public class AttributeValue extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_TYPE_BINARY |
static String |
ATTRIBUTE_TYPE_NUMBER |
static String |
ATTRIBUTE_TYPE_STRING |
| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final String ATTRIBUTE_TYPE_NUMBER
public static final String ATTRIBUTE_TYPE_STRING
public static final String ATTRIBUTE_TYPE_BINARY
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 AttributeValuepublic 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()
public void setValue(String type, String value)
type - The attribute type to be set.value - The value to be set.Copyright © 2023. All rights reserved.