本文整理了Java中java.lang.Short.toUnsignedLong()
方法的一些代码示例,展示了Short.toUnsignedLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Short.toUnsignedLong()
方法的具体详情如下:
包路径:java.lang.Short
类名称:Short
方法名:toUnsignedLong
暂无
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@Override
public Long getRenderFlag()
{
long ret = Short.toUnsignedLong( this.getFrequency() );
if( this.isActive() && this.isPowered() )
{
ret |= 0x10000L;
}
return ret;
}
}
代码示例来源:origin: Baqend/Orestes-Bloomfilter
@Override
protected long decrement(int index) {
if(counters[index] == 0)
return 0;
return Short.toUnsignedLong(--counters[index]);
}
代码示例来源:origin: org.opendaylight.yangtools/yang-common
@Override
public final long longValue() {
return Short.toUnsignedLong(value);
}
代码示例来源:origin: Baqend/Orestes-Bloomfilter
@Override
protected long count(int index) {
return Short.toUnsignedLong(counters[index]);
}
代码示例来源:origin: opendaylight/yangtools
@Override
public final long longValue() {
return Short.toUnsignedLong(value);
}
代码示例来源:origin: Baqend/Orestes-Bloomfilter
@Override
protected long increment(int index) {
if(Short.toUnsignedLong(counters[index]) == MAX) {
overflowHandler.run();
return MAX;
}
return Short.toUnsignedLong(++counters[index]);
}
代码示例来源:origin: Baqend/Orestes-Bloomfilter
@Override
public Map<Integer, Long> getCountMap() {
Map<Integer, Long> result = new HashMap<>();
for (int i = 0; i < counters.length; i++) {
long count = Short.toUnsignedLong(counters[i]);
if (count > 0) {
result.put(i, count);
}
}
return result;
}
代码示例来源:origin: apache/sis
@Override public long longValue(int index) {return Short.toUnsignedLong(super.shortValue(index));}
@Override public int intValue(int index) {return Short.toUnsignedInt (super.shortValue(index));}
代码示例来源:origin: ontio/ontology-java-sdk
public long readVarInt(long max) throws IOException {
long fb = Byte.toUnsignedLong(readByte());
long value;
if (fb == 0xFD) {
value = Short.toUnsignedLong(readShort());
} else if (fb == 0xFE) {
value = Integer.toUnsignedLong(readInt());
} else if (fb == 0xFF) {
value = readLong();
} else {
value = fb;
}
if (Long.compareUnsigned(value, max) > 0) {
throw new IOException(ErrorCode.ParamError);
}
return value;
}
public long readVarInt2(long max) throws IOException {
代码示例来源:origin: neow3j/neow3j
public long readVarInt(long max) throws IOException {
long fb = Byte.toUnsignedLong(readByte());
long value;
if (fb == 0xFD) {
value = Short.toUnsignedLong(readShort());
} else if (fb == 0xFE) {
value = Integer.toUnsignedLong(readInt());
} else if (fb == 0xFF) {
value = readLong();
} else {
value = fb;
}
if (Long.compareUnsigned(value, max) > 0) {
throw new IOException();
}
return value;
}
代码示例来源:origin: ontio/ontology-java-sdk
public long readVarInt(long max) throws IOException {
long fb = Byte.toUnsignedLong(readByte());
long value;
if (fb == 0xFD) {
value = Short.toUnsignedLong(readShort());
} else if (fb == 0xFE) {
value = Integer.toUnsignedLong(readInt());
} else if (fb == 0xFF) {
value = readLong();
} else {
value = fb;
}
if (Long.compareUnsigned(value, max) > 0) {
throw new IOException(ErrorCode.ParamError);
}
return value;
}
public long readVarInt2(long max) throws IOException {
代码示例来源:origin: ontio/ontology-java-sdk
public long readVarInt2(long max) throws IOException {
long fb = Byte.toUnsignedLong(readByte());
long value;
if (fb == ScriptOp.OP_PUSHDATA1.getByte()) {
value = Byte.toUnsignedLong(readByte());
} else if (fb == ScriptOp.OP_PUSHDATA2.getByte()) {
value = Short.toUnsignedLong(readShort());
} else if (fb == ScriptOp.OP_PUSHDATA4.getByte()) {
value = Integer.toUnsignedLong(readInt());
} else{
value = fb;
}
if (Long.compareUnsigned(value, max) > 0) {
throw new IOException(ErrorCode.ParamError);
}
return value;
}
public String readVarString() throws IOException {
代码示例来源:origin: ontio/ontology-java-sdk
public long readVarInt2(long max) throws IOException {
long fb = Byte.toUnsignedLong(readByte());
long value;
if (fb == ScriptOp.OP_PUSHDATA1.getByte()) {
value = Byte.toUnsignedLong(readByte());
} else if (fb == ScriptOp.OP_PUSHDATA2.getByte()) {
value = Short.toUnsignedLong(readShort());
} else if (fb == ScriptOp.OP_PUSHDATA4.getByte()) {
value = Integer.toUnsignedLong(readInt());
} else{
value = fb;
}
if (Long.compareUnsigned(value, max) > 0) {
throw new IOException(ErrorCode.ParamError);
}
return value;
}
public String readVarString() throws IOException {
内容来源于网络,如有侵权,请联系作者删除!