|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<DashboardState.ColumnIndex> com.atlassian.gadgets.dashboard.DashboardState.ColumnIndex
public static 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 Summary | |
---|---|
ONE
The second, middle column (in a three column layout) on the dashboard |
|
TWO
The third, and last column (in a three column layout) on the dashboard |
|
ZERO
The first, left-most column on the dashboard. |
Method Summary | |
---|---|
static DashboardState.ColumnIndex |
from(int index)
Returns the column index as an instance of ColumnIndex . |
boolean |
hasNext()
Returns true if there are more possible columns after this one, false otherwise. |
int |
index()
Returns the actual value of the ColumnIndex as an int . |
DashboardState.ColumnIndex |
next()
Returns the next column index after this one if there is one, equivalent to doing i+1 when the index is an int . |
static Iterable<DashboardState.ColumnIndex> |
range(DashboardState.ColumnIndex start,
DashboardState.ColumnIndex end)
Returns an immutable Iterable over ColumnIndex es starting from start and
ending with end , inclusive. |
static DashboardState.ColumnIndex |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static DashboardState.ColumnIndex[] |
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 |
---|
public static final DashboardState.ColumnIndex ZERO
public static final DashboardState.ColumnIndex ONE
public static final DashboardState.ColumnIndex TWO
Method Detail |
---|
public static DashboardState.ColumnIndex[] values()
for (DashboardState.ColumnIndex c : DashboardState.ColumnIndex.values()) System.out.println(c);
public static DashboardState.ColumnIndex valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic int index()
ColumnIndex
as an int
.
ColumnIndex
as an int
.public boolean hasNext()
true
if there are more possible columns after this one, false
otherwise.
true
if there are more possible columns after this one, false
otherwise.public DashboardState.ColumnIndex next()
int
.
IllegalStateException
- if this is the last possible ColumnIndex
public static DashboardState.ColumnIndex from(int index)
index
as an instance of ColumnIndex
.
index
- the value we want as a ColumnIndex
ColumnIndex
that index
corresponds to
IllegalArgumentException
- if index
is outside the range of valid column indices.public static Iterable<DashboardState.ColumnIndex> range(DashboardState.ColumnIndex start, DashboardState.ColumnIndex end)
Iterable
over ColumnIndex
es starting from start
and
ending with end
, inclusive. Extremely useful for looping over columns using the foreach construct.
start
- the first value to use in the Iterable
end
- the last value to use in the Iterable
Iterable
over ColumnIndex
es starting from start
and ending with
end
, inclusive
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |