Package com.jcabi.github
Class Labels.Smart
java.lang.Object
com.jcabi.github.Labels.Smart
- All Implemented Interfaces:
Labels
- Enclosing interface:
- Labels
Smart Labels with extra features.
- Since:
- 0.5
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.github.Labels
Labels.Smart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanLabel exists?Create new label.createOrGet(String name) Create or get label.createOrGet(String name, String color) Create or get label (with this explicit color).voidDelete label by name.Get a label by name.iterate()Iterate them all.repo()The repo we're in.
-
Constructor Details
-
Smart
Public ctor.- Parameters:
lbl- Labels
-
-
Method Details
-
contains
Label exists?- Parameters:
name- Name of the label- Returns:
- TRUE if it exists
-
createOrGet
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
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
-
repo
Description copied from interface:LabelsThe repo we're in. -
create
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:
-
get
Description copied from interface:LabelsGet a label by name. -
iterate
Description copied from interface:LabelsIterate them all. -
delete
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:
-