Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   This is free and unencumbered software released into the public domain.
   Anyone is free to copy, modify, publish, use, compile, sell, or
   distribute this software, either in source code form or as a compiled
   binary, for any purpose, commercial or non-commercial, and by any
   In jurisdictions that recognize copyright laws, the author or authors
  of this software dedicate any and all copyright interest in the
  software to the public domain. We make this dedication for the benefit
  of the public at large and to the detriment of our heirs and
  successors. We intend this dedication to be an overt act of
  relinquishment in perpetuity of all present and future rights to this
  software under copyright law.
 import java.util.UUID;
 import base.json.Json;

A public or private group of users. A group may be of the following types:
  • Open Activity is public, and users can self join.
  • Closed Some activity is public, users must be invited.
  • Private Activity and membership is private, users must be invited.
 public class Group implements QueryResultComparable<Group>{
 	private UUID uuid;
 	private String name;

0=open, 1=closed, 2=private
 	private int type;
 	public Group(UUID uuidString nameint type) {
 		this. = uuid;
 		this. = name;
 		this. = type;
 	public UUID getUuid() {
 		return ;
 	public void setUuid(UUID uuid) {
 		this. = uuid;
 	public String getName() {
 		return ;
 	public void setName(String name) {
 		this. = name;

Group type. 0=open, 1=closed, 2=private
 	public int getType() {
 		return ;

Update group type. 0=open, 1=closed, 2=private
 	public void setType(int type) {
 		this. = type;
 	public String toString() {
 		return toJson();
 	public String toJson() {
 		return "{" +
 				"\"uuid\":\"" +  + "\"," +
 				"\"name\":\"" + Json.escape() + "\"," +
 				"\"type\":" +  + "" +
 	public int compareTo(Group o) {
		int i = .compareTo(o.getName());
		if(i != 0) {
			return i;
		return .compareTo(o.getUuid());
New to GrepCode? Check out our FAQ X