org.jcoderz.phoenix.report
Class ReportInterval

java.lang.Object
  extended by org.jcoderz.phoenix.report.ReportInterval
All Implemented Interfaces:
Serializable, EnumType, StrongType

public final class ReportInterval
extends Object
implements Serializable, EnumType

Enumerated type of a report interval. Instances of this class are immutable. The following report intervals are defined:

The values of this enum have a internal sequential integer representation starting with '0'.

Author:
generated
See Also:
Serialized Form

Field Summary
static ReportInterval BUILD
          Single builds (value: Build).
static ReportInterval DAY
          The ReportInterval Day.
static ReportInterval MONTH
          The ReportInterval Month.
static ReportInterval OLD
          Select old findings, not listed before.
static String TYPE_NAME
          The name of this type.
static Map VALUE_MAP
          Immutable map using the name string as key holding the ReportIntervals as values.
static List VALUES
          Immutable list of the ReportIntervals.
static ReportInterval WEEK
          The ReportInterval Week.
 
Method Summary
static ReportInterval fromInt(int i)
          Creates a ReportInterval object from its int representation.
static ReportInterval fromString(String str)
          Creates a ReportInterval object from its String representation.
 int toInt()
          Returns the int representation of this report interval.
 String toString()
          Returns the String representation of this report interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final String TYPE_NAME
The name of this type.

See Also:
Constant Field Values

BUILD

public static final ReportInterval BUILD
Single builds (value: Build).


DAY

public static final ReportInterval DAY
The ReportInterval Day.


WEEK

public static final ReportInterval WEEK
The ReportInterval Week.


MONTH

public static final ReportInterval MONTH
The ReportInterval Month.


OLD

public static final ReportInterval OLD
Select old findings, not listed before. (value: Old).


VALUES

public static final List VALUES
Immutable list of the ReportIntervals.


VALUE_MAP

public static final Map VALUE_MAP
Immutable map using the name string as key holding the ReportIntervals as values.

Method Detail

fromInt

public static ReportInterval fromInt(int i)
                              throws ArgumentMalformedException
Creates a ReportInterval object from its int representation.

Parameters:
i - the integer representation of the report interval.
Returns:
the ReportInterval object represented by this int.
Throws:
ArgumentMalformedException - If the assigned int value isn't listed in the internal report interval table.

fromString

public static ReportInterval fromString(String str)
                                 throws ArgumentMalformedException
Creates a ReportInterval object from its String representation.

Parameters:
str - the string representation of the report interval.
Returns:
the ReportInterval object represented by this str.
Throws:
ArgumentMalformedException - If the given str value isn't listed in the internal report interval table.

toInt

public int toInt()
Returns the int representation of this report interval.

Specified by:
toInt in interface EnumType
Returns:
the int representation of this report interval.

toString

public String toString()
Returns the String representation of this report interval.

Overrides:
toString in class Object
Returns:
the String representation of this report interval.


Copyright 2007 The jCoderZ Project.