Enum VonNeumannNeighbourhood

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.graphical.Position

        org.refcodes.graphical.Position.PositionBuilder<B extends org.refcodes.graphical.Position.PositionBuilder<B>>, org.refcodes.graphical.Position.PositionMutator, org.refcodes.graphical.Position.PositionProperty
      • Nested classes/interfaces inherited from interface org.refcodes.graphical.PosXAccessor

        org.refcodes.graphical.PosXAccessor.PosXBuilder<B extends org.refcodes.graphical.PosXAccessor.PosXBuilder<B>>, org.refcodes.graphical.PosXAccessor.PosXMutator, org.refcodes.graphical.PosXAccessor.PosXProperty
      • Nested classes/interfaces inherited from interface org.refcodes.graphical.PosYAccessor

        org.refcodes.graphical.PosYAccessor.PosYBuilder<B extends org.refcodes.graphical.PosYAccessor.PosYBuilder<B>>, org.refcodes.graphical.PosYAccessor.PosYMutator, org.refcodes.graphical.PosYAccessor.PosYProperty
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BOTTOM  
      LEFT  
      RIGHT  
      TOP  
    • Method Detail

      • values

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

        public static VonNeumannNeighbourhood 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
      • getPositionX

        public int getPositionX()
        Returns the relative X position to position (0, 0).
        Specified by:
        getPositionX in interface org.refcodes.graphical.PosXAccessor
        Returns:
        The relative position X to the (0,0) coordinate.
      • getPositionY

        public int getPositionY()
        Returns the relative Y position to position (0, 0).
        Specified by:
        getPositionY in interface org.refcodes.graphical.PosYAccessor
        Returns:
        The relative position Y to the (0,0) coordinate.