public class Group
extends java.lang.Object
Constructor and Description |
---|
Group(java.lang.String name)
Construct a group.
|
Modifier and Type | Method and Description |
---|---|
Group |
appendGroup(Group group)
Append a group at the end of the list of groups this group starts or is a part of.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getName()
Get the name of the group.
|
Group |
getNext()
Get the next group after this group.
|
java.lang.String |
getSubject()
Get the resolved subject of a group by concatenating the group name and any groups.
|
int |
hashCode() |
java.lang.String |
toString() |
public Group(java.lang.String name)
Group names are considered 'Restricted Terms' and must only contain A-Z, a-z, 0-9, '-' or '_'
name
- the group namepublic Group appendGroup(Group group)
getNext()
Subsequent appends add the group to the end of the list.group
- the group to appendpublic java.lang.String getSubject()
Group g = new Group("A")
.appendGroup(new Group("B"))
.appendGroup(new Group("C"))
.appendGroup(new Group("D"));
System.out.println(g.getSubject());
prints "A.B.C.D"public java.lang.String getName()
public Group getNext()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object