Class StatusUtils
- java.lang.Object
-
- org.opennms.netmgt.bsm.service.model.functions.reduce.StatusUtils
-
public class StatusUtils extends 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 List<Integer>
getIndicesWithStatusGe(List<StatusWithIndex> statuses, Status threshold)
Retrieves the indices with a status >= the given threshold.protected static Optional<Status>
getStatus(Optional<StatusWithIndices> si)
Retrieves theStatus
from aStatusWithIndices
.protected static List<StatusWithIndex>
toListWithIndices(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 List<Integer> getIndicesWithStatusGe(List<StatusWithIndex> statuses, Status threshold)
Retrieves the indices with a status >= the given threshold.- Parameters:
statuses
-threshold
-- Returns:
-
toListWithIndices
protected static List<StatusWithIndex> toListWithIndices(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 Optional<Status> getStatus(Optional<StatusWithIndices> si)
Retrieves theStatus
from aStatusWithIndices
.- Parameters:
si
-- Returns:
-
-