예제 #1
0
 public String equalsAndReplace(int i, EnumFooBarQix enumValue) {
   String result = "";
   if (i == enumValue.getValue()) {
     result += enumValue.name();
   }
   return result;
 }
예제 #2
0
 public String divisible(int i, EnumFooBarQix enumValue) {
   String result = "";
   if (i % enumValue.getValue() == 0) {
     result += enumValue.name();
   }
   return result;
 }
예제 #3
0
 public String replaceChars(String integerString) {
   String result = "";
   if (integerString.length() > 0) {
     int integerI = Integer.parseInt(integerString.substring(0, 1));
     for (EnumFooBarQix value : EnumFooBarQix.values()) {
       result += equalsAndReplace(integerI, value);
     }
     result += replaceChars(integerString.substring(1));
   }
   return result;
 }
예제 #4
0
  public String fooBarQixiseInteger(int i) {
    StringBuffer result = new StringBuffer("");
    for (EnumFooBarQix value : EnumFooBarQix.values()) {
      result.append(divisible(i, value));
    }

    result.append(replaceChars(Integer.toString(i)));

    if ("".equals(result)) {
      result.append(i);
    }
    return result.toString();
  }