summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-05-06 15:16:42 +0000
committerRich Hickey <richhickey@gmail.com>2006-05-06 15:16:42 +0000
commit0df1d23f885720ff40bdccff6c4526f1fcdf2c5f (patch)
tree7b89a5ebc75ca76d22a6ab64d94a09a295decf0c /src
parentb5867713b47e73335a0ced582741e6cae0769c0e (diff)
added RT.box fns
Diffstat (limited to 'src')
-rw-r--r--src/org/clojure/runtime/RT.java40
1 files changed, 38 insertions, 2 deletions
diff --git a/src/org/clojure/runtime/RT.java b/src/org/clojure/runtime/RT.java
index b55e89a2..619d7586 100644
--- a/src/org/clojure/runtime/RT.java
+++ b/src/org/clojure/runtime/RT.java
@@ -67,11 +67,47 @@ static public Iter iter(Object coll)
}
-static public Character ch(char c)
+static public Character box(char x)
{
- return new Character(c);
+ return new Character(x);
}
+static public Boolean box(boolean x)
+ {
+ return Boolean.valueOf(x);
+ }
+
+static public Byte box(byte x)
+ {
+ return new Byte(x);
+ }
+
+static public Short box(short x)
+ {
+ return new Short(x);
+ }
+
+static public Integer box(int x)
+ {
+ return new Integer(x);
+ }
+
+static public Long box(long x)
+ {
+ return new Long(x);
+ }
+
+static public Float box(float x)
+ {
+ return new Float(x);
+ }
+
+static public Double box(double x)
+ {
+ return new Double(x);
+ }
+
+
static public Cons cons(Object x, Cons y)
{
return new Cons(x, y);