private static NodeId createNew(NodeIdType type, int v1, long v2) { // Create general NodeId form. return NodeId.createRaw(type, v1, v2); }
private static NodeId create64(long value2) { if ( !BitsLong.isSet(value2, 63) ) return createPtr(value2); // Inline. long v2 = value2; if ( BitsLong.isSet(v2, 62) ) { // XSD_DOUBLE v2 = DoubleNode62.removeType(v2); return NodeId.createRaw(NodeIdType.XSD_DOUBLE, v2); } int t = (int)BitsLong.unpack(v2, 56, 63); // 7 bits v2 = BitsLong.clear(v2, 56, 64); NodeIdType type = NodeIdType.intToEnum(t); if ( type == NodeIdType.SPECIAL ) throw new TDBException(String.format("Attempt to create a special from a long: 0x%016", v2)); return NodeId.createRaw(type, v2); }
@Test public void nodeId_codec_12() { testCodecBuffer(NodeId.createRaw(NodeIdType.XSD_INTEGER, 1)); }
@Test public void nodeId_codec_02() { testCodecArray(NodeId.createRaw(NodeIdType.XSD_INTEGER, 1)); }
@Test public void nodeId_codec_12() { testCodecBuffer(NodeId.createRaw(NodeIdType.XSD_INTEGER, 1)); }
@Test public void nodeId_codec_02() { testCodecArray(NodeId.createRaw(NodeIdType.XSD_INTEGER, 1)); }
return NodeId.createRaw(XSD_DECIMAL, dn.pack()); else return null; return NodeId.createRaw(type, v); return null ; return NodeId.createRaw(XSD_DOUBLE, v); float f = ((Number)lit.getValue()).floatValue(); long v = FloatNode.pack(f); return NodeId.createRaw(XSD_FLOAT, v); if ( v == -1 ) return null; return NodeId.createRaw(XSD_DATETIMESTAMP, v); if ( v == -1 ) return null; return NodeId.createRaw(XSD_DATETIME, v); if ( v == -1 ) return null; return NodeId.createRaw(XSD_DATE, v); return NodeId.createRaw(XSD_BOOLEAN, v);
@Test public void nodeId_codec_03() { testCodecArray(NodeId.createRaw(NodeIdType.XSD_INTEGER, BitsLong.clear(-1L, 56,64))); }
@Test public void nodeId_codec_13() { testCodecBuffer(NodeId.createRaw(NodeIdType.XSD_INTEGER, BitsLong.clear(-1L, 56,64))); }
@Test public void nodeId_codec_03() { testCodecArray(NodeId.createRaw(NodeIdType.XSD_INTEGER, BitsLong.clear(-1L, 56,64))); }
@Test public void nodeId_codec_13() { testCodecBuffer(NodeId.createRaw(NodeIdType.XSD_INTEGER, BitsLong.clear(-1L, 56,64))); }