Package java.util

Examples of java.util.Dictionary.keys()


            try {
                Dictionary dictionary = configuration.getProperties();
                if (dictionary == null) {
                    dictionary = newDictionary();
                }
                Enumeration keys = dictionary.keys();
                while (keys.hasMoreElements()) {
                    String key = (String) keys.nextElement();
                    if (key != null && key.startsWith("node#")) {
                        String stripedKey = key.substring(0, key.lastIndexOf("/"));
                        if (!credentialsMap.containsKey(stripedKey)) {
View Full Code Here


    // try to table lock all tables that are above
    // this threshold

    boolean didEscalate = false;
    for (Enumeration e = containers.keys(); e.hasMoreElements(); ) {
      ContainerKey ckey = (ContainerKey) e.nextElement();

      LockCount lc = (LockCount) containers.get(ckey);

      if (lc.count < threshold) {
View Full Code Here

    // try to table lock all tables that are above
    // this threshold

    boolean didEscalate = false;
    for (Enumeration e = containers.keys(); e.hasMoreElements(); ) {
      ContainerKey ckey = (ContainerKey) e.nextElement();

      LockCount lc = (LockCount) containers.get(ckey);

      if (lc.count < threshold) {
View Full Code Here

  private void makeProperties(UPnPDevice upnpDevice){
    Dictionary dict = upnpDevice.getDescriptions(null);
    int size = dict.size();
    String[] names = new String[size];
    String[] values = new String[size];
    Enumeration keys = dict.keys();
    for (int i=0;i<size;i++){
      names[i]= (String) keys.nextElement();
      values[i]= Util.justString(dict.get(names[i]));
    }
    Mediator.getPropertiesViewer().setProperties(names,values);
View Full Code Here

    public void paintLabels( Graphics g ) {
        final Color color = slider.isEnabled() ? Color.black : Color.gray;
        final Dictionary labelTable = slider.getLabelTable();
        if ( labelTable == null )
            return;
        final Enumeration keys = labelTable.keys();
        final int min = slider.getMinimum();
        final int max = slider.getMaximum();
        while ( keys.hasMoreElements() ) {
            final int integer = (Integer)keys.nextElement();
            if ( integer >= min && integer <= max ) {
View Full Code Here

        Dictionary props = component.getProperties();
        if (props != null)
        {

            pw.println("  Properties=");
            TreeSet keys = new TreeSet(Util.list(props.keys()));
            for (Iterator ki = keys.iterator(); ki.hasNext();)
            {
                String key = (String) ki.next();
                Object value = props.get(key);
                value = WebConsoleUtil.toString(value);
View Full Code Here

        {
            String title = Util.getBundleName(bundle);
            System.out.println("\n" + title);
            System.out.println(Util.getUnderlineString(title.length()));
            Dictionary dict = bundle.getHeaders();
            Enumeration keys = dict.keys();
            while (keys.hasMoreElements())
            {
                Object k = (String) keys.nextElement();
                Object v = dict.get(k);
                System.out.println(k + " = " + Util.getValueString(v));
View Full Code Here

        Dictionary props = config.getProperties();
        if (props != null)
        {
            SortedSet keys = new TreeSet();
            for (Enumeration ke = props.keys(); ke.hasMoreElements();)
            {
                keys.add(ke.nextElement());
            }

            for (Iterator ki = keys.iterator(); ki.hasNext();)
View Full Code Here

                "This form is automatically generated from existing properties because no property "
                    + "descriptors are available for this configuration. This may be cause by the absence "
                    + "of the OSGi Metatype Service or the absence of a MetaType descriptor for this configuration." );

            json.key( "properties" ).object(); //$NON-NLS-1$
            for ( Enumeration pe = props.keys(); pe.hasMoreElements(); )
            {
                final String id = ( String ) pe.nextElement();

                // ignore well known special properties
                if ( !id.equals( Constants.SERVICE_PID ) && !id.equals( Constants.SERVICE_DESCRIPTION )
View Full Code Here

    {
        Dictionary props = component.getProperties();
        if (props != null)
        {
            JSONArray buf = new JSONArray();
            TreeSet keys = new TreeSet(Util.list(props.keys()));
            for (Iterator ki = keys.iterator(); ki.hasNext();)
            {
                final String key = (String) ki.next();
                final StringBuffer b = new StringBuffer();
                b.append(key).append(" = ");
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.