Class StatusUtils
- java.lang.Object
-
- org.opennms.netmgt.bsm.service.model.functions.reduce.StatusUtils
-
public class StatusUtils extends java.lang.ObjectUtility methods for manipulatingStatusWithIndexandStatusWithIndicesobjects.- Author:
- jwhite
-
-
Constructor Summary
Constructors Constructor Description StatusUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.util.List<java.lang.Integer>getIndicesWithStatusGe(java.util.List<StatusWithIndex> statuses, Status threshold)Retrieves the indices with a status >= the given threshold.protected static java.util.Optional<Status>getStatus(java.util.Optional<StatusWithIndices> si)Retrieves theStatusfrom aStatusWithIndices.protected static java.util.List<StatusWithIndex>toListWithIndices(java.util.List<Status> statuses)Converts a list ofStatusto a list ofStatusWithIndex, using the position in the array as the index.
-
-
-
Method Detail
-
getIndicesWithStatusGe
protected static java.util.List<java.lang.Integer> getIndicesWithStatusGe(java.util.List<StatusWithIndex> statuses, Status threshold)
Retrieves the indices with a status >= the given threshold.- Parameters:
statuses-threshold-- Returns:
-
toListWithIndices
protected static java.util.List<StatusWithIndex> toListWithIndices(java.util.List<Status> statuses)
Converts a list ofStatusto a list ofStatusWithIndex, using the position in the array as the index.- Parameters:
statuses-- Returns:
-
getStatus
protected static java.util.Optional<Status> getStatus(java.util.Optional<StatusWithIndices> si)
Retrieves theStatusfrom aStatusWithIndices.- Parameters:
si-- Returns:
-
-