/** * Returns true if all given elements are found within this set. * * @param collect the element collection. * @return true if all given elements are found within this set, false otherwise. * @throws DataAccessLayerException in case of data access failure. */ public boolean containsAll(final Collection<? extends E> collect) throws DataAccessLayerException { for (final E obj : collect) { if (!contains(obj)) { return false; } } return true; }
@Test public void containsTest() throws DataAccessLayerException { for (String key : TESTDATA1) { assertTrue(CLASS_UNDER_TEST.contains(key)); } assertTrue(CLASS_UNDER_TEST.containsAll(TESTDATA1)); for (String key : TESTDATA2) { assertTrue(!CLASS_UNDER_TEST.contains(key)); } assertTrue(!CLASS_UNDER_TEST.containsAll(TESTDATA2)); }
/** * Returns true if all given elements are found within this set. * * @param collect the element collection. * @return true if all given elements are found within this set, false otherwise. * @throws DataAccessLayerException in case of data access failure. */ public boolean containsAll(final Collection<? extends E> collect) throws DataAccessLayerException { for (final E obj : collect) { if (!contains(obj)) { return false; } } return true; }
@Override public boolean contains(final Object o) { try { return (o instanceof Value && _ids.contains(_dict.getID((Value) o, _p))); } catch (DataAccessLayerException exception) { throw new RuntimeException(exception); } }
@Override public boolean contains(final Object o) { try { return (o instanceof Value && _ids.contains(_dict.getID((Value) o, _p))); } catch (DataAccessLayerException exception) { throw new RuntimeException(exception); } }
if (!_classesSet.contains(triple[2])) { _classesSet.add(triple[2]); if (!_classesSet.contains(triple[0])) { _classesSet.add(triple[0]); if (!_classesSet.contains(triple[2])) { _classesSet.add(triple[2]); if (!_oPropsSet.contains(triple[1])) { _oPropsSet.add(triple[1]); if (!_dPropsSet.contains(triple[1])) { _dPropsSet.add(triple[1]);
if (!_classesSet.contains(triple[2])) { _classesSet.add(triple[2]); if (!_classesSet.contains(triple[0])) { _classesSet.add(triple[0]); if (!_classesSet.contains(triple[2])) { _classesSet.add(triple[2]); if (!_oPropsSet.contains(triple[1])) { _oPropsSet.add(triple[1]); if (!_dPropsSet.contains(triple[1])) { _dPropsSet.add(triple[1]);