Skip to content

Commit

Permalink
ditch the type XRAY_TYPE_NONE
Browse files Browse the repository at this point in the history
  • Loading branch information
slogan621 committed Oct 22, 2020
1 parent 931dd4e commit 39312bf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/src/main/java/org/thousandsmiles/tscharts_lib/XRay.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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"
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 39312bf

Please sign in to comment.