Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.util.Scanner #243

Open
90 tasks
dthongvl opened this issue Aug 28, 2017 · 0 comments
Open
90 tasks

java.util.Scanner #243

dthongvl opened this issue Aug 28, 2017 · 0 comments
Labels

Comments

@dthongvl
Copy link
Contributor

dthongvl commented Aug 28, 2017

A simple text scanner which can parse primitive types and strings using regular expressions.

-------------- Write junit test for the following methods --------------------

  • Scanner(Readable source)
    Constructs a new Scanner that produces values scanned from the specified source.

  • Scanner(InputStream source)
    Constructs a new Scanner that produces values scanned from the specified input stream.

  • Scanner(File source)
    Constructs a new Scanner that produces values scanned from the specified file.

  • Scanner(Path source)
    Constructs a new Scanner that produces values scanned from the specified file.

  • Scanner(String source)
    Constructs a new Scanner that produces values scanned from the specified string.

  • Scanner(ReadableByteChannel source)
    Constructs a new Scanner that produces values scanned from the specified channel.

  • Scanner(Readable source, Pattern pattern)
    Constructs a Scanner that returns values scanned from the specified source delimited by the specified pattern.

  • Scanner(InputStream source, String charsetName)
    Constructs a new Scanner that produces values scanned from the specified input stream.

  • Scanner(File source, String charsetName)
    Constructs a new Scanner that produces values scanned from the specified file.

  • Scanner(File source, CharsetDecoder dec)

  • Scanner(Path source, String charsetName)
    Constructs a new Scanner that produces values scanned from the specified file.

  • Scanner(Path source, Charset charset)

  • Scanner(ReadableByteChannel source, String charsetName)
    Constructs a new Scanner that produces values scanned from the specified channel.

  • close()source
    Closes this scanner.

  • findInLine(String pattern)
    Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.

  • findInLine(Pattern pattern)
    Attempts to find the next occurrence of the specified pattern ignoring delimiters.

  • findWithinHorizon(String pattern, int horizon)
    Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.

  • findWithinHorizon(Pattern pattern, int horizon)
    Attempts to find the next occurrence of the specified pattern.

  • hasNext()source
    Returns true if this scanner has another token in its input.

  • hasNext(String pattern)
    Returns true if the next token matches the pattern constructed from the specified string.

  • hasNext(Pattern pattern)
    Returns true if the next complete token matches the specified pattern.

  • hasNextBigInteger()source
    Returns true if the next token in this scanner's input can be interpreted as a BigInteger in the default radix using the #nextBigInteger method. ...

  • hasNextFloat()source
    Returns true if the next token in this scanner's input can be interpreted as a float value using the #nextFloat method.

  • hasNextInt()source
    Returns true if the next token in this scanner's input can be interpreted as an int value in the default radix using the #nextInt method.

  • hasNextInt(int radix)
    Returns true if the next token in this scanner's input can be interpreted as an int value in the specified radix using the #nextInt method.

  • hasNextLine()source
    Returns true if there is another line in the input of this scanner.

  • hasNextLong()source
    Returns true if the next token in this scanner's input can be interpreted as a long value in the default radix using the #nextLong method.

  • hasNextShort()source
    Returns true if the next token in this scanner's input can be interpreted as a short value in the default radix using the #nextShort method. ...

  • ioException()source
    Returns the IOException last thrown by this Scanner's underlying Readable.

  • match()source
    Returns the match result of the last scanning operation performed by this scanner.

  • next()source
    Finds and returns the next complete token from this scanner.

  • next(String pattern)
    Returns the next token if it matches the pattern constructed from the specified string.

  • next(Pattern pattern)
    Returns the next token if it matches the specified pattern.

  • nextBoolean()source
    Scans the next token of the input into a boolean value and returns that value.

  • nextDouble()source
    Scans the next token of the input as a double.

  • nextFloat()source
    Scans the next token of the input as a float.

  • nextInt()source
    Scans the next token of the input as an int.

  • nextLine()source
    Advances this scanner past the current line and returns the input that was skipped.

  • nextLong()source
    Scans the next token of the input as a long.

  • nextShort()source
    Scans the next token of the input as a short.

  • skip(Pattern pattern)
    Skips input that matches the specified pattern, ignoring delimiters.

  • skip(String pattern)
    Skips input that matches a pattern constructed from the specified string.

  • useDelimiter(Pattern pattern)
    Sets this scanner's delimiting pattern to the specified pattern.

  • useDelimiter(String pattern)
    Sets this scanner's delimiting pattern to a pattern constructed from the specified String.

  • useLocale(Locale locale)
    Sets this scanner's locale to the specified locale.

