Package com.yahoo.data.access.simple
Class Value.StringValue
- java.lang.Object
-
- com.yahoo.data.access.simple.Value
-
- com.yahoo.data.access.simple.Value.StringValue
-
- All Implemented Interfaces:
Inspectable
,Inspector
- Enclosing class:
- Value
public static class Value.StringValue extends 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 Constructor Description StringValue(byte[] v)
StringValue(java.lang.String v)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
asString()
Access the inspector's value if it's a STRING; otherwise throws exceptionjava.lang.String
asString(java.lang.String x)
Get the inspector's value (or the supplied default), never throwsbyte[]
asUtf8()
Access the inspector's value (in utf-8 representation) if it's a STRING; otherwise throws exceptionbyte[]
asUtf8(byte[] x)
Get the inspector's value (or the supplied default), never throwsType
type()
Get the type of an inspectorboolean
valid()
Check if the inspector is valid.
-
-
-
Method Detail
-
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.
-
asString
public java.lang.String asString()
Description copied from interface:Inspector
Access the inspector's value if it's a STRING; otherwise throws exception
-
asString
public java.lang.String asString(java.lang.String x)
Description copied from interface:Inspector
Get the inspector's value (or the supplied default), never throws
-
asUtf8
public byte[] asUtf8()
Description copied from interface:Inspector
Access the inspector's value (in utf-8 representation) if it's a STRING; otherwise throws exception
-
-