Class MatchingFrame
java.lang.Object
tools.refinery.interpreter.matchers.tuple.AbstractTuple
tools.refinery.interpreter.matchers.tuple.VolatileTuple
tools.refinery.interpreter.localsearch.MatchingFrame
- All Implemented Interfaces:
IModifiableTuple
,ITuple
A MatchingFrame is a Volatile Tuple implementation used by the local search engine internally.
-
Constructor Summary
ConstructorsConstructorDescriptionMatchingFrame
(int frameSize) MatchingFrame
(MatchingFrame other) Creates a copy of another matching frame; the two frames can be updated separately -
Method Summary
Methods inherited from class tools.refinery.interpreter.matchers.tuple.VolatileTuple
equals, hashCode, toImmutable
Methods inherited from class tools.refinery.interpreter.matchers.tuple.AbstractTuple
doCalcHash, getDistinctElements, internalEquals, invertIndex, invertIndexWithMupliplicity, raiseIndexingError
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface tools.refinery.interpreter.matchers.tuple.ITuple
getDistinctElements, invertIndex, invertIndexWithMupliplicity, toImmutable
-
Constructor Details
-
MatchingFrame
public MatchingFrame(int frameSize) - Since:
- 1.7
-
MatchingFrame
Creates a copy of another matching frame; the two frames can be updated separately- Parameters:
other
-- Since:
- 1.7
-
-
Method Details
-
getValue
Returns the value stored inside the matching frame.- Parameters:
position
-- Returns:
- the element stored in the selected position in the frame, or null if it is not yet set
- Throws:
IndexOutOfBoundsException
- if position is negativeIllegalArgumentException
- if the position is larger then the length of the frame
-
setValue
Sets the value of the variable at the given position. For internal use in LS matching only.- Parameters:
position
- the position of the variable within the framevalue
- the value to be set for the variable
-
testAndSetValue
-
toString
- Overrides:
toString
in classAbstractTuple
-
getSize
public int getSize() -
get
-
getElements
- Specified by:
getElements
in interfaceITuple
- Overrides:
getElements
in classAbstractTuple
-
set
- Specified by:
set
in interfaceIModifiableTuple
-