From 39312bfdec44e5a0870ededdf67468b3efe7c876 Mon Sep 17 00:00:00 2001 From: Syd Logan Date: Wed, 21 Oct 2020 22:07:30 -0700 Subject: [PATCH] ditch the type XRAY_TYPE_NONE --- .../java/org/thousandsmiles/tscharts_lib/XRay.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/thousandsmiles/tscharts_lib/XRay.java b/app/src/main/java/org/thousandsmiles/tscharts_lib/XRay.java index 43544d8..6133cf5 100755 --- a/app/src/main/java/org/thousandsmiles/tscharts_lib/XRay.java +++ b/app/src/main/java/org/thousandsmiles/tscharts_lib/XRay.java @@ -25,7 +25,6 @@ public class XRay implements Serializable { - public static final String XRAY_TYPE_NONE = "n"; public static final String XRAY_TYPE_FULL = "f"; public static final String XRAY_TYPE_ANTERIORS_BITEWINGS = "a"; public static final String XRAY_TYPE_PANORAMIC_VIEW = "p"; @@ -71,7 +70,7 @@ public String mouthTypeToString(XRayMouthType type) public String convertCSVToDBXrayType(String type) { - String ret = XRAY_TYPE_NONE; + String ret = ""; if (type.contains("full")) { ret += XRAY_TYPE_FULL; @@ -198,13 +197,13 @@ public String getType() { } private boolean validateType(String type) { - return type.equals(XRAY_TYPE_NONE) || type.equals(XRAY_TYPE_FULL) || + return type.equals(XRAY_TYPE_FULL) || type.equals(XRAY_TYPE_ANTERIORS_BITEWINGS) || type.equals(XRAY_TYPE_PANORAMIC_VIEW) || type.equals(XRAY_TYPE_CEPHATOMETRIC); } public void clearType() { - this.m_type = XRAY_TYPE_NONE; + this.m_type = ""; } // if m_type is "fb" and this function is called with "p", m_type will become "fbp" @@ -226,7 +225,7 @@ public boolean removeType(String type) { if (validateType(type) == false) { ret = false; } else if (m_type.contains(type) == true) { - this.m_type.replace(type, ""); + this.m_type = this.m_type.replace(type, ""); } return ret; } @@ -269,7 +268,7 @@ public void setId(int m_id) { public XRay() { this.m_teeth = 0; - this.m_type = XRAY_TYPE_NONE; + this.m_type = ""; this.m_mouthType = XRayMouthType.XRAY_MOUTH_TYPE_CHILD; }