Package org.biojavax
Class DocRefAuthor.Tools
- java.lang.Object
-
- org.biojavax.DocRefAuthor.Tools
-
- Enclosing interface:
- DocRefAuthor
public static class DocRefAuthor.Tools extends java.lang.Object
Useful tools for working with authors.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
generateAuthorString(java.util.List authors, boolean useAnd)
Takes a set of authors and creates a comma-separated string.static java.util.List
parseAuthorString(java.lang.String authors)
Takes a list of authors and returns a set of DocRefAuthor objects.
-
-
-
Method Detail
-
parseAuthorString
public static java.util.List parseAuthorString(java.lang.String authors)
Takes a list of authors and returns a set of DocRefAuthor objects.- Parameters:
authors
- a comma-separated list of authors- Returns:
- set of DocRefAuthor objects.
-
generateAuthorString
public static java.lang.String generateAuthorString(java.util.List authors, boolean useAnd)
Takes a set of authors and creates a comma-separated string. For the final comma, it replaces it with the word "and".- Parameters:
authors
- set of authorsuseAnd
- whether or not to do the and thing, otherwise use all commas.- Returns:
- a comma-separated string with the word "and" in place of the final comma.
-
-