From 6ba047cd4bbab4915b9c4076ef8f258ec9a829c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 25 Apr 2016 18:13:04 +0200 Subject: [PATCH] added utilities class --- .../jcustomercore/utils/CustomerUtils.java | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/org/mxchange/jcustomercore/utils/CustomerUtils.java 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 () { + } + +} -- 2.39.5