]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.api.uuid/src/org/argeo/api/uuid/UnkownNameUuid.java
All typed UUIDs implemented (except v2).
[lgpl/argeo-commons.git] / org.argeo.api.uuid / src / org / argeo / api / uuid / UnkownNameUuid.java
diff --git a/org.argeo.api.uuid/src/org/argeo/api/uuid/UnkownNameUuid.java b/org.argeo.api.uuid/src/org/argeo/api/uuid/UnkownNameUuid.java
deleted file mode 100644 (file)
index 623de91..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.argeo.api.uuid;
-
-import java.util.UUID;
-
-/** A name-based UUID (v3 or v5) whose construction values are not known. */
-public class UnkownNameUuid extends TypedUuid {
-       private static final long serialVersionUID = APM.SERIAL;
-
-       public UnkownNameUuid(UUID uuid) {
-               super(uuid);
-               if ((uuid.version() != 5 && uuid.version() != 3) || uuid.variant() != 2)
-                       throw new IllegalArgumentException("The provided UUID is not a name-based UUID.");
-       }
-
-       /**
-        * Always returns <code>true</true> since it is unknown from which values it was
-        * constructed..
-        */
-       @Override
-       public boolean isOpaque() {
-               return true;
-       }
-
-       /**
-        * Whether the hash of this name UUID was generated with SHA-1 (v5) or with MD5
-        * (v3).
-        */
-       public boolean isSha1() {
-               return uuid.version() == 5;
-       }
-}