public LimitTokenPositionFilter(TokenStream in, int maxTokenPosition, boolean consumeAllTokens) {super(in);if (maxTokenPosition < 1) {throw new IllegalArgumentException("maxTokenPosition must be greater than zero");}this.maxTokenPosition = maxTokenPosition;this.consumeAllTokens = consumeAllTokens;}

public LimitTokenPositionFilter(TokenStream @in, int maxTokenPosition, bool consumeAllTokens): base(@in){if (maxTokenPosition < 1){throw new System.ArgumentException("maxTokenPosition must be greater than zero");}this.maxTokenPosition = maxTokenPosition;this.consumeAllTokens = consumeAllTokens;posIncAtt = AddAttribute<IPositionIncrementAttribute>();}
