Esempio n. 1
0
 /**
  * ** A String reperesentation of this URI (with arguments) ** @param includeBlankValues True to
  * include keys for blank values. ** @return A String representation of this URI
  */
 public String toString(boolean includeBlankValues) {
   StringBuffer sb = new StringBuffer(this.getURI());
   if (!ListTools.isEmpty(this.getKeyValList())) {
     sb.append("?");
     this.getArgString(sb, includeBlankValues);
   }
   return sb.toString();
 }
Esempio n. 2
0
 /**
  * ** A String reperesentation of this URI (with arguments) ** @return A String representation of
  * this URI
  */
 public String toString() {
   StringBuffer sb = new StringBuffer(this.getURI());
   if (!ListTools.isEmpty(this.getKeyValList())) {
     sb.append("?");
     this.getArgString(sb);
   }
   return sb.toString();
 }
Esempio n. 3
0
 public static String GetPropertyString_OBDII(long dtcFault[]) {
   if (ListTools.isEmpty(dtcFault)) {
     return GetPropertyString_OBDII("");
   } else {
     java.util.List<String> dtc = new Vector<String>();
     for (int i = 0; i < dtcFault.length; i++) {
       if (dtcFault[i] != 0L) {
         dtc.add(GetFaultString(dtcFault[i]));
       }
     }
     return GetPropertyString_OBDII(dtc);
   }
 }
Esempio n. 4
0
 /**
  * ** Returns a new URIArg with this URIArg's arguments encoded into a ** single RTProperties
  * added with a specified key [CHECK] ** @param rtpKey The key to add the encoded args at
  * ** @param exclKeys keys to exclude from encoding ** @return A new URIArg with non excluded
  * arguments encoded
  */
 public URIArg rtpEncode(String rtpKey, String... exclKeys) {
   URIArg rtpUrl = new URIArg(this.getURI());
   RTProperties rtp = new RTProperties();
   for (KeyVal kv : this.getKeyValList()) {
     String kn = kv.getKey();
     if (ListTools.contains(exclKeys, kn)) {
       rtpUrl.addArg(kv);
     } else {
       rtp.setString(kn, kv.getValue());
     }
   }
   rtpUrl.addArg(rtpKey, rtp);
   return rtpUrl;
 }
Esempio n. 5
0
 /**
  * ** Sets the specified argument key to the specified String value. ** @param key The key of the
  * agrument ** @param value The value to set ** @param obfuscate True if the value should be
  * obfuscated ** @return True if the argument existed, else false
  */
 public boolean setArgValue(String key[], String value, boolean obfuscate) {
   if (ListTools.size(key) >= 1) {
     boolean hadArg = this.hasArg(key);
     // remove all but the first key
     for (int i = 1; i < key.length; i++) {
       this.removeArg(key[i]);
     }
     // set the first key
     this.setArgValue(key[0], value, obfuscate);
     return hadArg;
   } else {
     return false;
   }
 }
Esempio n. 6
0
 public static String GetPropertyString_OBDII(java.util.List<String> dtc) {
   String dtcStr = !ListTools.isEmpty(dtc) ? StringTools.join(dtc, ",") : "";
   return GetPropertyString_OBDII(dtcStr);
 }
Esempio n. 7
0
 public static String GetPropertyString_OBDII(String dtc[]) {
   String dtcStr = !ListTools.isEmpty(dtc) ? StringTools.join(dtc, ",") : "";
   return GetPropertyString_OBDII(dtcStr);
 }