object Stack
- See also
stack.nilStack for starting construction of an empty stack for ServiceFactorys.
- Alphabetic
- By Inheritance
- Stack
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait Head extends AnyRef
Trait encompassing all associated metadata of a stack element.
Trait encompassing all associated metadata of a stack element. Stackables extend this trait.
- abstract class Module[T] extends Stackable[T]
A convenience class to construct stackable modules.
A convenience class to construct stackable modules. This variant operates over stacks and the entire parameter map. The
ModuleN
variants may be more convenient for most definitions as they operate overT
types and the parameter extraction is derived from type parameters.ModuleParams
is similar, except it requiresparameters
to be declared.def myNode = new Module[Int=>Int]("myelem") { val role = "Multiplier" val description = "Multiplies values by a multiplier" val parameters = Seq(implicitly[Stack.Param[Multiplied]]) def make(params: Params, next: Stack[Int=>Int]): Stack[Int=>Int] = { val Multiplier(m) = params[Multiplier] if (m == 1) next // It's a no-op, skip it. else Stack.leaf("multiply", i => next.make(params)(i)*m) } }
- abstract class Module0[T] extends Stackable[T]
A module of 0 parameters.
- abstract class Module1[P1, T] extends Stackable[T]
A module of 1 parameter.
- abstract class Module2[P1, P2, T] extends Stackable[T]
A module of 2 parameters.
- abstract class Module3[P1, P2, P3, T] extends Stackable[T]
A module of 3 parameters.
- abstract class Module4[P1, P2, P3, P4, T] extends Stackable[T]
A module of 4 parameters.
- abstract class Module5[P1, P2, P3, P4, P5, T] extends Stackable[T]
A module of 5 parameters.
- abstract class Module6[P1, P2, P3, P4, P5, P6, T] extends Stackable[T]
A module of 6 parameters.
- abstract class Module7[P1, P2, P3, P4, P5, P6, P7, T] extends Stackable[T]
A module of 7 parameters.
- abstract class Module8[P1, P2, P3, P4, P5, P6, P7, P8, T] extends Stackable[T]
A module of 8 parameters.
- abstract class Module9[P1, P2, P3, P4, P5, P6, P7, P8, P9, T] extends Stackable[T]
A module of 9 parameters.
- abstract class ModuleParams[T] extends Stackable[T]
- class NoOpModule[T] extends Module0[T]
- trait Param[P] extends AnyRef
A typeclass representing P-typed elements, eligible as parameters for stack configuration.
A typeclass representing P-typed elements, eligible as parameters for stack configuration. Note that the typeclass instance itself is used as the key in parameter maps; thus typeclasses should be persistent:
case class Multiplier(i: Int) { def mk(): (Multiplier, Stack.Param[Multiplier]) = (this, Multiplier.param) } object Multiplier { implicit val param = Stack.Param(Multiplier(123)) }
The
mk()
function together withParameterized.configured
provides a convenient Java interface. - trait Parameterized[+T] extends AnyRef
A mix-in for describing an object that is parameterized.
- trait Params extends Iterable[(Param[_], Any)]
A parameter map.
- trait ParamsInjector extends AnyRef
Encodes parameter injection for Stack.Params
- case class Role(name: String) extends Product with Serializable
Base trait for Stack roles.
Base trait for Stack roles. A stack's role is indicative of its functionality. Roles provide a way to group similarly-purposed stacks and slot stack elements into specific usages.
- trait TransformParams[T] extends Stackable[T]
Add an element to the
Stack
that will transform the parameters at that specific position. - trait Transformable[+T] extends AnyRef
- trait Transformer extends AnyRef
Encodes transformations for stacks of ServiceFactories of arbitrary
Req
andRep
types.Encodes transformations for stacks of ServiceFactories of arbitrary
Req
andRep
types. Such transformations must be indifferent to these types in order to typecheck.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def leaf[T](role: Role, t: T): Stack[T]
If only a role is given when constructing a leaf, then the head is created automatically
- def leaf[T](head: Head, t: T): Stack[T]
A static stack element; necessarily the last.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def node[T](head: Head, mk: (T) => T, next: Stack[T]): Stack[T]
A constructor for a 'simple' Node.
- def node[T](head: Head, mk: (Params, Stack[T]) => Stack[T], next: Stack[T]): Stack[T]
Nodes materialize by transforming the underlying stack in some way.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object Head
- object Param
- object Params