gr.spinellis.umlgraph.doclet
Enum RelationDirection

Package class diagram package RelationDirection
java.lang.Object
  extended by java.lang.Enum<RelationDirection>
      extended by gr.spinellis.umlgraph.doclet.RelationDirection
All Implemented Interfaces:
Serializable, Comparable<RelationDirection>

public enum RelationDirection
extends Enum<RelationDirection>

The possibile directions of a relation given a reference class (used in context diagrams)


Enum Constant Summary
BOTH
           
IN
           
NONE
           
OUT
           
 
Method Summary
 boolean contains(RelationDirection d)
          Returns true if this direction "contains" the specified one, that is, either it's equal to it, or this direction is BOTH
 RelationDirection inverse()
          Inverts the direction of the relation.
 RelationDirection sum(RelationDirection d)
          Adds the current direction
static RelationDirection valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RelationDirection[] 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

NONE

public static final RelationDirection NONE

IN

public static final RelationDirection IN

OUT

public static final RelationDirection OUT

BOTH

public static final RelationDirection BOTH
Method Detail

values

public static RelationDirection[] 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 (RelationDirection c : RelationDirection.values())
    System.out.println(c);

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

valueOf

public static RelationDirection valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

sum

public RelationDirection sum(RelationDirection d)
Adds the current direction

Parameters:
d -
Returns:

contains

public boolean contains(RelationDirection d)
Returns true if this direction "contains" the specified one, that is, either it's equal to it, or this direction is BOTH

Parameters:
d -
Returns:

inverse

public RelationDirection inverse()
Inverts the direction of the relation. Turns IN into OUT and vice-versa, NONE and BOTH are not changed

Returns: