Code example for TreeMap

0
     * @param file {@code non-null;} file that this instance is part of 
     */ 
    public ClassDefsSection(DexFile file) { 
        super("class_defs", file, 4); 
 
        classDefs = new TreeMap<Type, ClassDefItem>(); 
        orderedDefs = null; 
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public Collection<? extends Item> items() { 
        if (orderedDefs != null) { 
            return orderedDefs; 
        } 
         
        return classDefs.values(); 
    } 
 
    /** {@inheritDoc} */ 
    @Override