Package com.helger.commons.type
Interface IHasObjectType
-
- All Known Subinterfaces:
ITypedObject<IDTYPE>
- All Known Implementing Classes:
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 IHasObjectType
Base interface for all objects having a certainObjectType.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ObjectTypegetObjectType()default StringgetObjectTypeName()default booleanhasObjectType(ObjectType aOT)Check if this object has the providedObjectType.
-
-
-
Method Detail
-
getObjectType
@Nonnull ObjectType getObjectType()
- Returns:
- The type of the object. Never
null.
-
getObjectTypeName
@Nonnull @Nonempty default String getObjectTypeName()
- Returns:
- The name of the object type. Neither
nullnor empty.
-
hasObjectType
default boolean hasObjectType(@Nullable ObjectType aOT)
Check if this object has the providedObjectType.- Parameters:
aOT- The object type to check. May benull.- Returns:
trueif this object has the passed ObjectType,falseotherwise.
-
-