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
Modifier and TypeInterfaceDescriptionstatic class
Domain 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.PathSearchContext
empty()
Gets an emptyPathSearch.PathSearchContext
.Get path search config.Gets a path view items.static List<PartsText.PartText>
ofPosition
(String text, int position) static PartsText
ofPositions
(String text, int[] positions) Split given text intoPartsText.PartText
's by given positions.void
Sets a path search config.void
Sets 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, setResultValue
Methods 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
-