Class Coin
java.lang.Object
org.episteme.social.economics.money.Coin
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named
Represents a physical coin or banknote.
Each coin has a unique identification (serial number), a face value, and an emission date. Common denominations include:
- Euro: 1¢, 2¢, 5¢, 10¢, 20¢, 50¢, €1, €2
- USD: 1¢, 5¢, 10¢, 25¢, 50¢, $1
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCoin(double value, Identification identification, TimeCoordinate emission, Currency currency) Creates a new Coin from amount and currency.Coin(Identification identification, TimeCoordinate emission, Money value) Creates a new Coin.Coin(Identification id, TimeCoordinate emission, Money value, String mintMark) Creates a new Coin with mint mark. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Coineuro(Identification id, TimeCoordinate emission, double value) Creates a Euro coin.Returns the currency.Returns the emission date.Returns the emission year.getId()Returns the unique identifier of this entity.Returns the coin identification.Returns the mint mark.Returns the traits map for this entity.getValue()Returns the face value.inthashCode()toString()static CoinusPenny(Identification id, TimeCoordinate emission) Creates a US penny.static CoinusQuarter(Identification id, TimeCoordinate emission) Creates a US quarter.Methods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Constructor Details
-
Coin
Creates a new Coin.- Parameters:
identification- unique serial numberemission- the date of mintingvalue- the face value- Throws:
NullPointerException- if any argument is null
-
Coin
Creates a new Coin with mint mark.- Parameters:
emission- the date of mintingvalue- the face valuemintMark- the mint mark (e.g., "D" for Denver)identification- unique serial number
-
Coin
public Coin(double value, Identification identification, TimeCoordinate emission, Currency currency) Creates a new Coin from amount and currency.- Parameters:
value- numeric face valueidentification- unique serial numberemission- the date of mintingcurrency- the currency
-
-
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
-
getIdentification
Returns the coin identification.- Returns:
- the identification
-
getEmission
-
getEmissionYear
-
getValue
-
getCurrency
-
getMintMark
-
equals
-
hashCode
-
toString
-
usPenny
Creates a US penny. -
usQuarter
Creates a US quarter. -
euro
Creates a Euro coin.
-