diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/com/xagasoft/gats/GatsDictionary.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/java/com/xagasoft/gats/GatsDictionary.java b/java/com/xagasoft/gats/GatsDictionary.java index 95ecc45..0ad4c78 100644 --- a/java/com/xagasoft/gats/GatsDictionary.java +++ b/java/com/xagasoft/gats/GatsDictionary.java | |||
@@ -90,6 +90,57 @@ public class GatsDictionary extends GatsObject implements Map<String,GatsObject> | |||
90 | return hValue.put( arg0, arg1 ); | 90 | return hValue.put( arg0, arg1 ); |
91 | } | 91 | } |
92 | 92 | ||
93 | public GatsObject put( String key, long val ) | ||
94 | { | ||
95 | return hValue.put( key, new GatsInteger( val ) ); | ||
96 | } | ||
97 | |||
98 | public GatsObject put( String key, double val ) | ||
99 | { | ||
100 | return hValue.put( key, new GatsFloat( val ) ); | ||
101 | } | ||
102 | |||
103 | public GatsObject put( String key, boolean val ) | ||
104 | { | ||
105 | return hValue.put( key, new GatsBoolean( val ) ); | ||
106 | } | ||
107 | |||
108 | public GatsObject put( String key, String val ) | ||
109 | { | ||
110 | return hValue.put( key, new GatsString( val ) ); | ||
111 | } | ||
112 | |||
113 | public long getInt( String key ) | ||
114 | { | ||
115 | return ((GatsInteger)hValue.get( key )).getValue(); | ||
116 | } | ||
117 | |||
118 | public double getFloat( String key ) | ||
119 | { | ||
120 | return ((GatsFloat)hValue.get( key )).getValue(); | ||
121 | } | ||
122 | |||
123 | public boolean getBool( String key ) | ||
124 | { | ||
125 | return ((GatsBoolean)hValue.get( key )).getValue(); | ||
126 | } | ||
127 | |||
128 | public byte[] getString( String key ) | ||
129 | { | ||
130 | return ((GatsString)hValue.get( key )).getValue(); | ||
131 | } | ||
132 | |||
133 | public GatsDictionary getDict( String key ) | ||
134 | { | ||
135 | return (GatsDictionary)hValue.get( key ); | ||
136 | } | ||
137 | |||
138 | public GatsList getList( String key ) | ||
139 | { | ||
140 | return (GatsList)hValue.get( key ); | ||
141 | } | ||
142 | |||
143 | |||
93 | public void putAll( Map<? extends String, ? extends GatsObject> arg0 ) | 144 | public void putAll( Map<? extends String, ? extends GatsObject> arg0 ) |
94 | { | 145 | { |
95 | hValue.putAll( arg0 ); | 146 | hValue.putAll( arg0 ); |