Package com.jcabi.github
Class Labels.Smart
- java.lang.Object
-
- com.jcabi.github.Labels.Smart
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.Labels
Labels.Smart
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(String name)Label exists?Labelcreate(String name, String color)Create new label.LabelcreateOrGet(String name)Create or get label.LabelcreateOrGet(String name, String color)Create or get label (with this explicit color).voiddelete(String name)Delete label by name.Labelget(String name)Get a label by name.Iterable<Label>iterate()Iterate them all.Reporepo()The repo we're in.
-
-
-
Constructor Detail
-
Smart
public Smart(Labels lbl)
Public ctor.- Parameters:
lbl- Labels
-
-
Method Detail
-
contains
public boolean contains(String name)
Label exists?- Parameters:
name- Name of the label- Returns:
- TRUE if it exists
-
createOrGet
public Label createOrGet(String name) throws IOException
Create or get label.- Parameters:
name- Name of the label- Returns:
- Label found or created
- Throws:
IOException- If there is any I/O problem
-
createOrGet
public Label createOrGet(String name, String color) throws IOException
Create or get label (with this explicit color).- Parameters:
name- Name of the labelcolor- Color to set (or modify)- Returns:
- Label found or created
- Throws:
IOException- If there is any I/O problem- Since:
- 0.7
-
create
public Label create(String name, String color) throws IOException
Description copied from interface:LabelsCreate new label.- Specified by:
createin interfaceLabels- Parameters:
name- The name of itcolor- Color of it- Returns:
- The label created
- Throws:
IOException- If there is any I/O problem- See Also:
- Create a Label
-
get
public Label get(String name)
Description copied from interface:LabelsGet a label by name.- Specified by:
getin interfaceLabels- Parameters:
name- The name of it- Returns:
- The label
- See Also:
- Get a single label
-
iterate
public Iterable<Label> iterate()
Description copied from interface:LabelsIterate them all.- Specified by:
iteratein interfaceLabels- Returns:
- Iterator of labels
- See Also:
- List Labels on an Issue
-
delete
public void delete(String name) throws IOException
Description copied from interface:LabelsDelete label by name.- Specified by:
deletein interfaceLabels- Parameters:
name- Name of the label to remove- Throws:
IOException- If there is any I/O problem- See Also:
- Delete a Label
-
-