Class AbstractConfiguration.Primitive

java.lang.Object
net.jini.config.AbstractConfiguration.Primitive
Enclosing class:
AbstractConfiguration

public static final class AbstractConfiguration.Primitive extends Object
Represents the value of an entry with a primitive type. Subclasses of AbstractConfiguration that contain primitive entries should return instances of this class from their getEntryInternal methods.
Since:
2.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an object that represents a primitive value of the type associated with the specified primitive wrapper object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if the argument is a Primitive for which the result of calling getValue is the same as the value for this instance, otherwise false.
    Returns the primitive type of the value associated with this object.
    Returns the primitive value associated with this object, represented as a primitive wrapper instance.
    int
    Returns a hash code value for this object.
    Returns a string representation of this object.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Primitive

      public Primitive(Object value)
      Creates an object that represents a primitive value of the type associated with the specified primitive wrapper object.
      Parameters:
      value - the primitive wrapper object
      Throws:
      IllegalArgumentException - if value is not an instance of a primitive wrapper class
  • Method Details

    • getValue

      public Object getValue()
      Returns the primitive value associated with this object, represented as a primitive wrapper instance.
      Returns:
      the value of this object, as a primitive wrapper instance
    • getType

      public Class getType()
      Returns the primitive type of the value associated with this object.
      Returns:
      the primitive type of the value associated with this object
    • toString

      public String toString()
      Returns a string representation of this object.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Returns true if the argument is a Primitive for which the result of calling getValue is the same as the value for this instance, otherwise false.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Returns a hash code value for this object.
      Overrides:
      hashCode in class Object