Labels.Smart| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(String name)
Label exists?
|
Label |
create(String name,
String color)
Create new label.
|
Label |
createOrGet(String name)
Create or get label.
|
Label |
createOrGet(String name,
String color)
Create or get label (with this explicit color).
|
void |
delete(String name)
Delete label by name.
|
Label |
get(String name)
Get a label by name.
|
Iterable<Label> |
iterate()
Iterate them all.
|
Repo |
repo()
The repo we're in.
|
public Smart(Labels lbl)
lbl - Labelspublic boolean contains(String name)
name - Name of the labelpublic Label createOrGet(String name) throws IOException
name - Name of the labelIOException - If there is any I/O problempublic Label createOrGet(String name, String color) throws IOException
name - Name of the labelcolor - Color to set (or modify)IOException - If there is any I/O problempublic Label create(String name, String color) throws IOException
Labelscreate in interface Labelsname - The name of itcolor - Color of itIOException - If there is any I/O problempublic Label get(String name)
Labelsget in interface Labelsname - The name of itpublic Iterable<Label> iterate()
Labelsiterate in interface Labelspublic void delete(String name) throws IOException
Labelsdelete in interface Labelsname - Name of the label to removeIOException - If there is any I/O problemCopyright © 2012–2018 jcabi.com. All rights reserved.