Class StatusUtils
- java.lang.Object
-
- org.opennms.netmgt.bsm.service.model.functions.reduce.StatusUtils
-
public class StatusUtils extends java.lang.Object
Utility methods for manipulatingStatusWithIndex
andStatusWithIndices
objects.- 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 theStatus
from aStatusWithIndices
.protected static java.util.List<StatusWithIndex>
toListWithIndices(java.util.List<Status> statuses)
Converts a list ofStatus
to 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 ofStatus
to 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 theStatus
from aStatusWithIndices
.- Parameters:
si
-- Returns:
-
-