Interface FieldLocationPredicate

All Superinterfaces:
Predicate<FieldLocation>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FieldLocationPredicate extends Predicate<FieldLocation>
A functional interface for predicates that test FieldLocation instances. Provides factory methods for common field location matching scenarios such as:
  • Matching fields by position (odd/even row or column index)
  • Matching fields by name or index
  • Matching fields by value or type
See Also:
  • Method Details

    • nullToAll

      static FieldLocationPredicate nullToAll(FieldLocationPredicate predicate)
      Returns the given predicate if not null, otherwise returns a predicate that matches all locations.
      Parameters:
      predicate - the predicate to check, may be null
      Returns:
      the predicate if not null, otherwise all()
    • all

      static FieldLocationPredicate all()
      Returns a predicate that matches all field locations.
      Returns:
      a predicate that always returns true
    • oddRowIndex

      static FieldLocationPredicate oddRowIndex()
      Returns a predicate that matches field locations with odd row indexes. Row indexes are one-based for this check (i.e., row 1, 3, 5, etc.).
      Returns:
      a predicate that matches odd row indexes
    • evenRowIndex

      static FieldLocationPredicate evenRowIndex()
      Returns a predicate that matches field locations with even row indexes. Row indexes are one-based for this check (i.e., row 0, 2, 4, 6, etc.).
      Returns:
      a predicate that matches even row indexes
    • oddFieldIndex

      static FieldLocationPredicate oddFieldIndex()
      Returns a predicate that matches field locations with odd field indexes (columns). Field indexes are one-based for this check (i.e., column 1, 3, 5, etc.).
      Returns:
      a predicate that matches odd field indexes
    • evenFieldIndex

      static FieldLocationPredicate evenFieldIndex()
      Returns a predicate that matches field locations with even field indexes (columns). Field indexes are one-based for this check (i.e., column 0, 2, 4, 6, etc.).
      Returns:
      a predicate that matches even field indexes
    • fieldNames

      static FieldLocationPredicate fieldNames(String... fieldNames)
      Returns a predicate that matches field locations where the field name is one of the specified names.
      Parameters:
      fieldNames - the field names to match
      Returns:
      a predicate that matches the specified field names
    • fieldIndexes

      static FieldLocationPredicate fieldIndexes(int... fieldIndexes)
      Returns a predicate that matches field locations where the field index is one of the specified indexes.
      Parameters:
      fieldIndexes - the field indexes to match
      Returns:
      a predicate that matches the specified field indexes
    • negativeNumber

      static FieldLocationPredicate negativeNumber()
      Returns a predicate that matches field locations where the field value is a negative number. Supports INT, LONG, BYTE, SHORT, DOUBLE, FLOAT, BIG_DECIMAL, and BIG_INTEGER field types.
      Returns:
      a predicate that matches negative numeric field values
    • fieldEquals

      static FieldLocationPredicate fieldEquals(String fieldName, Object value)
      Returns a predicate that matches field locations where the specified field in the record equals the given value.
      Parameters:
      fieldName - the name of the field to check
      value - the value to match
      Returns:
      a predicate that matches when the specified field equals the value
    • fieldEquals

      static FieldLocationPredicate fieldEquals(Object value)
      Returns a predicate that matches field locations where the field value equals the given value.
      Parameters:
      value - the value to match
      Returns:
      a predicate that matches when the field value equals the given value
    • fieldTypeEquals

      static FieldLocationPredicate fieldTypeEquals(FieldType fieldType)
      Returns a predicate that matches field locations where the field type equals the specified field type.
      Parameters:
      fieldType - the field type to match
      Returns:
      a predicate that matches when the field type equals the specified type