A util-like standard library written in Scala and for Scala/Java.
With a random project name.
Both Scala3 and Java aimed to be supported.
However, due to my primary-used platform is Scala3, and I need to make it available on it as soon as possible to support developing for my other project. Undercurrent stage, we haven't taken enough time and efforts to do test on the Java platform. So the features may not be easy to use with Java.
For the Scala2 platform, I am poor with the scala/sbt build system and cannot work easily with cross-compile in sbt. Additions the reason I have just claimed in the above paragraph, the Scala2 support may not come so quickly without any contributions.
It contains utils, DSLs for scala, and some tiny feature modules that can be used in many projects. This aims to combine the duplicated util code used in multiple projects.
Current features:
- Full-featured
event.Event
library, supports ordering listeners by listener priority,EventContext
that can pass variables between listeners and handle event success status, event/emitter's error handler to handle errors from listener thrown. - Extended data types
LinkedList
from Java, can quickly sort inplace and iterates.
- Scala DSLs provide a way to do more simple jobs easier
- some commonly used math operator (
/-/
(over),*^
(pow)). - extension methods to encapsulate values to scala base data types.
- some commonly used math operator (
- GivenContext -— put(provide) and get(use) variables using its type as the key
- Series random utils
- x/y chances to:
- get a boolean value, or get one or another value.
- choose one or more items from a list.
- run a code block, or run another code block.
- Bytes data processing
- Convert a singed byte (or a byte array) to a HEX string
- Alias for long based datetime, or int based datetime, and the conversion functions.
- Drop specific
Class[T]
from one stack trace, or get a stack trace from where calls the function. - Convert an
Exception
(Throwable
) to String with various formatting methods. Numeric Statistics from the Morny project. (unstable)
Scheduled features:
- All the util modules in the existing project (Morny, etc.) that are reusable and have a weight.
Feel free to PRs for any reason, include but not only the new features, docs, tests, bug fixes...