All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dtsx.astra.sdk.utils.IdUtils Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
package com.dtsx.astra.sdk.utils;

import java.util.UUID;

/**
 * Utilities to work with ids
 */
public class IdUtils {

    /** Hide constructor. */
    private IdUtils() {}

    /**
     * Check if it is uuid.
     *
     * @param uuid
     *      unique identifier
     * @return
     *      check if this is uuid
     */
    public static boolean isUUID(String uuid) {
        try {
            UUID.fromString(uuid);
        } catch(IllegalArgumentException ieox) {
            return false;
        }
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy