public ResultImpl(Message theMessage, String[] theLoopPoints, Map<String, Integer> theLoopPointNames, String[] theFieldPaths, Map<String, Integer> theFieldNames, String[] theWherePaths, String[] theWherePatterns, boolean[] theExactMatchFlags) { myTerser = new Terser(theMessage); myLoopPoints = theLoopPoints; myIndices = new int[theLoopPoints.length]; myNumEmpty = new int[theLoopPoints.length]; myMaxNumEmpty = getMaxNumEmpty(theLoopPoints); myLoopPointNames = theLoopPointNames; myFieldPaths = theFieldPaths; myValues = new String[theFieldPaths.length]; myFieldNames = theFieldNames; myWherePaths = theWherePaths; myWherePatterns = theWherePatterns; myExactMatchFlags = theExactMatchFlags; if (theLoopPoints.length == 0) { myNonLoopingQuery = true; // if no loops, give ourselves 1 // iteration } else { myIndices[myIndices.length - 1] = -1; // start before 1st // iteration } }
public ResultImpl(Message theMessage, String[] theLoopPoints, Map<String, Integer> theLoopPointNames, String[] theFieldPaths, Map<String, Integer> theFieldNames, String[] theWherePaths, String[] theWherePatterns, boolean[] theExactMatchFlags) { myTerser = new Terser(theMessage); myLoopPoints = theLoopPoints; myIndices = new int[theLoopPoints.length]; myNumEmpty = new int[theLoopPoints.length]; myMaxNumEmpty = getMaxNumEmpty(theLoopPoints); myLoopPointNames = theLoopPointNames; myFieldPaths = theFieldPaths; myValues = new String[theFieldPaths.length]; myFieldNames = theFieldNames; myWherePaths = theWherePaths; myWherePatterns = theWherePatterns; myExactMatchFlags = theExactMatchFlags; if (theLoopPoints.length == 0) { myNonLoopingQuery = true; // if no loops, give ourselves 1 // iteration } else { myIndices[myIndices.length - 1] = -1; // start before 1st // iteration } }
private int[] getMaxNumEmpty(String[] theLoopPoints) { int[] retVal = new int[theLoopPoints.length]; for (int i = 0; i < theLoopPoints.length; i++) { retVal[i] = getMaxNumEmpty(theLoopPoints[i]); } return retVal; }
private int[] getMaxNumEmpty(String[] theLoopPoints) { int[] retVal = new int[theLoopPoints.length]; for (int i = 0; i < theLoopPoints.length; i++) { retVal[i] = getMaxNumEmpty(theLoopPoints[i]); } return retVal; }