This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Main extends App { | |
| AvoidLosingGenericType.run() | |
| AvoidMatchingOnGenericTypeParams.run() | |
| TypeableExample.run() | |
| TypeTagExample.run() | |
| } | |
| class Funky[A, B](val foo: A, val bar: B) { | |
| override def toString: String = s"Funky($foo, $bar)" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.collection.mutable.WeakHashMap | |
| /** | |
| * Utility traits for classes whose companion objects are to | |
| * intern their instances, never creating repeated objects. | |
| * | |
| * Instances are cached based on their immutable | |
| * arguments, as provided to companion object's {{apply()}}. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FLOAT NUMBER \f | |
| ((?:[\+-]?[0-9]*[\.,][0-9]+)|(?:[\+-]?[0-9]+)) | |
| DEGREE SEPARATOR \ds | |
| [^ms'′"″,\.\dNEWnew] | |
| MINUTE SEPARATOR \ms | |
| [^ds°"″,\.\dNEWnew] | |
| SECOND SEPARATOR \ss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.codehaus.jackson.annotate.{ JsonTypeInfo, JsonSubTypes, JsonProperty } | |
| import org.codehaus.jackson.annotate.JsonSubTypes.Type | |
| import org.codehaus.jackson.map.ObjectMapper | |
| @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") | |
| @JsonSubTypes(Array( | |
| new Type(value = classOf[Bingo], name = "x"), | |
| new Type(value = classOf[Bongo], name = "y"), | |
| new Type(value = classOf[Bungo], name = "z") | |
| )) |