Created
March 22, 2011 12:46
-
-
Save ivyl/881155 to your computer and use it in GitHub Desktop.
useful things for using db4o in scala, need to be reviewed
This file contains 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
implicit def toPredicate[T](predicate: T => Boolean) = | |
new Predicate[T]() {def `match`(entry: T): Boolean = {predicate(entry)}} | |
class RichObjectSet[T](objectSet:ObjectSet[T]) extends Iterator[T] { | |
def hasNext:Boolean = objectSet.hasNext() | |
def next:T = objectSet.next() | |
} | |
implicit def toRichObjectSet[T](objectSet: ObjectSet[T] ) = | |
new RichObjectSet[T](objectSet) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment