@Override public boolean hasNext() { checkRead(); return baseIter.hasNext(); }
@Override public Triple next() { checkRead(); return baseIter.next(); }
@Override public boolean hasNext() { checkRead(); return baseIter.hasNext(); }
@Override public Triple next() { checkRead(); return baseIter.next(); }
@Override public int size() { checkRead(); return wrapped.size(); }
@Override public Object[] toArray() { checkRead(); return wrapped.toArray(); }
@Override public boolean contains(Object o) { checkRead(); return wrapped.contains((Triple) o); }
@Override public boolean containsAll(Collection<?> c) { checkRead(); return wrapped.containsAll(c); }
@Override public boolean contains(Object o) { checkRead(); return wrapped.contains((Triple) o); }
@Override public boolean containsAll(Collection<?> c) { checkRead(); return wrapped.containsAll(c); }
@Override public boolean isEmpty() { checkRead(); return wrapped.isEmpty(); }
@Override public <T> T[] toArray(T[] a) { checkRead(); return wrapped.toArray(a); }
@Override public int size() { checkRead(); return wrapped.size(); }
@Override public boolean isEmpty() { checkRead(); return wrapped.isEmpty(); }
@Override public <T> T[] toArray(T[] a) { checkRead(); return wrapped.toArray(a); }
@Override public Object[] toArray() { checkRead(); return wrapped.toArray(); }
/** * Returns the wrapped Graph if the caller has all access rights. * If the caller has only the read access right, then a write-blocked * Graph is returned. If the caller has neither the read nor the write * access right then an AccessControlException is thrown. * * @return the wrapped Graph or a write-block Graph depending * on the access rights of the caller. */ public Graph getUnsecuredGraph() { try { checkWrite(); return wrapped; } catch (AccessControlException ex) { checkRead(); return new WriteBlockedGraph(wrapped); } } }
/** * Returns the wrapped Graph if the caller has all access rights. * If the caller has only the read access right, then a write-blocked * Graph is returned. If the caller has neither the read nor the write * access right then an AccessControlException is thrown. * * @return the wrapped Graph or a write-block Graph depending * on the access rights of the caller. */ public Graph getUnsecuredGraph() { try { checkWrite(); return wrapped; } catch (AccessControlException ex) { checkRead(); return new WriteBlockedGraph(wrapped); } } }