Package net.jini.config
Class AbstractConfiguration.Primitive
java.lang.Object
net.jini.config.AbstractConfiguration.Primitive
- Enclosing class:
- AbstractConfiguration
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the argument is aPrimitivefor which the result of callinggetValueis the same as the value for this instance, otherwisefalse.getType()Returns the primitive type of the value associated with this object.getValue()Returns the primitive value associated with this object, represented as a primitive wrapper instance.inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this object.
-
Constructor Details
-
Primitive
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- ifvalueis not an instance of a primitive wrapper class
-
-
Method Details
-
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
Returns the primitive type of the value associated with this object.- Returns:
- the primitive type of the value associated with this object
-
toString
Returns a string representation of this object. -
equals
Returnstrueif the argument is aPrimitivefor which the result of callinggetValueis the same as the value for this instance, otherwisefalse. -
hashCode
public int hashCode()Returns a hash code value for this object.
-