com.thinkaurelius.titan.graphdb.relations

## Class RelationComparator

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

- All Implemented Interfaces:
    Comparator<InternalRelation>

      public class RelationComparator
      extends Object
      implements Comparator<InternalRelation>

  A `Comparator` for `TitanRelation` that uses a defined order to compare the relations with or otherwise uses the natural order of relations.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RelationComparator(InternalVertex v)`
    `RelationComparator(InternalVertex v, OrderList orders)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(InternalRelation r1, InternalRelation r2)`
    `static int` | `compareValues(Object v1, Object v2)`
    `static int` | `compareValues(Object v1, Object v2, Order order)`

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

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

    - ### Methods inherited from interface java.util.Comparator

      `equals`

- - ### Constructor Detail

    - #### RelationComparator

          public RelationComparator(InternalVertex v)

    - #### RelationComparator

          public RelationComparator(InternalVertex v,
                            OrderList orders)

  - ### Method Detail

    - #### compare

          public int compare(InternalRelation r1,
                    InternalRelation r2)

      Specified by:
        `compare` in interface `Comparator<InternalRelation>`

    - #### compareValues

          public static int compareValues(Object v1,
                          Object v2,
                          Order order)

    - #### compareValues

          public static int compareValues(Object v1,
                          Object v2)

Copyright © 2012–2014. All rights reserved.