private int valuedIn(String flags) {
        int result = 0;
        for (char ch : flags.toCharArray())
            if (this.getType(ch) == Type.STRING || this.getType(ch) == Type.OPTIONAL)
                ++result;

        return result;
    }