From: Roland Häder Date: Mon, 25 Apr 2016 16:13:04 +0000 (+0200) Subject: added utilities class X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6ba047cd4bbab4915b9c4076ef8f258ec9a829c0;p=jcustomer-core.git added utilities class --- diff --git a/src/org/mxchange/jcustomercore/utils/CustomerUtils.java b/src/org/mxchange/jcustomercore/utils/CustomerUtils.java new file mode 100644 index 0000000..c26bccd --- /dev/null +++ b/src/org/mxchange/jcustomercore/utils/CustomerUtils.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcustomercore.utils; + +import java.security.SecureRandom; +import java.util.Random; + +/** + * Customer utilities + *

+ * @author Roland Haeder + */ +public class CustomerUtils { + + /** + * Random number generator + */ + private static final Random RANDOM_NUMBER_GENERATOR; + + /** + * Static initializer + */ + static { + // Init RNG + RANDOM_NUMBER_GENERATOR = new SecureRandom(); + } + + /** + * Generates a random customer number with some dashes in it + *

+ * @param length Length of the number + *

+ * @return Generated customer number + */ + public static String generateCustomerNumber (final long length) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + /** + * No constructors for utiltity classes + */ + private CustomerUtils () { + } + +}