Class ObjectField


  • public class ObjectField
    extends BaseField
    Field holding a map of sub-fields.
    • Constructor Detail

      • ObjectField

        public ObjectField()
    • Method Detail

      • getListFields

        public LinkedHashMap<String,​ListField> getListFields()
        Retrieves all subfields from the fields map as a LinkedHashMap of ListField objects, keyed by their field names.
        Returns:
        a LinkedHashMap containing the field names as keys and their corresponding ListField instances as values (only includes fields that are list fields)
      • getObjectFields

        public LinkedHashMap<String,​ObjectField> getObjectFields()
        Retrieves all subfields from the fields map as a LinkedHashMap of ObjectField objects, keyed by their field names.
        Returns:
        a LinkedHashMap containing the field names as keys and their corresponding ObjectField objects as values
      • getSimpleField

        public SimpleField getSimpleField​(String fieldKey)
                                   throws IllegalStateException
        Retrieves a single sub-field from the fields map as a SimpleField.
        Parameters:
        fieldKey - the name/key of the field to retrieve
        Returns:
        the corresponding SimpleField, or null if fields is null or if no field exists for fieldKey (depending on fields' behavior)
        Throws:
        IllegalStateException - if the referenced field exists but is not of type SIMPLE_FIELD
      • getListField

        public ListField getListField​(String fieldKey)
        Retrieves a list sub-field from the fields map as a ListField.
        Parameters:
        fieldKey - the name/key of the field to retrieve
        Returns:
        the corresponding ListField, or null if fields is null or if no field exists for fieldKey (depending on fields' behavior)
        Throws:
        IllegalStateException - if the referenced field exists but is not of type LIST_FIELD
      • getObjectField

        public ObjectField getObjectField​(String fieldKey)
        Retrieves an object sub-field from the fields map as a ObjectField.
        Parameters:
        fieldKey - the name/key of the field to retrieve
        Returns:
        the corresponding ObjectField, or null if fields is null or if no field exists for fieldKey (depending on fields' behavior)
        Throws:
        IllegalStateException - if the referenced field exists but is not of type OBJECT_FIELD
      • toStringFromList

        public String toStringFromList()
      • getFields

        public InferenceFields getFields()
        Sub-fields keyed by their name.