Class CommentStartsWith

  • All Implemented Interfaces:
    CommentMatcher

    public class CommentStartsWith
    extends java.lang.Object
    implements CommentMatcher
    CommentMatcher that matches lines that begin with a specified String.
    • Constructor Summary

      Constructors 
      Constructor Description
      CommentStartsWith​(java.lang.String value)
      Constructs a new CommentStartsWith comment matcher.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isComment​(java.lang.String line)
      Determines whether a line of CSV is a comment.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommentStartsWith

        public CommentStartsWith​(java.lang.String value)
        Constructs a new CommentStartsWith comment matcher.
        Parameters:
        value - the String a line must start with to be a comment
        Throws:
        java.lang.NullPointerException - if value is null
        java.lang.IllegalArgumentException - if value is empty
    • Method Detail

      • isComment

        public boolean isComment​(java.lang.String line)
        Determines whether a line of CSV is a comment.
        Specified by:
        isComment in interface CommentMatcher
        Parameters:
        line - the raw line of CSV
        Returns:
        true if it's a comment, otherwise false