Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to jclouds, Inc. (jclouds) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. jclouds licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.jclouds.cloudsigma.domain;
 
 import static com.google.common.base.Preconditions.checkNotNull;

Author(s):
Adrian Cole
 
 public class ProfileInfo {
 
    public static class Builder {
       protected String uuid;
       protected String email;
       protected String firstName;
       protected String lastName;
       protected String nickName;
       protected ProfileType type = .;
 
       public Builder uuid(String uuid) {
          this. = uuid;
          return this;
       }
 
       public Builder email(String email) {
          this. = email;
          return this;
       }
 
       public Builder firstName(String firstName) {
          this. = firstName;
          return this;
       }
 
       public Builder lastName(String lastName) {
          this. = lastName;
          return this;
       }
 
       public Builder nickName(String nickName) {
          this. = nickName;
          return this;
       }
 
       public Builder type(ProfileType type) {
          this. = type;
          return this;
       }
 
       public ProfileInfo build() {
          return new ProfileInfo();
       }
 
    }
 
    protected final String uuid;
    protected final String email;
    protected final String firstName;
    protected final String lastName;
    protected final String nickName;
    protected final ProfileType type;
 
    public ProfileInfo(String uuidString emailString firstNameString lastNameString nickNameProfileType type) {
       this. = checkNotNull(uuid"uuid");
       this. = checkNotNull(email"email");
       this. = checkNotNull(firstName"firstName");
       this. = checkNotNull(lastName"lastName");
       this. = checkNotNull(nickName"nickName");
       this. = checkNotNull(type"type");
    }

   

Returns:
uuid of the profile.
 
    public String getUuid() {
       return ;
    }

   
Checks for valid email address

Returns:
email of the profile.
   public String getEmail() {
      return ;
   }

   

Returns:
firstName of the profile.
   protected String getFirstName() {
      return ;
   }

   

Returns:
lastName of the profile.
   protected String getLastName() {
      return ;
   }

   
Used in phpBB nick name

Returns:
nickName of the profile.
   protected String getNickName() {
      return ;
   }

   

Returns:
type of the profile.
   protected ProfileType getType() {
      return ;
   }
   public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + (( == null) ? 0 : .hashCode());
      result = prime * result + (( == null) ? 0 : .hashCode());
      result = prime * result + (( == null) ? 0 : .hashCode());
      result = prime * result + (( == null) ? 0 : .hashCode());
      result = prime * result + (( == null) ? 0 : .hashCode());
      result = prime * result + (( == null) ? 0 : .hashCode());
      return result;
   }
   public boolean equals(Object obj) {
      if (this == obj)
         return true;
      if (obj == null)
         return false;
      if (getClass() != obj.getClass())
         return false;
      ProfileInfo other = (ProfileInfoobj;
      if ( == null) {
         if (other.email != null)
            return false;
      } else if (!.equals(other.email))
         return false;
      if ( == null) {
         if (other.firstName != null)
            return false;
      } else if (!.equals(other.firstName))
         return false;
      if ( == null) {
         if (other.lastName != null)
            return false;
      } else if (!.equals(other.lastName))
         return false;
      if ( == null) {
         if (other.nickName != null)
            return false;
      } else if (!.equals(other.nickName))
         return false;
      if ( != other.type)
         return false;
      if ( == null) {
         if (other.uuid != null)
            return false;
      } else if (!.equals(other.uuid))
         return false;
      return true;
   }
   public String toString() {
      return "[uuid=" +  + ", email=" +  + ", firstName=" +  + ", lastName=" + 
            + ", nickName=" +  + ", type=" +  + "]";
   }
New to GrepCode? Check out our FAQ X