Package com.helger.commons.id
Interface IHasID<IDTYPE>
-
- Type Parameters:
IDTYPE- The type of the provided ID.
- All Known Subinterfaces:
IErrorLevel,ILicense,ITypedObject<IDTYPE>
- All Known Implementing Classes:
CustomLicense,ECountry,EErrorLevel,ELicense,EMimeContentType,ErrorLevel,ErrorTextProvider.EField,ETriState,EWatchDirAction,TypedObject
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface IHasID<IDTYPE>
Base interface for all objects having an ID.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T extends Comparable<? super T>>
Comparator<IHasID<T>>getComparatorID()IDTYPEgetID()Get the unique ID of this object.
-
-
-
Method Detail
-
getID
IDTYPE getID()
Get the unique ID of this object. If the type isStringthan the returned value must match an XML NMToken expression (so e.g. no ':' in the ID)!- Returns:
- The ID of this object. May not be
null.
-
getComparatorID
@Nonnull static <T extends Comparable<? super T>> Comparator<IHasID<T>> getComparatorID()
-
-