package util
- Alphabetic
- By Inheritance
- util
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait AsLineOutput[T] extends AnyRef
Typeclass for things that can be output to.
Typeclass for things that can be output to. In order to output to an object of type
T
, it must be opened to some resource of typeOpened
and eventually have that resource be closed. - trait AsString[-T] extends AnyRef
Typeclass for things that are essentially strings (e.g., LimitedString).
- trait BaseGroupedBy[M[_, _], K, V, C[_]] extends AnyRef
Base trait for GroupedBy and MutableGroupedBy
- trait BaseType[A] extends AnyRef
- trait BaseTypeEquiv[A, B] extends AnyRef
- Annotations
- @implicitNotFound("It looks like ${A} and ${B} don't have the same base type (even after unwrapping any Option layers)")
- trait BaseTypeLowPriority extends AnyRef
- trait CaseInsensitivePlatform extends AnyRef
Used to split out the scala 2.13-only parts of the
CaseInsensitive
utility.Used to split out the scala 2.13-only parts of the
CaseInsensitive
utility. The "caseInsensitiveSortBy" usesSeqOps
as the enrichedseq
type, which was added in scala 2.13 to replace the deprecated SeqLike trait. - trait CommutativeNumericCompanionPlatform[X[_]] extends EvidenceIterableFactory[X, Numeric]
Scala 2.13-specific parts of the MathAggregations.XyzNumericCompanion trait.
Scala 2.13-specific parts of the MathAggregations.XyzNumericCompanion trait. This interface is built up around EvidenceIterableFactory, which was added in scala 2.13, and which we are using instead of the now-deprecated CanBuildFrom typeclass.
- trait EventHandler[-E, S] extends AnyRef
An event handler that responds to a given event in some implicitly-given scope.
An event handler that responds to a given event in some implicitly-given scope. The handler can perform side-effects before deciding whether or not interrupt the event, which would prevent the event from being passed to any more handlers.
- E
The event type
- S
The scope type, e.g. a Transaction, or Unit for unscoped events
- sealed trait EventHandlerAction extends AnyRef
Indicates a decision by an EventHandler to either interrupt the event (preventing it from being passed to further event handlers), or allow it to continue.
- class EventHandlerRegistry[S] extends AnyRef
An instance of this class is able to register "EventHandlers" and dispatch events to them.
An instance of this class is able to register "EventHandlers" and dispatch events to them. Events will be dispatched to handlers in the order they were added. In addition to the event itself, a
scope
(e.g. a Transaction) can be provided to the handler.- S
The scope type
- trait EventSubscription extends AnyRef
- case class FilePath(name: String, parent: Option[FilePath]) extends Ordered[FilePath] with Product with Serializable
A representation of a FilePath, made of a series of path segments, ending with a name.
A representation of a FilePath, made of a series of path segments, ending with a name. A FilePath is represented in memory as a "name" (the final part of the path), and an optional reference to a parent. In this manner, it is comparable to a scala
List
, except that it is reversed.The purpose of this class is to represent the same thing as a java.io.File or a java.nio.file.Path, but without the intention of actually interacting with any filesystem. FilePath is purely representational data.
- trait FilenameSanitization extends AnyRef
Utility mixin that includes methods for sanitizing filenames and paths for use in an actual filesystem.
- case class GroupedBy[K, V, C[_]](map: Map[K, C[V]]) extends BaseGroupedBy[Map, K, V, C] with Product with Serializable
Type wrapper for a Map of "key to collection of values", i.e.
Type wrapper for a Map of "key to collection of values", i.e. the result of a
groupBy
call. Works with Slick'sInvoker#build
method to build up a map from a streaming result set.Created by DylanH on 6/26/2017.
- K
The key type
- V
The value type
- C
The type of the collection to hold values in the map
- trait GroupedByPlatform extends AnyRef
Used to split the scala 2.13-only parts of the
GroupedBy
object.Used to split the scala 2.13-only parts of the
GroupedBy
object. The implicits for creating newBuilder
are oriented aroundIterableFactory
andMapFactory
, replacing the usage of the now-removed CanBuildFrom trait. - class LazyMap[K, V] extends AnyRef
Simple cache-like class that will lazily initialize values for any given key.
- trait MultiMapPlatform extends AnyRef
Used to split scala 2.13-only details from the
MultiMap
object.Used to split scala 2.13-only details from the
MultiMap
object. The MultiMapOps uses a type bound of IterableOnce, replacing the now-unavailable TraversableOnce that was used in 2.13 ThetoMultiMap
method uses an implicit Factory, which replaces the now-removed CanBuildFrom from 2.12. ThetoSumMap
method uses.view
to callmapValues
, conforming to a change in Map behavior from 2.12 to 2.13. - case class MutableGroupedBy[K, V, C[_]](map: Map[K, C[V]]) extends BaseGroupedBy[Map, K, V, C] with Product with Serializable
Variant of
GroupedBy
that uses a *mutable* map - class NonEmptyIterable[+A] extends AnyRef
- trait OnlyTraversable[A] extends AnyRef
Push-style "stream" which fills the void left by the removal of
Traversable
in Scala 2.13.Push-style "stream" which fills the void left by the removal of
Traversable
in Scala 2.13.This is kind of a niche for the handful of cases where we want to treat something as "collection" but writing an iterator would be too difficult. I.e. when the collection contents are determined by some algorithm that reports results via a side-effect, such as the Bron-Kerbosch algorithm.
An
OnlyTraversable
can only be traversed by itsforeach
method; it has no iterator. It can be transformed via the typical for-comprehension methods, but no other conveniences are provided. - trait OptionBaseType[T] extends AnyRef
- trait OptionBaseTypeLowPriority extends AnyRef
- class SimpleIOAdapter[T] extends AnyRef
A basic I/O adapter for capturing and applying a transformation to a process's stdout while capturing stderr from that process.
- trait StringMatcher[T] extends AnyRef
Oh how I wish Scala already had a trait for unapply
objects
.Oh how I wish Scala already had a trait for unapply
objects
. (Note:Inject
from Cats fits the bill, but since this module is supposed to be dependency-free, we can't use it here) - trait StringMatcherPlatform extends AnyRef
Used to split scala 2.12-only interfaces out of the
StringMatcher
companion object.Used to split scala 2.12-only interfaces out of the
StringMatcher
companion object. The commaSeparated/tokenSeparated helpers use an implicitFactory[_, _]
, replacing the now-unavailableCanBuildFrom[Nothing, _, _]
that was used in 2.12. - trait SyncResource[+R] extends AnyRef
Abstraction that's *close* to
cats.effect.Resource[R]
, but is suitable for adapting uses where the acquisition and release of the resource are joined together in a block (i.e.Abstraction that's *close* to
cats.effect.Resource[R]
, but is suitable for adapting uses where the acquisition and release of the resource are joined together in a block (i.e. they can't be separated for use in constructing a Resource).- R
The acquired resource type
- type UnitK[x] = Unit
Useful for when you need a
FunctionK
where the output type is only everUnit
, e.g.Useful for when you need a
FunctionK
where the output type is only everUnit
, e.g. callingforeach
on aMapK
.
Value Members
- object AsLineOutput
- object AsString
- object BaseType extends BaseTypeLowPriority
- object BaseTypeEquiv
- object CaseConversions
- object CaseInsensitive extends CaseInsensitivePlatform
- object EventHandlerAction
- object FilePath extends Serializable
- object FilenameSanitization extends FilenameSanitization
Singleton version of the
FilenameSanitization
mixin. - object FoldIn
- object GroupedBy extends GroupedByPlatform with Serializable
- object LogToolOutput
Helper for logging output from tools.
- object MathAggregations
A few pseudo-collections for numbers to provide some basic aggregations (like sum and average).
A few pseudo-collections for numbers to provide some basic aggregations (like sum and average). This is envisioned to be used with
GroupedBy
to prevent needing to collect all of the numbers and apply the operation after, at least for operations that can be aggregated on the fly. - object MultiMap extends MultiMapPlatform
- object NonEmptyIterable
- object OnlyTraversable
- object OptionBaseType extends OptionBaseTypeLowPriority
- object OxfordList
A helper utility for forming "Oxford" word lists.
A helper utility for forming "Oxford" word lists. For example, [item1, item2] -> "item1 and item2" or [item1, item2, item3] -> "item1, item2, and item3"
- object RichCloseable
- object RichFile
- object RichIterator
- object SimpleIOAdapter
- object StringMatcher extends StringMatcherPlatform
- object SyncResource