Interface PathSearch.PathSearchContext
- All Superinterfaces:
AbstractTextComponent.TextComponentContext<Path,,PathSearch.PathSearchContext> ComponentContext<PathSearch.PathSearchContext>
- Enclosing class:
- PathSearch
public static interface PathSearch.PathSearchContext
extends AbstractTextComponent.TextComponentContext<Path,PathSearch.PathSearchContext>
Context for
PathSearch.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDomain class for path view item.Nested classes/interfaces inherited from interface org.springframework.shell.component.support.AbstractTextComponent.TextComponentContext
AbstractTextComponent.TextComponentContext.MessageLevel -
Method Summary
Modifier and TypeMethodDescriptionstatic PathSearch.PathSearchContextempty()Gets an emptyPathSearch.PathSearchContext.Get path search config.Gets a path view items.static List<PartsText.PartText>ofPosition(String text, int position) static PartsTextofPositions(String text, int[] positions) Split given text intoPartsText.PartText's by given positions.voidSets a path search config.voidSets a path view items.Methods inherited from interface org.springframework.shell.component.support.AbstractTextComponent.TextComponentContext
getInput, getMessage, getMessageLevel, getName, getResultValue, setInput, setMessage, setMessage, setMessageLevel, setName, setResultValueMethods inherited from interface org.springframework.shell.component.context.ComponentContext
containsKey, get, get, getTerminalWidth, put, setTerminalWidth, stream, toTemplateModel
-
Method Details
-
getPathViewItems
List<PathSearch.PathSearchContext.PathViewItem> getPathViewItems()Gets a path view items.- Returns:
- path view items
-
setPathViewItems
Sets a path view items.- Parameters:
items- the path view items
-
getPathSearchConfig
PathSearch.PathSearchConfig getPathSearchConfig()Get path search config.- Returns:
- a path search config
-
setPathSearchConfig
Sets a path search config.- Parameters:
config- a path search config
-
empty
Gets an emptyPathSearch.PathSearchContext.- Returns:
- empty path search context
-
ofPositions
Split given text intoPartsText.PartText's by given positions.- Parameters:
text- the text to splitpositions- the positions array, expected to be ordered and no duplicates- Returns:
- parts text
-
ofPosition
-