Package net.nullved.pmweatherapi.util
Record Class ColorMap.LerpSegment
java.lang.Object
java.lang.Record
net.nullved.pmweatherapi.util.ColorMap.LerpSegment
- Record Components:
start- The starting valuefrom- The startingColorend- The ending valueto- The endingColor
- Enclosing class:
ColorMap
public static record ColorMap.LerpSegment(float start, Color from, float end, Color to)
extends Record
Represents a Lerp Segment
- Since:
- 0.14.15.6
-
Constructor Summary
ConstructorsConstructorDescriptionLerpSegment(float start, Color from, float end, Color to) Creates an instance of aLerpSegmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.floatstart()Returns the value of thestartrecord component.to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
start
public float start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
end
public float end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-