public static final class AbstractConfiguration.Primitive<T> extends Object
AbstractConfiguration
that contain primitive entries should
return instances of this class from their getEntryInternal
methods.Constructor and Description |
---|
Primitive(T value)
Creates an object that represents a primitive value of the type
associated with the specified primitive wrapper object.
|
Modifier and Type | Method and Description |
---|---|
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 . |
Class<T> |
getType()
Returns the primitive type of the value associated with this object.
|
T |
getValue()
Returns the primitive value associated with this object, represented
as a primitive wrapper instance.
|
int |
hashCode()
Returns a hash code value for this object.
|
String |
toString()
Returns a string representation of this object.
|
public Primitive(T value)
value
- the primitive wrapper objectIllegalArgumentException
- if value
is not an
instance of a primitive wrapper classpublic T getValue()
public Class<T> getType()
public String toString()
public boolean equals(Object obj)
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
.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.