org.openmdx.kernel.exception
Class BasicException.Parameter

java.lang.Object
  extended by org.openmdx.kernel.exception.BasicException.Parameter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Property
Enclosing class:
BasicException

public static class BasicException.Parameter
extends Object
implements Serializable

The Parameter class represents a name-value pair. The name and value hold internally are always of type string.

See Also:
Serialized Form

Field Summary
static String EXCEPTION_CLASS
          Name of the parameter representing the excption's java class.
static String EXCEPTION_SOURCE
          Name of the parameter representing the excption's source set by {link @see BasicException#setSource(java.lang.Object) setSource()}
 
Constructor Summary
BasicException.Parameter(String name, boolean value)
          Creates a Parameter object.
BasicException.Parameter(String name, byte value)
          Creates a Parameter object.
BasicException.Parameter(String name, char value)
          Creates a Parameter object.
BasicException.Parameter(String name, double value)
          Creates a Parameter object.
BasicException.Parameter(String name, float value)
          Creates a Parameter object.
BasicException.Parameter(String name, int value)
          Creates a Parameter object.
BasicException.Parameter(String name, long value)
          Creates a Parameter object.
BasicException.Parameter(String name, long duration, java.util.concurrent.TimeUnit unit)
          Creates a Parameter object.
BasicException.Parameter(String name, Object value)
          Creates a Parameter object.
BasicException.Parameter(String name, short value)
          Creates a Parameter object.
 
Method Summary
static BasicException.Parameter[] add(BasicException.Parameter[] first, BasicException.Parameter[] second)
          Add an Parameter array to another Parameter array
 boolean equals(Object object)
          Indicates whether some other object is "equal to" this one.
 String getName()
          Returns the property name
 String getValue()
          Returns the property value
 int hashCode()
          Returns a hash code value for the object.
 String toString()
          Returns a string representation of the Parameter object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EXCEPTION_CLASS

public static final String EXCEPTION_CLASS
Name of the parameter representing the excption's java class.

See Also:
Constant Field Values

EXCEPTION_SOURCE

public static final String EXCEPTION_SOURCE
Name of the parameter representing the excption's source set by {link @see BasicException#setSource(java.lang.Object) setSource()}

See Also:
Constant Field Values
Constructor Detail

BasicException.Parameter

public BasicException.Parameter(String name,
                                Object value)
Creates a Parameter object. The constructor converts the passed value to a String object.

null objects are preserved in that the accessor getValue returns a null object.

The constructor accepts various value types as , array of simple java types, array of and a null object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.

BasicException.Parameter

public BasicException.Parameter(String name,
                                long value)
Creates a Parameter object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.

BasicException.Parameter

public BasicException.Parameter(String name,
                                int value)
Creates a Parameter object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.

BasicException.Parameter

public BasicException.Parameter(String name,
                                short value)
Creates a Parameter object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.

BasicException.Parameter

public BasicException.Parameter(String name,
                                byte value)
Creates a Parameter object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.

BasicException.Parameter

public BasicException.Parameter(String name,
                                char value)
Creates a Parameter object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.

BasicException.Parameter

public BasicException.Parameter(String name,
                                boolean value)
Creates a Parameter object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.

BasicException.Parameter

public BasicException.Parameter(String name,
                                long duration,
                                java.util.concurrent.TimeUnit unit)
Creates a Parameter object.

Parameters:
name - The parameter's name.
duration - The parameter's duration value.
unit - The parameter's time unit.

BasicException.Parameter

public BasicException.Parameter(String name,
                                double value)
Creates a Parameter object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.

BasicException.Parameter

public BasicException.Parameter(String name,
                                float value)
Creates a Parameter object.

Parameters:
name - The property's name.
value - The property's value converted internally to a String.
Method Detail

getName

public final String getName()
Returns the property name

Returns:
String

getValue

public final String getValue()
Returns the property value

Returns:
String

equals

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

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

toString

public String toString()
Returns a string representation of the Parameter object.

Format: "="

Overrides:
toString in class Object
Returns:
a String

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

add

public static BasicException.Parameter[] add(BasicException.Parameter[] first,
                                             BasicException.Parameter[] second)
Add an Parameter array to another Parameter array

Parameters:
first -
second - Add this array to the array named 'first'
Returns:
Parameter[]


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.