diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-06-11 04:05:22 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-06-11 04:05:22 +0000 |
commit | 380b36be3352cd9a5c93dbd67db25346166a8547 (patch) | |
tree | f69613e7b6238744c34af6dc14d6feb68a4f6706 /java/com/xagasoft/gats/GatsNull.java | |
parent | 3905f9962bbfb312c3804ff9c7b7d1e0fa203cbc (diff) | |
download | libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.gz libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.bz2 libgats-380b36be3352cd9a5c93dbd67db25346166a8547.tar.xz libgats-380b36be3352cd9a5c93dbd67db25346166a8547.zip |
All languages now support Null except for python and php, python is proving
slightly trickier.
Diffstat (limited to 'java/com/xagasoft/gats/GatsNull.java')
-rw-r--r-- | java/com/xagasoft/gats/GatsNull.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/java/com/xagasoft/gats/GatsNull.java b/java/com/xagasoft/gats/GatsNull.java new file mode 100644 index 0000000..7919433 --- /dev/null +++ b/java/com/xagasoft/gats/GatsNull.java | |||
@@ -0,0 +1,40 @@ | |||
1 | package com.xagasoft.gats; | ||
2 | |||
3 | import java.io.InputStream; | ||
4 | import java.io.OutputStream; | ||
5 | |||
6 | /** | ||
7 | * Represents a null value. This is really is the simplest type, GatsBoolean is | ||
8 | * a damn liar. This doesn't have any value, it's just null. | ||
9 | */ | ||
10 | public class GatsNull extends GatsObject | ||
11 | { | ||
12 | private boolean bValue = false; | ||
13 | |||
14 | /** | ||
15 | * Construct a new GatsNull, the default value is false. | ||
16 | */ | ||
17 | public GatsNull() | ||
18 | { | ||
19 | } | ||
20 | |||
21 | public int getType() | ||
22 | { | ||
23 | return GatsObject.NULL; | ||
24 | } | ||
25 | |||
26 | public String toString() | ||
27 | { | ||
28 | return "(null)"; | ||
29 | } | ||
30 | |||
31 | void read( InputStream is, char cType ) throws java.io.IOException | ||
32 | { | ||
33 | } | ||
34 | |||
35 | void write( OutputStream os ) throws java.io.IOException | ||
36 | { | ||
37 | os.write( (int)'n' ); | ||
38 | } | ||
39 | }; | ||
40 | |||