I hereby claim:
- I am retroryan on github.
- I am binaryknight (https://keybase.io/binaryknight) on keybase.
- I have a public key whose fingerprint is E3F3 387C 700B 0653 3B79 0584 CFA0 3E0D EEDD D84C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
trait Animal | |
case class Bird(name: String, wings: Boolean) extends Animal | |
case class Horse(name: String, height: Double) extends Animal | |
object Animal { |
sealed abstract class QueryType[T] { | |
val data: T | |
} | |
case class IntQueryType(data: Int) extends QueryType[Int] with Ordered[IntQueryType] { | |
def compare(that: IntQueryType): Int = this.data - that.data | |
} | |
case class StringQueryType(data: String) extends QueryType[String] with Ordered[StringQueryType] { | |
def compare(that:StringQueryType):Int = this.data.compareTo(that.data) |