Permalink
Browse files

Added filterNot to Box

  • Loading branch information...
1 parent 52c9825 commit b21ad473bf11d6b48eceb367ecd7a5a03637aed4 @dpp dpp committed Apr 21, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 core/common/src/main/scala/net/liftweb/common/Box.scala
View
9 core/common/src/main/scala/net/liftweb/common/Box.scala
@@ -279,6 +279,15 @@ sealed abstract class Box[+A] extends Product {
def exists(func: A => Boolean): Boolean = false
/**
+ * Creates a Box if the current Box is Full and the value does not satisfy the predicate, f.
+ *
+ * @param f the predicate used to test value.
+ *
+ * @returns a Box
+ */
+ def filterNot(f: A => Boolean): Box[A] = filter(a => !f(a))
+
+ /**
* Perform a side effect by calling the specified function
* with the value contained in this box.
*/

0 comments on commit b21ad47

Please sign in to comment.