Class MatchingFrame

    • Constructor Detail

      • 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 Detail

      • getValue

        public java.lang.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:
        java.lang.IndexOutOfBoundsException - if position is negative
        java.lang.IllegalArgumentException - if the position is larger then the length of the frame
      • setValue

        public void setValue​(int position,
                             java.lang.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​(java.lang.Integer position,
                                       java.lang.Object value)
      • getSize

        public int getSize()
        Specified by:
        getSize in interface ITuple
        Returns:
        number of elements
      • get

        public java.lang.Object get​(int index)
        Specified by:
        get in interface ITuple
        Returns:
        the element at the specified index
      • getElements

        public java.lang.Object[] getElements()
        Description copied from class: AbstractTuple
        As the tuple is supposed to be immutable, do not modify the returned array.
        Specified by:
        getElements in interface ITuple
        Overrides:
        getElements in class AbstractTuple
        Returns:
        the array containing all elements of this Tuple
      • set

        public void set​(int index,
                        java.lang.Object value)
        Description copied from interface: IModifiableTuple
        Sets the selected value for a tuple
        Specified by:
        set in interface IModifiableTuple