💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] TreeSet内部使用TreeMap的key列来存储数据 ## 构造函数 ~~~ public class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E>, Cloneable, Serializable { private transient NavigableMap<E, Object> m; private static final Object PRESENT = new Object(); TreeSet(NavigableMap<E, Object> var1) { this.m = var1; } public TreeSet() { this((NavigableMap)(new TreeMap())); } } ~~~ ## add ~~~ public boolean add(E var1) { return this.m.put(var1, PRESENT) == null; } ~~~ ## remove ~~~ public boolean remove(Object var1) { return this.m.remove(var1) == PRESENT; } ~~~