@Immutable @Loggable(value=1) public static final class IssueLabels.Smart extends Object implements IssueLabels
IssueLabels.Smart| Constructor and Description |
|---|
IssueLabels.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 IssueLabels.Smart(@NotNull(message="lbl can\'t be NULL") IssueLabels lbl)
lbl - Labelspublic boolean contains(@NotNull(message="name can\'t be NULL") String name)
name - Name of the label@NotNull(message="label is never NULL") public Label get(@NotNull(message="name cant be NULL") String name)
name - Name of the labelpublic boolean addIfAbsent(@NotNull(message="name should not be NULL") String name) throws IOException
name - Name of the labelIOException - If there is any I/O problempublic boolean addIfAbsent(@NotNull(message="name is never NULL") String name, @NotNull(message="color can\'t be NULL") String color) throws IOException
name - Name of the labelcolor - Color to setIOException - If there is any I/O problem@NotNull(message="collection is never NULL") public Collection<Label> findByColor(@NotNull(message="color can\'t be NULL") String color) throws IOException
color - ColorIOException - If there is any I/O problempublic boolean removeIfExists(@NotNull(message="name cannot be NULL") String name) throws IOException
name - Label to removeIOException - If there is any I/O problem@NotNull(message="issue is never NULL") public Issue issue()
IssueLabelsissue in interface IssueLabelspublic void add(@NotNull(message="names can\'t be NULL") Iterable<String> names) throws IOException
IssueLabelsadd in interface IssueLabelsnames - The labels to addIOException - If there is any I/O problempublic void replace(@NotNull(message="names can\'t be NULL") Iterable<String> names) throws IOException
IssueLabelsreplace in interface IssueLabelsnames - The labels to saveIOException - If there is any I/O problem@NotNull(message="Iterable of labels is never NULL") public Iterable<Label> iterate()
IssueLabelsiterate in interface IssueLabelspublic void remove(@NotNull(message="name can\'t be NULL") 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–2014 jcabi.com. All rights reserved.