Package org.jjazz.pianoroll.api
Record Class ZoomValue
java.lang.Object
java.lang.Record
org.jjazz.pianoroll.api.ZoomValue
Zoom value for an editor.
hValue and vValue must be in the range [0;100].
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.getCopy
(int hDelta, int vDelta) Get a copy with the specified parameters added to the existing hValue and vValue.getHCopy
(int newHValue) Get a copy of this instance with hValue changed.getVCopy
(int newVValue) Get a copy of this instance with vValue changed.final int
hashCode()
Returns a hash code value for this object.int
hValue()
Returns the value of thehValue
record component.static ZoomValue
Get a ZoomValue instance from the specified string.Save the object as a string.final String
toString()
Returns a string representation of this record class.int
vValue()
Returns the value of thevValue
record component.
-
Constructor Details
-
ZoomValue
public ZoomValue()Create a zoom value with 50 / 50. -
ZoomValue
public ZoomValue(int hValue, int vValue) Creates an instance of aZoomValue
record class.- Parameters:
hValue
- the value for thehValue
record componentvValue
- the value for thevValue
record component
-
-
Method Details
-
getHCopy
Get a copy of this instance with hValue changed.- Parameters:
newHValue
-- Returns:
-
getVCopy
Get a copy of this instance with vValue changed.- Parameters:
newVValue
-- Returns:
-
getCopy
Get a copy with the specified parameters added to the existing hValue and vValue.- Parameters:
hDelta
-vDelta
-- Returns:
-
saveAsString
Save the object as a string.- Returns:
- See Also:
-
loadFromString
Get a ZoomValue instance from the specified string.- Parameters:
s
-- Returns:
- See Also:
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
hValue
public int hValue()Returns the value of thehValue
record component.- Returns:
- the value of the
hValue
record component
-
vValue
public int vValue()Returns the value of thevValue
record component.- Returns:
- the value of the
vValue
record component
-