Enum Direction

    • Enum Constant Detail

      • OUT

        public static final Direction OUT
        Refers to an outgoing direction.
      • IN

        public static final Direction IN
        Refers to an incoming direction.
      • BOTH

        public static final Direction BOTH
        Refers to either direction (IN or OUT).
    • Field Detail

      • proper

        public static final Direction[] proper
        The actual direction of an Edge may only be IN or OUT, as defined in this array.
    • Method Detail

      • values

        public static Direction[] 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 (Direction c : Direction.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Direction 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
      • opposite

        public Direction opposite()
        Produce the opposite representation of the current Direction enum.