Record Class Attribute<T>
java.lang.Object
java.lang.Record
fr.fidorial.world.environment.Attribute<T>
- Type Parameters:
T- the value type- Record Components:
value- the value, or the modifier argument whenmodifieris notModifier.OVERRIDEmodifier- how the value combines with the one already provided
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modifier()Returns the value of themodifierrecord component.static <T> Attribute<T> of(T value) Creates an attribute replacing whatever the dimension provided.static <T> Attribute<T> Creates an attribute deriving from whatever the dimension provided.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Attribute
-
-
Method Details
-
of
Creates an attribute replacing whatever the dimension provided.- Type Parameters:
T- the value type- Parameters:
value- the value- Returns:
- the attribute
-
of
@Contract(value="_, _ -> new", pure=true) public static <T> Attribute<T> of(T value, Modifier modifier) Creates an attribute deriving from whatever the dimension provided.- Type Parameters:
T- the value type- Parameters:
value- the modifier argumentmodifier- how to combine it- Returns:
- the attribute
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object). -
value
-
modifier
-