Added OSGi entries to `MANIFEST.MF`:
```
Bundle-ManifestVersion: 2
Bundle-Name: ulid-creator
Bundle-SymbolicName: com.github.f4b6a3.ulid
Bundle-Version: 4.1.0
Export-Package: com.github.f4b6a3.ulid
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
```
The OSGi symbolic name is the same as the root package name:
`com.github.f4b6a3.ulid`
Now you call `UlidFactory.newInstance()` and it's variants to get a new
`UlidFactory`.
List of changes:
- Added `UlidFactory.newInstance()`
- Added `UlidFactory.newInstance(Random)`
- Added `UlidFactory.newInstance(Supplier<byte[]>)`
- Added `UlidFactory.newMonotonicInstance()`
- Added `UlidFactory.newMonotonicInstance(Random)`
- Added `UlidFactory.newMonotonicInstance(Supplier<byte[]>)`
- Added benchmark code to compare ULID with UUID
- Removed `DefaultFactory`
- Removed `MonotonicFactory`
- Removed `Ulid.toUpperCase()`
- Removed `RandomGenerator`
The benchmark code was created in the direcory `benchmark`.
To execute the benchmark, run the script `./benchmark/run.sh`.
Sorry, there is no `run.bat` file for Windows.
Add static methods to Ulid:
- Ulid.getInstant(String);
- Ulid.getTime(String);
- Ulid.getRandom(String);
List of changes:
Updated Ulid
Updated test cases
Updated README.md
Test coverage 99.4%
Changed the uuid-creator to generate two types of ULID: default
(non-monotonic) and monotonic.
Until version 2.x.x this library only created monotonic ULIDs.
The version 3.0.0 breaks compatibility.
List of changes:
Changed UlidCreator
Created Ulid
Created UlidSpecCreator // abstract
Created DefaultUlidSpecCreator // implementation
Created MonotonicUlidSpecCreator // implementation
Removed UlidConverter
Removed UlidUtil
Removed UlidStruct
Create and update test cases
and more...
Test coverage: 93.5%
It's not needed to parse the whole ULID timestamp. All is needed is to
check the first two bits. They are extra bits added by the base-32
encoding. Both bits must be ZERO.
Moved v4 generators to UlidStruct
List of Changes:
Create UlidStruct.toUuid4()
Create UlidStruct.toString4()
Create UlidCreatorUuidTest // test cases
Create UlidCreatorStringTest // test cases
Add UlidUtil.extractUnixMilliseconds(UUID ulid)
Add UlidUtil.extractUnixMilliseconds(String ulid)
Now it can generate UUIDs and ULIDs compatible with RFC-4122 UUID v4.
List of Changes:
Created UlidCreator.getUlid4();
Created UlidCreator.getUlidString4();
Updated README.md
Coverage 94.1%
Now the generation of ULID in string format is 2.5x faster than before.
List of changes:
Optimize UlidSpecCreator
Optimize UlidConverter
Optimize UlidValidator
Create UlidStruct // class for internal use and test cases
Add test cases
Update README.md
Update javadoc
Coverage 94.3%