Class AbstractPLObject<IMPLTYPE extends AbstractPLObject<IMPLTYPE>>

java.lang.Object
com.helger.pdflayout.base.AbstractPLObject<IMPLTYPE>
Type Parameters:
IMPLTYPE - The implementation type of this class.
All Implemented Interfaces:
com.helger.commons.id.IHasID<String>, com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>, IPLObject<IMPLTYPE>, IPLVisitable
Direct Known Subclasses:
AbstractPLRenderableObject, PLPageSet

public abstract class AbstractPLObject<IMPLTYPE extends AbstractPLObject<IMPLTYPE>> extends Object implements IPLObject<IMPLTYPE>
Abstract PL object
Author:
Philip Helger
  • Constructor Details

    • AbstractPLObject

      public AbstractPLObject()
  • Method Details

    • getID

      public final String getID()
      Specified by:
      getID in interface com.helger.commons.id.IHasID<IMPLTYPE extends AbstractPLObject<IMPLTYPE>>
      Returns:
      The unique element ID. Never null. By default this ID is automatically generated, by it might be overridden by setID(String).
    • onAfterSetID

      @OverrideOnDemand protected void onAfterSetID()
      Callback invoked after an ID change. Overwrite this method to do local actions (if needed)
    • setID

      @Nonnull public final IMPLTYPE setID(@Nonnull @Nonempty String sID)
      Set the ID of this element. This methods calls onAfterSetID after any change, even if the values were the same.
      Parameters:
      sID - The new ID to use. May neither be null nor empty.
      Returns:
      this for chaining
    • getDebugID

      @Nonnull @Nonempty public final String getDebugID()
      Specified by:
      getDebugID in interface IPLObject<IMPLTYPE extends AbstractPLObject<IMPLTYPE>>
      Returns:
      The debug ID of this element. Neither null nor empty. The debug ID is usually automatically created automatically from the ID.
    • setBasicDataFrom

      Description copied from interface: IPLObject
      For copying stuff internally. Must always call super method
      Specified by:
      setBasicDataFrom in interface IPLObject<IMPLTYPE extends AbstractPLObject<IMPLTYPE>>
      Parameters:
      aSource - Source object to copy from. May not be null.
      Returns:
      this for chaining
    • toString

      public String toString()
      Overrides:
      toString in class Object