abstract class Module[T] extends Stackable[T]
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 over T
types
and the parameter extraction is derived from type parameters.
ModuleParams
is similar, except it requires parameters
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) } }
- Alphabetic
- By Inheritance
- Module
- Stackable
- Head
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Module()
Abstract Value Members
-
abstract
def
description: String
The description of the functionality of the element.
The description of the functionality of the element.
- Definition Classes
- Head
- abstract def make(params: Params, next: Stack[T]): Stack[T]
-
abstract
def
parameters: Seq[Param[_]]
The Params that the element is interested in.
-
abstract
def
role: Role
The Role that the element can serve.
Concrete 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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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 toStack(next: Stack[T]): Stack[T]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )