Class 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
    • Field Detail

      • mValue

        private T mValue
    • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object