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 certain ObjectType.
    Author:
    Philip Helger
    • 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 null nor empty.
      • hasObjectType

        default boolean hasObjectType​(@Nullable
                                      ObjectType aOT)
        Check if this object has the provided ObjectType.
        Parameters:
        aOT - The object type to check. May be null.
        Returns:
        true if this object has the passed ObjectType, false otherwise.