Code example for TreeMap

0
     * @param file {@code non-null;} file that this instance is part of 
     */ 
    public StringIdsSection(DexFile file) {
        super("string_ids", file, 4);
 
        strings = new TreeMap<CstUtf8, StringIdItem>();
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public Collection<? extends Item> items() {
        return strings.values();
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public IndexedItem get(Constant cst) {
        if (cst == null) {
            throw new NullPointerException("cst == null");
        }