Class Author.Builder
java.lang.Object
org.hansken.plugin.extraction.api.Author.Builder
- Enclosing class:
- Author
A builder for an
author
.
Note: all methods throw a NullPointerException
when null
is passed to them, and all properties must be set.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Create the author from the properties set on thisbuilder
.Set theemail
.Set thename
.organisation
(String organisation) Set theorganisation
.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Set thename
.- Parameters:
name
- the name- Returns:
this
- Throws:
IllegalArgumentException
- if the given name is empty
-
email
Set theemail
.- Parameters:
email
- the email- Returns:
this
- Throws:
IllegalArgumentException
- if the given email is empty
-
organisation
Set theorganisation
.- Parameters:
organisation
- the organisation- Returns:
this
- Throws:
IllegalArgumentException
- if the given organisation is empty
-
build
Create the author from the properties set on thisbuilder
.- Returns:
- the created author
-