com.ds.fw.errors
Class FwErrors

java.lang.Object
  |
  +--com.ds.fw.types.FwSimpleObject
        |
        +--com.ds.fw.errors.FwErrors
All Implemented Interfaces:
java.lang.Cloneable, FwCopyableIF, FwDisplayableIF, FwSimpleObjectIF, java.io.Serializable

public class FwErrors
extends FwSimpleObject

This class manipulates a collection with errors.

See Also:
Serialized Form

Constructor Summary
FwErrors()
          Default constructor
 
Method Summary
 void clear()
          Clears the errors vector.
 com.ds.fw.errors.FwError getError(int i)
          Gets a error from the list by index.
 com.ds.fw.errors.FwError getLastError()
          Gets the last error from the list.
 int getNBErrors()
          Gets the number of errors in the list.
 int getNBErrors(int type)
          Gets the number of errors with the given type.
 void newError(java.lang.String name, java.lang.String descr, int code, int type)
          Adds a new error to the list.
 java.lang.String printErrors()
          Returns a string with all errors in the list.
 
Methods inherited from class com.ds.fw.types.FwSimpleObject
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, printStackTrace, toString, toStringValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FwErrors

public FwErrors()
Default constructor

Method Detail

clear

public void clear()
Clears the errors vector.


newError

public void newError(java.lang.String name,
                     java.lang.String descr,
                     int code,
                     int type)
Adds a new error to the list.

Parameters:
name - name of the error
descr - description of the error
code - code of the error
type - type of the error

getError

public com.ds.fw.errors.FwError getError(int i)
Gets a error from the list by index.

Parameters:
i - the index
Returns:
the error

getLastError

public com.ds.fw.errors.FwError getLastError()
Gets the last error from the list.


getNBErrors

public int getNBErrors()
Gets the number of errors in the list.


getNBErrors

public int getNBErrors(int type)
Gets the number of errors with the given type.

Parameters:
type - the type
Returns:
thenumber ogf the errors with the type

printErrors

public java.lang.String printErrors()
Returns a string with all errors in the list.