Class DOMDataTreePrefixTable<V>

java.lang.Object
org.opendaylight.mdsal.dom.spi.DOMDataTreePrefixTable<V>
Type Parameters:
V - Value type

@Beta public final class DOMDataTreePrefixTable<V> extends Object
Prefix table indexed by DOMDataTreeIdentifier. Stores values in tree and provides lookup of closest ancestor. This class is not thread-safe.
  • Method Details

    • create

      public static <V> DOMDataTreePrefixTable<V> create()
    • lookup

      public @Nullable DOMDataTreePrefixTableEntry<V> lookup(@NonNull DOMDataTreeIdentifier prefix)
      Lookups entry by provided DOMDataTreeIdentifier, if entry is not present returns closest non-null entry towards root or null if no entry towards root exists.
      Parameters:
      prefix - Prefix for lookup
      Returns:
      closest non-null entry towards root or null if no entry towards root exists.
    • store

      public void store(@NonNull DOMDataTreeIdentifier prefix, @NonNull V value)
      Stores value associated to the prefix.
      Parameters:
      prefix - DOM prefix of value
      value - Value to be stored
      Throws:
      IllegalStateException - If value is already stored for provided prefix
    • remove

      public void remove(@NonNull DOMDataTreeIdentifier prefix)
      Removes value associated to the prefix. Value is removed only and only if full prefix match for stored value. Removal of prefix does not remove child prefixes.
      Parameters:
      prefix - to be removed