Interface JBBPFieldFinder

All Known Implementing Classes:
JBBPFieldStruct, JBBPNamedNumericFieldMap

public interface JBBPFieldFinder
The Interface describes a class which can provide search for its inside field storage.
Since:
1.0
  • Method Details

    • findFirstFieldForType

      <T extends JBBPAbstractField> T findFirstFieldForType(Class<T> fieldType)
      Find the first met field for defined class. Field should be exactly instance of the class, not a successor.
      Type Parameters:
      T - the class of the field
      Parameters:
      fieldType - the field class for search
      Returns:
      found field or null
    • findLastFieldForType

      <T extends JBBPAbstractField> T findLastFieldForType(Class<T> fieldType)
      Find the last met field for defined class. Field should be exactly instance of the class, not a successor.
      Type Parameters:
      T - the class of the field
      Parameters:
      fieldType - the field class for search, must not be null
      Returns:
      found field or null
    • findFieldForType

      <T extends JBBPAbstractField> T findFieldForType(Class<T> fieldType)
      Find unique field for defined class. Field should be exactly instance of the class and the field must be only one or not be presented else an exception will be thrown.
      Type Parameters:
      T - the class of the field
      Parameters:
      fieldType - the field class for search, must not be null
      Returns:
      found field or null
    • findFieldForNameAndType

      <T extends JBBPAbstractField> T findFieldForNameAndType(String fieldName, Class<T> fieldType)
      Find a field for its name and type pair.
      Type Parameters:
      T - the class of the field
      Parameters:
      fieldName - the field name for search, must not be null
      fieldType - the field class for search, must not be null
      Returns:
      found field or null
    • findFieldForPathAndType

      <T extends JBBPAbstractField> T findFieldForPathAndType(String fieldPath, Class<T> fieldType)
      Find a field for its path and type pair.
      Type Parameters:
      T - the class of the field
      Parameters:
      fieldPath - the field path for search, must not be null
      fieldType - the field class for search, must not be null
      Returns:
      found field or null
    • findFieldForName

      JBBPAbstractField findFieldForName(String fieldName)
      Find a field for its name.
      Parameters:
      fieldName - the field name for search, it must not be null
      Returns:
      found field or null
    • findFieldForPath

      JBBPAbstractField findFieldForPath(String fieldPath)
      Find a field for its path.
      Parameters:
      fieldPath - the field path for search, it must not be null
      Returns:
      found field or null
    • nameExists

      boolean nameExists(String fieldName)
      Check that a field exists for a name
      Parameters:
      fieldName - a field name to check, it must not be null
      Returns:
      true if the field exists, false otherwise
    • pathExists

      boolean pathExists(String fieldPath)
      Check that a file exists for path
      Parameters:
      fieldPath - a field path to check, it must not be null
      Returns:
      true if the field exists, false otherwise