Rel extends AbstractValueSetAttribute implements AAttributable, AreaAttributable, LinkAttributable { public void setValue(final String value) { super.setAttributeValue(value); } Rel(final String value);  Rel(final String... values); void setValue(final String value); String getValue(); Set<String> getValueSet(); void removeValue(final String value); void removeValues(final Collection<String> values); void addValues(final Collection<String> values); void addValue(final String value); void setValue(final boolean updateClient, final String value); static final String ALTERNATE; static final String AUTHOR; static final String BOOKMARK; static final String HELP; static final String LICENSE; static final String NEXT; static final String NOFOLLOW; static final String NOREFERRER; static final String NOOPENER; static final String PREFETCH; static final String PREV; static final String SEARCH; static final String TAG; static final String STYLESHEET; static final String PRELOAD; static final String PRECONNECT; static final String PINGBACK; static final String ICON; static final String DNS_PREFETCH; static final String EXTERNAL; }
@Test public void testContains() { { Rel rel = new Rel(AutoComplete.NAME); rel.setValue(false, AutoComplete.NAME + " " + AutoComplete.EMAIL + " " + AutoComplete.USERNAME); Assert.assertTrue(rel.contains(AutoComplete.NAME)); Assert.assertTrue(rel.contains(AutoComplete.USERNAME)); Assert.assertFalse(rel.contains(AutoComplete.ADDRESS_LINE2)); } { Rel rel = new Rel(""); Assert.assertFalse(rel.contains(AutoComplete.ADDRESS_LINE2)); } }
@Test public void testContainsAll() { { Rel rel = new Rel(""); Assert.assertFalse(rel.containsAll(Arrays.asList(AutoComplete.ADDRESS_LINE2))); } Rel rel = new Rel(AutoComplete.NAME); rel.setValue(false, AutoComplete.NAME + " " + AutoComplete.EMAIL + " " + AutoComplete.USERNAME); Assert.assertTrue(rel.containsAll(Arrays.asList(AutoComplete.NAME, AutoComplete.USERNAME, AutoComplete.EMAIL))); Assert.assertTrue(rel.containsAll(Arrays.asList(AutoComplete.USERNAME))); Assert.assertFalse(rel.containsAll(Arrays.asList(AutoComplete.ADDRESS_LINE2))); Assert.assertFalse(rel.containsAll(Arrays.asList(AutoComplete.NAME, AutoComplete.ADDRESS_LINE2))); }