openfuture.bugbase.model
Class ErrorLevel

java.lang.Object
  |
  +--openfuture.bugbase.model.ErrorLevel
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class ErrorLevel
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

ErrorLevel.java Created: Tue May 30 19:20:19 2000

Version:
$Revision: 1.3 $
Author:
Wolfgang Reissenberger
See Also:
Serialized Form

Field Summary
static java.lang.String BUG_DISTURBING
           
static int BUG_LEVEL_DISTURBING
           
static int BUG_LEVEL_NEW_FEATURE
           
static int BUG_LEVEL_NICE_TO_HAVE
           
static int BUG_LEVEL_SEVERE
           
static java.lang.String BUG_NEW_FEATURE
           
static java.lang.String BUG_NICE_TO_HAVE
           
static java.lang.String BUG_SEVERE
           
 
Constructor Summary
ErrorLevel()
          Creates with level "nice to have";
ErrorLevel(int level)
          Creates with given level.
ErrorLevel(java.lang.String level)
          Creates with error level equal to level.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares to another ErrorLevel.
static java.util.Vector getErrorLevels()
          Returns a Vector of error level names.
 int getValue()
          Returns the internal representation of the error level
 boolean is(int level)
          Compares to a bug level
protected  void setErrorLevel(int v)
          Set the value of errorLevel.
protected  void setErrorLevel(java.lang.String level)
          Set the value of errorLevel.
 java.lang.String toString()
          Returns the String representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUG_SEVERE

public static final java.lang.String BUG_SEVERE

BUG_DISTURBING

public static final java.lang.String BUG_DISTURBING

BUG_NICE_TO_HAVE

public static final java.lang.String BUG_NICE_TO_HAVE

BUG_NEW_FEATURE

public static final java.lang.String BUG_NEW_FEATURE

BUG_LEVEL_SEVERE

public static final int BUG_LEVEL_SEVERE

BUG_LEVEL_DISTURBING

public static final int BUG_LEVEL_DISTURBING

BUG_LEVEL_NICE_TO_HAVE

public static final int BUG_LEVEL_NICE_TO_HAVE

BUG_LEVEL_NEW_FEATURE

public static final int BUG_LEVEL_NEW_FEATURE
Constructor Detail

ErrorLevel

public ErrorLevel()
Creates with level "nice to have";

ErrorLevel

public ErrorLevel(int level)
Creates with given level.
Parameters:
level - error level

ErrorLevel

public ErrorLevel(java.lang.String level)
Creates with error level equal to level.
Parameters:
level - error level.
Method Detail

toString

public java.lang.String toString()
Returns the String representation
Overrides:
toString in class java.lang.Object
Returns:
String representation

setErrorLevel

protected void setErrorLevel(int v)
Set the value of errorLevel.
Parameters:
v - Value to assign to errorLevel.

setErrorLevel

protected void setErrorLevel(java.lang.String level)
Set the value of errorLevel.
Parameters:
level - Value to assign to errorLevel.

is

public boolean is(int level)
Compares to a bug level
Parameters:
level - bug level
Returns:
true, if this has the same level

getErrorLevels

public static java.util.Vector getErrorLevels()
Returns a Vector of error level names.
Returns:
error level names.

getValue

public int getValue()
Returns the internal representation of the error level
Returns:
the internal representation of the error level

compareTo

public int compareTo(java.lang.Object o)
Compares to another ErrorLevel. If the level of this one is more severe, 1 is returned.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - object to compared with
Returns:
-1 if this ErrorCode is less severe than o.


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.