Class ProductWrapper<E>

  • Type Parameters:
    E - the type parameter

    public class ProductWrapper<E>
    extends java.lang.Object
    Helper class for the Generator class.

    Created: 26.01.2010 10:53:53
    Since:
    0.6.0
    Author:
    Volker Bergmann
    • Constructor Detail

      • ProductWrapper

        public ProductWrapper​(E product)
        Instantiates a new Product wrapper.
        Parameters:
        product - the product
      • ProductWrapper

        public ProductWrapper()
        Instantiates a new Product wrapper.
    • Method Detail

      • wrap

        public ProductWrapper<E> wrap​(E product)
        Wrap product wrapper.
        Parameters:
        product - the product
        Returns:
        the product wrapper
      • wrap

        public ProductWrapper<E> wrap​(E product,
                                      boolean clearTags)
        Wrap product wrapper.
        Parameters:
        product - the product
        clearTags - the clear tags
        Returns:
        the product wrapper
      • unwrap

        public E unwrap()
        Unwrap e.
        Returns:
        the e
      • getTag

        public java.lang.String getTag​(java.lang.String key)
        Gets tag.
        Parameters:
        key - the key
        Returns:
        the tag
      • setTag

        public ProductWrapper<E> setTag​(java.lang.String key,
                                        java.lang.String value)
        Sets tag.
        Parameters:
        key - the key
        value - the value
        Returns:
        the tag
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • unwrap

        public static java.lang.Object unwrap​(ProductWrapper<?> wrapper)
        Unwrap object.
        Parameters:
        wrapper - the wrapper
        Returns:
        the object