Skip to content

Commit 2a2c684

Browse files
author
Chris Howe
committed
support labels with name
1 parent d0a019c commit 2a2c684

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

  • src/main/java/com/julienvey/trello/impl/domaininternal
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
package com.julienvey.trello.impl.domaininternal;
22

33
public class Label {
4-
private String value;
4+
// private String value;
5+
private String color;
6+
private String name;
57

68
public Label() {
79
}
810

911
public Label(String value) {
10-
this.value = value;
12+
String[] parts = value.split(",", 2);
13+
color = parts[0].trim();
14+
if(parts.length>1) name = parts[1].trim();
1115
}
1216

13-
public String getValue() {
14-
return value;
17+
public String getColor() {
18+
return color;
1519
}
1620

17-
public void setValue(String value) {
18-
this.value = value;
21+
public String getName() {
22+
return name;
23+
}
24+
25+
public void setColor(String color) {
26+
this.color = color;
27+
}
28+
29+
public void setName(String name){
30+
this.name = name;
1931
}
2032
}

0 commit comments

Comments
 (0)