Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package player;
- public class DataFromRegex {
- public static class Builder {
- private String enemy = null;
- public Builder enemy(String enemy) {
- this.enemy = enemy;
- return this;
- }
- public DataFromRegex build() {
- return new DataFromRegex(this);
- }
- }
- private String enemy = null;
- private DataFromRegex(Builder builder) {
- }
- private DataFromRegex() {
- }
- public String getEnemy() {
- return enemy;
- }
- @Override
- public String toString() {
- if (enemy!=null) {
- return enemy;
- } else {
- return "null enemy";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment