|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.services.moladb.model.AttributeValue
public class AttributeValue
Represents the value for an attribute.
Field Summary | |
---|---|
static String |
ATTRIBUTE_TYPE_BINARY
|
static String |
ATTRIBUTE_TYPE_NUMBER
|
static String |
ATTRIBUTE_TYPE_STRING
|
Constructor Summary | |
---|---|
AttributeValue()
Constructs a new AttributeValue object. |
|
AttributeValue(byte[] buffer)
Constructs a new AttributeValue object and init the value type as Binary |
|
AttributeValue(double d)
Constructs a new AttributeValue object and init the value type as Number |
|
AttributeValue(long n)
Constructs a new AttributeValue object and init the value type as Number |
|
AttributeValue(String s)
Constructs a new AttributeValue object and init the value type as String |
Method Summary | |
---|---|
String |
getAttributeType()
The method return the attribute value type. |
String |
getAttributeValue()
The method return the attribute value. |
byte[] |
getB()
The method return the attribute value in byte array. |
double |
getDouble()
The method return the attribute value in Double. |
long |
getLong()
The method return the attribute value in Long. |
String |
getN()
The method return the attribute value in String. |
String |
getS()
The method return the attribute value in String. |
void |
setB(byte[] buffer)
The method set value type as binary and set the value with input parameter. |
void |
setN(double n)
The method set value type as number and set the value with input parameter. |
void |
setN(long n)
The method set value type as number and set the value with input parameter. |
void |
setN(String n)
The method set value type as number and set the value with input parameter. |
void |
setS(String s)
The method set value type as String and set the value with input parameter. |
void |
setValue(String type,
String value)
The method set value type and value with input parameter. |
protected Map<String,String> |
toJsonObj()
|
String |
toString()
Return a string representation of the object. |
AttributeValue |
withB(byte[] buffer)
The method set value type as binary and set the value with input parameter. |
AttributeValue |
withN(double n)
The method set value type as number and set the value with input parameter. |
AttributeValue |
withN(long n)
The method set value type as number and set the value with input parameter. |
AttributeValue |
withN(String n)
The method set value type as number and set the value with input parameter. |
AttributeValue |
withS(String s)
The method set value type as String and set the value with input parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ATTRIBUTE_TYPE_NUMBER
public static final String ATTRIBUTE_TYPE_STRING
public static final String ATTRIBUTE_TYPE_BINARY
Constructor Detail |
---|
public AttributeValue()
public AttributeValue(String s)
s
- The initial value of AttributeValuepublic AttributeValue(double d)
d
- The initial value of AttributeValuepublic AttributeValue(long n)
n
- The initial value of AttributeValuepublic AttributeValue(byte[] buffer)
buffer
- The input byte buffer for AttributeValueMethod Detail |
---|
public byte[] getB()
public AttributeValue withB(byte[] buffer)
buffer
- The value to be set.
public void setB(byte[] buffer)
buffer
- The value to be set.public String getN()
public long getLong()
public double getDouble()
public AttributeValue withN(String n)
n
- The value to be set.
public AttributeValue withN(long n)
n
- The value to be set.
public AttributeValue withN(double n)
n
- The value to be set.
public void setN(String n)
n
- The value to be set.public void setN(long n)
n
- The value to be set.public void setN(double n)
n
- The value to be set.public String getS()
public AttributeValue withS(String s)
s
- The value to be set.
public void setS(String s)
s
- The value to be set.public String getAttributeType()
public String getAttributeValue()
public String toString()
toString
in class Object
public void setValue(String type, String value)
type
- The attribute type to be set.value
- The value to be set.protected Map<String,String> toJsonObj()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |