com.aliyun.openservices.ots.model
类 PartitionKeyValue

java.lang.Object
  继承者 com.aliyun.openservices.ots.model.PartitionKeyValue

public class PartitionKeyValue
extends Object

表示分片键(Partition Key)的值,包含了值的字符串表示和值的类型。


方法摘要
 boolean equals(Object o)
           
static PartitionKeyValue fromLong(long value)
          使用int值构造值的数据类型为PartitionKeyType.INTEGER的PartitionKeyValue对象。
static PartitionKeyValue fromString(String value)
          使用String对象构造值的数据类型为PartitionKeyType.STRING的PartitionKeyValue对象。
 PartitionKeyType getType()
          获取值的数据类型。
 String getValue()
          获取值的字符串表示。
 int hashCode()
           
 long toLong()
          转换为长整型。
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

方法详细信息

getValue

public String getValue()
获取值的字符串表示。

返回:
值的字符串表示。

getType

public PartitionKeyType getType()
获取值的数据类型。

返回:
值的数据类型。

fromString

public static PartitionKeyValue fromString(String value)
使用String对象构造值的数据类型为PartitionKeyType.STRING的PartitionKeyValue对象。

参数:
value - String对象。

fromLong

public static PartitionKeyValue fromLong(long value)
使用int值构造值的数据类型为PartitionKeyType.INTEGER的PartitionKeyValue对象。

参数:
value - int值。

toString

public String toString()
覆盖:
Object 中的 toString

toLong

public long toLong()
转换为长整型。 当且仅当数据类型为PartitionKeyType.INTEGER>时转换能够成功。

返回:
long值。

equals

public boolean equals(Object o)
覆盖:
Object 中的 equals

hashCode

public int hashCode()
覆盖:
Object 中的 hashCode


Copyright © 2013. All Rights Reserved.