Package choreo.util
Class ChoreoAlert
java.lang.Object
choreo.util.ChoreoAlert
A utility class for creating alerts under the "Choreo Alerts" group.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn alert that can have multiple causes. -
Method Summary
Modifier and TypeMethodDescriptionstatic Alertalert(String name, Alert.AlertType type) Creates an alert under the "Choreo" group.static ChoreoAlert.MultiAlertmultiAlert(Function<List<String>, String> textGenerator, Alert.AlertType type) Creates aChoreoAlert.MultiAlertunder the "Choreo" group.
-
Method Details
-
alert
Creates an alert under the "Choreo" group.- Parameters:
name- The name of the alerttype- The type of alert- Returns:
- an Alert published under the "Choreo" group
-
multiAlert
public static ChoreoAlert.MultiAlert multiAlert(Function<List<String>, String> textGenerator, Alert.AlertType type) Creates aChoreoAlert.MultiAlertunder the "Choreo" group.- Parameters:
textGenerator- A function that accepts a list of causes and returns an alert messagetype- The type of alert- Returns:
- a MultiAlert published under the "Choreo" group
-