Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added filterNot to Box

  • Loading branch information...
commit b21ad473bf11d6b48eceb367ecd7a5a03637aed4 1 parent 52c9825
David Pollak dpp authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 core/common/src/main/scala/net/liftweb/common/Box.scala
9 core/common/src/main/scala/net/liftweb/common/Box.scala
View
@@ -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.
*/
Please sign in to comment.
Something went wrong with that request. Please try again.