Examples of keys()


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

        StringBuilder sb = new StringBuilder();
        ConcurrentHashMap m = (ConcurrentHashMap) currentLockHolders.get(file);
        if (m == null) {
            return "(NULL)";
        }
        Enumeration threads = m.keys();
        while (threads.hasMoreElements()) {
            Thread t = (Thread) threads.nextElement();
            sb.append(t.toString());
            if (threads.hasMoreElements()) {
                sb.append(", ");
View Full Code Here

Examples of java.util.prefs.Preferences.keys()

    try
    {
      final Properties props = new Properties();
      final Preferences pref = base.node(configPath);
      final String[] keysArray = pref.keys();
      for (int i = 0; i < keysArray.length; i++)
      {
        final String key = keysArray[i];
        final String value = pref.get(key, null);
        if (value != null)
View Full Code Here

Examples of javax.swing.ActionMap.keys()

*/
public class newMapKeysNull implements Testlet {
 
  public void test(TestHarness harness) {
          ActionMap map = new ActionMap();
          if (map.keys() != null)
            harness.fail("New ActionMap should return null for keys()");
          if (map.allKeys() != null)
            harness.fail ("New ActionMap should return null for allKeys()");
  }

View Full Code Here

Examples of javax.swing.InputMap.keys()

  public void testMethod2(TestHarness harness)
  {
    harness.checkPoint("(int)");
    JTableHeader th = new JTableHeader();
    InputMap m1 = th.getInputMap(JComponent.WHEN_FOCUSED);
    harness.check(m1.keys(), null);
    harness.check(m1.getParent(), null);
    InputMap m2 = th.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);  
    harness.check(m2.keys(), null);
    harness.check(m2.getParent(), null);
    InputMap m3 = th.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
View Full Code Here

Examples of javax.swing.UIDefaults.keys()

        Map components = new TreeMap();
        UIDefaults defaults = UIManager.getLookAndFeelDefaults();

        //  Build of Map of attributes for each component

        for ( Enumeration e = defaults.keys(); e.hasMoreElements(); )
        {
            Object key = e.nextElement();
            Object value = defaults.get( key );

            Map componentMap = getComponentMap( components, key.toString() );
View Full Code Here

Examples of javax.swing.plaf.InputMapUIResource.keys()

    harness.check(defaults.get("TextField.font"), new FontUIResource("SansSerif", Font.PLAIN, 12));
    harness.check(defaults.get("TextField.margin"), new InsetsUIResource(0, 0, 0, 0));
    harness.check(UIManager.get("TextField.focusInputMap") instanceof InputMapUIResource);
    Object tf = UIManager.get("TextField.focusInputMap");
    InputMapUIResource tfim = (InputMapUIResource) tf;
    harness.check(tfim.keys().length == 33);
    harness.check(tfim.get(KeyStroke.getKeyStroke("ENTER")), "notify-field-accept");
    harness.check(tfim.get(KeyStroke.getKeyStroke("LEFT")), "caret-backward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("RIGHT")), "caret-forward");
    harness.check(tfim.get(KeyStroke.getKeyStroke("BACK_SPACE")), "delete-previous");
    harness.check(tfim.get(KeyStroke.getKeyStroke("ctrl X")), "cut-to-clipboard");
View Full Code Here

Examples of jfun.yan.Container.keys()

      String s1 = "hello world";
      yan.registerValue(s1);
      yan.registerValue(s1);
      yan.registerComponent(String.class, Components.value(s1).singleton());
      yan.registerConstructor(java.util.ArrayList.class, (Class[])null);
      assertEquals(2, yan.keys().size());
      assertEquals(2, yan.getInstances().size());
    }
    /*
    protected void assertSize(int s, jfun.yan.Container yan){
      assertEquals(s, InstanceCounter.countInstance(yan));
View Full Code Here

Examples of js.lang.NativeObject.keys()

        if (enumerationConstants == null) {
            enumerationConstants = new HashMap();

            NativeObject definition = prototype.getPropertyAs(NativeObject.class, "$");

            for (String name : definition.keys()) {
                NativeObject value = definition.getPropertyAs(NativeObject.class, name);

                if (value.isArray()) {
                    for (Enum item : (Enum[]) (Object) value) {
                        enumerationConstants.put(item.name(), item);
View Full Code Here

Examples of net.rim.device.api.io.parser.xml.XMLHashtable.keys()

        int childNode;

        _treeField.deleteAll();

        final XMLHashtable xmlht = (XMLHashtable) message.getObjectPayload();
        final Enumeration keys = xmlht.keys();

        while (keys.hasMoreElements()) {
            final Object key = keys.nextElement();
            final Object val = xmlht.get(key);
View Full Code Here

Examples of net.rim.device.api.util.ToIntHashtable.keys()

    registerType(CustomMessage.DEFAULT_IMAGE_TYPE, "", "");
   
    //Register persisted types
    ToIntHashtable customTypeTable = inboxMessages.getCustomTypeTable();
    if(!customTypeTable.isEmpty()){
      for(Enumeration e =customTypeTable.keys();e.hasMoreElements();){
        String JSON = (String) e.nextElement();
        int commaIndex = JSON.indexOf(',');
        String newImage = JSON.substring(12, commaIndex);
        String readImage = JSON.substring(commaIndex+13,JSON.length()-1);
        int type = customTypeTable.get(JSON);
View Full Code Here
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.