com.thinkaurelius.titan.graphdb.relations

## Class RelationCache

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.relations.RelationCache

- All Implemented Interfaces:
    Iterable<com.carrotsearch.hppc.cursors.LongObjectCursor<Object>>

      public class RelationCache
      extends Object
      implements Iterable<com.carrotsearch.hppc.cursors.LongObjectCursor<Object>>

  Immutable map from long key ids to objects. Implemented for memory and time efficiency.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `com.tinkerpop.blueprints.Direction` | `direction`
    `long` | `relationId`
    `long` | `typeId`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RelationCache(com.tinkerpop.blueprints.Direction direction, long typeId, long relationId, Object other)`
    `RelationCache(com.tinkerpop.blueprints.Direction direction, long typeId, long relationId, Object other, com.carrotsearch.hppc.LongObjectOpenHashMap<Object> properties)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<O> O` | `get(long key)`
    `Long` | `getOtherVertexId()`
    `Object` | `getValue()`
    `boolean` | `hasProperties()`
    `Iterator<com.carrotsearch.hppc.cursors.LongObjectCursor<Object>>` | `iterator()`
    `int` | `numProperties()`
    `Iterator<com.carrotsearch.hppc.cursors.LongObjectCursor<Object>>` | `propertyIterator()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### direction

          public final com.tinkerpop.blueprints.Direction direction

    - #### typeId

          public final long typeId

    - #### relationId

          public final long relationId

  - ### Constructor Detail

    - #### RelationCache

          public RelationCache(com.tinkerpop.blueprints.Direction direction,
                       long typeId,
                       long relationId,
                       Object other,
                       com.carrotsearch.hppc.LongObjectOpenHashMap<Object> properties)

    - #### RelationCache

          public RelationCache(com.tinkerpop.blueprints.Direction direction,
                       long typeId,
                       long relationId,
                       Object other)

  - ### Method Detail

    - #### get

          public <O> O get(long key)

    - #### hasProperties

          public boolean hasProperties()

    - #### numProperties

          public int numProperties()

    - #### getValue

          public Object getValue()

    - #### getOtherVertexId

          public Long getOtherVertexId()

    - #### propertyIterator

          public Iterator<com.carrotsearch.hppc.cursors.LongObjectCursor<Object>> propertyIterator()

    - #### iterator

          public Iterator<com.carrotsearch.hppc.cursors.LongObjectCursor<Object>> iterator()

      Specified by:
        `iterator` in interface `Iterable<com.carrotsearch.hppc.cursors.LongObjectCursor<Object>>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2012–2014. All rights reserved.