Labels.Smart
Constructor and Description |
---|
Labels.Smart(Labels lbl)
Public ctor.
|
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 boolean contains(@NotNull(message="name cannot be NULL") String name)
name
- Name of the label@NotNull(message="label should never be NULL") public Label createOrGet(@NotNull(message="name is not NULL") String name) throws IOException
name
- Name of the labelIOException
- If there is any I/O problem@NotNull(message="label should not be NULL") public Label createOrGet(@NotNull(message="name shouldn\'t be NULL") String name, @NotNull(message="color can\'t be NULL") String color) throws IOException
name
- Name of the labelcolor
- Color to set (or modify)IOException
- If there is any I/O problem@NotNull(message="repo is never NULL") public Repo repo()
Labels
@NotNull(message="label is never null") public Label create(@NotNull(message="name can\'t be NULL") String name, @NotNull(message="color can\'t be NULL") String color) throws IOException
Labels
create
in interface Labels
name
- The name of itcolor
- Color of itIOException
- If there is any I/O problem@NotNull(message="label is never NULL") public Label get(@NotNull(message="name can\'t be NULL") String name)
Labels
get
in interface Labels
name
- The name of it@NotNull(message="Iterable of labels is never NULL") public Iterable<Label> iterate()
Labels
iterate
in interface Labels
public void delete(@NotNull(message="name can\'t be NULL") String name) throws IOException
Labels
delete
in interface Labels
name
- Name of the label to removeIOException
- If there is any I/O problemCopyright © 2012–2014 jcabi.com. All rights reserved.