Class OrderedCompositeItem<S>
java.lang.Object
org.springframework.statemachine.support.OrderedCompositeItem<S>
- Type Parameters:
S
- the type of the item
Composite item which can be used in other components which
may want to allow automatic and annotation based ordering.
Good use case is a list of listeners where user may want
to place some of them to be processed before the others.
- Author:
- Janne Valkealahti
-
Constructor Details
-
OrderedCompositeItem
public OrderedCompositeItem()
-
-
Method Details
-
setItems
Public setter for the listeners.- Parameters:
items
- items
-
add
Register additional item.- Parameters:
item
- item
-
remove
Unregister item.- Parameters:
item
- item
-
iterator
Public getter for the list of items. TheOrdered
items come first, followed by any unordered ones.- Returns:
- an iterator over the list of items
-
reverse
Public getter for the list of items in reverse. TheOrdered
items come last, after any unordered ones.- Returns:
- an iterator over the list of items
-