Class Account
- java.lang.Object
-
- de.japrost.jabudget.domain.account.Account
-
- All Implemented Interfaces:
java.io.Serializable
public class Account extends java.lang.Object implements java.io.Serializable
An account in JaBudGet.
The Account is identified by its id.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Account.Builder
Builder forAccount
s.
-
Constructor Summary
Constructors Constructor Description Account(java.lang.String id)
Create an account.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getId()
Gets the identity of the Account.java.lang.String
getName()
Gets the given name of the Account.int
hashCode()
void
setName(java.lang.String name)
Sets the given name of the Account.java.lang.String
toString()
-
-
-
Method Detail
-
getId
public java.lang.String getId()
Gets the identity of the Account.- Returns:
- the identity of an Account.
-
getName
public java.lang.String getName()
Gets the given name of the Account.- Returns:
- the given name. If no name is given returns an empty String.
-
setName
public void setName(java.lang.String name)
Sets the given name of the Account.- Parameters:
name
- the new given name. SHOULD NOT BEnull
.
-
hashCode
public int hashCode()
This implementation uses just
id
.- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
This implementation uses just
id
.- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
This implementation shows all fields.
- Overrides:
toString
in classjava.lang.Object
-
-