@Immutable @Loggable(value=1) public static final class IssueLabels.Smart extends Object implements IssueLabels
IssueLabels.Smart| Constructor and Description |
|---|
Smart(IssueLabels lbl)
Public ctor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Iterable<String> names)
Add new labels.
|
boolean |
addIfAbsent(String name)
Add label if it is absent, don't touch its color if exists.
|
boolean |
addIfAbsent(String name,
String color)
Add label if it is absent, and set its color in any case.
|
void |
clear()
Remove all labels.
|
boolean |
contains(String name)
Label exists?
|
Collection<Label> |
findByColor(String color)
Select all labels with the given color.
|
Label |
get(String name)
Get label by name (runtime exception if absent).
|
Issue |
issue()
The issue we're in.
|
Iterable<Label> |
iterate()
Iterate them all.
|
void |
remove(String name)
Remove label by name.
|
boolean |
removeIfExists(String name)
Remove label if it exists (do nothing otherwise).
|
void |
replace(Iterable<String> names)
Replace all labels.
|
public Smart(IssueLabels lbl)
lbl - Labelspublic boolean contains(String name)
name - Name of the labelpublic Label get(String name)
name - Name of the labelpublic boolean addIfAbsent(String name) throws IOException
name - Name of the labelIOException - If there is any I/O problempublic boolean addIfAbsent(String name, String color) throws IOException
name - Name of the labelcolor - Color to setIOException - If there is any I/O problempublic Collection<Label> findByColor(String color) throws IOException
color - ColorIOException - If there is any I/O problempublic boolean removeIfExists(String name) throws IOException
name - Label to removeIOException - If there is any I/O problempublic Issue issue()
IssueLabelsissue in interface IssueLabelspublic void add(Iterable<String> names) throws IOException
IssueLabelsadd in interface IssueLabelsnames - The labels to addIOException - If there is any I/O problempublic void replace(Iterable<String> names) throws IOException
IssueLabelsreplace in interface IssueLabelsnames - The labels to saveIOException - If there is any I/O problempublic Iterable<Label> iterate()
IssueLabelsiterate in interface IssueLabelspublic void remove(String name) throws IOException
IssueLabelsremove in interface IssueLabelsname - Name of the label to removeIOException - If there is any I/O problempublic void clear()
throws IOException
IssueLabelsclear in interface IssueLabelsIOException - If there is any I/O problemCopyright © 2012–2018 jcabi.com. All rights reserved.