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 Summary
Modifier and TypeMethodDescriptionfindFieldForName(String fieldName) Find a field for its name.<T extends JBBPAbstractField>
TfindFieldForNameAndType(String fieldName, Class<T> fieldType) Find a field for its name and type pair.findFieldForPath(String fieldPath) Find a field for its path.<T extends JBBPAbstractField>
TfindFieldForPathAndType(String fieldPath, Class<T> fieldType) Find a field for its path and type pair.<T extends JBBPAbstractField>
TfindFieldForType(Class<T> fieldType) Find unique field for defined class.<T extends JBBPAbstractField>
TfindFirstFieldForType(Class<T> fieldType) Find the first met field for defined class.<T extends JBBPAbstractField>
TfindLastFieldForType(Class<T> fieldType) Find the last met field for defined class.booleannameExists(String fieldName) Check that a field exists for a namebooleanpathExists(String fieldPath) Check that a file exists for path
-
Method Details
-
findFirstFieldForType
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
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
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
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 nullfieldType- the field class for search, must not be null- Returns:
- found field or null
-
findFieldForPathAndType
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 nullfieldType- the field class for search, must not be null- Returns:
- found field or null
-
findFieldForName
Find a field for its name.- Parameters:
fieldName- the field name for search, it must not be null- Returns:
- found field or null
-
findFieldForPath
Find a field for its path.- Parameters:
fieldPath- the field path for search, it must not be null- Returns:
- found field or null
-
nameExists
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
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
-