Package org.geekhub.dt.objects

Examples of org.geekhub.dt.objects.Animal


    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        HttpSession session = request.getSession();
        TreeMap<String, List<Animal>> map = (TreeMap<String, List<Animal>>) session.getAttribute("map");

        int id = Integer.parseInt(request.getParameter("id"));
        Animal animalToDelete = null;
        for (List<Animal> animals : map.values()) {
            for (Animal animal : animals) {
                if (animal.getId() == id) {
                    animalToDelete = animal;
                }
View Full Code Here


        if (map.containsKey(name)) {
            animals = map.get(name);
        } else {
            animals = new ArrayList<>();
        }
        animals.add(new Animal(id, name, value));
        map.put(name, animals);
    }
View Full Code Here

TOP

Related Classes of org.geekhub.dt.objects.Animal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.