Package com.helger.commons.hierarchy
Interface IHasParent<PARENTTYPE>
-
- Type Parameters:
PARENTTYPE- The type of the parent objects
- 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 IHasParent<PARENTTYPE>
This helper interface is required to build a hierarchy of objects.- Author:
- Philip
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PARENTTYPEgetParent()Get the parent object of this object.default booleanhasParent()Check if this element has a parent.
-
-
-
Method Detail
-
getParent
@Nullable PARENTTYPE getParent()
Get the parent object of this object.- Returns:
- The parent object or
nullif this object has no parent.
-
hasParent
default boolean hasParent()
Check if this element has a parent.- Returns:
trueif this element has a parent,falseotherwise.- Since:
- 8.5.2
-
-