This project contains general purpose Java utilities for common CAASD's project needs. For example, this project contains:
- Literate classes for aviation concepts like:
LatLong
,Course
,Speed
, andDistance
. - Convenient map drawing capabilities using
MapBuilder
andMapImage
(see more here) - Useful "UUID-like" behaviors in
TimeId
andSmallTimeId
- Curve fitting tools for location data in:
Position
,KineticPosition
,PositionRecord
,KineticRecord
, andPositionInterpolator
- Useful Data-structures:
HashedLinkedSequence
andMetricTree
- Convenience methods for working with flat config files and Properties objects in:
PropertyUtils
- Classes for streaming data processing via functional programming:
DataCleaner
,FilteredConsumer
, andCompositeConsumer
. - Classes for convenient and powerful Exception handling:
ExceptionHandler
,ErrorCatchingTask
, andSequentialFileWriter
- Classes for powerful parallelism:
Parallelizer
- Other general purpose utilities like:
Histogram
,FileLineIterator
, andSingleUseTimer
This project is intended to assist anyone who codes in Java. However, this project was originally developed to "isolate" general purpose Java utilities from the Aviation Risk Identification and Assessment (ARIA) codebase.
- Literate code. Classes should be easy to use. Their behavior should be obvious.
- Well-tested code. Classes should be dependable.
- Powerful code. We want to natively support most use cases.
- As few dependencies as possible.
- Reconsider groupId -- Decision change from
org.mitre.caasd
toorg.mitre
- Execute change!
- Add "CONTRIBUTION.md" rules
- Add Roadmap
- Releasing current Java 8 version
- Then pivoting to Java 17
- Removing pair and triple (only in Java 17+)
- Add
LatLongPath
- Document CI/CD pipeline & strategy for (manually) publishing to maven central
- (Re)Add code coverage
- Interpolator needs to work across the international date line (e.g. where longitudes have a cliff)
All official releases are available at Maven Central.
The latest official release is version: 0.0.55
dependencies {
implementation("org.mitre:commons:0.0.55")
}
<dependency>
<groupId>org.mitre</groupId>
<artifactId>commons</artifactId>
<version>0.055/version>
</dependency>
Users who want to access the unreleased features within a SNAPSHOT build must download and build the source themselves. The build command is:
./gradlew build publishToMavenLocal
Contributions are welcomed and encouraged. But please keep in mind the project's goals and our philosophy on dependencies.
To keep source code formatting consistent this project uses:
- The spotless build plugin
- This plugin enforces a global code format during the build step (e.g. incorrect formatting breaks the build).
- Auto-format your code using:
./gradlew :spotlessApply
- A checkstyle.xml style sheet.
- The spotless plugin has priority,
- The goal of the style sheet is to configure your IDE so the spotless plugin and your IDE mostly agree on formatting
- We want the
commons
library to be hassle-free to use in YOUR java project. - Therefore
commons
:- Cannot encumber users by polluting their classpath.
- Must not leak its dependencies onto downstream class paths.
- Must not let its dependencies appear as part of the public API.
- If you notice a violation of this aspiration, please submit an issue. Dependency wrangling is a terrible time sink. We
don't want
commons
contributing to this headache.
- Added
LatLongPath
- Added
CheckedConsumer
andCheckedSupplier
- Deprecated
Pair
andTriple
because we modern projects should be using java records - Now formatting project code with The Palantir Java Formatter
- Fixed issue with interpolating LatLong data near the international date line
- The initial public release of the project.
- Brief release notes from versions that pre-date public-release are available here