i3.dragos.gm.core
Enum ConnectionMode

java.lang.Object
  extended by java.lang.Enum<ConnectionMode>
      extended by i3.dragos.gm.core.ConnectionMode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ConnectionMode>

public enum ConnectionMode
extends java.lang.Enum<ConnectionMode>

The ConnectionMode enum is used to select which edges or relations should be retrieved.

The sole purpose of this interface is to unify a couple of methods in GraphEntity and keeps the interface clean and simple.

Author:
Thorsten Hermes <thermes@i3.informatik.rwth-aachen.de>
See Also:
GraphEntity

Enum Constant Summary
ANY_NOSET
          All incident edges / relation ends of a graph element.
ANY_SET
          All incident edges / relation ends of a graph element.
DIRECTED_INCOMING
          All incoming directed edges / relation ends of a graph element.
DIRECTED_NOSET
          All directed edges / relation ends of a graph element.
DIRECTED_OUTGOING
          All outgoing directed edges / relation ends of a graph element.
DIRECTED_SET
          All directed edges / relation ends of a graph element.
UNDIRECTED_NOSET
          All undirected edges / relation ends of a graph element.
UNDIRECTED_SET
          All undirected edges / relation ends of a graph element.
 
Method Summary
abstract  boolean isSet()
          Determines whether this connection mode yields a set- or nonset collection.
static ConnectionMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ConnectionMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ANY_NOSET

public static final ConnectionMode ANY_NOSET
All incident edges / relation ends of a graph element. The direction is not considered. In the case of loops, the respective entries will occur twice in the returned collection.


ANY_SET

public static final ConnectionMode ANY_SET
All incident edges / relation ends of a graph element. The direction is not considered. In the case of loops, the respective entries will occur only once in the returned collection (which implies that this collection follows the general contract of a Set).


DIRECTED_NOSET

public static final ConnectionMode DIRECTED_NOSET
All directed edges / relation ends of a graph element. In the case of loops, the respective entries will occur twice in the returned collection.


DIRECTED_SET

public static final ConnectionMode DIRECTED_SET
All directed edges / relation ends of a graph element. In the case of loops, the respective entries will occur only once in the returned collection (which implies that this collection follows the general contract of a Set).


UNDIRECTED_NOSET

public static final ConnectionMode UNDIRECTED_NOSET
All undirected edges / relation ends of a graph element. In the case of loops, the respective entries will occur twice in the returned collection.


UNDIRECTED_SET

public static final ConnectionMode UNDIRECTED_SET
All undirected edges / relation ends of a graph element. In the case of loops, the respective entries will occur only once in the returned collection (which implies that this collection follows the general contract of a Set).


DIRECTED_INCOMING

public static final ConnectionMode DIRECTED_INCOMING
All incoming directed edges / relation ends of a graph element.


DIRECTED_OUTGOING

public static final ConnectionMode DIRECTED_OUTGOING
All outgoing directed edges / relation ends of a graph element.

Method Detail

values

public static ConnectionMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ConnectionMode c : ConnectionMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ConnectionMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isSet

public abstract boolean isSet()
Determines whether this connection mode yields a set- or nonset collection. This information is intended to be used when creating new collection objects when processing edge collections.

Returns:
true if this ConnectionMode behaves like Set, false otherwise


Copyright © 2002-2008 RWTH Aachen, Department of Computer Science 3 (Software Engineering). All Rights Reserved.