Interface Reference


public interface Reference
A reference that uniquely identifies or addresses as specific Container.

References are generic in nature, treating the field names and values as strings. While names are expected to be case-insensitive, no other requirements are in place regarding their types and ordering. When such additional requirements are desired, the reference should be used with and validated by a Schema.

  • Method Summary

    Modifier and Type
    Method
    Description
    default Reference
    extend(String name, String value)
    Extends this reference, adding or overwriting one field with a new value.
    Returns the fields defined by this reference.
    get(String field)
    Returns the value associated with the given field.
    static Reference
    of(TypedProperties properties)
    Constructs a reference with all the keys and values contained in a TypedProperties.
  • Method Details

    • fields

      Set<String> fields()
      Returns the fields defined by this reference.
      Returns:
      the field names
    • get

      String get(String field)
      Returns the value associated with the given field.
      Parameters:
      field - the field name
      Returns:
      the value associated with the field
    • extend

      default Reference extend(String name, String value)
      Extends this reference, adding or overwriting one field with a new value.
      Parameters:
      name - the field name
      value - the new value
      Returns:
      a new reference with this modification
    • of

      static Reference of(TypedProperties properties)
      Constructs a reference with all the keys and values contained in a TypedProperties.
      Parameters:
      properties - the typed properties object
      Returns:
      a new reference based on the keys and values in the properties