Package org.apache.commons.collections

Examples of org.apache.commons.collections.KeyValue


    Collection<KeyValue> c = tagMap.get(t.getID());
    if (c == null)
      return Collections.emptySet();
    Collection<String> list = new ArrayList<String>();
    for (Iterator<KeyValue> i = c.iterator();i.hasNext();) {
      KeyValue kv = i.next();
      list.add((String) kv.getKey());
    }
    return list;
  }
View Full Code Here


    }
    boolean ingroup = false;
    Collection<KeyValue> userEntries = tagMap.get(t.getID());
    if (userEntries == null) return false;
    for (Iterator<KeyValue> i = userEntries.iterator();i.hasNext();) {
      KeyValue kv = i.next();
      String userID = (String) kv.getKey();
      for (Iterator<?> groupit = group.getMembers().iterator(); groupit.hasNext(); ) {
        Identifiable other = (Identifiable) groupit.next();
        if (other.getID().equals(userID)) {
          ingroup = true;
        }
View Full Code Here

        Map.Entry entry = new UnmodifiableMapEntry(key, value);
        assertSame(key, entry.getKey());
        assertSame(value, entry.getValue());

        // 2. test pair constructor
        KeyValue pair = new DefaultKeyValue(key, value);
        entry = new UnmodifiableMapEntry(pair);
        assertSame(key, entry.getKey());
        assertSame(value, entry.getValue());

        // 3. test copy constructor
View Full Code Here

        Map.Entry entry = new DefaultMapEntry(key, value);
        assertSame(key, entry.getKey());
        assertSame(value, entry.getValue());

        // 2. test pair constructor
        KeyValue pair = new DefaultKeyValue(key, value);
        assertSame(key, pair.getKey());
        assertSame(value, pair.getValue());

        // 3. test copy constructor
        Map.Entry entry2 = new DefaultMapEntry(entry);
        assertSame(key, entry2.getKey());
        assertSame(value, entry2.getValue());
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.KeyValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.