com.thinkaurelius.titan.diskstorage.util

## Class StaticArrayEntry

- java.lang.Object
- - com.thinkaurelius.titan.diskstorage.util.StaticArrayBuffer
  - - com.thinkaurelius.titan.diskstorage.util.StaticArrayEntry

- All Implemented Interfaces:
    Entry, MetaAnnotatable, MetaAnnotated, StaticBuffer, Comparable<StaticBuffer>

      public class StaticArrayEntry
      extends StaticArrayBuffer
      implements Entry, MetaAnnotatable

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `StaticArrayEntry.DataHandler<D>`
    `static interface` | `StaticArrayEntry.GetColVal<E,D>`

    - ### Nested classes/interfaces inherited from interface com.thinkaurelius.titan.diskstorage.StaticBuffer

      `StaticBuffer.Factory<T>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static EntryMetaData[]` | `EMPTY_SCHEMA`
    `static StaticArrayEntry.GetColVal<Entry,StaticBuffer>` | `ENTRY_GETTER`

    - ### Fields inherited from class com.thinkaurelius.titan.diskstorage.util.StaticArrayBuffer

      `BYTE_LEN, CHAR_LEN, DOUBLE_LEN, FLOAT_LEN, INT_LEN, LONG_LEN, SHORT_LEN`

    - ### Fields inherited from interface com.thinkaurelius.titan.diskstorage.StaticBuffer

      `ARRAY_FACTORY, BB_FACTORY, STATIC_FACTORY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StaticArrayEntry(byte[] array, int valuePosition)`
    `StaticArrayEntry(byte[] array, int limit, int valuePosition)`
    `StaticArrayEntry(byte[] array, int offset, int limit, int valuePosition)`
    `StaticArrayEntry(StaticBuffer buffer, int valuePosition)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(StaticBuffer other)`
    `boolean` | `equals(Object o)`
    `RelationCache` | `getCache()` Returns the cached parsed representation of this Entry if it exists, else NULL
    `StaticBuffer` | `getColumn()`
    `<T> T` | `getColumnAs(StaticBuffer.Factory<T> factory)`
    `Map<EntryMetaData,Object>` | `getMetaData()` Returns all meta data associated with this entry
    `StaticBuffer` | `getValue()`
    `<T> T` | `getValueAs(StaticBuffer.Factory<T> factory)`
    `int` | `getValuePosition()`
    `int` | `hashCode()` Thread-safe hashcode method for StaticBuffer written according to Effective Java 2e by Josh Bloch.
    `boolean` | `hasMetaData()` Returns true if this entry has associated meta data
    `boolean` | `hasValue()`
    `static Entry` | `of(StaticBuffer buffer)`
    `static <E> Entry` | `of(StaticBuffer column, StaticBuffer value)`
    `static <E> Entry` | `ofByteBuffer(E element, StaticArrayEntry.GetColVal<E,ByteBuffer> getter)`
    `static <E> Entry` | `ofBytes(E element, StaticArrayEntry.GetColVal<E,byte[]> getter)`
    `static <E> Entry` | `ofStaticBuffer(E element, StaticArrayEntry.GetColVal<E,StaticBuffer> getter)`
    `void` | `setCache(RelationCache cache)` Sets the cached parsed representation of this Entry.
    `Object` | `setMetaData(EntryMetaData key, Object value)`
    `String` | `toString()`

    - ### Methods inherited from class com.thinkaurelius.titan.diskstorage.util.StaticArrayBuffer

      `as, as, asByteBuffer, asReadBuffer, compareTo, compareTo, compareTo, getBoolean, getByte, getBytes, getChar, getChars, getDouble, getDoubles, getFloat, getFloats, getInt, getInt, getInts, getLong, getLong, getLongs, getShort, getShorts, hashCode, length, of, of, putInt, putLong, subrange, subrange, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.thinkaurelius.titan.diskstorage.Entry

      `getColumn, getColumnAs, getValue, getValueAs, getValuePosition, hasValue`

    - ### Methods inherited from interface com.thinkaurelius.titan.diskstorage.StaticBuffer

      `as, asByteBuffer, asReadBuffer, getBoolean, getByte, getBytes, getChar, getChars, getDouble, getDoubles, getFloat, getFloats, getInt, getInts, getLong, getLongs, getShort, getShorts, length, subrange, subrange`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Field Detail

    - #### EMPTY_SCHEMA

          public static final EntryMetaData[] EMPTY_SCHEMA

    - #### ENTRY_GETTER

          public static StaticArrayEntry.GetColVal<Entry,StaticBuffer> ENTRY_GETTER

  - ### Constructor Detail

    - #### StaticArrayEntry

          public StaticArrayEntry(byte[] array,
                          int offset,
                          int limit,
                          int valuePosition)

    - #### StaticArrayEntry

          public StaticArrayEntry(byte[] array,
                          int limit,
                          int valuePosition)

    - #### StaticArrayEntry

          public StaticArrayEntry(byte[] array,
                          int valuePosition)

    - #### StaticArrayEntry

          public StaticArrayEntry(StaticBuffer buffer,
                          int valuePosition)

  - ### Method Detail

    - #### setMetaData

          public Object setMetaData(EntryMetaData key,
                           Object value)

      Specified by:
        `setMetaData` in interface `MetaAnnotatable`

    - #### hasMetaData

          public boolean hasMetaData()

      Description copied from interface: `MetaAnnotated`
      Returns true if this entry has associated meta data
      Specified by:
        `hasMetaData` in interface `MetaAnnotated`
      Returns:

    - #### getMetaData

          public Map<EntryMetaData,Object> getMetaData()

      Description copied from interface: `MetaAnnotated`
      Returns all meta data associated with this entry
      Specified by:
        `getMetaData` in interface `MetaAnnotated`
      Returns:

    - #### getCache

          public RelationCache getCache()

      Description copied from interface: `Entry`
      Returns the cached parsed representation of this Entry if it exists, else NULL
      Specified by:
        `getCache` in interface `Entry`
      Returns:

    - #### setCache

          public void setCache(RelationCache cache)

      Description copied from interface: `Entry`
      Sets the cached parsed representation of this Entry. This method does not synchronize, so a previously set representation would simply be overwritten.
      Specified by:
        `setCache` in interface `Entry`

    - #### of

          public static Entry of(StaticBuffer buffer)

    - #### ofBytes

          public static final <E> Entry ofBytes(E element,
                          StaticArrayEntry.GetColVal<E,byte[]> getter)

    - #### ofByteBuffer

          public static final <E> Entry ofByteBuffer(E element,
                               StaticArrayEntry.GetColVal<E,ByteBuffer> getter)

    - #### ofStaticBuffer

          public static final <E> Entry ofStaticBuffer(E element,
                                 StaticArrayEntry.GetColVal<E,StaticBuffer> getter)

    - #### of

          public static final <E> Entry of(StaticBuffer column,
                     StaticBuffer value)

    - #### getValuePosition

          public int getValuePosition()

      Specified by:
        `getValuePosition` in interface `Entry`

    - #### hasValue

          public boolean hasValue()

      Specified by:
        `hasValue` in interface `Entry`

    - #### getColumn

          public StaticBuffer getColumn()

      Specified by:
        `getColumn` in interface `Entry`

    - #### getColumnAs

          public <T> T getColumnAs(StaticBuffer.Factory<T> factory)

      Specified by:
        `getColumnAs` in interface `Entry`

    - #### getValue

          public StaticBuffer getValue()

      Specified by:
        `getValue` in interface `Entry`

    - #### getValueAs

          public <T> T getValueAs(StaticBuffer.Factory<T> factory)

      Specified by:
        `getValueAs` in interface `Entry`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `StaticArrayBuffer`

    - #### hashCode

          public int hashCode()

      Description copied from class: `StaticArrayBuffer`
      Thread-safe hashcode method for StaticBuffer written according to Effective Java 2e by Josh Bloch.
      Overrides:
        `hashCode` in class `StaticArrayBuffer`
      Returns:
        hashcode for given StaticBuffer

    - #### compareTo

          public int compareTo(StaticBuffer other)

      Specified by:
        `compareTo` in interface `Comparable<StaticBuffer>`
      Overrides:
        `compareTo` in class `StaticArrayBuffer`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `StaticArrayBuffer`

Copyright © 2012–2014. All rights reserved.