Liking cljdoc? Tell your friends :D

hara.object.element.util


box-argclj

(box-arg param-type arg)

Converts primitives to their correct data types (box-arg Float/TYPE 2) => 2.0

(box-arg Integer/TYPE 2.001) => 2

(type (box-arg Short/TYPE 1.0)) => java.lang.Short

Converts primitives to their correct data types
(box-arg Float/TYPE 2)
=> 2.0

(box-arg Integer/TYPE 2.001)
=> 2

(type (box-arg Short/TYPE 1.0))
=> java.lang.Short
raw docstring

box-argsclj

(box-args ele args)

makes the parameters of the arguments conform to the function signature

(-> (query/query-class String ["charAt" :#]) (box-args ["0123" 1])) => ["0123" 1]

makes the parameters of the arguments conform to the function signature

(-> (query/query-class String ["charAt" :#])
    (box-args ["0123" 1]))
=> ["0123" 1]
raw docstring

element-params-methodclj

(element-params-method ele)

arglist parameters for an element

(-> (query/query-class String ["charAt" :#]) (element-params-method)) => '[java.lang.String int]

arglist parameters for an element

(-> (query/query-class String ["charAt" :#])
    (element-params-method))
=> '[java.lang.String int]
raw docstring

format-element-methodclj

(format-element-method ele)

readable string representation of an element

(-> (query/query-class String ["charAt" :#]) (format-element-method)) => "[charAt :: (java.lang.String, int) -> char]"

readable string representation of an element

(-> (query/query-class String ["charAt" :#])
    (format-element-method))
=> "[charAt :: (java.lang.String, int) -> char]"
raw docstring

is-congruentclj

(is-congruent params args)

makes sure the argument types match with the param types

(is-congruent [Integer/TYPE String] [Long String]) => true

makes sure the argument types match with the param types

(is-congruent [Integer/TYPE String]
              [Long String])
=> true
raw docstring

param-arg-matchclj

(param-arg-match param-type arg-type)

Checks if the second argument can be used as the first argument (param-arg-match Double/TYPE Float/TYPE) => true

(param-arg-match Float/TYPE Double/TYPE) => true

(param-arg-match Integer/TYPE Float/TYPE) => false

(param-arg-match Byte/TYPE Long/TYPE) => false

(param-arg-match Long/TYPE Byte/TYPE) => true

(param-arg-match Long/TYPE Long) => true

(param-arg-match Long Byte) => false

(param-arg-match clojure.lang.PersistentHashMap java.util.Map) => false

(param-arg-match java.util.Map clojure.lang.PersistentHashMap) => true

Checks if the second argument can be used as the first argument
(param-arg-match Double/TYPE Float/TYPE)
=> true

(param-arg-match Float/TYPE Double/TYPE)
=> true

(param-arg-match Integer/TYPE Float/TYPE)
=> false

(param-arg-match Byte/TYPE Long/TYPE)
=> false

(param-arg-match Long/TYPE Byte/TYPE)
=> true

(param-arg-match Long/TYPE Long)
=> true

(param-arg-match Long Byte)
=> false

(param-arg-match clojure.lang.PersistentHashMap java.util.Map)
=> false

(param-arg-match java.util.Map clojure.lang.PersistentHashMap)
=> true
raw docstring

param-float-matchclj

(param-float-match param-type arg-type)

matches floats to integer inputs

(param-float-match Float/TYPE Long/TYPE) => true

(param-float-match Float/TYPE Long) => true

(param-float-match Float Integer) => true

(param-float-match Float Integer/TYPE) => true

matches floats to integer inputs

(param-float-match Float/TYPE Long/TYPE)
=> true

(param-float-match Float/TYPE Long)
=> true

(param-float-match Float Integer)
=> true

(param-float-match Float Integer/TYPE)
=> true
raw docstring

set-fieldclj

(set-field field obj val)

base function to set the field value of a particular object

base function to set the field value of a particular object
raw docstring

throw-arg-exceptioncljmacro

(throw-arg-exception ele args & [header])

helper macro for box-args to throw readable messages

helper macro for box-args to throw readable messages
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close