Class Flag

java.lang.Object
org.episteme.social.politics.flags.Flag
All Implemented Interfaces:
Serializable, Commented, Named

public class Flag extends Object implements Named, Commented, Serializable
Represents a flag as a symbolic and visual identifier for a political or social entity. This class stores both the physical image and the structural/symbolic data (colors, symbols, meaning).
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • Flag

      public Flag(String name, Image image, List<Color> colors, Set<String> symbols, String meaning, double aspectRatio)
      Creates a new flag.
      Parameters:
      name - the name of the flag (e.g., "Tricolore", "Stars and Stripes")
      image - the visual representation
      colors - the primary colors used in the flag
      symbols - the key symbols present on the flag (e.g., "Star", "Crescent")
      meaning - the symbolic meaning or history of the design
      aspectRatio - the standard width-to-height ratio (e.g., 1.5 for 3:2)
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Named
    • getComments

      public String getComments()
      Description copied from interface: Commented
      Returns the comments associated with this object. Maps to a "comments" trait.
      Specified by:
      getComments in interface Commented
      Returns:
      the comments
    • getImage

      public Image getImage()
      Returns the visual representation of the flag.
      Returns:
      the image, or null if not unmanaged
    • getColors

      public List<Color> getColors()
      Returns an unmodifiable list of the primary colors.
      Returns:
      the colors
    • getSymbols

      public Set<String> getSymbols()
      Returns an unmodifiable set of the symbols.
      Returns:
      the symbols (strings representing names of symbols)
    • getMeaning

      public String getMeaning()
      Returns the symbolic meaning of the flag.
      Returns:
      the meaning string
    • getAspectRatio

      public double getAspectRatio()
      Returns the standard width-to-height ratio.
      Returns:
      the aspect ratio
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTraits

      public Map<String,Object> getTraits()
      Description copied from interface: Commented
      Returns the map of traits/attributes for this object. Implementations should provide a mutable map to support default methods.
      Specified by:
      getTraits in interface Commented
      Returns:
      the traits map