java.lang.Object
com.aoapps.dao.base.AbstractReason
- All Implemented Interfaces:
Reason
,Comparable<Reason>
- Direct Known Subclasses:
AggregateReason
,SingleReason
Base for
Reason
implementations.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List
<AbstractReason> addReason
(List<AbstractReason> reasons, AbstractReason newReason) Merges a single reason, if not null.static List
<AbstractReason> addReasons
(List<AbstractReason> reasons, List<AbstractReason> newReasons) Combines two lists.static List
<AbstractReason> addUsedByReason
(List<AbstractReason> reasons, Collection<?> dependencies, String singularName, String pluralName) Adds a cannot remove reason if the provided collection is non-null and non-empty.abstract AbstractReason
abstract String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
AbstractReason
public AbstractReason()
-
-
Method Details
-
addReason
public static List<AbstractReason> addReason(List<AbstractReason> reasons, AbstractReason newReason) Merges a single reason, if not null. Helper for the generation of cannot remove reasons.- Returns:
- the (possibly) new list.
-
addReasons
public static List<AbstractReason> addReasons(List<AbstractReason> reasons, List<AbstractReason> newReasons) Combines two lists. Helper for the generation of cannot remove reasons.- Returns:
- the (possibly) new list.
-
addUsedByReason
public static List<AbstractReason> addUsedByReason(List<AbstractReason> reasons, Collection<?> dependencies, String singularName, String pluralName) Adds a cannot remove reason if the provided collection is non-null and non-empty. Helper for the generation of cannot remove reasons.- Returns:
- the (possibly) new list.
- See Also:
-
toString
-
merge
-