Class AbstractItem<T>

java.lang.Object
net.shibboleth.metadata.AbstractItem<T>
Type Parameters:
T - type of data contained in the item
All Implemented Interfaces:
Item<T>
Direct Known Subclasses:
DOMElementItem

@NotThreadSafe public abstract class AbstractItem<T> extends Object implements Item<T>
Base implementation of an Item.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final T
    The actual data held by the item.
    private final net.shibboleth.shared.collection.ClassToInstanceMultiMap<ItemMetadata>
    Additional processing information associated with this Item.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractItem(T newData)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    final net.shibboleth.shared.collection.ClassToInstanceMultiMap<ItemMetadata>
    Gets all of the metadata attached to this Item.
    final T
    Gets the wrapped item data.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.shibboleth.metadata.Item

    copy
  • Field Details

    • data

      @Nonnull private final T data
      The actual data held by the item.
    • metadata

      @Nonnull @NonnullElements private final net.shibboleth.shared.collection.ClassToInstanceMultiMap<ItemMetadata> metadata
      Additional processing information associated with this Item.
  • Constructor Details

    • AbstractItem

      protected AbstractItem(@Nonnull T newData)
      Constructor.
      Parameters:
      newData - data to wrap in the Item
  • Method Details

    • unwrap

      @Nonnull public final T unwrap()
      Description copied from interface: Item
      Gets the wrapped item data.
      Specified by:
      unwrap in interface Item<T>
      Returns:
      the wrapped item data
    • getItemMetadata

      @Nonnull @NonnullElements public final net.shibboleth.shared.collection.ClassToInstanceMultiMap<ItemMetadata> getItemMetadata()
      Description copied from interface: Item
      Gets all of the metadata attached to this Item.
      Specified by:
      getItemMetadata in interface Item<T>
      Returns:
      metadata attached to this Item