Java ID Value Create generateUniqueName(String kind)

Here you can find the source of generateUniqueName(String kind)

Description

generate Unique Name

License

Open Source License

Declaration

public static String generateUniqueName(String kind) 

Method Source Code

//package com.java2s;
/**//from w  w w.j  a v a  2 s . c o m
 * This file is part of CloudML [ http://cloudml.org ]
 *
 * Copyright (C) 2012 - SINTEF ICT
 * Contact: Franck Chauvel <franck.chauvel@sintef.no>
 *
 * Module: root
 *
 * CloudML is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * CloudML is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with CloudML. If not, see
 * <http://www.gnu.org/licenses/>.
 */

import java.util.Random;

public class Main {
    public static String generateUniqueName(String kind) {
        return String.format("%s%d", kind, new Random().nextInt());
    }
}

Related

  1. generateSalt()
  2. generateSalt()
  3. generateUniqueId()
  4. generateUniqueId()
  5. generateUniqueIdentity()
  6. generateUniqueString(int maxLength)
  7. toId(String id)
  8. toId(String name)
  9. toId(String text)