Interface NamedListView<VIEWT>

Type Parameters:
VIEWT - Type for immutable snapshots of named list elements.
All Superinterfaces:
Iterable<VIEWT>
All Known Subinterfaces:
NamedListChange<VIEWT,CHANGET>

public interface NamedListView<VIEWT> extends Iterable<VIEWT>
View type for a NamedConfigurationTree. Represents an immutable snapshot of a named list configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(int index)
    Returns value located at the specified index.
    get(String key)
    Returns value associated with the passed key.
    get(UUID internalId)
    Returns value associated with the passed internal id.
    default boolean
    Returns the true if this list is empty.
    default Iterator<VIEWT>
     
    Returns an immutable collection of keys contained within this list.
    int
    Returns the number of elements in this list.
    Returns an ordered stream of values from the named list.

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Method Details

    • namedListKeys

      List<String> namedListKeys()
      Returns an immutable collection of keys contained within this list.
      Returns:
      Immutable collection of keys contained within this list.
    • get

      @Nullable VIEWT get(String key)
      Returns value associated with the passed key.
      Parameters:
      key - Key string.
      Returns:
      Requested value or null if it's not found.
    • get

      @Nullable VIEWT get(UUID internalId)
      Returns value associated with the passed internal id.
      Parameters:
      internalId - Internal id.
      Returns:
      Requested value or null if it's not found.
    • get

      VIEWT get(int index) throws IndexOutOfBoundsException
      Returns value located at the specified index.
      Parameters:
      index - Value index.
      Returns:
      Requested value.
      Throws:
      IndexOutOfBoundsException - If index is out of bounds.
    • size

      int size()
      Returns the number of elements in this list.
      Returns:
      Number of elements.
    • isEmpty

      default boolean isEmpty()
      Returns the true if this list is empty.
      Returns:
      true if this list is empty.
    • stream

      Stream<VIEWT> stream()
      Returns an ordered stream of values from the named list.
    • iterator

      default Iterator<VIEWT> iterator()
      Specified by:
      iterator in interface Iterable<VIEWT>