Enum Binary

  • All Implemented Interfaces:
    Tag, java.io.Serializable, java.lang.Comparable<Binary>

    public enum Binary
    extends java.lang.Enum<Binary>
    implements Tag
    The binary tag: inhabitable or not.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      HABITABLE
      The tag habitable.
      NON_HABITABLE
      The tag non-habitable.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.scene.paint.Color getColor()
      Get the color representing this tag.
      static Tag getDefault()
      Give the default Binary tag.
      int getSize()
      Get the number of different tags (e.g.
      Binary next()
      Get the next tag.
      static Binary valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Binary[] 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

      • HABITABLE

        public static final Binary HABITABLE
        The tag habitable. It will be represented in ImagePatch (a inner class of Controller) with green border.
      • NON_HABITABLE

        public static final Binary NON_HABITABLE
        The tag non-habitable. It will be represented in ImagePatch (a inner class of Controller) with blue border.
    • Method Detail

      • values

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

        public static Binary 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
      • getDefault

        public static Tag getDefault()
        Give the default Binary tag.
        Returns:
        The default Binary tag.
      • getSize

        public int getSize()
        Description copied from interface: Tag
        Get the number of different tags (e.g. 2 for binary tag).
        Specified by:
        getSize in interface Tag
        Returns:
        The number of different tags
      • next

        public Binary next()
        Description copied from interface: Tag
        Get the next tag. It should be circular: get the exact tag beck after calling this function several times.
        Specified by:
        next in interface Tag
        Returns:
        The next tag.
      • getColor

        public javafx.scene.paint.Color getColor()
        Description copied from interface: Tag
        Get the color representing this tag.
        Specified by:
        getColor in interface Tag
        Returns:
        The color representing this tag.