Record Class BlockProperty
java.lang.Object
java.lang.Record
fr.fidorial.world.block.BlockProperty
- Record Components:
name- the property name, for instancefacingvalues- the accepted values, never empty
-
Constructor Summary
ConstructorsConstructorDescriptionBlockProperty(String name, List<String> values) Creates an instance of aBlockPropertyrecord class. -
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.intReturns the index of a value, or-1if it is not accepted.booleanReturnstrueif the value is accepted.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
BlockProperty
-
-
Method Details
-
indexOf
Returns the index of a value, or-1if it is not accepted.- Parameters:
value- the value- Returns:
- the index of a value, or
-1if it is not accepted - Since:
- 0.1.0
-
isValid
Returnstrueif the value is accepted.- Parameters:
value- the value- Returns:
trueif the value is accepted- Since:
- 0.1.0
-
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). -
name
-
values
-