public NestedForEachLmlMacroTag( final LmlParser parser, final LmlTag parentTag, final String rawTagData) { super(parser, parentTag, rawTagData); final int argumentsAmount = GdxArrays.sizeOf(getAttributes()); if (argumentsAmount <= 0) { parser.throwErrorIfStrict("Nested for each macro needs array attributes to iterate over."); indexes = null; argumentNames = null; values = null; } else { indexes = new IntArray(argumentsAmount); argumentNames = GdxArrays.newArray(argumentsAmount); values = GdxArrays.newArray(argumentsAmount); fillArrays(); } }
@Override protected boolean hasNext() { if (GdxArrays.isEmpty(indexes)) { return false; } return indexes.first() < values.first().length; }