@Override public void blacklist(Key<?> key, State state, Object source) { parent.blacklist(key, state, source); blacklistedKeys.add(key, state, source); }
@Override public boolean isBlacklisted(Key<?> key) { return blacklistedKeys.contains(key); }
@Override public Set<Object> getSourcesForBlacklistedKey(Key<?> key) { return blacklistedKeys.getSources(key); }
InheritingState(State parent) { this.parent = checkNotNull(parent, "parent"); this.lock = (parent == State.NONE) ? this : parent.lock(); this.blacklistedKeys = new WeakKeySet(lock); }
InheritingState(State parent) { this.parent = checkNotNull(parent, "parent"); this.lock = (parent == State.NONE) ? this : parent.lock(); this.blacklistedKeys = new WeakKeySet(lock); }
public void blacklist(Key<?> key, Object source) { parent.blacklist(key, source); blacklistedKeys.add(key, source); }
@Override public boolean isBlacklisted(Key<?> key) { return blacklistedKeys.contains(key); }
@Override public Set<Object> getSourcesForBlacklistedKey(Key<?> key) { return blacklistedKeys.getSources(key); }
InheritingState(State parent) { this.parent = checkNotNull(parent, "parent"); this.lock = (parent == State.NONE) ? this : parent.lock(); this.blacklistedKeys = new WeakKeySet(lock); }
@Override public void blacklist(Key<?> key, State state, Object source) { parent.blacklist(key, state, source); blacklistedKeys.add(key, state, source); }
@Override public boolean isBlacklisted(Key<?> key) { return blacklistedKeys.contains(key); }
@Override public Set<Object> getSourcesForBlacklistedKey(Key<?> key) { return blacklistedKeys.getSources(key); }
InheritingState(State parent) { this.parent = checkNotNull(parent, "parent"); this.lock = (parent == State.NONE) ? this : parent.lock(); this.blacklistedKeys = new WeakKeySet(lock); }
@Override public void blacklist(Key<?> key, State state, Object source) { parent.blacklist(key, state, source); blacklistedKeys.add(key, state, source); }
public boolean isBlacklisted(Key<?> key) { return blacklistedKeys.contains(key); }
public Set<Object> getSourcesForBlacklistedKey(Key<?> key) { return blacklistedKeys.getSources(key); }
private final WeakKeySet blacklistedKeys = new WeakKeySet(); private final Object lock;
public void blacklist(Key<?> key, Object source) { parent.blacklist(key, source); blacklistedKeys.add(key, source); }
public boolean isBlacklisted(Key<?> key) { return blacklistedKeys.contains(key); }
public Set<Object> getSourcesForBlacklistedKey(Key<?> key) { return blacklistedKeys.getSources(key); }