private String[] composeLoopPoints() { String[] result = new String[myLoopPoints.length]; for (int i = 0; i < myLoopPoints.length; i++) { result[i] = myLoopPoints[i].replaceAll("\\*\\d*", String.valueOf(myIndices[i])); int ref = getLoopPointReference(myLoopPoints[i]); if (ref >= i) { throw new IllegalStateException( "Loop point must be defined after the " + "one it references: " + myLoopPoints[i]); } else if (ref >= 0) { result[i] = expandLoopPointReference(result[i], result[ref]); } } return result; }
private String[] composeLoopPoints() { String[] result = new String[myLoopPoints.length]; for (int i = 0; i < myLoopPoints.length; i++) { result[i] = myLoopPoints[i].replaceAll("\\*\\d*", String.valueOf(myIndices[i])); int ref = getLoopPointReference(myLoopPoints[i]); if (ref >= i) { throw new IllegalStateException( "Loop point must be defined after the " + "one it references: " + myLoopPoints[i]); } else if (ref >= 0) { result[i] = expandLoopPointReference(result[i], result[ref]); } } return result; }
private String[] composePaths(String[] thePaths) { String[] currentLoopPoints = composeLoopPoints(); String[] result = new String[thePaths.length]; for (int i = 0; i < thePaths.length; i++) { result[i] = thePaths[i]; int ref = getLoopPointReference(thePaths[i]); if (ref >= 0) { result[i] = expandLoopPointReference(result[i], currentLoopPoints[ref]); } } return result; }
private boolean referencesLoop(String theFieldPath, int theLoopPoint) { String path = theFieldPath; int lp; while ((lp = getLoopPointReference(path)) >= 0) { if (lp == theLoopPoint) { return true; } else { path = myLoopPoints[lp]; } } return false; }
private String[] composePaths(String[] thePaths) { String[] currentLoopPoints = composeLoopPoints(); String[] result = new String[thePaths.length]; for (int i = 0; i < thePaths.length; i++) { result[i] = thePaths[i]; int ref = getLoopPointReference(thePaths[i]); if (ref >= 0) { result[i] = expandLoopPointReference(result[i], currentLoopPoints[ref]); } } return result; }
private boolean referencesLoop(String theFieldPath, int theLoopPoint) { String path = theFieldPath; int lp; while ((lp = getLoopPointReference(path)) >= 0) { if (lp == theLoopPoint) { return true; } else { path = myLoopPoints[lp]; } } return false; }