Interface FlowMapping<T,C extends Cell<T>>
- All Known Implementing Classes:
FlowMapping.AbstractMapping,FlowMapping.FullMapping,FlowMapping.PartialMapping,FlowMapping.ValidMapping
FlowState to map indexes from an old state to a new one.
There are three concrete implementations which extend the common abstract class AbstractMapping:
FlowMapping.ValidMapping: a valid mapping means that a cell can be removed from the old state and copied
as is to the new one
FlowMapping.PartialMapping: a partial mapping means that a cell should be removed from the old state
and copied to the new state after updating its index
FlowMapping.FullMapping: a full mapping means that a cell should be removed from the old state and
copied to the new state only after both its index and item have been updated.
Often a FullMapping can also receive a negative index as the "oldIndex" parameter of
manage(FlowState, FlowState), this means that no cells are left in the old state and a new one
must be created to reach FlowState.getTargetSize()
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFlowMapping.AbstractMapping<T,C extends Cell<T>> static classFlowMapping.FullMapping<T,C extends Cell<T>> static classFlowMapping.PartialMapping<T,C extends Cell<T>> static classFlowMapping.ValidMapping<T,C extends Cell<T>> -
Method Summary
Modifier and TypeMethodDescriptionintintvoid
-
Method Details
-
manage
-
getOldIndex
int getOldIndex() -
getNewIndex
int getNewIndex()
-