Class NullValueHolder

  • All Implemented Interfaces:
    IValueHolder<Object>

    public final class NullValueHolder
    extends Object
    implements IValueHolder<Object>
    Convention: Normally you set a value-holder to null if you can't find the requested attribute/field/... . If you find something but the contents is null, then set the specific value-holders value (the object value) to null. When to use the NullValueHolder isn't clear yet.
    • Field Detail

      • INSTANCE

        public static final NullValueHolder INSTANCE
        An instance of a NullValueHolder of xsd:anySimpleType.
    • Constructor Detail

      • NullValueHolder

        public NullValueHolder​(QName p_qnmType)
    • Method Detail

      • getValue

        public Object getValue()
        Description copied from interface: IValueHolder
        Get the data that this value holder holds.

        Implementations MUST ensure that multiple calls to this method will return values that equal each other.

        Specified by:
        getValue in interface IValueHolder<Object>
        Returns:
        null.
      • getType

        public QName getType()
        Description copied from interface: IValueHolder
        The type of data this value holder holds.
        Specified by:
        getType in interface IValueHolder<Object>
        Returns:
        The type given at construction time, or XSD_TYPE.ANYSIMPLETYPE.
      • hasValue

        public boolean hasValue()
        Description copied from interface: IValueHolder
        Check if this value holder currently holds data or not.
        Specified by:
        hasValue in interface IValueHolder<Object>
        Returns:
        Always false.