src/main/java/de/uapcore/lightpit/entities/User.java

changeset 33
fd8c40ff78c3
parent 29
27a0fdd7bca7
child 37
fecda0f466e6
     1.1 --- a/src/main/java/de/uapcore/lightpit/entities/User.java	Sat May 09 14:58:41 2020 +0200
     1.2 +++ b/src/main/java/de/uapcore/lightpit/entities/User.java	Sat May 09 15:19:21 2020 +0200
     1.3 @@ -1,8 +1,8 @@
     1.4  /*
     1.5   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
     1.6 - * 
     1.7 + *
     1.8   * Copyright 2018 Mike Becker. All rights reserved.
     1.9 - * 
    1.10 + *
    1.11   * Redistribution and use in source and binary forms, with or without
    1.12   * modification, are permitted provided that the following conditions are met:
    1.13   *
    1.14 @@ -24,20 +24,18 @@
    1.15   * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    1.16   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    1.17   * POSSIBILITY OF SUCH DAMAGE.
    1.18 - * 
    1.19 + *
    1.20   */
    1.21  package de.uapcore.lightpit.entities;
    1.22  
    1.23 -import java.util.Optional;
    1.24 +public final class User {
    1.25  
    1.26 -public final class User {
    1.27 -    
    1.28      public static final int ANONYMOUS_USERID = -1;
    1.29 -    
    1.30 +
    1.31      private int userID;
    1.32      private String username;
    1.33 -    private Optional<String> givenname;
    1.34 -    private Optional<String> lastname;
    1.35 +    private String givenname;
    1.36 +    private String lastname;
    1.37  
    1.38      public int getUserID() {
    1.39          return userID;
    1.40 @@ -55,19 +53,19 @@
    1.41          this.username = username;
    1.42      }
    1.43  
    1.44 -    public Optional<String> getGivenname() {
    1.45 +    public String getGivenname() {
    1.46          return givenname;
    1.47      }
    1.48  
    1.49 -    public void setGivenname(Optional<String> givenname) {
    1.50 +    public void setGivenname(String givenname) {
    1.51          this.givenname = givenname;
    1.52      }
    1.53  
    1.54 -    public Optional<String> getLastname() {
    1.55 +    public String getLastname() {
    1.56          return lastname;
    1.57      }
    1.58  
    1.59 -    public void setLastname(Optional<String> lastname) {
    1.60 +    public void setLastname(String lastname) {
    1.61          this.lastname = lastname;
    1.62      }
    1.63  
    1.64 @@ -88,5 +86,5 @@
    1.65          } else {
    1.66              return this.userID == ((User) obj).userID;
    1.67          }
    1.68 -    }    
    1.69 +    }
    1.70  }

mercurial