示例#1
0
 public String getPropertyName(StringProperty stringproperty) {
   String s = stringproperty.getName();
   String s1 = TextUtils.getValue(getLabels(), stringproperty.getLabel());
   if (s1.length() == 0) {
     s1 = s;
   }
   return s1;
 }
示例#2
0
 protected void updateStats(double ad[], String as[], Monitor monitor, int i) {
   Enumeration enumeration = monitor.getStatePropertyObjects();
   do {
     if (!enumeration.hasMoreElements()) {
       break;
     }
     StringProperty stringproperty = (StringProperty) enumeration.nextElement();
     if (stringproperty.getName().equals("snmpValue")
         || stringproperty.getName().equals("result")
         || stringproperty.getName().equals("value")
         || stringproperty.getName().equals("value0")
         || stringproperty.getName().equals("column1")) {
       String s = monitor.getProperty(stringproperty);
       if (!s.equals("n/a")) {
         ad[i] = TextUtils.toDouble(s);
       } else {
         ad[i] = -999D;
       }
       as[i] = monitor.getProperty("_name");
     }
   } while (true);
 }