------------ Build the following methods ------------------

  • Scanner(Readable source)
    Constructs a new Scanner that produces values scanned from the specified source.

  • Scanner(InputStream source)
    Constructs a new Scanner that produces values scanned from the specified input stream.

  • Scanner(File source)
    Constructs a new Scanner that produces values scanned from the specified file.

  • Scanner(Path source)
    Constructs a new Scanner that produces values scanned from the specified file.

  • Scanner(String source)
    Constructs a new Scanner that produces values scanned from the specified string.

  • Scanner(ReadableByteChannel source)
    Constructs a new Scanner that produces values scanned from the specified channel.

  • Scanner(Readable source, Pattern pattern)
    Constructs a Scanner that returns values scanned from the specified source delimited by the specified pattern.

  • Scanner(InputStream source, String charsetName)
    Constructs a new Scanner that produces values scanned from the specified input stream.

  • Scanner(File source, String charsetName)
    Constructs a new Scanner that produces values scanned from the specified file.

  • Scanner(File source, CharsetDecoder dec)

  • Scanner(Path source, String charsetName)
    Constructs a new Scanner that produces values scanned from the specified file.

  • Scanner(Path source, Charset charset)

  • Scanner(ReadableByteChannel source, String charsetName)
    Constructs a new Scanner that produces values scanned from the specified channel.

  • close()source
    Closes this scanner.

  • findInLine(String pattern)
    Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.

  • findInLine(Pattern pattern)
    Attempts to find the next occurrence of the specified pattern ignoring delimiters.

  • findWithinHorizon(String pattern, int horizon)
    Attempts to find the next occurrence of a pattern constructed from the specified string, ignoring delimiters.

  • findWithinHorizon(Pattern pattern, int horizon)
    Attempts to find the next occurrence of the specified pattern.

  • hasNext()source
    Returns true if this scanner has another token in its input.

  • hasNext(String pattern)
    Returns true if the next token matches the pattern constructed from the specified string.

  • hasNext(Pattern pattern)
    Returns true if the next complete token matches the specified pattern.

  • hasNextBigInteger()source
    Returns true if the next token in this scanner's input can be interpreted as a BigInteger in the default radix using the #nextBigInteger method. ...

  • hasNextFloat()source
    Returns true if the next token in this scanner's input can be interpreted as a float value using the #nextFloat method.

  • hasNextInt()source
    Returns true if the next token in this scanner's input can be interpreted as an int value in the default radix using the #nextInt method.

  • hasNextInt(int radix)
    Returns true if the next token in this scanner's input can be interpreted as an int value in the specified radix using the #nextInt method.

  • hasNextLine()source
    Returns true if there is another line in the input of this scanner.

  • hasNextLong()source
    Returns true if the next token in this scanner's input can be interpreted as a long value in the default radix using the #nextLong method.

  • hasNextShort()source
    Returns true if the next token in this scanner's input can be interpreted as a short value in the default radix using the #nextShort method. ...

  • ioException()source
    Returns the IOException last thrown by this Scanner's underlying Readable.

  • match()source
    Returns the match result of the last scanning operation performed by this scanner.

  • next()source
    Finds and returns the next complete token from this scanner.

  • next(String pattern)
    Returns the next token if it matches the pattern constructed from the specified string.

  • next(Pattern pattern)
    Returns the next token if it matches the specified pattern.

  • nextBoolean()source
    Scans the next token of the input into a boolean value and returns that value.

  • nextDouble()source
    Scans the next token of the input as a double.

  • nextFloat()source
    Scans the next token of the input as a float.

  • nextInt()source
    Scans the next token of the input as an int.

  • nextLine()source
    Advances this scanner past the current line and returns the input that was skipped.

  • nextLong()source
    Scans the next token of the input as a long.

  • nextShort()source
    Scans the next token of the input as a short.

  • skip(Pattern pattern)
    Skips input that matches the specified pattern, ignoring delimiters.

  • skip(String pattern)
    Skips input that matches a pattern constructed from the specified string.

  • useDelimiter(Pattern pattern)
    Sets this scanner's delimiting pattern to the specified pattern.

  • useDelimiter(String pattern)
    Sets this scanner's delimiting pattern to a pattern constructed from the specified String.

  • useLocale(Locale locale)
    Sets this scanner's locale to the specified locale.

@dthongvl dthongvl changed the title Java.Util.Scanner java.util.Scanner Aug 28, 2017
@ghost ghost self-assigned this Dec 19, 2017
@ghost ghost removed their assignment Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant