Enum Connectivity2D

java.lang.Object
java.lang.Enum<Connectivity2D>
inra.ijpb.plugins.Connectivity2D
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Connectivity2D>, java.lang.constant.Constable

public enum Connectivity2D
extends java.lang.Enum<Connectivity2D>
An enumeration of connectivity options for 2D Mathematical Morphology operators.
Author:
dlegland
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant Description
    C4
    The 4 connectivity (only orthogonal neighbors)
    C8
    The 8 connectivity (orthogonal and diagonal neighbors)
  • Method Summary

    Modifier and Type Method Description
    static Connectivity2D fromLabel​(java.lang.String label)
    Determines the connectivity type from its label.
    static java.lang.String[] getAllLabels()
    Returns all the labels for this enumeration.
    int getValue()
    Returns the integer value associated to this connectivity.
    java.lang.String toString()  
    static Connectivity2D valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static Connectivity2D[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • C4

      public static final Connectivity2D C4
      The 4 connectivity (only orthogonal neighbors)
    • C8

      public static final Connectivity2D C8
      The 8 connectivity (orthogonal and diagonal neighbors)
  • Method Details

    • values

      public static Connectivity2D[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Connectivity2D 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
    • getValue

      public int getValue()
      Returns the integer value associated to this connectivity.
      Returns:
      the integer value associated to this connectivity.
    • getAllLabels

      public static java.lang.String[] getAllLabels()
      Returns all the labels for this enumeration.
      Returns:
      all the labels for this enumeration.
    • fromLabel

      public static Connectivity2D fromLabel​(java.lang.String label)
      Determines the connectivity type from its label.
      Parameters:
      label - the name of the connectivity
      Returns:
      the connectivity associated to the label
      Throws:
      java.lang.IllegalArgumentException - if label is not recognized.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Enum<Connectivity2D>