Minor code improvements.

This commit is contained in:
MobiusDev
2016-12-11 20:32:47 +00:00
parent 6a2ccc62e4
commit 70f0330eb0
182 changed files with 1006 additions and 1328 deletions

View File

@@ -656,7 +656,7 @@ public interface IXmlReader
* @param node
* @return {@code true} if the node is an element type, {@code false} otherwise
*/
public static boolean isNode(Node node)
static boolean isNode(Node node)
{
return node.getNodeType() == Node.ELEMENT_NODE;
}
@@ -665,7 +665,7 @@ public interface IXmlReader
* @param node
* @return {@code true} if the node is an element type, {@code false} otherwise
*/
public static boolean isText(Node node)
static boolean isText(Node node)
{
return node.getNodeType() == Node.TEXT_NODE;
}

View File

@@ -303,7 +303,7 @@ public final class Rnd
protected static volatile long SEED_UNIQUIFIER = 8682522807148012L;
public static final Random directRandom()
public static Random directRandom()
{
return rnd.directRandom();
}
@@ -313,7 +313,7 @@ public final class Rnd
* @return A random double number from 0 to 1
* @see com.l2jmobius.commons.util.Rnd#nextDouble()
*/
public static final double get()
public static double get()
{
return rnd.nextDouble();
}
@@ -323,7 +323,7 @@ public final class Rnd
* @param n The superior limit (exclusive)
* @return A random integer number from 0 to n-1
*/
public static final int get(int n)
public static int get(int n)
{
return rnd.get(n);
}
@@ -334,7 +334,7 @@ public final class Rnd
* @param max The maximum value
* @return A random integer number from min to max
*/
public static final int get(int min, int max)
public static int get(int min, int max)
{
return rnd.get(min, max);
}
@@ -345,12 +345,12 @@ public final class Rnd
* @param max The maximum value
* @return A random long number from min to max
*/
public static final long get(long min, long max)
public static long get(long min, long max)
{
return rnd.get(min, max);
}
public static final RandomContainer newInstance(RandomType type)
public static RandomContainer newInstance(RandomType type)
{
switch (type)
{
@@ -375,7 +375,7 @@ public final class Rnd
* @return A random boolean state (true or false)
* @see java.util.Random#nextBoolean()
*/
public static final boolean nextBoolean()
public static boolean nextBoolean()
{
return rnd.nextBoolean();
}
@@ -385,7 +385,7 @@ public final class Rnd
* @param array The array to be filled with random byte numbers
* @see java.util.Random#nextBytes(byte[] bytes)
*/
public static final void nextBytes(byte[] array)
public static void nextBytes(byte[] array)
{
rnd.nextBytes(array);
}
@@ -395,7 +395,7 @@ public final class Rnd
* @return A random double number from 0 to 1
* @see java.util.Random#nextDouble()
*/
public static final double nextDouble()
public static double nextDouble()
{
return rnd.nextDouble();
}
@@ -405,7 +405,7 @@ public final class Rnd
* @return A random integer number from 0 to 1
* @see java.util.Random#nextFloat()
*/
public static final float nextFloat()
public static float nextFloat()
{
return rnd.nextFloat();
}
@@ -415,7 +415,7 @@ public final class Rnd
* @return A random gaussian double number from 0 to 1
* @see java.util.Random#nextGaussian()
*/
public static final double nextGaussian()
public static double nextGaussian()
{
return rnd.nextGaussian();
}
@@ -425,7 +425,7 @@ public final class Rnd
* @return A random integer number from Integer.MIN_VALUE to Integer.MAX_VALUE
* @see java.util.Random#nextInt()
*/
public static final int nextInt()
public static int nextInt()
{
return rnd.nextInt();
}
@@ -435,7 +435,7 @@ public final class Rnd
* @return int
* @see com.l2jmobius.commons.util.Rnd#get(int n)
*/
public static final int nextInt(int n)
public static int nextInt(int n)
{
return get(n);
}
@@ -445,7 +445,7 @@ public final class Rnd
* @return A random integer number from Long.MIN_VALUE to Long.MAX_VALUE
* @see java.util.Random#nextLong()
*/
public static final long nextLong()
public static long nextLong()
{
return rnd.nextLong();
}