public class PackedLongIV<V extends BigdataLiteral> extends AbstractLiteralIV<V,Long> implements Serializable, org.openrdf.model.Literal
| Modifier and Type | Field and Description |
|---|---|
static long |
MAX_POS_LONG_WITH_LEADING_ZERO_BYTE
The
PackedLongIV uses the LongPacker to compress values. |
static org.openrdf.model.URI |
PACKED_LONG |
flags| Constructor and Description |
|---|
PackedLongIV(long value)
Ctor with internal value specified.
|
PackedLongIV(String value)
Ctor with string value specified.
|
| Modifier and Type | Method and Description |
|---|---|
int |
_compareTo(IV o)
Compare two
IVs having the same intrinsic datatype. |
V |
asValue(LexiconRelation lex)
Returns the Literal representation of this IV.
|
boolean |
booleanValue()
Implement
Literal.booleanValue(). |
int |
byteLength()
Return the byte length for the byte[] encoded representation of this
internal value.
|
IV<V,Long> |
clone(boolean clearCache)
Return a copy of this
IV. |
BigDecimal |
decimalValue()
Implement
Literal.decimalValue(). |
double |
doubleValue()
Implement
Literal.doubleValue(). |
boolean |
equals(Object o)
Two
PackedLongIV are equal if their InetAddresses are equal. |
float |
floatValue()
Implement
Literal.floatValue(). |
DTEExtension |
getDTEX()
IFF
IV.getDTE() returns DTE.Extension then this method will
report the DTEExtension value that specifies the intrinsic
datatype for this IV. |
Long |
getInlineValue()
Returns the inline value.
|
String |
getLabel()
Implement
Literal.getLabel(). |
int |
hashCode()
Return a hash code based on the value of the point in the value space.
|
BigInteger |
integerValue()
Implement
Literal.integerValue(). |
int |
intValue()
Implement
Literal.intValue(). |
long |
longValue()
Implement
Literal.longValue(). |
short |
shortValue()
Implement
Literal.shortValue(). |
String |
toString() |
byteValue, calendarValue, getDatatype, getLanguage, needsMaterialization, stringValueisInlinecompareTo, encode, flags, getDTE, getDTE, getInternalValueTypeEnum, getValue, getValueCache, getVTE, getVTE, hasValue, isBigNumeric, isBNode, isExtension, isExtension, isFixedNumeric, isFloatingPointNumeric, isInline, isLiteral, isNullIV, isNumeric, isResource, isSignedNumeric, isStatement, isUnsignedNumeric, isURI, isVocabulary, setValue, toFlagsclone, finalize, getClass, notify, notifyAll, wait, wait, waitbyteValue, calendarValue, getDatatype, getLanguageencode, flags, getDTE, getVTE, isBigNumeric, isBNode, isExtension, isFixedNumeric, isFloatingPointNumeric, isInline, isLiteral, isNullIV, isNumeric, isResource, isSignedNumeric, isStatement, isUnsignedNumeric, isURI, isVocabularycompareTopublic static final org.openrdf.model.URI PACKED_LONG
public static final long MAX_POS_LONG_WITH_LEADING_ZERO_BYTE
PackedLongIV uses the LongPacker to compress values.
LongPacker.packLong(long, byte[], com.bigdata.io.LongPacker.IByteBuffer)
is order preserving whenever the first byte is 0. Since the IV relies on an
order preserving encoding, we restrict the supported range to values in
[0;MAX_POS_LONG_WITH_LEADING_ZERO_BYTE], where MAX_POS_LONG_WITH_LEADING_ZERO_BYTE
corresponds to the 64bit string 00000000111111111111111..., which equals
72057594037927935L. The value was (statically) verified as follows:
long v1 = 72057594037927935L;
long v2 = 72057594037927936L;
System.out.println(( ( v1 >> 56 ) != 0 )); // condition used in LongPacker
System.out.println(( ( v2 >> 56 ) != 0 )); // condition used in LongPacker
outputs "false" followed by "true".public PackedLongIV(String value)
public PackedLongIV(long value)
public IV<V,Long> clone(boolean clearCache)
IVCacheIV.
Note: This method exists to defeat the hard reference from the IV
to the cached BigdataValue in order to avoid a memory leak when
the IV is used as the key in a weak value cache whose value is
the BigdataValue. Therefore, certain IV implementations
MAY return this when they are used for limited collections. The
vocabulary IVs are the primary example. For the same reason, we do not
need to recursively break the link from the IV to the
BigdataValue for IVs which embed other IVs.
clone in interface IVCache<V extends BigdataLiteral,Long>clearCache - When true the cached reference (if any) will NOT
be set on the copy.(Thread-local
cache combined with unbounded thread pools causes effective memory
leak)public Long getInlineValue() throws UnsupportedOperationException
getInlineValue in interface IV<V extends BigdataLiteral,Long>Object.UnsupportedOperationException - unless the RDF value is inline.public V asValue(LexiconRelation lex)
asValue in interface IVCache<V extends BigdataLiteral,Long>lex - The lexicon relation (this is required in order to access the
BigdataValueFactory for the namespace associated with
lexicon when we materialize an inline IV).BigdataValue.public int byteLength()
byteLength in interface IV<V extends BigdataLiteral,Long>public String toString()
toString in class AbstractLiteralIV<V extends BigdataLiteral,Long>public int hashCode()
AbstractIV
Note: The IV implementations typically DO NOT return hash codes
that are consistent with BigdataValue#hashCode(). Therefore you
MUST NOT mix IVs and BigdataValues in the keys of a map
or the values of a set.
hashCode in interface org.openrdf.model.LiteralhashCode in class AbstractIV<V extends BigdataLiteral,Long>public String getLabel()
AbstractLiteralIVLiteral.getLabel().getLabel in interface org.openrdf.model.LiteralgetLabel in class AbstractLiteralIV<V extends BigdataLiteral,Long>public boolean equals(Object o)
PackedLongIV are equal if their InetAddresses are equal.equals in interface org.openrdf.model.Literalequals in class AbstractIV<V extends BigdataLiteral,Long>public int _compareTo(IV o)
AbstractIVIVs having the same intrinsic datatype._compareTo in class AbstractIV<V extends BigdataLiteral,Long>public DTEExtension getDTEX()
IVIV.getDTE() returns DTE.Extension then this method will
report the DTEExtension value that specifies the intrinsic
datatype for this IV.getDTEX in interface IV<V extends BigdataLiteral,Long>getDTEX in class AbstractIV<V extends BigdataLiteral,Long>(Implement support for DTE extension types for URIs),
( DTEExtension for compressed timestamp)public boolean booleanValue()
Literal.booleanValue().booleanValue in interface org.openrdf.model.LiteralbooleanValue in class AbstractLiteralIV<V extends BigdataLiteral,Long>public short shortValue()
Literal.shortValue().shortValue in interface org.openrdf.model.LiteralshortValue in class AbstractLiteralIV<V extends BigdataLiteral,Long>public int intValue()
Literal.intValue().intValue in interface org.openrdf.model.LiteralintValue in class AbstractLiteralIV<V extends BigdataLiteral,Long>public long longValue()
Literal.longValue().longValue in interface org.openrdf.model.LiterallongValue in class AbstractLiteralIV<V extends BigdataLiteral,Long>public float floatValue()
Literal.floatValue().floatValue in interface org.openrdf.model.LiteralfloatValue in class AbstractLiteralIV<V extends BigdataLiteral,Long>public double doubleValue()
Literal.doubleValue().doubleValue in interface org.openrdf.model.LiteraldoubleValue in class AbstractLiteralIV<V extends BigdataLiteral,Long>public BigInteger integerValue()
Literal.integerValue().integerValue in interface org.openrdf.model.LiteralintegerValue in class AbstractLiteralIV<V extends BigdataLiteral,Long>public BigDecimal decimalValue()
Literal.decimalValue().decimalValue in interface org.openrdf.model.LiteraldecimalValue in class AbstractLiteralIV<V extends BigdataLiteral,Long>Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.