コード例 #1
0
  /**
   * @param x
   * @return
   */
  private int length(Vector x) {
    int count = 0;

    for (Numeric n : x) {
      if (n.booleanValue()) {
        count++;
      }
    }

    return count;
  }
コード例 #2
0
  private String getSubSequence(Vector x, String target) {
    StringBuilder builder = new StringBuilder();

    for (int i = 0; i < x.size(); i++) {
      Numeric n = x.get(i);
      if (n.booleanValue()) {
        builder.append(target.charAt(i));
      }
    }

    return builder.toString();
  }