Package org.jline.style
Class MemoryStyleSource
java.lang.Object
org.jline.style.MemoryStyleSource
- All Implemented Interfaces:
StyleSource
In-memory
StyleSource
.- Since:
- 3.4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear all styles.Returns the appropriate style for the given style-group and style-name, ornull
if missing.groups()
Returns configured style-group names.void
Remove all styles for given style-group.void
Remove a specific style from style-group.void
Set a specific style in a style-group.Returns configured styles for given style-group.
-
Constructor Details
-
MemoryStyleSource
public MemoryStyleSource()
-
-
Method Details
-
get
Description copied from interface:StyleSource
Returns the appropriate style for the given style-group and style-name, ornull
if missing.- Specified by:
get
in interfaceStyleSource
- Parameters:
group
- the groupname
- the style name- Returns:
- the style
-
set
Description copied from interface:StyleSource
Set a specific style in a style-group.- Specified by:
set
in interfaceStyleSource
- Parameters:
group
- the groupname
- the style namestyle
- the style to set
-
remove
Description copied from interface:StyleSource
Remove all styles for given style-group.- Specified by:
remove
in interfaceStyleSource
- Parameters:
group
- the group
-
remove
Description copied from interface:StyleSource
Remove a specific style from style-group.- Specified by:
remove
in interfaceStyleSource
- Parameters:
group
- the groupname
- the style name to remove
-
clear
public void clear()Description copied from interface:StyleSource
Clear all styles.- Specified by:
clear
in interfaceStyleSource
-
groups
Description copied from interface:StyleSource
Returns configured style-group names.- Specified by:
groups
in interfaceStyleSource
- Returns:
- Immutable collection.
-
styles
Description copied from interface:StyleSource
Returns configured styles for given style-group.- Specified by:
styles
in interfaceStyleSource
- Parameters:
group
- the style group- Returns:
- Immutable map.
-