コード例 #1
0
ファイル: NumericProperty.java プロジェクト: SiteView/ECC8.13
 static {
   defaultDisplayUnits = new HashMap();
   unitDisplayName = new HashMap();
   unitConversionTable = new HashMap();
   defaultDisplayUnits.add("milliseconds", "seconds");
   unitDisplayName.add("milliseconds", "ms");
   unitDisplayName.add("seconds", "sec");
   unitDisplayName.add("minutes", "min");
   unitConversionTable.add("milliseconds to seconds", new Float(0.001D));
   unitConversionTable.add("seconds to milliseconds", new Float(1000F));
 }
コード例 #2
0
 synchronized HashMap getLabels() {
   if (labelsCache == null) {
     labelsCache = new HashMap();
     if (getProperty(pValueLabels).length() > 0) {
       String s = getProperty(pValueLabels);
       labelsCache.add("Result", s);
     } else {
       labelsCache.add("Result", "Result");
     }
   }
   return labelsCache;
 }
コード例 #3
0
  /**
   * CAUTION: Decompiled by hand.
   *
   * @param hashmap
   * @param hashmap1
   * @param flag
   */
  public void initializeValuesTable(HashMap hashmap, HashMap hashmap1, boolean flag) {
    for (HashMapIterator hashmapiterator = hashmap.begin();
        !hashmapiterator.atEnd();
        hashmapiterator.advance()) {
      String s = (String) hashmapiterator.key();
      Object obj = hashmapiterator.value();
      StringProperty stringproperty = getPropertyObject(s);
      if (stringproperty != null) {
        if (!stringproperty.onPlatform(getPlatform())) {
          continue;
        }
        if (flag) {
          hashmap1.remove(stringproperty);
        }
        if (obj instanceof Array) {
          for (Enumeration enumeration = ((Array) obj).elements();
              enumeration.hasMoreElements();
              hashmap1.add(stringproperty, enumeration.nextElement())) ;
        } else {
          hashmap1.add(stringproperty, obj);
        }
        continue;
      }
      if (flag) {
        hashmap1.remove(s);
      }

      if (obj instanceof Array) {
        Enumeration enumeration1 = ((Array) obj).elements();
        while (enumeration1.hasMoreElements()) {
          Object obj1 = enumeration1.nextElement();
          if ((obj1 instanceof String)) {
            hashmap1.add(s, obj1);
          }
        }
      } else if (obj instanceof String) {
        hashmap1.add(s, obj);
      }
    }
  }