StyleSource
public class MemoryStyleSource extends Object implements StyleSource
StyleSource
.Constructor | Description |
---|---|
MemoryStyleSource() |
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
Clear all styles.
|
String |
get(String group,
String name) |
Returns the appropriate style for the given style-group and style-name, or
null if missing. |
Iterable<String> |
groups() |
Returns configured style-group names.
|
void |
remove(String group) |
Remove all styles for given style-group.
|
void |
remove(String group,
String name) |
Remove a specific style from style-group.
|
void |
set(String group,
String name,
String style) |
Set a specific style in a style-group.
|
Map<String,String> |
styles(String group) |
Returns configured styles for given style-group.
|
@Nullable public String get(String group, String name)
StyleSource
null
if missing.get
in interface StyleSource
group
- the groupname
- the style namepublic void set(String group, String name, String style)
StyleSource
set
in interface StyleSource
group
- the groupname
- the style namestyle
- the style to setpublic void remove(String group)
StyleSource
remove
in interface StyleSource
group
- the grouppublic void remove(String group, String name)
StyleSource
remove
in interface StyleSource
group
- the groupname
- the style name to removepublic void clear()
StyleSource
clear
in interface StyleSource
public Iterable<String> groups()
StyleSource
groups
in interface StyleSource
public Map<String,String> styles(String group)
StyleSource
styles
in interface StyleSource
group
- the style groupCopyright © 2020. All rights reserved.