com.baidubce.model
Class User

java.lang.Object
  extended by com.baidubce.model.User

public class User
extends Object

Represents the owner of an Baidu Bos bucket.


Constructor Summary
User()
          Constructs a new user without specifying an ID or display name.
User(String id, String displayName)
          Constructs a new user with the specified ID and display name.
 
Method Summary
 boolean equals(Object obj)
           
 String getDisplayName()
          Gets the display name of the user.
 String getId()
          Gets the ID of the user.
 int hashCode()
           
 void setDisplayName(String displayName)
          Sets the display name of the user.
 void setId(String id)
          Sets the ID of the user.
 String toString()
           
 User withDisplayName(String displayName)
          Sets the display name of the user.
 User withId(String id)
          Sets the ID of the user.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

User

public User()
Constructs a new user without specifying an ID or display name.


User

public User(String id,
            String displayName)
Constructs a new user with the specified ID and display name.

Parameters:
id - The ID for the user.
displayName - The display name for the user.
Method Detail

getId

public String getId()
Gets the ID of the user.

Returns:
The ID of the user.

setId

public void setId(String id)
Sets the ID of the user.

Parameters:
id - The ID of the user.

withId

public User withId(String id)
Sets the ID of the user.

Parameters:
id - The ID of the user.
Returns:
this object

getDisplayName

public String getDisplayName()
Gets the display name of the user.

Returns:
The display name of the user.

setDisplayName

public void setDisplayName(String displayName)
Sets the display name of the user.

Parameters:
displayName - The display name of the user.

withDisplayName

public User withDisplayName(String displayName)
Sets the display name of the user.

Parameters:
displayName - The display name of the user.
Returns:
this object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018. All rights reserved.