Class ItemId

java.lang.Object
net.shibboleth.metadata.ItemId
All Implemented Interfaces:
Comparable<ItemId>, ItemMetadata

@Immutable public class ItemId extends Object implements ItemMetadata, Comparable<ItemId>
Carries a unique identifier for the data carried by an Item. An Item may have more than one ItemId, but should not have the same ItemId as any other Item in a given context.
  • Field Details

    • id

      @Nonnull @NotEmpty private final String id
      Unique ID for the Item.
  • Constructor Details

    • ItemId

      public ItemId(@Nonnull @NotEmpty String itemId)
      Constructor.
      Parameters:
      itemId - a unique identifier for the entity, never null or empty
  • Method Details

    • getId

      @Nonnull @NotEmpty public String getId()
      Gets a unique identifier for the data carried by the Item.
      Returns:
      unique identifier for the data carried by the Item
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(ItemId o)
      Specified by:
      compareTo in interface Comparable<ItemId>