aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorShawn Buckley <shawntbuckley@gmail.com>2015-10-19 19:48:03 -0400
committerShawn Buckley <shawntbuckley@gmail.com>2015-10-19 19:49:28 -0400
commit71501031505f8f107b4511b7e7650f4eb3953fd4 (patch)
tree02a1dda7bc40814bd7071a1f86c9d07b3054cbcb /src/main
parentba53c6004c1a64968e49a9292055853e775aeaf8 (diff)
downloadGT5-Unofficial-71501031505f8f107b4511b7e7650f4eb3953fd4.tar.gz
GT5-Unofficial-71501031505f8f107b4511b7e7650f4eb3953fd4.tar.bz2
GT5-Unofficial-71501031505f8f107b4511b7e7650f4eb3953fd4.zip
Replace homegrown character comparision for builtin ones
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/api/enums/GT_Values.java7
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java6
2 files changed, 3 insertions, 10 deletions
diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java
index e04b2be941..8fe1f87c69 100644
--- a/src/main/java/gregtech/api/enums/GT_Values.java
+++ b/src/main/java/gregtech/api/enums/GT_Values.java
@@ -32,13 +32,6 @@ public class GT_Values {
/** Empty String for an easier Call Hierarchy */
public static final String E = "";
- /** Character Set with all Numbers */
- public static final HashSet<Character> CN = new HashSet<Character>(Arrays.asList('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'));
- /** Character Set with all lowercased Characters */
- public static final HashSet<Character> CL = new HashSet<Character>(Arrays.asList('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'));
- /** Character Set with all uppercased Characters */
- public static final HashSet<Character> CU = new HashSet<Character>(Arrays.asList('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'));
-
/** The first 32 Bits */
public static final int[] B = new int[] {1<<0,1<<1,1<<2,1<<3,1<<4,1<<5,1<<6,1<<7,1<<8,1<<9,1<<10,1<<11,1<<12,1<<13,1<<14,1<<15,1<<16,1<<17,1<<18,1<<19,1<<20,1<<21,1<<22,1<<23,1<<24,1<<25,1<<26,1<<27,1<<28,1<<29,1<<30,1<<31};
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 5e6e2498c5..6d99de6516 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -1124,7 +1124,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
return;
}
- if (GT_Values.CU.contains(Character.valueOf(aEvent.Name.charAt(0)))) {
+ if (Character.isUpperCase(aEvent.Name.charAt(0))) {
GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
}
} else {
@@ -1141,8 +1141,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
if (tName.length() > 0) {
- if ((GT_Values.CU.contains(Character.valueOf(tName.charAt(0)))) || (GT_Values.CN.contains(Character.valueOf(tName.charAt(0))))
- || (tName.charAt(0) == '_')) {
+ char firstChar = tName.charAt(0);
+ if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) || firstChar == '_') {
if (aPrefix.mIsMaterialBased) {
aMaterial = Materials.get(tName);
if (aMaterial != aMaterial.mMaterialInto) {