Package cdc.graphs
Enum NodeRelativePosition
- java.lang.Object
-
- java.lang.Enum<NodeRelativePosition>
-
- cdc.graphs.NodeRelativePosition
-
- All Implemented Interfaces:
Serializable,Comparable<NodeRelativePosition>
public enum NodeRelativePosition extends Enum<NodeRelativePosition>
Enumeration of possible relative position of 2 nodes in a directed graph.- Author:
- Damien Carbonne
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IN_LOOPThere is a loop passing through both nodes.SAMEThe 2 nodes are the same.STRICTLY_OVERThe first node is over the second one.STRICTLY_UNDERThe first node is under the second one.UNRELATEDThe 2 nodes are not related.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NodeRelativePositionvalueOf(String name)Returns the enum constant of this type with the specified name.static NodeRelativePosition[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SAME
public static final NodeRelativePosition SAME
The 2 nodes are the same.
-
STRICTLY_OVER
public static final NodeRelativePosition STRICTLY_OVER
The first node is over the second one.There is a path from first node to second one.
-
STRICTLY_UNDER
public static final NodeRelativePosition STRICTLY_UNDER
The first node is under the second one.There is a path from second bode to first one.
-
IN_LOOP
public static final NodeRelativePosition IN_LOOP
There is a loop passing through both nodes.This should not exist if the graph describes a partial or total order.
-
UNRELATED
public static final NodeRelativePosition UNRELATED
The 2 nodes are not related.
-
-
Method Detail
-
values
public static NodeRelativePosition[] 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 (NodeRelativePosition c : NodeRelativePosition.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NodeRelativePosition 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 nameNullPointerException- if the argument is null
-
-