diff --git a/src/main/java/com/samskivert/util/Randoms.java b/src/main/java/com/samskivert/util/Randoms.java index 04cc023f..24956414 100644 --- a/src/main/java/com/samskivert/util/Randoms.java +++ b/src/main/java/com/samskivert/util/Randoms.java @@ -1,5 +1,22 @@ // // $Id$ +// +// samskivert library - useful routines for java programs +// Copyright (C) 2001-2010 Michael Bayne, et al. +// +// This library 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 2.1 of the License, or +// (at your option) any later version. +// +// This library 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 this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.samskivert.util; @@ -11,6 +28,10 @@ import java.util.Random; /** * Provides utility routines to simplify obtaining randomized values. + * + * Each instance of Randoms is completely thread safe, but will share an underlying + * {@link Random} object. If you wish to have a private stream of pseudorandom numbers, + * use the {@link #with} factory. */ public class Randoms { @@ -71,6 +92,8 @@ public class Randoms /** * Returns true approximately one in n times. + * + * @throws IllegalArgumentException if n is not positive. */ public boolean getChance (int n) {