Created
July 20, 2018 13:03
-
-
Save ssaurel/6045b66dcf344eb89064a5ab20a5d330 to your computer and use it in GitHub Desktop.
Group POJO for a tutorial on the SSaurel's Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ssaurel.fastjson; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Group { | |
private Long id; | |
private String name; | |
private List<User> users = new ArrayList<>(); | |
public Long getId() { | |
return id; | |
} | |
public void setId(Long id) { | |
this.id = id; | |
} | |
public String getName() { | |
return name; | |
} | |
public void setName(String name) { | |
this.name = name; | |
} | |
public List<User> getUsers() { | |
return users; | |
} | |
public void setUsers(List<User> users) { | |
this.users = users; | |
} | |
public void addUser(User user) { | |
users.add(user); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment