public class StateMappingHelper
Class StateMappingHelper. Provides statemappinghelper functionality for the Hytale server.
java.lang.Object > StateMappingHelper
Field Summary
mainStateMap
Field mainStateMap.
allMainStates
Field allMainStates.
subStateMap
Field subStateMap.
depth
Field depth.
currentParentState
Field currentParentState.
component
Field component.
hasStateEvaluator
Field hasStateEvaluator.
requiresStateEvaluator
Field requiresStateEvaluator.
defaultSubState
Field defaultSubState.
defaultComponentLocalState
Field defaultComponentLocalState.
defaultComponentLocalStateIndex
Field defaultComponentLocalStateIndex.
componentLocalStateAutoReset
Field componentLocalStateAutoReset.
componentImportStateMappings
Field componentImportStateMappings.
singletonDefaultStateMap
Field singletonDefaultStateMap.
helper
Field helper.
index
Field index.
subStateIndex
Field subStateIndex.
map
Field map.
state
Field state.
validator
Field validator.
resetValue
Field resetValue.
string
Field string.
iterator
Field iterator.
next
Field next.
stateIndexSource
Field stateIndexSource.
stateSensors
Field stateSensors.
stateSetters
Field stateSetters.
stateRequirers
Field stateRequirers.
Method Detail
StateMappingHelper
public
StateMappingHelper
()
Method StateMappingHelper.
getAllMainStates
int[]
getAllMainStates
()
Method getAllMainStates.
getHighestSubStateIndex
int
getHighestSubStateIndex
(final int mainStateIndex)
Method getHighestSubStateIndex.
- Parameters:
final intmainStateIndex
getAndPutSensorIndex
void
getAndPutSensorIndex
(final String state, final String subState, @Nonnull final BiConsumer setter)
Method getAndPutSensorIndex.
- Parameters:
final Stringstatefinal StringsubState@Nonnull final BiConsumersetter
StateDepth
new
StateDepth
(this.depth, state)
Method StateDepth.
- Parameters:
this.depththis.depthstatestate
getAndPutSetterIndex
void
getAndPutSetterIndex
(final String state, final String subState, @Nonnull final BiConsumer setter)
Method getAndPutSetterIndex.
- Parameters:
final Stringstatefinal StringsubState@Nonnull final BiConsumersetter
getAndPutStateRequirerIndex
void
getAndPutStateRequirerIndex
(final String state, final String subState, @Nonnull final BiConsumer setter)
Method getAndPutStateRequirerIndex.
- Parameters:
final Stringstatefinal StringsubState@Nonnull final BiConsumersetter
getAndPutIndex
void
getAndPutIndex
(final String state, @Nullable final String subState, @Nonnull final BiConsumer setter, @Nonnull final Function mainStateFunction, @Nonnull final BiFunction subStateFunction)
Method getAndPutIndex.
- Parameters:
final Stringstate@Nullable final StringsubState@Nonnull final BiConsumersetter@Nonnull final FunctionmainStateFunction@Nonnull final BiFunctionsubStateFunction
initialiseDefaultSubStates
IStateMap
initialiseDefaultSubStates
(final int index)
Method initialiseDefaultSubStates.
- Parameters:
final intindex
validate
void
validate
(final String configName, @Nonnull final List errors)
Method validate.
- Parameters:
final StringconfigName@Nonnull final Listerrors
getStateIndex
int
getStateIndex
(final String state)
Method getStateIndex.
- Parameters:
final Stringstate
getSubStateIndex
int
getSubStateIndex
(final int index, final String subState)
Method getSubStateIndex.
- Parameters:
final intindexfinal StringsubState
getStateName
String
getStateName
(final int index)
Method getStateName.
- Parameters:
final intindex
getSubStateName
String
getSubStateName
(final int index, final int subState)
Method getSubStateName.
- Parameters:
final intindexfinal intsubState
getCurrentParentState
String
getCurrentParentState
()
Method getCurrentParentState.
increaseDepth
void
increaseDepth
()
Method increaseDepth.
decreaseDepth
void
decreaseDepth
()
Method decreaseDepth.
setDefaultSubState
void
setDefaultSubState
(final String subState)
Method setDefaultSubState.
- Parameters:
final StringsubState
getDefaultSubState
String
getDefaultSubState
()
Method getDefaultSubState.
setNotComponent
void
setNotComponent
()
Method setNotComponent.
isComponent
boolean
isComponent
()
Method isComponent.
hasComponentStates
boolean
hasComponentStates
()
Method hasComponentStates.
initialiseComponentState
Method initialiseComponentState.
- Parameters:
@Nonnull final BuilderSupportsupport
readComponentDefaultLocalState
void
readComponentDefaultLocalState
(@Nonnull final JsonObject data)
Method readComponentDefaultLocalState.
- Parameters:
@Nonnull final JsonObjectdata
IllegalStateException
new
IllegalStateException
(validator.errorMessage(state)
Method IllegalStateException.
- Parameters:
validator.errorMessage(statevalidator.errorMessage(state
hasDefaultLocalState
boolean
hasDefaultLocalState
()
Method hasDefaultLocalState.
getDefaultLocalState
String
getDefaultLocalState
()
Method getDefaultLocalState.
setComponentImportStateMappings
void
setComponentImportStateMappings
(@Nonnull final JsonArray states)
Method setComponentImportStateMappings.
- Parameters:
@Nonnull final JsonArraystates
getComponentImportStateIndex
int
getComponentImportStateIndex
(final String state)
Method getComponentImportStateIndex.
- Parameters:
final Stringstate
importedStateCount
int
importedStateCount
()
Method importedStateCount.
setRequiresStateEvaluator
void
setRequiresStateEvaluator
()
Method setRequiresStateEvaluator.
setHasStateEvaluator
void
setHasStateEvaluator
()
Method setHasStateEvaluator.
optimise
void
optimise
()
Method optimise.
getOrCreateIndex
int
getOrCreateIndex
(final String name)
Method getOrCreateIndex.
- Parameters:
final Stringname
getAndPutRequirerIndex
int
getAndPutRequirerIndex
(final String targetState)
Method getAndPutRequirerIndex.
- Parameters:
final StringtargetState
isEmpty
boolean
isEmpty
()
Method isEmpty.
size
int
size
()
Method size.