Class Share
java.lang.Object
org.episteme.social.economics.money.Share
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Property
Represents a share (stock) in a company.
A share represents ownership in a corporation, entitling the holder to a portion of the company's profits and assets.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionShare(Set<EconomicAgent> owners, String symbol, Organization company, Money currentValue) Creates a new Share. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOwner(EconomicAgent owner) Adds an owner to this share.booleanReturns the issuing company.Returns the dividend per share.doubleCalculates the dividend yield.getId()Returns the unique identifier of this entity.Returns the issuing company.Returns an unmodifiable view of the owners.Returns the ticker symbol.Returns the traits map for this entity.getValue()Returns the current market value.inthashCode()voidremoveOwner(EconomicAgent owner) Removes an owner from this share.voidsetCurrentValue(Money value) Updates the current market value.voidsetDividendPerShare(Money dividend) Sets the dividend per share.toString()Methods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Constructor Details
-
Share
Creates a new Share.- Parameters:
owners- the share ownerssymbol- the ticker symbolcompany- the issuing companycurrentValue- the current market value
-
-
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
-
getOwners
Returns an unmodifiable view of the owners. -
addOwner
Adds an owner to this share.- Parameters:
owner- the new owner
-
removeOwner
Removes an owner from this share.- Parameters:
owner- the owner to remove
-
getSymbol
-
getOrganization
-
getCompany
-
getValue
-
setCurrentValue
Updates the current market value.- Parameters:
value- the new value
-
getDividendYield
public double getDividendYield()Calculates the dividend yield.- Returns:
- the yield as a percentage
-
equals
-
hashCode
-
toString
-