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
ConstructorDescriptionAbstractProperty
(String name, List<T> values) AbstractProperty
(String name, List<T> values, int bitOffset) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Deprecated.int
Deprecated.int
getIndex
(int state) getKey()
Get thePropertyKey
associated with this property.getName()
Returns the name of this state.int
Deprecated.getValue
(int state) getValueFor
(String string) Gets the value for the given string, or null.Return a list of available values for this state.int
hashCode()
int
Deprecated.int
modifyIndex
(int state, int index) void
Internal 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, wait
Methods inherited from interface com.sk89q.worldedit.registry.state.Property
getIndex, getIndexFor, getRemap
-
Constructor Details
-
AbstractProperty
-
AbstractProperty
-
-
Method Details
-
getKey
Description copied from interface:Property
Get thePropertyKey
associated 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:Property
Return a list of available values for this state. -
toString
-
hashCode
public int hashCode() -
getName
Description copied from interface:Property
Returns the name of this state. -
getValueFor
Description copied from interface:Property
Gets the value for the given string, or null.- Specified by:
getValueFor
in 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
-