Class Receipt
java.lang.Object
org.episteme.social.economics.money.Receipt
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named
Represents a receipt for a completed transaction.
A receipt is an immutable record of an exchange of money or shares between a seller and buyer.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReceipt(Organization seller, Organization buyer, TimeCoordinate date, Identification id, String description, Money amount) Creates a receipt for a money transaction.Receipt(Organization seller, Organization buyer, TimeCoordinate date, Identification id, String description, Share share, int quantity) Creates a receipt for a share transaction. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBuyer()getDate()getId()Returns the unique identifier of this entity.intgetShare()Returns the traits map for this entity.inthashCode()booleanReturns true if this is a money transaction (not shares).booleanReturns true if this is a share transaction.toString()Methods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Constructor Details
-
Receipt
public Receipt(Organization seller, Organization buyer, TimeCoordinate date, Identification id, String description, Money amount) Creates a receipt for a money transaction.- Parameters:
seller- the selling organizationbuyer- the buying organizationdate- the transaction datedescription- transaction descriptionamount- the monetary amountidentification- unique receipt ID
-
-
Method Details
-
getId
Description copied from interface:IdentifiedReturns the unique identifier of this entity.- Specified by:
getIdin interfaceIdentified<Identification>- Returns:
- the identifier
-
getTraits
Description copied from interface:ComprehensiveIdentificationReturns the traits map for this entity.- Specified by:
getTraitsin interfaceCommented- Specified by:
getTraitsin interfaceComprehensiveIdentification- Returns:
- the traits map
-
getSeller
-
getBuyer
-
getDate
-
getIdentification
-
getDescription
-
getAmount
-
getQuantity
public int getQuantity() -
isMoneyTransaction
public boolean isMoneyTransaction()Returns true if this is a money transaction (not shares).- Returns:
- true for money transaction
-
equals
-
hashCode
-
toString
-