Permalink
Browse files

added 1.0, test all public doc-ed fns have :added

Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
  • Loading branch information...
1 parent 7b4b8e1 commit 59b65669860a1f33825775494809e5d500c19c63 @stuarthalloway stuarthalloway committed Apr 29, 2010
Oops, something went wrong.
@@ -19,7 +19,8 @@
number of items of each collection to print. If a collection contains
more items, the printer will print items up to the limit followed by
'...' to represent the remaining items. The root binding is nil
- indicating no limit."}
+ indicating no limit."
+ :added "1.0"}
*print-length* nil)
(def
@@ -30,7 +31,8 @@
collection, its items are at level 1; and so on. If an object is a
collection and is at a level greater than or equal to the value bound to
*print-level*, the printer prints '#' to represent it. The root binding
- is nil indicating no limit."}
+ is nil indicating no limit."
+ :added "1.0"}
*print-level* nil)
(defn- print-sequential [^String begin, print-one, ^String sep, ^String end, sequence, ^Writer w]
@@ -158,7 +160,8 @@
(prefer-method print-dup clojure.lang.IPersistentCollection java.util.Collection)
(def ^{:tag String
- :doc "Returns escape string for char or nil if none"}
+ :doc "Returns escape string for char or nil if none"
+ :added "1.0"}
char-escape-string
{\newline "\\n"
\tab "\\t"
@@ -216,7 +219,8 @@
(print-sequential "#{" pr-on " " "}" (seq s) w))
(def ^{:tag String
- :doc "Returns name string for char or nil if none"}
+ :doc "Returns name string for char or nil if none"
+ :added "1.0"}
char-name-string
{\newline "newline"
\tab "tab"
@@ -252,7 +252,8 @@
interfaces. If not supplied class defaults to Object. Creates an
returns an instance of a proxy class derived from the supplied
classes. The resulting value is cached and used for any subsequent
- requests for the same class set. Returns a Class object."
+ requests for the same class set. Returns a Class object."
+ {:added "1.0"}
[& bases]
(let [[super interfaces] (get-super-and-interfaces bases)
pname (proxy-name super interfaces)]
@@ -262,7 +263,8 @@
(defn construct-proxy
"Takes a proxy class and any arguments for its superclass ctor and
- creates and returns an instance of the proxy."
+ creates and returns an instance of the proxy."
+ {:added "1.0"}
[c & ctor-args]
(. Reflector (invokeConstructor c (to-array ctor-args))))
@@ -272,6 +274,7 @@
fns (which must take arguments matching the corresponding method,
plus an additional (explicit) first arg corresponding to this, and
sets the proxy's fn map."
+ {:added "1.0"}
[^IProxy proxy mappings]
(. proxy (__initClojureFnMappings mappings)))
@@ -284,11 +287,13 @@
a fn, in which case the corresponding method will revert to the
default behavior. Note that this function can be used to update the
behavior of an existing instance without changing its identity."
+ {:added "1.0"}
[^IProxy proxy mappings]
(. proxy (__updateClojureFnMappings mappings)))
(defn proxy-mappings
"Takes a proxy instance and returns the proxy's fn map."
+ {:added "1.0"}
[^IProxy proxy]
(. proxy (__getClojureFnMappings)))
@@ -316,6 +321,7 @@
be provided to override protected methods, they have no other access
to protected members, nor to super, as these capabilities cannot be
proxied."
+ {:added "1.0"}
[class-and-interfaces args & fs]
(let [bases (map #(or (resolve %) (throw (Exception. (str "Can't resolve: " %))))
class-and-interfaces)
@@ -354,12 +360,14 @@
(defmacro proxy-super
"Use to call a superclass method in the body of a proxy method.
Note, expansion captures 'this"
+ {:added "1.0"}
[meth & args]
`(proxy-call-with-super (fn [] (. ~'this ~meth ~@args)) ~'this ~(name meth)))
(defn bean
"Takes a Java object and returns a read-only implementation of the
map abstraction based upon its JavaBean properties."
+ {:added "1.0"}
[^Object x]
(let [c (. x (getClass))
pmap (reduce (fn [m ^java.beans.PropertyDescriptor pd]
@@ -586,6 +586,7 @@
to reference the load code for the implementing namespace. Should be
true when implementing-ns is the default, false if you intend to
load the code via some other method."
+ {:added "1.0"}
[& options]
(when *compile-files*
@@ -664,6 +665,7 @@
This parameter is used to specify the signatures of the methods of
the generated interface. Do not repeat superinterface signatures
here."
+ {:added "1.0"}
[& options]
(let [options-map (apply hash-map options)
@@ -682,6 +684,7 @@
classloader. Subsequent to generation you can import it into any
desired namespaces just like any other class. See gen-class for a
description of the options."
+ {:added "1.0"}
[& options]
(let [options-map (apply hash-map options)
@@ -450,7 +450,8 @@
"Creates a new vector of a single primitive type t, where t is one
of :int :long :float :double :byte :short :char or :boolean. The
resulting vector complies with the interface of vectors in general,
- but stores the values unboxed internally."
+ but stores the values unboxed internally."
+ {:added "1.2"}
[t]
(let [am ^clojure.core.ArrayManager (ams t)]
(Vec. am 0 5 EMPTY-NODE (.array am 0) nil)))
@@ -86,6 +86,7 @@
(defn inspect-tree
"creates a graphical (Swing) inspector on the supplied hierarchical data"
+ {:added "1.0"}
[data]
(doto (JFrame. "Clojure Inspector")
(.add (JScrollPane. (JTree. (tree-model data))))
@@ -96,6 +97,7 @@
"creates a graphical (Swing) inspector on the supplied regular
data, which must be a sequential data structure of data structures
of equal length"
+ {:added "1.0"}
[data]
(doto (JFrame. "Clojure Inspector")
(.add (JScrollPane. (JTable. (old-table-model data))))
@@ -147,6 +149,7 @@
(defn inspect
"creates a graphical (Swing) inspector on the supplied object"
+ {:added "1.0"}
[x]
(doto (JFrame. "Clojure Inspector")
(.add
@@ -18,6 +18,7 @@
(defn union
"Return a set that is the union of the input sets"
+ {:added "1.0"}
([] #{})
([s1] s1)
([s1 s2]
@@ -30,6 +31,7 @@
(defn intersection
"Return a set that is the intersection of the input sets"
+ {:added "1.0"}
([s1] s1)
([s1 s2]
(if (< (count s2) (count s1))
@@ -45,6 +47,7 @@
(defn difference
"Return a set that is the first set without elements of the remaining sets"
+ {:added "1.0"}
([s1] s1)
([s1 s2]
(if (< (count s1) (count s2))
@@ -60,17 +63,20 @@
(defn select
"Returns a set of the elements for which pred is true"
+ {:added "1.0"}
[pred xset]
(reduce (fn [s k] (if (pred k) s (disj s k)))
xset xset))
(defn project
"Returns a rel of the elements of xrel with only the keys in ks"
+ {:added "1.0"}
[xrel ks]
(set (map #(select-keys % ks) xrel)))
(defn rename-keys
"Returns the map with the keys in kmap renamed to the vals in kmap"
+ {:added "1.0"}
[map kmap]
(reduce
(fn [m [old new]]
@@ -82,12 +88,14 @@
(defn rename
"Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap"
+ {:added "1.0"}
[xrel kmap]
(set (map #(rename-keys % kmap) xrel)))
(defn index
"Returns a map of the distinct values of ks in the xrel mapped to a
set of the maps in xrel with the corresponding values of ks."
+ {:added "1.0"}
[xrel ks]
(reduce
(fn [m x]
@@ -97,12 +105,14 @@
(defn map-invert
"Returns the map with the vals mapped to the keys."
+ {:added "1.0"}
[m] (reduce (fn [m [k v]] (assoc m v k)) {} m))
(defn join
"When passed 2 rels, returns the rel corresponding to the natural
join. When passed an additional keymap, joins on the corresponding
keys."
+ {:added "1.0"}
([xrel yrel] ;natural join
(if (and (seq xrel) (seq yrel))
(let [ks (intersection (set (keys (first xrel))) (set (keys (first yrel))))
@@ -499,6 +499,7 @@
(defmacro try-expr
"Used by the 'is' macro to catch unexpected exceptions.
You don't call this."
+ {:added "1.1"}
[msg form]
`(try ~(assert-expr msg form)
(catch Throwable t#
@@ -82,6 +82,7 @@
attrs, and content. Other parsers can be supplied by passing
startparse, a fn taking a source and a ContentHandler and returning
a parser"
+ {:added "1.0"}
([s] (parse s startparse-sax))
([s startparse]
(binding [*stack* nil
Oops, something went wrong.

0 comments on commit 59b6566

Please sign in to comment.