jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1243493 - /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java
Date Mon, 13 Feb 2012 12:57:15 GMT
Author: mduerig
Date: Mon Feb 13 12:57:15 2012
New Revision: 1243493

URL: http://svn.apache.org/viewvc?rev=1243493&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
- Utility methods for handling null, true and false values

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java?rev=1243493&r1=1243492&r2=1243493&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/json/JsonValue.java
Mon Feb 13 12:57:15 2012
@@ -305,6 +305,18 @@ public abstract class JsonValue {
         public JsonAtom(Token token) {
             this(token.text(), valueType(token.type()));
         }
+        
+        public boolean isNull() {
+            return this == NULL || equals(NULL);
+        }
+        
+        public boolean isTrue() {
+            return this == TRUE || equals(TRUE);
+        }
+        
+        public boolean isFalse() {
+            return this == FALSE || equals(FALSE);
+        }
 
         @Override
         public JsonAtom asAtom() {



Mime
View raw message