Class Author.Builder
- java.lang.Object
-
- org.hansken.plugin.extraction.api.Author.Builder
-
- Enclosing class:
- Author
public static final class Author.Builder extends Object
A builder for anauthor.Note: all methods throw a
NullPointerExceptionwhennullis passed to them, and all properties must be set.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Authorbuild()Create the author from the properties set on thisbuilder.Author.Builderemail(String email)Set theemail.Author.Buildername(String name)Set thename.Author.Builderorganisation(String organisation)Set theorganisation.
-
-
-
Method Detail
-
name
public Author.Builder name(String name)
Set thename.- Parameters:
name- the name- Returns:
this- Throws:
IllegalArgumentException- if the given name is empty
-
email
public Author.Builder email(String email)
Set theemail.- Parameters:
email- the email- Returns:
this- Throws:
IllegalArgumentException- if the given email is empty
-
organisation
public Author.Builder organisation(String organisation)
Set theorganisation.- Parameters:
organisation- the organisation- Returns:
this- Throws:
IllegalArgumentException- if the given organisation is empty
-
-