@Test public void add() { root.add("hello"); Assert.assertEquals(Sets.newHashSet("hello"), root.getCurrentSet()); root.add("hello"); Assert.assertEquals(Sets.newHashSet("hello"), root.getCurrentSet()); }
@Override public void add(T t) { Lock lock = readWriteLock.writeLock(); try { lock.lock(); this.localHoldings.add(t); } catch (Exception e) { logger.error("[add]", e); } finally { lock.unlock(); } }
DefaultLeveledEmbededSet implements LeveledEmbededSet<T> { @Override public void add(T t) { Lock lock = readWriteLock.writeLock(); try { lock.lock(); this.localHoldings.add(t); } catch (Exception e) { logger.error("[add]", e); } finally { lock.unlock(); } } }
DefaultLeveledEmbededSet implements LeveledEmbededSet<T> { @Override public void add(T t) { Lock lock = readWriteLock.writeLock(); try { lock.lock(); this.localHoldings.add(t); } catch (Exception e) { logger.error("[add]", e); } finally { lock.unlock(); } }  }
DefaultLeveledEmbededSet implements LeveledEmbededSet<T> { @Override public void add(T t) { Lock lock = readWriteLock.writeLock(); try { lock.lock(); this.localHoldings.add(t); } catch (Exception e) { logger.error("[add]", e); } finally { lock.unlock(); } }  @Override LeveledEmbededSet<T> getSuperSet(); @Override LeveledEmbededSet<T> getSubSet(); @Override LeveledEmbededSet<T> getThrough(int level); @Override Set<T> getCurrentSet(); @Override void add(T t); @Override void remove(T t); @Override void resume(T t, int level); DefaultLeveledEmbededSet<T> setSuperSet(DefaultLeveledEmbededSet<T> superSet); DefaultLeveledEmbededSet<T> setSubSet(DefaultLeveledEmbededSet<T> subSet); }
DefaultLeveledEmbededSet implements LeveledEmbededSet<T> { @Override public void add(T t) { Lock lock = readWriteLock.writeLock(); try { lock.lock(); this.localHoldings.add(t); } catch (Exception e) { logger.error("[add]", e); } finally { lock.unlock(); } }  @Override LeveledEmbededSet<T> getSuperSet(); @Override LeveledEmbededSet<T> getSubSet(); @Override LeveledEmbededSet<T> getThrough(int level); @Override Set<T> getCurrentSet(); @Override void add(T t); @Override void remove(T t); @Override void resume(T t, int level); DefaultLeveledEmbededSet<T> setSuperSet(DefaultLeveledEmbededSet<T> superSet); DefaultLeveledEmbededSet<T> setSubSet(DefaultLeveledEmbededSet<T> subSet);  }