Code example for PrimitiveSink

Methods: putLong

0
     */ 
    enum AtomicValueFunnel implements Funnel<org.treetank.api.IData> {
        INSTANCE;
        public void funnel(org.treetank.api.IData data, PrimitiveSink into) {
            final AtomicValue from = (AtomicValue)data;
            into.putLong(from.mItemKey).putBytes(from.mValue).putInt(from.mType);
        } 
    } 
 
    /** Value of the item as byte array. */ 
    private byte[] mValue;
 
    /** The item's value type. */ 
    private int mType;
 
    /** 
     * The item's key. In case of an Atomic value this is always a negative to 
     * make them distinguishable from nodes. 
     */ 
    private long mItemKey;