Class Reading.Initializer

java.lang.Object
eu.bandm.tools.ramus.ogma.Reading.Initializer
Enclosing class:
Reading<D,T,A>

public static class Reading.Initializer extends Object
A safe map of keys to initial values.

Operations guard against type errors, null references, and overwriting of entries.

  • Constructor Details

    • Initializer

      public Initializer()
      Creates a new empty instance.
  • Method Details

    • add

      public <A> void add(Reading.Key<A> key, A value)
      Associates a key with a value.
      Type Parameters:
      A - the value type
      Parameters:
      key - the key
      value - the value
      Throws:
      NullPointerException - if key or value is null
      IllegalStateException - if key is already associated with a value