Class SimpleNameValue<V>

Object
SimpleNameValue<V>
Type Parameters:
V - value-type
All Implemented Interfaces:
NameValue<V>

public final class SimpleNameValue<V> extends Object implements NameValue<V>
A simple container expressing a name-value pair.
Author:
Owen Feehan
  • Constructor Details

    • SimpleNameValue

      public SimpleNameValue(String name, V value)
      Creates a new SimpleNameValue instance.
      Parameters:
      name - The associated name.
      value - The associated value.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: NameValue
      The associated name.
      Specified by:
      getName in interface NameValue<V>
      Returns:
      the name
    • setName

      public void setName(String name)
      Description copied from interface: NameValue
      Assigns the associated name.
      Specified by:
      setName in interface NameValue<V>
      Parameters:
      name - name to assign
    • getValue

      public V getValue()
      Description copied from interface: NameValue
      The associated value.
      Specified by:
      getValue in interface NameValue<V>
      Returns:
      the value
    • setValue

      public void setValue(V value)
      Description copied from interface: NameValue
      Assigns the associated value.
      Specified by:
      setValue in interface NameValue<V>
      Parameters:
      value - value to assign