public class ImmutablePerson extends ImmutableBaseData implements Person, Serializable
Person in ImmutableBaseData hierarchy.| Constructor and Description |
|---|
ImmutablePerson(int id,
String name,
long paid,
long share)
Create immutable person.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getDifference()
Get the difference between
getShare() and getPaid()
(positive of the person still has to pay something, negative if the
person is getting something back). |
String |
getName()
Get the name of the person.
|
long |
getPaid()
Get the calulcated amount of money the person has already paid.
|
long |
getShare()
Get the calculated share the person has to pay in total (not taking
getPaid() into account). |
equals, getId, hashCodepublic ImmutablePerson(int id,
String name,
long paid,
long share)
id - ID opf personname - name of personpaid - calculated amount paid by personshare - calculated total share of personpublic String getName()
Personpublic long getPaid()
public long getShare()
getPaid() into account).public long getDifference()
getShare() and getPaid()
(positive of the person still has to pay something, negative if the
person is getting something back).Copyright © 2015 illucIT Software GmbH. All rights reserved.