Class ValueWrappingResource<T>

  • All Implemented Interfaces:
    IResource

    public class ValueWrappingResource<T>
    extends Object
    implements IResource
    A resource consisting of a single wrapped value.
    • Constructor Detail

      • ValueWrappingResource

        public ValueWrappingResource​(T value)
        Constructs a resource with the specified value.
        Parameters:
        value - the value which will be wrapped in the resource
    • Method Detail

      • getObject

        public T getObject​(ComparisonContext comparisonContext)
        Description copied from interface: IResource
        Returns the contained object.
        Specified by:
        getObject in interface IResource
        Parameters:
        comparisonContext - The context of the current comparison operation. Can't null
        Returns:
        the contained object, may be null
      • getChild

        public T getChild​(ComparisonContext comparisonContext,
                          Object key)
        Description copied from interface: IResource
        Returns a child object by its key.
        Specified by:
        getChild in interface IResource
        Parameters:
        comparisonContext - The context of the current comparison operation. Can't null
        key - the child key, not null
        Returns:
        the child object or null if not available