Class VariableTypeStateProvider.InnerProvider
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.model.typesytem.VariableTypeStateProvider.InnerProvider
-
- Enclosing class:
- VariableTypeStateProvider
protected static class VariableTypeStateProvider.InnerProvider extends Object
Provider ofVariableTypeState
. Contains set ofVariableTypeState
and also has some useful method for filtering containingVariableTypeState
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
InnerProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addState(VariableTypeState state)
Adds newVariableTypeStateProvider
to providervoid
clear()
Deletes all states from providervoid
copyLastState(int newOffset)
Copies thegetLastState()
state and change its offsetvoid
copyNearestState(int offset, int newOffset)
Copies thegetNearestByOffset(int)
state and change its offsetList<VariableTypeState>
getAll()
Gets all states from providerVariableTypeState
getLastState()
Gets the state with the highest value ofVariableTypeState.getOffset()
VariableTypeState
getLastStateBetween(int begin, int end)
VariableTypeState
getNearestByOffset(int offset)
Gets the state with the nearest value ofVariableTypeState.getOffset()
tooffset
boolean
isEmptyState()
Checks that there is no states in provider or if there is one state in provider without computing typesvoid
sort()
Sorts all containingVariableTypeState
byVariableTypeState.getOffset()
-
-
-
Method Detail
-
addState
public void addState(VariableTypeState state)
Adds newVariableTypeStateProvider
to provider- Parameters:
state
- adding newVariableTypeStateProvider
, can't benull
-
sort
public void sort()
Sorts all containingVariableTypeState
byVariableTypeState.getOffset()
-
getLastState
public VariableTypeState getLastState()
Gets the state with the highest value ofVariableTypeState.getOffset()
- Returns:
- the state with the highest value of
VariableTypeState.getOffset()
, can benull
if there is no state in provider
-
getNearestByOffset
public VariableTypeState getNearestByOffset(int offset)
Gets the state with the nearest value ofVariableTypeState.getOffset()
tooffset
- Parameters:
offset
- offset for finding the nearestVariableTypeState
byVariableTypeState.getOffset()
- Returns:
- the state with the nearest value of
VariableTypeState.getOffset()
tooffset
, can benull
if there is no state in provider
-
getLastStateBetween
public VariableTypeState getLastStateBetween(int begin, int end)
- Parameters:
begin
- left border of range for getting stateend
- right border of range for getting state- Returns:
- the state with the highest value of
VariableTypeState.getOffset()
betweenbegin
andend
, can benull
if there is no state in provider
-
clear
public void clear()
Deletes all states from provider
-
isEmptyState
public boolean isEmptyState()
Checks that there is no states in provider or if there is one state in provider without computing types- Returns:
true
if there is no states in provider or if there is one state in provider without computing types,false
otherwise
-
copyLastState
public void copyLastState(int newOffset)
Copies thegetLastState()
state and change its offset- Parameters:
newOffset
- new value of offset for copying value
-
copyNearestState
public void copyNearestState(int offset, int newOffset)
Copies thegetNearestByOffset(int)
state and change its offset- Parameters:
newOffset
- new value of offset for copying value
-
getAll
public List<VariableTypeState> getAll()
Gets all states from provider- Returns:
- all states from provider, never
null
-
-