Exemple #1
0
 /**
  * Returns an array of the keys of all the values that are equal to the value specified
  *
  * @param value
  * @return
  */
 public CArray indexesOf(Construct value) {
   CArray ret = new CArray(Target.UNKNOWN);
   if (associative_mode) {
     for (String key : associative_array.keySet()) {
       if (BasicLogic.equals.doEquals(associative_array.get(key), value)) {
         ret.push(new CString(key, Target.UNKNOWN));
       }
     }
   } else {
     for (int i = 0; i < array.size(); i++) {
       if (BasicLogic.equals.doEquals(array.get(i), value)) {
         ret.push(new CInt(i, Target.UNKNOWN));
       }
     }
   }
   return ret;
 }