public abstract class StateHolder<O,S> extends java.lang.Object implements IStateHolder<S>
Modifier and Type | Field and Description |
---|---|
private static java.util.function.Function<java.util.Map.Entry<IProperty<?>,java.lang.Comparable<?>>,java.lang.String> |
MAP_ENTRY_TO_STRING |
protected O |
object |
private com.google.common.collect.ImmutableMap<IProperty<?>,java.lang.Comparable<?>> |
properties |
private com.google.common.collect.Table<IProperty<?>,java.lang.Comparable<?>,S> |
propertyToStateMap |
field_215672_b
Modifier | Constructor and Description |
---|---|
protected |
StateHolder(O objectIn,
com.google.common.collect.ImmutableMap<IProperty<?>,java.lang.Comparable<?>> propertiesIn) |
Modifier and Type | Method and Description |
---|---|
void |
buildPropertyValueTable(java.util.Map<java.util.Map<IProperty<?>,java.lang.Comparable<?>>,S> map) |
<T extends java.lang.Comparable<T>> |
cycle(IProperty<T> property) |
protected static <T> T |
cyclePropertyValue(java.util.Collection<T> values,
T currentValue) |
<T extends java.lang.Comparable<T>> |
get(IProperty<T> property) |
java.util.Collection<IProperty<?>> |
getProperties() |
private java.util.Map<IProperty<?>,java.lang.Comparable<?>> |
getPropertiesWithValue(IProperty<?> property,
java.lang.Comparable<?> value) |
com.google.common.collect.ImmutableMap<IProperty<?>,java.lang.Comparable<?>> |
getValues() |
<T extends java.lang.Comparable<T>> |
has(IProperty<T> property) |
java.lang.String |
toString() |
<T extends java.lang.Comparable<T>,V extends T> |
with(IProperty<T> property,
V value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, withString
private static final java.util.function.Function<java.util.Map.Entry<IProperty<?>,java.lang.Comparable<?>>,java.lang.String> MAP_ENTRY_TO_STRING
protected final O object
private final com.google.common.collect.ImmutableMap<IProperty<?>,java.lang.Comparable<?>> properties
protected static <T> T cyclePropertyValue(java.util.Collection<T> values, T currentValue)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Collection<IProperty<?>> getProperties()
public <T extends java.lang.Comparable<T>> boolean has(IProperty<T> property)
public <T extends java.lang.Comparable<T>> T get(IProperty<T> property)
get
in interface IStateHolder<S>
public <T extends java.lang.Comparable<T>,V extends T> S with(IProperty<T> property, V value)
with
in interface IStateHolder<S>
public void buildPropertyValueTable(java.util.Map<java.util.Map<IProperty<?>,java.lang.Comparable<?>>,S> map)
private java.util.Map<IProperty<?>,java.lang.Comparable<?>> getPropertiesWithValue(IProperty<?> property, java.lang.Comparable<?> value)
public com.google.common.collect.ImmutableMap<IProperty<?>,java.lang.Comparable<?>> getValues()
getValues
in interface IStateHolder<S>