Skip to content

Releases: fulcrumgenomics/commons

Release 0.2.0

22 Jun 20:39
Compare
Choose a tag to compare

Initial release of our Scala commons library. In no particular order:

  • CommonsDef: object that is designed to be imported with import CommonsDef._ in any/all classes much like the way that scala.PreDef is imported in all files automatically.
  • StringUtil: methods to manipulate and format strings.
  • TimeUtil: methods for formatting time.
  • PathUtil: utility methods for creating and manipulating Path objects and path-like Strings.
  • IoUtil and Io: utility methods for input and output.
  • Logger: a logging class to support logging at multiple levels (i.e. info, warning, error)
  • ReflectionUtil: generic utility methods related to Java and Scala reflection.
  • DelimitedDataParser: a parser for files of text columns delimited by some character (e.g. tab-delimited or csv).
  • SimpleCounter and NumericCounter: classes to count occurrences of any kind of object, as well as numeric types.
    • NumericCounter has additional methods to provide various useful summary statistics.
  • SelfClosingIterator: an Iterator that implements Closeable and auto-closes when it hits the end of the underlying iterator.
  • BiMap: an iterable bi-directional map.
  • BetterBufferedIterator: a better buffered iterator that provides implementations of takeWhile and dropWhile that don't discard extra values.
  • ReflectiveBuilder: class to manage the process of inspecting another class and it's constructor(s) and then assembling the necessary information to build an instance reflectively.
  • ClassFinder: uility class that can scan for classes in the classpath and find all the ones annotated with a particular annotation.
  • CaptureSystemStreams: methods to help capture stdin and stderr streams (ex. when writing tests).
  • AsyncStreamSink: class that is capable of reading output from a sub-process (or arbitrary other InputStream) and processing it through any method that accepts a String, while managing the extra thread necessary to ensure nothing blocks.