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


Java TByteArrayList类代码示例

本文整理汇总了Java中gnu.trove.list.array.TByteArrayList的典型用法代码示例。如果您正苦于以下问题:Java TByteArrayList类的具体用法?Java TByteArrayList怎么用?Java TByteArrayList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TByteArrayList类属于gnu.trove.list.array包,在下文中一共展示了TByteArrayList类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TByteArrayStack

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
/**
 * Creates a new <code>TByteArrayStack</code> instance that is
 * a copy of the instanced passed to us.
 *
 * @param stack the instance to copy
 */
public TByteArrayStack( TByteStack stack ) {
    if ( stack instanceof TByteArrayStack ) {
        TByteArrayStack array_stack = ( TByteArrayStack ) stack;
        this._list = new TByteArrayList( array_stack._list );
    } else {
        throw new UnsupportedOperationException( "Only support TByteArrayStack" );
    }
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:15,代码来源:TByteArrayStack.java

示例2: readExternal

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
public void readExternal( ObjectInput in )
	throws IOException, ClassNotFoundException {

	// VERSION
	in.readByte();

	// LIST
	_list = ( TByteArrayList ) in.readObject();
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:10,代码来源:TByteArrayStack.java

示例3: readExternal

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
@Override
public void readExternal( ObjectInput in )
	throws IOException, ClassNotFoundException {

	// VERSION
	in.readByte();

	// LIST
	_list = ( TByteArrayList ) in.readObject();
}
 
开发者ID:palantir,项目名称:trove-3.0.3,代码行数:11,代码来源:TByteArrayStack.java

示例4: serialize

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
@Override
public void serialize(@NonNull TByteArrayList value, JsonGenerator gen,
		SerializerProvider serializers) throws IOException {
	gen.writeStartObject();
	List<Integer> values = new ArrayList<>();
	value.forEach(b -> values.add((int) b));
	gen.writeObjectField("values", values);
	gen.writeEndObject();
}
 
开发者ID:cinquin,项目名称:mutinack,代码行数:10,代码来源:TByteArrayListSerializer.java

示例5: ReadBooleanRegistersResponse

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
public ReadBooleanRegistersResponse(int transectionId, int unitId, ModbusRegisterType registerType,
        int startingAddress, boolean[] values) {
    super(transectionId, unitId, registerType, startingAddress);
    this.values = new TByteArrayList(values.length);
    quantity = values.length;
    for (boolean v : values) {
        this.values.add((byte) (v ? 1 : 0));
    }
}
 
开发者ID:epsilony,项目名称:codec-modbus,代码行数:10,代码来源:ReadBooleanRegistersResponse.java

示例6: deserialize

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
@Override
public EntityData.Value deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
    EntityData.Value.Builder value = EntityData.Value.newBuilder();
    if (json.isJsonPrimitive()) {
        extractPrimitive(value, json);
    } else if (json.isJsonObject()) {
        extractMap(json, context, value);
    } else if (json.isJsonArray()) {
        JsonArray jsonArray = json.getAsJsonArray();
        TByteList byteList = new TByteArrayList();
        for (JsonElement element : jsonArray) {
            if (element.isJsonArray()) {
                value.addValue((EntityData.Value) context.deserialize(element, EntityData.Value.class));
            } else if (json.isJsonObject()) {
                extractMap(json, context, value);
            } else if (element.isJsonPrimitive()) {
                extractPrimitive(value, element);
                if (element.getAsJsonPrimitive().isNumber()) {
                    try {
                        byteList.add(element.getAsByte());
                    } catch (NumberFormatException nfe) {
                    }
                }
            }
        }
        value.setBytes(ByteString.copyFrom(byteList.toArray()));
    }
    return value.build();
}
 
开发者ID:zoneXcoding,项目名称:Mineworld,代码行数:30,代码来源:EntityDataJSONFormat.java

示例7: getPhredScores

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
@SuppressWarnings("null")
private @NonNull TByteArrayList getPhredScores() {
	allocateBasePhredQualityArray();
	return phredScores;
}
 
开发者ID:cinquin,项目名称:mutinack,代码行数:6,代码来源:CandidateSequence.java

示例8: fill

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
private void fill(TByteArrayList type, TurboList<FailCounter> counters, int b)
{
	int n = counters.size() - type.size();
	Utils.log("Type %d = %d", b, n);
	type.fill(type.size(), counters.size(), (byte)b);
}
 
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:7,代码来源:FailCountManager.java

示例9: AutoDeltaByteVector

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
public AutoDeltaByteVector() {
    this.commands = new ArrayList<>(5);
    this.v = new TByteArrayList();
    this.baselineCommandCount = 0;
}
 
开发者ID:bacta,项目名称:pre-cu,代码行数:6,代码来源:AutoDeltaByteVector.java

示例10: AutoDeltaBoolVector

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
public AutoDeltaBoolVector() {
    this.commands = new ArrayList<>(5);
    this.v = new TByteArrayList();
    this.baselineCommandCount = 0;
}
 
开发者ID:bacta,项目名称:pre-cu,代码行数:6,代码来源:AutoDeltaBoolVector.java

示例11: serialize

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
public EntityData.Value serialize(Iterable<Byte> value) {
    TByteArrayList bytes = new TByteArrayList();
    bytes.addAll(Lists.newArrayList(value));
    ByteString byteString = ByteString.copyFrom(bytes.toArray(new byte[bytes.size()]));
    return EntityData.Value.newBuilder().setBytes(byteString).build();
}
 
开发者ID:zoneXcoding,项目名称:Mineworld,代码行数:7,代码来源:ByteTypeHandler.java

示例12: clear

import gnu.trove.list.array.TByteArrayList; //导入依赖的package包/类
/**
 * Erases the contents of this buffer and sets its
 * length to zero.
 */
public void clear() {
  values = new TByteArrayList();
}
 
开发者ID:teanalab,项目名称:demidovii,代码行数:8,代码来源:CompressedByteBuffer.java


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