Class DatabaseIndexUnitFinder

java.lang.Object
generalDatabase.DatabaseIndexUnitFinder
All Implemented Interfaces:
DataUnitMatcher

public class DatabaseIndexUnitFinder extends Object implements DataUnitMatcher
Works with a DataUnitFinder to match PamDataUnits by database index. Can be used with one or two input arguments. The first is the index searched for, the second is boolean and if it's true, will require that the index is > 0.
Author:
Doug Gillespie
  • Constructor Details

    • DatabaseIndexUnitFinder

      public DatabaseIndexUnitFinder()
  • Method Details

    • match

      public int match(PamDataUnit dataUnit, Object... criteria)
      Description copied from interface: DataUnitMatcher
      Return an int, so we can see if we should move forwrard of back. Similar behaviour to a Java Comparator, where >0 means that the criteria are greater than the dataUnit, probably meaning we're too far into the list, so should back up, invalid input: '<'= meaning we're not far enough, and 0 meaning a match.
      Specified by:
      match in interface DataUnitMatcher
      Returns: