Last active
August 23, 2016 12:41
-
-
Save mrzor/830100559d9b330c0c8bce9fa92210ce to your computer and use it in GitHub Desktop.
UUID heresy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn ^StringBuilder stringbuilder-append-UUID [^StringBuilder sb ^UUID uuid] | |
(doto sb | |
(.append "#UUID\"") | |
(.append (.getLeastSignificantBits uuid)) | |
(.append "\""))) | |
(defmethod print-method UUID [^UUID v ^java.io.Writer w] | |
(.append | |
w | |
(stringbuilder-append-UUID (StringBuilder. 60) v))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment