• (format-constraint c)
Returns a vector of vectors representing one or more constraints
separated by commas. Constraints may be specified in Clojure using
strings, keywords, vectors, maps, and/or sets.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/miglayout/internal.clj:32 top

(defn format-constraint
  "Returns a vector of vectors representing one or more constraints
  separated by commas. Constraints may be specified in Clojure using
  strings, keywords, vectors, maps, and/or sets."
  [c]
  [[", "]
   (fcase #(%1 %2) c
     string?  [c]
     keyword? [c]
     vector?  (interpose " " c)
     map?     (apply concat (interpose [", "] (map #(interpose " " %) c)))
     set?     (apply concat (interpose [", "] (map format-constraints c)))
     (throwf IllegalArgumentException
             "unrecognized constraint: %s (%s)" c (class c)))])
Vars in clojure.contrib.miglayout.internal/format-constraint: defn
Used in 0 other vars

Comments top

No comments for format-constraint. Log in to add a comment.