Package com.helger.pdflayout.base
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 Summary
Constructors Constructor Description AbstractPLObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDebugID()StringgetID()protected voidonAfterSetID()Callback invoked after an ID change.IMPLTYPEsetBasicDataFrom(IMPLTYPE aSource)For copying stuff internally.IMPLTYPEsetID(String sID)Set the ID of this element.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.pdflayout.base.IPLObject
getAsSplittable, hasID, isVertSplittable
-
Methods inherited from interface com.helger.pdflayout.base.IPLVisitable
visit
-
-
-
-
Method Detail
-
getID
public final String getID()
- Specified by:
getIDin interfacecom.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 bysetID(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 callsonAfterSetIDafter any change, even if the values were the same.- Parameters:
sID- The new ID to use. May neither benullnor empty.- Returns:
- this for chaining
-
getDebugID
@Nonnull @Nonempty public final String getDebugID()
- Specified by:
getDebugIDin interfaceIPLObject<IMPLTYPE extends AbstractPLObject<IMPLTYPE>>- Returns:
- The debug ID of this element. Neither
nullnor empty. The debug ID is usually automatically created automatically from the ID.
-
setBasicDataFrom
@Nonnull @OverridingMethodsMustInvokeSuper public IMPLTYPE setBasicDataFrom(@Nonnull IMPLTYPE aSource)
Description copied from interface:IPLObjectFor copying stuff internally. Must always call super method- Specified by:
setBasicDataFromin interfaceIPLObject<IMPLTYPE extends AbstractPLObject<IMPLTYPE>>- Parameters:
aSource- Source object to copy from. May not benull.- Returns:
- this for chaining
-
-