summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/parserutils/DoubleMatcher.java
diff options
context:
space:
mode:
authorBenjamin J. Culkin <bjculkin@mix.wvu.edu>2017-10-08 22:39:59 -0300
committerBenjamin J. Culkin <bjculkin@mix.wvu.edu>2017-10-08 22:39:59 -0300
commitc82e3b3b2de0633317ec8fc85925e91422820597 (patch)
tree96567416ce23c5ce85601f9cedc3a94bb1c55cba /BJC-Utils2/src/main/java/bjc/utils/parserutils/DoubleMatcher.java
parentb3ac1c8690c3e14c879913e5dcc03a5f5e14876e (diff)
Start splitting into maven modules
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/parserutils/DoubleMatcher.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/parserutils/DoubleMatcher.java46
1 files changed, 0 insertions, 46 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/parserutils/DoubleMatcher.java b/BJC-Utils2/src/main/java/bjc/utils/parserutils/DoubleMatcher.java
deleted file mode 100644
index a885808..0000000
--- a/BJC-Utils2/src/main/java/bjc/utils/parserutils/DoubleMatcher.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package bjc.utils.parserutils;
-
-import static bjc.utils.PropertyDB.applyFormat;
-import static bjc.utils.PropertyDB.getRegex;
-
-import java.util.regex.Pattern;
-
-/*
- * Checks if a string would pass Double.parseDouble.
- *
- * Uses a regex from the javadoc for Double.valueOf()
- */
-class DoubleMatcher {
- /*
- * Unit pieces.
- */
- private static final String rDecDigits = getRegex("fpDigits");
- private static final String rHexDigits = getRegex("fpHexDigits");
- private static final String rExponent = applyFormat("fpExponent", getRegex("fpExponent"), rDecDigits);
-
- /*
- * Decimal floating point numbers.
- */
- private static final String rSimpleDec = applyFormat("fpDecimalDecimal", rDecDigits, rExponent);
- private static final String rSimpleIntDec = applyFormat("fpDecimalInteger", rDecDigits, rExponent);
-
- /*
- * Hex floating point numbers.
- */
- private static final String rHexInt = applyFormat("fpHexInteger", rHexDigits);
- private static final String rHexDec = applyFormat("fpHexDecimal", rHexDigits);
- private static final String rHexLead = applyFormat("fpHexLeader", rHexInt, rHexDec);
- private static final String rHexString = applyFormat("fpHexString", rHexLead, rDecDigits);
-
- /*
- * Floating point components.
- */
- private static final String rFPLeader = getRegex("fpLeader");
- private static final String rFPNum = applyFormat("fpNumber", rSimpleIntDec, rSimpleDec, rHexString);
-
- /*
- * Full double.
- */
- private static final String rDouble = applyFormat("fpDouble", rFPLeader, rFPNum);
- public static final Pattern doubleLiteral = Pattern.compile("\\A" + rDouble + "\\Z");
-}