Class CommentStartsWith

java.lang.Object
org.supercsv.comment.CommentStartsWith
All Implemented Interfaces:
CommentMatcher

public class CommentStartsWith extends Object implements CommentMatcher
CommentMatcher that matches lines that begin with a specified String.
  • Field Details

    • value

      private final String value
  • Constructor Details

    • CommentStartsWith

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

    • isComment

      public boolean isComment(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