Package org.jparsec
Class RepeatTimesParser<T>
- java.lang.Object
-
- org.jparsec.Parser<java.util.List<T>>
-
- org.jparsec.RepeatTimesParser<T>
-
final class RepeatTimesParser<T> extends Parser<java.util.List<T>>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jparsec.Parser
Parser.Mode, Parser.Reference<T>
-
-
Field Summary
Fields Modifier and Type Field Description private ListFactory<T>listFactoryprivate intmaxprivate intminprivate Parser<? extends T>parser
-
Constructor Summary
Constructors Constructor Description RepeatTimesParser(Parser<? extends T> parser, int min, int max)RepeatTimesParser(Parser<? extends T> parser, int min, int max, ListFactory<T> listFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) booleanapply(ParseContext ctxt)private booleanrepeatAtMost(int times, java.util.Collection<T> collection, ParseContext ctxt)java.lang.StringtoString()-
Methods inherited from class org.jparsec.Parser
asDelimiter, asOptional, atLeast, atomic, between, cast, endBy, endBy1, fails, followedBy, from, from, getReturn, ifelse, ifelse, infixl, infixn, infixr, label, lexer, many, many1, map, newReference, next, next, not, not, notFollowedBy, optional, optional, or, otherwise, parse, parse, parse, parse, parse, parseTree, peek, postfix, prefix, read, reluctantBetween, retn, sepBy, sepBy1, sepEndBy, sepEndBy1, skipAtLeast, skipMany, skipMany1, skipTimes, skipTimes, source, succeeds, times, times, token, until, withSource
-
-
-
-
Field Detail
-
min
private final int min
-
max
private final int max
-
listFactory
private final ListFactory<T> listFactory
-
-
Method Detail
-
apply
boolean apply(ParseContext ctxt)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
repeatAtMost
private boolean repeatAtMost(int times, java.util.Collection<T> collection, ParseContext ctxt)
-
-