org.hypergraphdb.type
Interface HGPrimitiveType<JavaType>

All Superinterfaces:
ByteArrayConverter<JavaType>, HGAtomType, HGGraphHolder
All Known Implementing Classes:
BooleanType, ByteType, CharType, DoubleType, FloatType, HGHandleType, IntType, LongType, NumericTypeBase, PrimitiveTypeBase, ShortType, StringType

public interface HGPrimitiveType<JavaType>
extends HGAtomType, ByteArrayConverter<JavaType>

A HGPrimitiveType is a HGAtomType that store its values directly as raw byte data.

A primitive type must expose those operations to HyperGraph in order to facilitate indexing and other storage management, and optimization activities. The exposed conversion of a primitive type to/from a byte buffer are defined in the parent ByteArrayConverter interface.

Author:
Borislav Iordanov

Method Summary
 java.util.Comparator<byte[]> getComparator()
          Return a java.util.Comparator instance that provides an order relation of the values of the primitive type.
 
Methods inherited from interface org.hypergraphdb.type.HGAtomType
make, release, store, subsumes
 
Methods inherited from interface org.hypergraphdb.HGGraphHolder
setHyperGraph
 
Methods inherited from interface org.hypergraphdb.storage.ByteArrayConverter
fromByteArray, toByteArray
 

Method Detail

getComparator

java.util.Comparator<byte[]> getComparator()
Return a java.util.Comparator instance that provides an order relation of the values of the primitive type. An implementation is allowed to return null in which case it is assumed that the type does not offer an ordering relation. However, if a non-null value is returned, it is must be of a publicly available and default constructible class.