japgolly.microlibs.utils

Type members

Classlikes

object Aligner
object AsciiTable

Taken from https://github.com/dsl-platform/101-dsl-examples/blob/master/001-periodic-table-of-elements/scala/src/main/scala/com/dslplatform/examples/AsciiTable.scala

final class BiMap[A, B]

Bidirectional maps between values of two key types.

Bidirectional maps between values of two key types.

Since:

31/05/2013

Companion:
object
object BiMap
Companion:
class

Format a set of ints into a concise textual description.

Format a set of ints into a concise textual description.

Example: "2, 5, 7-14, 20"

Companion:
class
final class ConsolidatedSeq[+A](values: Array[Option[A]], groups: Array[Int])
Companion:
object
object Debug
case object Disabled extends Enabled
sealed trait Enabled extends WithBoolOps[Enabled]
Companion:
object
case object Enabled extends Enabled with Object[Enabled]
Companion:
class

Implements .equals using reference equality

Implements .equals using reference equality

Companion:
object
Companion:
class
object FileUtils
final case class FnWithFallback[A, B](withFallback: A => B => A => B) extends AnyVal

A partial function that, given a fallback, can efficiently become a total function.

A partial function that, given a fallback, can efficiently become a total function.

Companion:
object
Companion:
class
sealed trait Impossible

Unfortunately using Nothing results in Scala 2 behaving differently and having lots of problems wrt implicit resolution and type inference.

Unfortunately using Nothing results in Scala 2 behaving differently and having lots of problems wrt implicit resolution and type inference.

This is an alternative.

Companion:
object
object Impossible
Companion:
class

Provides labels based on index for items in an ordered sequence.

Provides labels based on index for items in an ordered sequence.

Companion:
object
object IndexLabel
Companion:
class
case object Invalid extends Validity
object Memo
final class OptionalBoolFn[A](val value: Option[A => Boolean]) extends AnyVal
Companion:
object
Companion:
class
trait Platform
object PlatformJVM extends Platform
sealed abstract class PotentialChange[+E, +A]
Companion:
object
Companion:
class
final class Ref[A <: AnyRef](val value: A)

Wraps a value such that reference equality holds.

Wraps a value such that reference equality holds.

Allows values to be used as map-keys, in sets, etc with uniqueness being by reference.

Companion:
object
object Ref
Companion:
class

Conversion to and from roman numerals.

Conversion to and from roman numerals.

trait SafeBool[B <: SafeBool[B]] extends Product with Serializable

Boolean isomorphism.

Boolean isomorphism.

Mix into the base type and override companion there.

Examples:

   sealed trait Enabled extends SafeBool[Enabled] {
     override final def companion = Enabled
   }

   case object Enabled extends Enabled with SafeBool.Object[Enabled] {
     override def positive = Enabled
     override def negative = Disabled
   }

   case object Disabled extends Enabled
   sealed abstract class Permission extends SafeBool.WithBoolOps[Permission] {
     override final def companion = Permission
   }

   case object Allow extends Permission
   case object Deny extends Permission

   object Permission extends SafeBool.Object[Permission] {
     override def positive = Allow
     override def negative = Deny
   }
Companion:
object
object SafeBool
Companion:
class
final class SetDiff[A](val removed: Set[A], val added: Set[A])

The difference between two sets.

The difference between two sets.

Companion:
object
object SetDiff
Companion:
class
final class SetOnceVar[A]
Companion:
object
object SetOnceVar
Companion:
class

Fast, efficient lookup functions for static data.

Fast, efficient lookup functions for static data.

Creation verifies key uniqueness and throws runtime exceptions on failure.

Companion:
class
final class TransitiveClosure[A](a2i: A => Int, i2a: Int => A, size: Int, directChildren: A => Iterable[A], filter: A => Filter)(implicit evidence$1: UnivEq[A])

Only works with acyclic digraphs. Closure is also reflexive.

Only works with acyclic digraphs. Closure is also reflexive.

Laws

i ∈ [0,size) a2i.i2a = id

Value parameters:
a2i

Global index of a node.

directChildren

Each direct child of a given node. Non-transitive; don't return self.

i2a

Node at global index.

Companion:
object
object Utils
case object Valid extends Validity
sealed trait Validity extends SafeBool[Validity] with WithBoolOps[Validity]
Companion:
object
object Validity extends Object[Validity]
Companion:
class

Value members

Concrete fields