Class Share

java.lang.Object
org.episteme.social.economics.money.Share
All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Property

public final class Share extends Object implements Property, ComprehensiveIdentification
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 Details

    • Share

      public Share(Set<EconomicAgent> owners, String symbol, Organization company, Money currentValue)
      Creates a new Share.
      Parameters:
      owners - the share owners
      symbol - the ticker symbol
      company - the issuing company
      currentValue - the current market value
  • Method Details

    • getId

      public Identification getId()
      Description copied from interface: Identified
      Returns the unique identifier of this entity.
      Specified by:
      getId in interface Identified<Identification>
      Returns:
      the identifier
    • getTraits

      public Map<String,Object> getTraits()
      Description copied from interface: ComprehensiveIdentification
      Returns the traits map for this entity.
      Specified by:
      getTraits in interface Commented
      Specified by:
      getTraits in interface ComprehensiveIdentification
      Returns:
      the traits map
    • getOwners

      public Set<EconomicAgent> getOwners()
      Returns an unmodifiable view of the owners.
      Specified by:
      getOwners in interface Property
      Returns:
      the owners
    • addOwner

      public void addOwner(EconomicAgent owner)
      Adds an owner to this share.
      Parameters:
      owner - the new owner
    • removeOwner

      public void removeOwner(EconomicAgent owner)
      Removes an owner from this share.
      Parameters:
      owner - the owner to remove
    • getSymbol

      public String getSymbol()
      Returns the ticker symbol.
      Returns:
      the symbol
    • getOrganization

      public Organization getOrganization()
      Returns the issuing company.
      Returns:
      the organization
    • getCompany

      public Organization getCompany()
      Returns the issuing company.
      Returns:
      the company
    • getValue

      public Money getValue()
      Returns the current market value.
      Specified by:
      getValue in interface Property
      Returns:
      the value
    • setCurrentValue

      public void setCurrentValue(Money value)
      Updates the current market value.
      Parameters:
      value - the new value
    • getDividendPerShare

      public Money getDividendPerShare()
      Returns the dividend per share.
      Returns:
      the dividend, or null if not set
    • setDividendPerShare

      public void setDividendPerShare(Money dividend)
      Sets the dividend per share.
      Parameters:
      dividend - the dividend amount
    • getDividendYield

      public double getDividendYield()
      Calculates the dividend yield.
      Returns:
      the yield as a percentage
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object