Package org.openstreetmap.josm.command
Interface SplitWayCommand.Strategy
-
- Enclosing class:
- SplitWayCommand
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface SplitWayCommand.Strategy
Determines which way chunk should reuse the old id and its history
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Way
determineWayToKeep(Iterable<Way> wayChunks)
Determines which way chunk should reuse the old id and its history.static SplitWayCommand.Strategy
keepFirstChunk()
Returns a strategy which selects the first way chunk.static SplitWayCommand.Strategy
keepLongestChunk()
Returns a strategy which selects the way chunk with the highest node count to keep.
-
-
-
Method Detail
-
determineWayToKeep
Way determineWayToKeep(Iterable<Way> wayChunks)
Determines which way chunk should reuse the old id and its history.- Parameters:
wayChunks
- the way chunks- Returns:
- the way to keep
-
keepLongestChunk
static SplitWayCommand.Strategy keepLongestChunk()
Returns a strategy which selects the way chunk with the highest node count to keep.- Returns:
- strategy which selects the way chunk with the highest node count to keep
-
keepFirstChunk
static SplitWayCommand.Strategy keepFirstChunk()
Returns a strategy which selects the first way chunk.- Returns:
- strategy which selects the first way chunk
-
-