本文整理汇总了Java中org.apache.thrift.TBaseHelper类的典型用法代码示例。如果您正苦于以下问题:Java TBaseHelper类的具体用法?Java TBaseHelper怎么用?Java TBaseHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TBaseHelper类属于org.apache.thrift包,在下文中一共展示了TBaseHelper类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: compareTo
import org.apache.thrift.TBaseHelper; //导入依赖的package包/类
@Override
public int compareTo(AbstractThriftBase other) {
if (!getClass().equals(other.getClass()))
return getClass().getName().compareTo(other.getClass().getName());
int lastComparison = Boolean.valueOf(isSet(null)).compareTo(isSet(null));
if (lastComparison != 0)
return lastComparison;
if (isSet(null)) {
lastComparison = TBaseHelper.compareTo(str, other.getStr());
if (lastComparison != 0)
return lastComparison;
}
return 0;
}
示例2: compareTo
import org.apache.thrift.TBaseHelper; //导入依赖的package包/类
public int compareTo(MockMessage other) {
if(!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
MockMessage typedOther = (MockMessage) other;
lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
if(lastComparison != 0) {
return lastComparison;
}
if(isSetName()) {
lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
if(lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMappings()).compareTo(typedOther.isSetMappings());
if(lastComparison != 0) {
return lastComparison;
}
if(isSetMappings()) {
lastComparison = TBaseHelper.compareTo(this.mappings, typedOther.mappings);
if(lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetIntList()).compareTo(typedOther.isSetIntList());
if(lastComparison != 0) {
return lastComparison;
}
if(isSetIntList()) {
lastComparison = TBaseHelper.compareTo(this.intList, typedOther.intList);
if(lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStrSet()).compareTo(typedOther.isSetStrSet());
if(lastComparison != 0) {
return lastComparison;
}
if(isSetStrSet()) {
lastComparison = TBaseHelper.compareTo(this.strSet, typedOther.strSet);
if(lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
示例3: columnNameAsByteArray
import org.apache.thrift.TBaseHelper; //导入依赖的package包/类
/**
* Converts column name into byte[] according to comparator type
* @param column - column name from parser
* @param columnFamily - column family name from parser
* @return bytes[] - into which column name was converted according to comparator type
*/
private byte[] columnNameAsByteArray(String column, String columnFamily)
{
return TBaseHelper.byteBufferToByteArray(columnNameAsBytes(column, columnFamily));
}
示例4: subColumnNameAsByteArray
import org.apache.thrift.TBaseHelper; //导入依赖的package包/类
/**
* Converts sub-column name into byte[] according to comparator type
* @param superColumn - sub-column name from parser
* @param cfDef - column family from parser
* @return bytes[] - into which column name was converted according to comparator type
*/
private byte[] subColumnNameAsByteArray(String superColumn, CfDef cfDef)
{
return TBaseHelper.byteBufferToByteArray(subColumnNameAsBytes(superColumn, cfDef));
}