Class StarCatalog

java.lang.Object
org.episteme.natural.physics.astronomy.StarCatalog
All Implemented Interfaces:
MiniCatalog<Star>

public class StarCatalog extends Object implements MiniCatalog<Star>
Star catalog with Quantity-based astronomical data loaded from JSON.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • StarCatalog

      public StarCatalog()
  • Method Details

    • getInstance

      public static StarCatalog getInstance()
      Returns the singleton instance.
    • getAll

      public List<Star> getAll()
      Description copied from interface: MiniCatalog
      Returns all entries in the catalog.
      Specified by:
      getAll in interface MiniCatalog<Star>
    • findByName

      public Optional<Star> findByName(String name)
      Description copied from interface: MiniCatalog
      Finds an entry by name.
      Specified by:
      findByName in interface MiniCatalog<Star>
    • size

      public int size()
      Description copied from interface: MiniCatalog
      Returns the size of the catalog.
      Specified by:
      size in interface MiniCatalog<Star>
    • filterBySpectralClass

      public List<Star> filterBySpectralClass(char spectralClass)
      Filters stars by spectral class (O, B, A, F, G, K, M).
      Parameters:
      spectralClass - the spectral class letter
      Returns:
      matching stars
    • findNearest

      public List<Star> findNearest(double maxDistanceLightYears)
      Finds stars within a distance range.
      Parameters:
      maxDistanceLightYears - maximum distance in light years
      Returns:
      stars within range, sorted by distance
    • filterByTemperature

      public List<Star> filterByTemperature(double minKelvin, double maxKelvin)
      Filters stars by temperature range (for H-R diagram).
      Parameters:
      minKelvin - minimum temperature
      maxKelvin - maximum temperature
      Returns:
      matching stars