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
NullPointerException
whennull
is 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 Author
build()
Create the author from the properties set on thisbuilder
.Author.Builder
email(String email)
Set theemail
.Author.Builder
name(String name)
Set thename
.Author.Builder
organisation(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
-
-