Class MatchingFrame

All Implemented Interfaces:
IModifiableTuple, ITuple

public class MatchingFrame extends VolatileTuple implements IModifiableTuple
A MatchingFrame is a Volatile Tuple implementation used by the local search engine internally.
  • Constructor Details

    • MatchingFrame

      public MatchingFrame(int frameSize)
      Since:
      1.7
    • MatchingFrame

      public MatchingFrame(MatchingFrame other)
      Creates a copy of another matching frame; the two frames can be updated separately
      Parameters:
      other -
      Since:
      1.7
  • Method Details

    • getValue

      public Object getValue(int position)
      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 negative
      IllegalArgumentException - if the position is larger then the length of the frame
    • setValue

      public void setValue(int position, Object value)
      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 frame
      value - the value to be set for the variable
    • testAndSetValue

      public boolean testAndSetValue(Integer position, Object value)
    • toString

      public String toString()
      Overrides:
      toString in class AbstractTuple
    • getSize

      public int getSize()
      Specified by:
      getSize in interface ITuple
    • get

      public Object get(int index)
      Specified by:
      get in interface ITuple
    • getElements

      public Object[] getElements()
      Specified by:
      getElements in interface ITuple
      Overrides:
      getElements in class AbstractTuple
    • set

      public void set(int index, Object value)
      Specified by:
      set in interface IModifiableTuple