Liking cljdoc? Tell your friends :D

hara.core.base.primitive


+primitive-lookup+clj


+primitive-records+clj


+primitives+clj


create-lookupclj

(create-lookup m)
(create-lookup m ignore)

creates a path lookup given a record

(create-lookup {:byte {:name "byte" :size 1} :long {:name "long" :size 4}}) => {"byte" [:byte :name] 1 [:byte :size] "long" [:long :name] 4 [:long :size]}

creates a path lookup given a record

(create-lookup {:byte {:name "byte" :size 1}
                :long {:name "long" :size 4}})
=> {"byte" [:byte :name]
    1 [:byte :size]
    "long" [:long :name]
    4 [:long :size]}
raw docstring

primitive-typeclj

(primitive-type v to)

Converts primitive values across their different representations. The choices are: :raw - The string in the jdk (i.e. Z for Boolean, C for Character) :symbol - The symbol that hara.object.query uses for matching (i.e. boolean, char, int) :string - The string that hara.object.query uses for matching :class - The primitive class representation of the primitive :container - The containing class representation for the primitive type

(primitive-type Boolean/TYPE :symbol) => 'boolean

(primitive-type "Z" :symbol) => 'boolean

(primitive-type "int" :symbol) => 'int

(primitive-type Character :string) => "char"

(primitive-type "V" :class) => Void/TYPE

(primitive-type 'long :container) => Long

(primitive-type 'long :type) => :long

Converts primitive values across their different representations. The choices are:
 :raw       - The string in the jdk (i.e. `Z` for Boolean, `C` for Character)
 :symbol    - The symbol that hara.object.query uses for matching (i.e. boolean, char, int)
 :string    - The string that hara.object.query uses for matching
 :class     - The primitive class representation of the primitive
 :container - The containing class representation for the primitive type

(primitive-type Boolean/TYPE :symbol)
=> 'boolean

(primitive-type "Z" :symbol)
=> 'boolean

(primitive-type "int" :symbol)
=> 'int

(primitive-type Character :string)
=> "char"

(primitive-type "V" :class)
=> Void/TYPE

(primitive-type 'long :container)
=> Long

(primitive-type 'long :type)
=> :long
raw docstring

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

× close