Enum Class DashboardState.ColumnIndex

java.lang.Object
java.lang.Enum<DashboardState.ColumnIndex>
com.atlassian.gadgets.dashboard.DashboardState.ColumnIndex
All Implemented Interfaces:
Serializable, Comparable<DashboardState.ColumnIndex>, Constable
Enclosing class:
DashboardState

public static enum DashboardState.ColumnIndex extends Enum<DashboardState.ColumnIndex>
There are a predetermined number of columns that a dashboard can contain, and ColumnIndex is the enumeration of those columns.
  • Enum Constant Details

  • Method Details

    • values

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

      public static DashboardState.ColumnIndex valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • index

      public int index()
      Returns the actual value of the ColumnIndex as an int.
      Returns:
      the actual value of the ColumnIndex as an int.
    • hasNext

      public boolean hasNext()
      Returns true if there are more possible columns after this one, false otherwise.
      Returns:
      true if there are more possible columns after this one, false otherwise.
    • next

      Returns the next column index after this one if there is one, equivalent to doing i+1 when the index is an int.
      Returns:
      the next column index after this one if there is one
      Throws:
      IllegalStateException - if this is the last possible ColumnIndex
    • from

      public static DashboardState.ColumnIndex from(int index)
      Returns the column index as an instance of ColumnIndex.
      Parameters:
      index - the value we want as a ColumnIndex
      Returns:
      the ColumnIndex that index corresponds to
      Throws:
      IllegalArgumentException - if index is outside the range of valid column indices.
    • range

      Returns an immutable Iterable over ColumnIndexes starting from start and ending with end, inclusive. Extremely useful for looping over columns using the foreach construct.
      Parameters:
      start - the first value to use in the Iterable
      end - the last value to use in the Iterable
      Returns:
      an immutable Iterable over ColumnIndexes starting from start and ending with end, inclusive