Class StructureQueryConstraint.SimpleFilter

Object
SimpleFilter
All Implemented Interfaces:
StructureQueryConstraint.Sequence
Enclosing interface:
StructureQueryConstraint

public abstract static class StructureQueryConstraint.SimpleFilter extends Object implements StructureQueryConstraint.Sequence
A base implementation for a simple constraint that looks at one row at a time.
  • Constructor Details

  • Method Details

    • matches

      public abstract boolean matches(int index)
      Returns true if the row at the specified index matches the criteria.
      Parameters:
      index - index into the forest being searched
    • advance

      public boolean advance(StructureQueryConstraint.Acceptor acceptor)
      Description copied from interface: StructureQueryConstraint.Sequence
      Attempts to advance in this sequence by 0, 1 or more positions (i.e., attempts to find the next 0, 1 or more matching indices). Each position should be passed to acceptor through calls to acceptor.accept(index) or acceptor.accept(indices). Return value indicates whether this sequence is capable of producing values: false indicates the end of this sequence.
      Specified by:
      advance in interface StructureQueryConstraint.Sequence
      Parameters:
      acceptor - accepts members of this sequence
      Returns:
      false iff this sequence does not have any more values