org.jcoderz.phoenix.report
Class Origin

java.lang.Object
  extended by org.jcoderz.phoenix.report.Origin
All Implemented Interfaces:
Serializable, Comparable, RestrictedString, StrongType

public final class Origin
extends Object
implements Serializable, RestrictedString, Comparable

Holds the Origin.

 String.type[1..15].
 regular expression: [A-Za-z0-9]* * 
Instances of this class are immutable.

This class implements the Comparable interface based on the natural order of the String representation of its instances.

Author:
generated via stylesheet
See Also:
Serialized Form

Field Summary
static Origin CHECKSTYLE
          Checkstyle findings report http://checkstyle.sf.net/
static Origin COVERAGE
          Emma http://emma.sf.net or Cobertura http://cobertura.sf.net coverage report.
static Origin CPD
          Copy & Paste report http://pmd.sf.net/
static Origin FINDBUGS
          Findbugs findings report http://findbugs.sf.net/
static Origin JAVA_DOC
          JavaDoc messages http://java.sun.com/j2se/javadoc/.
static int MAX_LENGTH
          The maximal length of Origin (15).
static int MIN_LENGTH
          The minimal length of Origin (1).
static Origin PMD
          PMD findings report http://pmd.sf.net/
static String REGULAR_EXPRESSION
          The regular expression matching Origin.
static Pattern REGULAR_EXPRESSION_PATTERN
          The compiled pattern for the regular expression.
static Origin SYSTEM
          jcoderz report merger system errors.
static String TYPE_NAME
          Origin - the name of this type as string constant.
 
Method Summary
 int compareTo(Object o)
          Compares this Origin with an other.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
static Origin fromString(String str)
          Creates a Origin object from the String representation.
 int hashCode()
          Returns the hash code for the Origin.
 String toString()
          Returns the String representation of this Origin.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final String TYPE_NAME
Origin - the name of this type as string constant.

See Also:
Constant Field Values

MIN_LENGTH

public static final int MIN_LENGTH
The minimal length of Origin (1).

See Also:
Constant Field Values

MAX_LENGTH

public static final int MAX_LENGTH
The maximal length of Origin (15).

See Also:
Constant Field Values

REGULAR_EXPRESSION

public static final String REGULAR_EXPRESSION
The regular expression matching Origin.

See Also:
Constant Field Values

REGULAR_EXPRESSION_PATTERN

public static final Pattern REGULAR_EXPRESSION_PATTERN
The compiled pattern for the regular expression.


PMD

public static final Origin PMD
PMD findings report http://pmd.sf.net/


CPD

public static final Origin CPD
Copy & Paste report http://pmd.sf.net/


CHECKSTYLE

public static final Origin CHECKSTYLE
Checkstyle findings report http://checkstyle.sf.net/


FINDBUGS

public static final Origin FINDBUGS
Findbugs findings report http://findbugs.sf.net/


COVERAGE

public static final Origin COVERAGE
Emma http://emma.sf.net or Cobertura http://cobertura.sf.net coverage report.


JAVA_DOC

public static final Origin JAVA_DOC
JavaDoc messages http://java.sun.com/j2se/javadoc/.


SYSTEM

public static final Origin SYSTEM
jcoderz report merger system errors.

Method Detail

fromString

public static Origin fromString(String str)
                         throws ArgumentMalformedException
Creates a Origin object from the String representation.

Parameters:
str - The str representation of the Origin to be returned.
Returns:
The Origin object represented by this str.
Throws:
ArgumentMalformedException - If the given string str violates the restriction of this type.

toString

public String toString()
Returns the String representation of this Origin.

Overrides:
toString in class Object
Returns:
The String representation of this Origin.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the object to compare to.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns the hash code for the Origin.

Overrides:
hashCode in class Object
Returns:
the hash code for the Origin.

compareTo

public int compareTo(Object o)
Compares this Origin with an other. The order is based on the natural order of the String representation of the compared instances.

Specified by:
compareTo in interface Comparable
Parameters:
o - the Object to be compared.
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
ClassCastException - if the specified object's type prevents it from being compared to this Object.
See Also:
String.compareTo(Object)


Copyright 2007 The jCoderZ Project.