gfc-timeuuid


License

License

Apache-style
GroupId

GroupId

com.gilt
ArtifactId

ArtifactId

gfc-timeuuid_2.11
Last Version

Last Version

0.0.8
Release Date

Release Date

Type

Type

jar
Description

Description

gfc-timeuuid
gfc-timeuuid
Project Organization

Project Organization

com.gilt

Download gfc-timeuuid_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.gilt/gfc-timeuuid_2.11/ -->
<dependency>
    <groupId>com.gilt</groupId>
    <artifactId>gfc-timeuuid_2.11</artifactId>
    <version>0.0.8</version>
</dependency>
// https://jarcasting.com/artifacts/com.gilt/gfc-timeuuid_2.11/
implementation 'com.gilt:gfc-timeuuid_2.11:0.0.8'
// https://jarcasting.com/artifacts/com.gilt/gfc-timeuuid_2.11/
implementation ("com.gilt:gfc-timeuuid_2.11:0.0.8")
'com.gilt:gfc-timeuuid_2.11:jar:0.0.8'
<dependency org="com.gilt" name="gfc-timeuuid_2.11" rev="0.0.8">
  <artifact name="gfc-timeuuid_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gilt', module='gfc-timeuuid_2.11', version='0.0.8')
)
libraryDependencies += "com.gilt" % "gfc-timeuuid_2.11" % "0.0.8"
[com.gilt/gfc-timeuuid_2.11 "0.0.8"]

Dependencies

compile (1)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8

test (4)

Group / Artifact Type Version
org.scalatest : scalatest_2.11 jar 3.0.0
org.scalacheck : scalacheck_2.11 jar 1.13.4
com.datastax.cassandra : cassandra-driver-core jar 2.0.1
com.netflix.astyanax : astyanax jar 1.56.48

Project Modules

There are no modules declared in this project.

gfc-timeuuid Maven Central Build Status Join the chat at https://gitter.im/gilt/gfc

An Scala timeuuid library for generating version 1 UUIDs, based on http://www.ietf.org/rfc/rfc4122.txts. Part of the Gilt Foundation Classes.

Getting gfc-timeuuid

The latest version is 0.0.8, which is cross-built against Scala 2.10.x, 2.11.x and 2.12.x.

If you're using SBT, add the following line to your build file:

libraryDependencies += "com.gilt" %% "gfc-timeuuid" % "0.0.8"

For Maven and other build tools, you can visit search.maven.org. (This search will also list other available libraries from the gilt fundation classes.)

Contents and Example Usage

Generates a new unique time based UUID

val uuid = TimeUuid()

Convert time UUID to unix timestamp

import com.gilt.timeuuid._

val uuid = TimeUuid()
val timestamp = uuid.toLong

Convert time UUID to unix date

import com.gilt.timeuuid._

val uuid = TimeUuid()
val date = uuid.toDate

Convert arrays of 16 bytes to UUID:

val bytes = new Array[Byte](16)
val uuid = bytes.toUUID

License

Copyright 2018 Gilt Groupe, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

com.gilt

Gilt Tech

Versions

Version
0.0.8
0.0.7
0.0.6