-
If you have a lot of instanceof checks and casting, then you should consider having your base class (Term) define all methods that all sub classes implement, which by default do nothing and/or return sensible values (which could be an Optional or a "null object"). For example, Jackson does this for its JSON tree structure and its base class JsonNode.
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
Or just go full on functional. There are several JVM based Haskell languages, e.g. Eta and Frege.
-
Another option could be to check out Kotlin. It's a JVM language that while still object-oriented has may functional syntax features.
-
Or just go full on functional. There are several JVM based Haskell languages, e.g. Eta and Frege.