Class AbstractProperty<T>
java.lang.Object
com.sk89q.worldedit.registry.state.AbstractProperty<T>
- All Implemented Interfaces:
Property<T>
- Direct Known Subclasses:
BooleanProperty,DirectionalProperty,EnumProperty,IntegerProperty
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractProperty(String name, List<T> values) AbstractProperty(String name, List<T> values, int bitOffset) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintDeprecated.intDeprecated.intgetIndex(int state) getKey()Get thePropertyKeyassociated with this property.getName()Returns the name of this state.intDeprecated.getValue(int state) getValueFor(String string) Gets the value for the given string, or null.Return a list of available values for this state.inthashCode()intDeprecated.intmodifyIndex(int state, int index) voidInternal method for name setting post-deserialise.toString()abstract <C extends AbstractProperty<T>>
CwithOffset(int bitOffset) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.sk89q.worldedit.registry.state.Property
getIndex, getIndexFor, getRemap
-
Constructor Details
-
AbstractProperty
-
AbstractProperty
-
-
Method Details
-
getKey
Description copied from interface:PropertyGet thePropertyKeyassociated with this property. -
getNumBits
Deprecated. -
getBitOffset
Deprecated. -
getBitMask
Deprecated. -
withOffset
-
modify
Deprecated. -
modifyIndex
public int modifyIndex(int state, int index) -
getValue
-
getIndex
public int getIndex(int state) -
getValues
Description copied from interface:PropertyReturn a list of available values for this state. -
toString
-
hashCode
public int hashCode() -
getName
Description copied from interface:PropertyReturns the name of this state. -
getValueFor
Description copied from interface:PropertyGets the value for the given string, or null.- Specified by:
getValueForin interfaceProperty<T>- Parameters:
string- The string- Returns:
- The value, or null
- Throws:
IllegalArgumentException- When the value is invalid.
-
setName
Internal method for name setting post-deserialise. Do not use. -
equals
-