类 AttributeValue


  • public class AttributeValue
    extends Object
    Represents the value for an attribute.
    • 构造器详细资料

      • AttributeValue

        public AttributeValue()
        Constructs a new AttributeValue object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      • AttributeValue

        public AttributeValue​(String s)
        Constructs a new AttributeValue object and init the value type as String
        参数:
        s - The initial value of AttributeValue
      • AttributeValue

        public AttributeValue​(double d)
        Constructs a new AttributeValue object and init the value type as Number
        参数:
        d - The initial value of AttributeValue
      • AttributeValue

        public AttributeValue​(long n)
        Constructs a new AttributeValue object and init the value type as Number
        参数:
        n - The initial value of AttributeValue
      • AttributeValue

        public AttributeValue​(byte[] buffer)
        Constructs a new AttributeValue object and init the value type as Binary
        参数:
        buffer - The input byte buffer for AttributeValue
    • 方法详细资料

      • getB

        public byte[] getB()
        The method return the attribute value in byte array. Note: This method will decode the attribute value with base64 first.
        返回:
        Attribute value in byte array.
      • withB

        public AttributeValue withB​(byte[] buffer)
        The method set value type as binary and set the value with input parameter. Input byte array will be encoded with base64. a reference to this object so that method calls can be chained together.
        参数:
        buffer - The value to be set.
        返回:
        A reference to this object so that method calls can be chained together
      • setB

        public void setB​(byte[] buffer)
        The method set value type as binary and set the value with input parameter. Note: this method will encode the byte array with base64 first.
        参数:
        buffer - The value to be set.
      • getN

        public String getN()
        The method return the attribute value in String.
        返回:
        Attribute value in String.
      • getLong

        public long getLong()
        The method return the attribute value in Long.
        返回:
        Attribute value in long.
      • getDouble

        public double getDouble()
        The method return the attribute value in Double.
        返回:
        Attribute value in double.
      • withN

        public AttributeValue withN​(String n)
        The method set value type as number and set the value with input parameter.
        参数:
        n - The value to be set.
        返回:
        A reference to this object so that method calls can be chained together
      • withN

        public AttributeValue withN​(long n)
        The method set value type as number and set the value with input parameter.
        参数:
        n - The value to be set.
        返回:
        A reference to this object so that method calls can be chained together
      • withN

        public AttributeValue withN​(double n)
        The method set value type as number and set the value with input parameter.
        参数:
        n - The value to be set.
        返回:
        A reference to this object so that method calls can be chained together
      • setN

        public void setN​(String n)
        The method set value type as number and set the value with input parameter.
        参数:
        n - The value to be set.
      • setN

        public void setN​(long n)
        The method set value type as number and set the value with input parameter.
        参数:
        n - The value to be set.
      • setN

        public void setN​(double n)
        The method set value type as number and set the value with input parameter.
        参数:
        n - The value to be set.
      • getS

        public String getS()
        The method return the attribute value in String.
        返回:
        The attribute value in String.
      • withS

        public AttributeValue withS​(String s)
        The method set value type as String and set the value with input parameter.
        参数:
        s - The value to be set.
        返回:
        A reference to this object so that method calls can be chained together
      • setS

        public void setS​(String s)
        The method set value type as String and set the value with input parameter.
        参数:
        s - The value to be set.
      • getAttributeType

        public String getAttributeType()
        The method return the attribute value type.
        返回:
        Attribute value type.
      • getAttributeValue

        public String getAttributeValue()
        The method return the attribute value.
        返回:
        Attribute value type.
      • toString

        public String toString()
        Return a string representation of the object.
        覆盖:
        toString 在类中 Object
        返回:
        A string representation of the object.
      • setValue

        public void setValue​(String type,
                             String value)
        The method set value type and value with input parameter. If type is "B" (binary), the corresponding value MUST be encoded with base64.
        参数:
        type - The attribute type to be set.
        value - The value to be set.