/** * @param x * @return */ private int length(Vector x) { int count = 0; for (Numeric n : x) { if (n.booleanValue()) { count++; } } return count; }
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(); }