Package com.yahoo.data.access.simple
Class Value.DoubleValue
java.lang.Object
com.yahoo.data.access.simple.Value
com.yahoo.data.access.simple.Value.DoubleValue
- All Implemented Interfaces:
Inspectable
,Inspector
- Enclosing class:
- Value
-
Nested Class Summary
Nested classes/interfaces inherited from class com.yahoo.data.access.simple.Value
Value.ArrayValue, Value.BoolValue, Value.DataValue, Value.DoubleValue, Value.EmptyValue, Value.LongValue, Value.ObjectValue, Value.StringValue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
asDouble()
Access the inspector's value if it's a DOUBLE (or LONG); otherwise throws exceptiondouble
asDouble
(double x) Get the inspector's value (or the supplied default), never throwslong
asLong()
Access the inspector's value if it's a LONG (or DOUBLE); otherwise throws exceptionlong
asLong
(long x) Get the inspector's value (or the supplied default), never throwstype()
Get the type of an inspectorboolean
valid()
Check if the inspector is valid.
-
Constructor Details
-
DoubleValue
public DoubleValue(double v)
-
-
Method Details
-
valid
public boolean valid()Description copied from interface:Inspector
Check if the inspector is valid. If you try to access a field or array entry that does not exist, you will get an invalid Inspector returned. -
type
Description copied from interface:Inspector
Get the type of an inspector -
asDouble
public double asDouble()Description copied from interface:Inspector
Access the inspector's value if it's a DOUBLE (or LONG); otherwise throws exception -
asLong
public long asLong()Description copied from interface:Inspector
Access the inspector's value if it's a LONG (or DOUBLE); otherwise throws exception -
asDouble
public double asDouble(double x) Description copied from interface:Inspector
Get the inspector's value (or the supplied default), never throws -
asLong
public long asLong(long x) Description copied from interface:Inspector
Get the inspector's value (or the supplied default), never throws
-