Ejemplo n.º 1
0
  /**
   * ** Apply the specified partial key as a suffix to the key name contained in this RTKey
   * ** @param stSfx Property key suffix ** @return The combine property key from this RTKey and the
   * specified suffix.
   */
  public String suffix(String stSfx) {
    String rtk = this.getName();

    /* adjust suffix */
    String sfx = StringTools.trim(stSfx);
    if (sfx.length() == 0) {
      return rtk;
    }

    /* assemble/return */
    StringBuffer sb = new StringBuffer();
    sb.append(rtk);
    if (!rtk.endsWith(".")) {
      sb.append(".");
    }
    if (sfx.startsWith(".")) {
      sb.append(sfx.substring(1));
    } else {
      sb.append(sfx);
    }
    return sb.toString();
  }
Ejemplo n.º 2
0
 /** ** Constructor ** @param key The property name */
 public RTKey(String key) {
   this.keyName = StringTools.trim(key);
 }