Code example for TreeMap

Methods: values

0
     * Getter of an ArrayList that contains a copy of all objects in the Catalog. 
     * It creates a copy of all elements and can be some ineficient. 
     * @return Unordered ArrayList with all objects in Catalog 
     */ 
    public ArrayList<X> getCopyObjects() {
        return new ArrayList(table.values());
    } 
     
     
    /** 
     * Getter of a Collection that contains all objects in the Catalog. 
     * Note that if you delete/modify an object in colection, it will repercute in the Catalog. But 
     * if you add an object it won't be added to the Catalog. Some errors can happen when the 
     * Catalog is modificated and a old Collection is used. 
     * @return Collection with all objects in Catalog 
     */ 
    public Collection<X> getObjects() {
        return table.values();
    }