Examples of keySet()


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

    /**
     *   keySet returns a Set containing all the keys
     */
    public void testDescendingKeySet() {
        ConcurrentNavigableMap map = dmap5();
        Set s = map.keySet();
        assertEquals(5, s.size());
        assertTrue(s.contains(m1));
        assertTrue(s.contains(m2));
        assertTrue(s.contains(m3));
        assertTrue(s.contains(m4));

Examples of java.util.jar.Attributes.keySet()

            String[] removeHeaders = builder.getProperty( Constants.REMOVEHEADERS, "" ).split( "," );

            // apply -removeheaders to the custom manifest
            for ( int i = 0; i < removeHeaders.length; i++ )
            {
                for ( Iterator j = mainMavenAttributes.keySet().iterator(); j.hasNext(); )
                {
                    if ( j.next().toString().matches( removeHeaders[i].trim() ) )
                    {
                        j.remove();
                    }

Examples of javax.json.JsonObject.keySet()

        if (response == null) {
            return empty;
        }
        int length = response.size();
        String retVal[] = new String[length];
        Iterator keyIterator = response.keySet().iterator();
        int counter = 0;
        while (keyIterator.hasNext()) {
            retVal[counter++] = (String) keyIterator.next();
        }
        return retVal;

Examples of javax.management.openmbean.CompositeDataSupport.keySet()

                    getMetric(objectName, metricName + "`" + key, data.get(key), rr);
                }
            }
            else if ( value instanceof TabularDataSupport ) {
                TabularDataSupport data = (TabularDataSupport)value;
                Set keys = data.keySet();
                for ( Iterator it = keys.iterator(); it.hasNext(); ) {
                    Object key = it.next();
                    for ( Iterator ki = ((List) key).iterator(); ki.hasNext(); ) {
                        Object key2 = ki.next();
                        CompositeData cd = data.get(new Object[] {key2});

Examples of javax.management.openmbean.CompositeType.keySet()

public class JmxInstanceTest extends TestCase {
    public void testJMXInstanceStatics() {
        CompositeType it = JmxInstance.INSTANCE;
        Assert.assertEquals(
            new HashSet<String>(Arrays.asList(AdminServiceMBean.INSTANCE)),
            it.keySet());

        TabularType tt = JmxInstance.INSTANCE_TABLE;
        Assert.assertEquals("Instances", tt.getTypeName());
    }

Examples of javax.management.openmbean.TabularData.keySet()

        EasyMock.expect(i.getJavaOpts()).andReturn("someopts");
        EasyMock.replay(i);
       
        JmxInstance ji = new JmxInstance(i);
        TabularData td = JmxInstance.tableFrom(Collections.singletonList(ji));       
        Collection<?> keys = (Collection<?>) td.keySet().iterator().next();
        Assert.assertEquals("MyInstance", keys.iterator().next());
       
        CompositeData cd = td.get(keys.toArray());
        Assert.assertEquals(1712, cd.get("Pid"));
        Assert.assertEquals("MyInstance", cd.get("Name"));

Examples of javax.management.openmbean.TabularDataSupport.keySet()

                    getMetric(objectName, metricName + "`" + key, data.get(key), rr);
                }
            }
            else if ( value instanceof TabularDataSupport ) {
                TabularDataSupport data = (TabularDataSupport)value;
                Set keys = data.keySet();
                for ( Iterator it = keys.iterator(); it.hasNext(); ) {
                    Object key = it.next();
                    for ( Iterator ki = ((List) key).iterator(); ki.hasNext(); ) {
                        Object key2 = ki.next();
                        CompositeData cd = data.get(new Object[] {key2});

Examples of javax.script.Bindings.keySet()

    try {
      Map<String, Object> map = new HashMap<String, Object>();
      for (Iterator it = context.getScopes().iterator(); it.hasNext(); ) {
        int scope = ((Integer)it.next()).intValue();
        Bindings bindings = context.getBindings(scope);
        Set keys = bindings.keySet();
       
        for(Object key : keys) {
          map.put((String)key, bindings.get(key));
        }
        }

Examples of javax.swing.UIDefaults.keySet()

    // Font size for defaults
    int fontSize = config.getInt(null, ConfigurationValueInteger.FONT_SIZE);
    if (fontSize > 0) {
      UIDefaults defaults = UIManager.getLookAndFeelDefaults();
      for (Object key : defaults.keySet()) {
        Font font = defaults.getFont(key);
        if (font != null) {
          font = font.deriveFont((float) (font.getSize() + fontSize));
          defaults.put(key, font);
        }

Examples of javax.ws.rs.core.MultivaluedMap.keySet()

   private void testRedirect(ClientResponse response)
   {
      MultivaluedMap headers = response.getHeaders();
      System.out.println("size: " + headers.size());
      for (Object name : headers.keySet())
      {
         System.out.println(name + ":" + headers.getFirst(name.toString()));
      }
      Assert.assertEquals((String) headers.getFirst("location"), generateURL("/redirect/data"));
   }
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.