|
Scala example source code file (genericouter.scala)
The Scala genericouter.scala source codecase class S(n:Int) trait TraversableLike[+A, +Repr] { class WithFilter(p: A => Boolean) def withFilter(p: A => Boolean): WithFilter = new WithFilter(p) } class HashMap[K, +V] extends TraversableLike[(K, V), HashMap[K, V]] class Outer[T](val t: T) { class Inner { def getT : T = t } } class OuterImpl(x: X) extends Outer[X](x) { def newInner = new Inner } class X { def getI : Outer[X]#Inner = { val oImpl = new OuterImpl(this) new oImpl.Inner } } Other Scala examples (source code examples)Here is a short list of links related to this Scala genericouter.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.