Permalink
Browse files

fix: introduce Preconditions, fix: SmartPoster.getFirstIfExists

  • Loading branch information...
1 parent d2331fb commit 015b49c0988b221f91a745c29e59618e8255d6ee yoshihiro503 committed Sep 12, 2011
Showing with 14 additions and 0 deletions.
  1. +10 −0 src/main/scala/util/Preconditions.scala
  2. +4 −0 src/main/scala/util/Preconditions.scala~
@@ -0,0 +1,10 @@
+package org.proofcafe.nfcdemo.util
+
+object Preconditions {
+
+ def checkNotNull[A](x : A): A =
+ if (x != null) x else throw new IllegalArgumentException()
+
+ def checkArgument(b: Boolean): Unit =
+ if (b) () else throw new IllegalArgumentException()
+}
@@ -0,0 +1,4 @@
+package org.proofcafe.nfcdemo.util
+
+object Precondition {
+}

0 comments on commit 015b49c

Please sign in to comment.