Examples of keySet()


Examples of java.util.Map.keySet()

    collection.add(new DomainClass(4));

    Map map = handler.createMap(collection);
    assert map instanceof HashMap;

    Object firstKey = map.keySet().iterator().next();
    assert firstKey instanceof Integer;

    Object value = map.get(firstKey);
    assert value instanceof DomainClass;

Examples of java.util.NavigableMap.keySet()

        assertFalse(sm.containsKey(one));
        assertTrue(sm.containsKey(two));
        assertFalse(sm.containsKey(three));
        assertFalse(sm.containsKey(four));
        assertFalse(sm.containsKey(five));
        Iterator i = sm.keySet().iterator();
        Object k;
        k = (Integer)(i.next());
        assertEquals(two, k);
        assertFalse(i.hasNext());
        Iterator r = sm.descendingKeySet().iterator();

Examples of java.util.Properties.keySet()

        + "Explorer.props";
      BufferedInputStream bi = new BufferedInputStream(new FileInputStream(explorerProps));
      expProps.load(bi);
      bi.close();
      bi = null;
      Set keys = expProps.keySet();
      Iterator keysI = keys.iterator();
      while (keysI.hasNext()) {
        String key = (String)keysI.next();
        if (!key.endsWith("Policy")) {
          // See if this key is in the Explorer props

Examples of java.util.PropertyResourceBundle.keySet()

        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (final Object o : props.keySet()) {
            final String key = (String) o;

            frameworkProps.put(key, props.getString(key));

            if (key.equals(CONFIG_ERRAI_SERIALIZABLE_TYPE)) {

Examples of java.util.ResourceBundle.keySet()

    private static Set<String> allKeys;

    @BeforeClass
    public static void init() {
        ResourceBundle bundle = ResourceBundle.getBundle("org.apache.openejb.config.rules.Messages");
        allKeys = bundle.keySet();
        allKeys = stripPrefixes(allKeys);
    }

    @Test
    public void audit() {

Examples of java.util.SortedMap.keySet()

            hbox.add(new JLabel(resources.getStringValue("asciiOptionCharset")));
            hbox.add(Box.createHorizontalGlue());
            hbox.add(cbxCharset = new JComboBox());
            cbxCharset.addItem(resources.getStringValue("asciiOptionNoCharset"));
            SortedMap map = Charset.availableCharsets();
            for (Iterator it = map.keySet().iterator(); it.hasNext();) {
                cbxCharset.addItem(it.next());
            }
            // TODO: Use preferences to set a default charset if desired by user
            cbxCharset.setSelectedIndex(0); // None by default
            box.add(hbox);

Examples of java.util.TreeMap.keySet()

      // Setting the Custom Fields..
      String customFields = "";
      TreeMap map = new TreeMap();
      map = CustomFieldData.getCustomField("Ticket", ticketID, dataSource);

      Set set = map.keySet();
      Iterator it = set.iterator();
      while (it.hasNext()) {
        String str = (String) it.next();
        CustomFieldVO field = (CustomFieldVO) map.get(str);
        if (field == null) {

Examples of java.util.TreeSet.keySet()

        out.write(TREEMAP);
        LongPacker.packInt(out,l.size());
      }

      writeObject(out, l.comparator());
      for(Object o:l.keySet()){
        writeObject(out, o);
        writeObject(out, l.get(o));
      }
    }else if(clazz ==  HashMap.class){
      HashMap l = (HashMap) obj;

Examples of java.util.WeakHashMap.keySet()

    AbstractMap map6 = new TreeMap();
    assertSame("TreeMap", map6.keySet(), map6.keySet());

    AbstractMap map7 = new WeakHashMap();
    assertSame("WeakHashMap", map7.keySet(), map7.keySet());
  }

  /**
   * @tests java.util.AbstractMap#remove(java.lang.Object)
   */
 

Examples of java.util.concurrent.ConcurrentHashMap.keySet()

          field.setAccessible(true);
          final Object object = field.get(javaSupport);
          if(object instanceof ConcurrentHashMap)
          {
            ConcurrentHashMap classCache = (ConcurrentHashMap) object;
            for(Object classObject : classCache.keySet())
            {
              Class aClass = (Class)classObject;
              if(aClass.toString().startsWith("class $Proxy"))
                classCache.remove(aClass);
            }
TOP
Copyright © 2018 www.massapi.com. 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.