org.marketcetera.util.ws.wrappers
Class BaseWrapper<T>

java.lang.Object
  extended by org.marketcetera.util.ws.wrappers.BaseWrapper<T>
Direct Known Subclasses:
DualWrapper, MapWrapper, RootElementWrapper

public abstract class BaseWrapper<T>
extends Object

A generic wrapper for marshalling a data value via JAXB. This class provides only a protected getter/setter because the raw form (namely the standard class used to represent that value in Java) may not be suitable for JAXB marshalling; but that raw form is suitable for (and is, in fact used by this class) to override certain standard Object methods.

Since:
1.0.0
Version:
$Id: BaseWrapper.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Constructor Summary
protected BaseWrapper()
          Creates a new wrapper.
  BaseWrapper(T value)
          Creates a new wrapper with the given value.
 
Method Summary
 boolean equals(Object other)
           
protected  T getValue()
          Returns the receiver's data.
 int hashCode()
           
protected  void setValue(T value)
          Sets the receiver's data to the given value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseWrapper

public BaseWrapper(T value)
Creates a new wrapper with the given value.

Parameters:
value - The value, which may be null.

BaseWrapper

protected BaseWrapper()
Creates a new wrapper. This empty constructor is intended for use by JAXB.

Method Detail

setValue

protected void setValue(T value)
Sets the receiver's data to the given value.

Parameters:
value - The value, which may be null.

getValue

protected T getValue()
Returns the receiver's data.

Returns:
The data, which may be null.

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.