junitx.ddtunit.data
Class TypedObject

java.lang.Object
  extended by junitx.ddtunit.data.TypedObject
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AssertObject

public class TypedObject
extends Object
implements Cloneable

Class represents objects that specify type and value separately. This is especially usefull during operation with null object references.

Author:
jg

Field Summary
static String UNKNOWN_TYPE
           
 
Constructor Summary
TypedObject(String id)
           
TypedObject(String id, String type)
           
 
Method Summary
 Object clone()
           
 boolean equals(Object obj)
          Returns true if this TypedObject is the same as the o argument.
 String getId()
           
 String getType()
           
 Object getValue()
           
 int hashCode()
          Override hashCode.
 void setId(String id)
           
 void setType(String type)
           
 void setValue(Object value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_TYPE

public static final String UNKNOWN_TYPE
See Also:
Constant Field Values
Constructor Detail

TypedObject

public TypedObject(String id)

TypedObject

public TypedObject(String id,
                   String type)
Method Detail

getValue

public Object getValue()

setValue

public void setValue(Object value)

getType

public String getType()

getId

public String getId()

hashCode

public int hashCode()
Override hashCode.

Overrides:
hashCode in class Object
Returns:
the Objects hashcode.

equals

public boolean equals(Object obj)
Returns true if this TypedObject is the same as the o argument.

Overrides:
equals in class Object
Returns:
true if this TypedObject is the same as the o argument.

setId

public void setId(String id)

setType

public void setType(String type)

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
Overrides:
clone in class Object


Copyright © 2004-2011. All Rights Reserved.