(get obj k)accessor with either keyword or array lookup
(access/get (test.Cat. "spike") :name) => "spike"
accessor with either keyword or array lookup (access/get (test.Cat. "spike") :name) => "spike"
(get-in obj ks)accesses the nested object using specifiedb path
(access/get-in (test.Cat. "spike") [:name])
accesses the nested object using specifiedb path (access/get-in (test.Cat. "spike") [:name])
(get-with-array obj arr)access the fields of an object with an array of keywords
(get-with-array {:a 1} [:a]) => {:a 1}
(get-with-array (test.Cat. "spike") [:name]) => {:name "spike"}
access the fields of an object with an array of keywords
(get-with-array {:a 1} [:a])
=> {:a 1}
(get-with-array (test.Cat. "spike")
[:name])
=> {:name "spike"}(get-with-keyword obj k)access the fields of an object with keyword
(get-with-keyword {:a 1} :a) => 1
(get-with-keyword (test.Cat. "spike") :name) => "spike"
access the fields of an object with keyword
(get-with-keyword {:a 1} :a)
=> 1
(get-with-keyword (test.Cat. "spike")
:name)
=> "spike"(keys obj)gets all keys of an object
(access/keys (test.Cat. "spike")) => (contains [:name])
gets all keys of an object (access/keys (test.Cat. "spike")) => (contains [:name])
(meta-clear class)clears all meta-read and meta-write definitions for a class
clears all meta-read and meta-write definitions for a class
(set obj m)(set obj k v)sets the fields of an object with a map
(-> (doto (test.Cat. "spike") (access/set {:name "fluffy"})) (access/get :name)) => (any "fluffy" (throws))
sets the fields of an object with a map
(-> (doto (test.Cat. "spike")
(access/set {:name "fluffy"}))
(access/get :name))
=> (any "fluffy"
(throws))(set-with-keyword obj k v)sets the fields of an object with keyword
(std.object.framework/map-like test.Cat {:tag "cat" :read :all :write :all})
(-> (doto (test.Cat. "spike") (set-with-keyword :name "fluffy")) (access/get :name)) => (any "fluffy" (throws))
sets the fields of an object with keyword
(std.object.framework/map-like
test.Cat
{:tag "cat"
:read :all
:write :all})
(-> (doto (test.Cat. "spike")
(set-with-keyword :name "fluffy"))
(access/get :name))
=> (any "fluffy"
(throws))cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |