Interface IExpressionTypeState
-
- All Known Implementing Classes:
PromiseVariableTreeTypeState
,PromiseVariableTreeTypeStateWithSubStates
,ThreadSafeVariableTreeTypeState
,VariableTreeTypeState
,VariableTreeTypeStateWithSubStates
,VariableTypeState
public interface IExpressionTypeState
Describe state of expression.
Each state corresponding to change type of expression.
Also we can say, that state is a node of graph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChildState(IExpressionTypeState childState)
Add new child state.void
addExpressionRelatedTypes(Expression baseExpression, Collection<? extends TypeItem> types)
Adds types to state.void
addType(TypeItem type)
Add type to statevoid
addTypes(VariableTypeState state)
Add type to state from another statevoid
addTypes(Collection<? extends TypeItem> types)
Add types to stateIterable<IExpressionTypeState>
getChildState()
Gets children states for current stateEnvironments
getEnvironments()
Gets correspondingEnvironment
for current stateIExpressionTypeState
getParentState()
Gets state that was before current stateIterable<TypeItem>
getTypes()
Gets all types associated with this stateint
getTypesSize()
Gets type's list sizeboolean
hasTypes()
Checks that state has assosiated typesvoid
setParentState(IExpressionTypeState parentState)
Sets state that was before current state.
-
-
-
Method Detail
-
getEnvironments
Environments getEnvironments()
Gets correspondingEnvironment
for current state- Returns:
Environments
, nevernull
-
getTypes
Iterable<TypeItem> getTypes()
Gets all types associated with this state- Returns:
- list of
TypeItem
-
hasTypes
boolean hasTypes()
Checks that state has assosiated types- Returns:
true
if there are assosiated types in state,false
otherwise
-
addType
void addType(TypeItem type)
Add type to state- Parameters:
type
- addingTypeItem
, can't benull
-
addTypes
void addTypes(Collection<? extends TypeItem> types)
Add types to state- Parameters:
types
- addingTypeItem
s, can't benull
-
addExpressionRelatedTypes
void addExpressionRelatedTypes(Expression baseExpression, Collection<? extends TypeItem> types)
Adds types to state. Method removes old types related tobaseExpression
and add new related types- Parameters:
baseExpression
-Expression
which provides adding types, cannot benull
types
- settingTypeItem
s, cannot benull
-
addTypes
void addTypes(VariableTypeState state)
Add type to state from another state- Parameters:
state
-VariableTypeState
for adding types, can't benull
-
getTypesSize
int getTypesSize()
Gets type's list size- Returns:
- count of types in
VariableTypeState
-
getParentState
IExpressionTypeState getParentState()
Gets state that was before current state- Returns:
- parent state
-
setParentState
void setParentState(IExpressionTypeState parentState)
Sets state that was before current state.
Remark that inaddChildState(IExpressionTypeState)
parent state set automatically- Parameters:
parentState
- parent state
-
getChildState
Iterable<IExpressionTypeState> getChildState()
Gets children states for current state- Returns:
- list of
IExpressionTypeState
-
addChildState
void addChildState(IExpressionTypeState childState)
Add new child state.
Remarks that current state will be parent state forchildState
- Parameters:
childState
- new child
-
-