当前位置: 首页>>代码示例>>Java>>正文


Java TBaseHelper类代码示例

本文整理汇总了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;
}
 
开发者ID:venwyhk,项目名称:ikasoa,代码行数:15,代码来源:AbstractThriftBase.java

示例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;
}
 
开发者ID:we7,项目名称:voldemort,代码行数:51,代码来源:MockMessage.java

示例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));
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:CliClient.java

示例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));
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:CliClient.java


注:本文中的org.apache.thrift.TBaseHelper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。