Enum Side

  • All Implemented Interfaces:
    com.globalmentor.lex.Identifier, com.globalmentor.lex.Token, java.io.Serializable, java.lang.Comparable<Side>

    public enum Side
    extends java.lang.Enum<Side>
    implements com.globalmentor.lex.Identifier
    Indicates an absolute side.
    Author:
    Garret Wilson
    See Also:
    Axis, Border
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BACK
      The front side.
      BOTTOM
      The bottom side.
      FRONT
      The back side.
      LEFT
      The left side.
      RIGHT
      The right side.
      TOP
      The top side.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Axis getAxis()  
      static java.util.Set<Side> getSides​(Axis axis)
      Determines the sides on the given axis.
      static Side valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Side[] 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

      • LEFT

        public static final Side LEFT
        The left side.
      • RIGHT

        public static final Side RIGHT
        The right side.
      • TOP

        public static final Side TOP
        The top side.
      • BOTTOM

        public static final Side BOTTOM
        The bottom side.
      • FRONT

        public static final Side FRONT
        The back side. This value is currently unused.
      • BACK

        public static final Side BACK
        The front side. This value is currently unused.
    • Method Detail

      • values

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

        public static Side 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
      • getAxis

        public Axis getAxis()
        Returns:
        The absolute axis of the side.
      • getSides

        public static java.util.Set<Side> getSides​(@Nonnull
                                                   Axis axis)
        Determines the sides on the given axis.
        Parameters:
        axis - The axis the sides of which to return.
        Returns:
        The sides for the given axis.