Class EnumProperty
java.lang.Object
com.sk89q.worldedit.registry.state.AbstractProperty<String>
com.sk89q.worldedit.registry.state.EnumProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getIndexFor
(CharSequence string) Get the index of the given value in the list of valuesgetValueFor
(String string) Gets the value for the given string, or null.withOffset
(int bitOffset) Methods inherited from class com.sk89q.worldedit.registry.state.AbstractProperty
equals, getBitMask, getBitOffset, getIndex, getKey, getName, getNumBits, getValue, getValues, hashCode, modify, modifyIndex, setName, toString
-
Constructor Details
-
EnumProperty
-
-
Method Details
-
withOffset
- Specified by:
withOffset
in classAbstractProperty<String>
-
getIndexFor
Description copied from interface:Property
Get the index of the given value in the list of values- Parameters:
string
- value to get index for- Throws:
IllegalArgumentException
- if value not applicable to this property
-
getValueFor
Description copied from interface:Property
Gets the value for the given string, or null.- Specified by:
getValueFor
in interfaceProperty<String>
- Overrides:
getValueFor
in classAbstractProperty<String>
- Parameters:
string
- The string- Returns:
- The value, or null
-