Back to project page jogjakota-perizinan.
The source code is released under:
MIT License
If you think the Android project jogjakota-perizinan listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package id.go.jogjakota.perizinan.data; //from w w w. j a v a 2 s.com import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import id.go.jogjakota.perizinan.domain.Permit; import id.go.jogjakota.perizinan.domain.User; public class PermitDB { private static PermitDB permitDB; private LinkedList<Permit> permits = new LinkedList<>(); public static PermitDB get() { if (permitDB == null) permitDB = new PermitDB(); return permitDB; } public void addPermit(Permit permit) { permits.add(permit); } public List<Permit> getPermitsBy(User user) { List<Permit> result = new ArrayList<>(); for (Permit permit : permits) { if (permit.getUser().equals(user)) result.add(permit); } return result; } }