Package org.supercsv.comment
Class CommentStartsWith
- java.lang.Object
-
- org.supercsv.comment.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.
-
-
-
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 nulljava.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 interfaceCommentMatcher
- Parameters:
line
- the raw line of CSV- Returns:
- true if it's a comment, otherwise false
-
-