@Test public void testGetAll() { Mappings<Task, Resource> mappings = new Mappings<Task, Resource>(); Task t = new Task("t"); Resource r = new Resource("r"); Mapping<Task, Resource> mapping = new Mapping<Task, Resource>("m", t, r); mappings.add(mapping); Assert.assertEquals(Collections.singleton(mapping), mappings.getAll()); }
public Set<Mapping<T, R>> getAll() { return Collections.unmodifiableSet(mappings); }
Mappings implements Iterable<Mapping<T, R>> { public Set<Mapping<T, R>> getAll() { return Collections.unmodifiableSet(mappings); } }
Mappings implements Iterable<Mapping<T, R>> { public Set<Mapping<T, R>> getAll() { return Collections.unmodifiableSet(mappings); }  }
Mappings implements Iterable<Mapping<T, R>> { public Set<Mapping<T, R>> getAll() { return Collections.unmodifiableSet(mappings); }  void add(Mapping<T, R> mapping); boolean remove(Mapping<T, R> mapping); boolean removeAll(Collection<Mapping<T,R>> mappings); @Override Iterator<Mapping<T, R>> iterator(); int size(); Set<Mapping<T, R>> get(T source); Set<R> getTargets(T source); Set<Mapping<T, R>> get(R target); Set<T> getSources(R target); Set<Mapping<T, R>> get(T source, R target); Set<Mapping<T, R>> getAll(); }
Mappings implements Iterable<Mapping<T, R>> { public Set<Mapping<T, R>> getAll() { return Collections.unmodifiableSet(mappings); }  void add(Mapping<T, R> mapping); boolean remove(Mapping<T, R> mapping); boolean removeAll(Collection<Mapping<T,R>> mappings); @Override Iterator<Mapping<T, R>> iterator(); int size(); Set<Mapping<T, R>> get(T source); Set<R> getTargets(T source); Set<Mapping<T, R>> get(R target); Set<T> getSources(R target); Set<Mapping<T, R>> get(T source, R target); Set<Mapping<T, R>> getAll();  }