mirror of
https://github.com/plexusorg/toml4j.git
synced 2025-01-01 04:52:24 +00:00
Call original method to avoid duplicated work.
This commit is contained in:
parent
3773c4eadf
commit
414bd396fa
1 changed files with 10 additions and 10 deletions
|
@ -137,8 +137,8 @@ public class Toml {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getString(String key, String defaultValue) {
|
public String getString(String key, String defaultValue) {
|
||||||
Object val = get(key);
|
String val = getString(key);
|
||||||
return val == null ? defaultValue : (String) val;
|
return val == null ? defaultValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getLong(String key) {
|
public Long getLong(String key) {
|
||||||
|
@ -146,8 +146,8 @@ public class Toml {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getLong(String key, Long defaultValue) {
|
public Long getLong(String key, Long defaultValue) {
|
||||||
Object val = get(key);
|
Long val = getLong(key);
|
||||||
return val == null ? defaultValue : (Long) val;
|
return val == null ? defaultValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,8 +171,8 @@ public class Toml {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getBoolean(String key, Boolean defaultValue) {
|
public Boolean getBoolean(String key, Boolean defaultValue) {
|
||||||
Object val = get(key);
|
Boolean val = getBoolean(key);
|
||||||
return val == null ? defaultValue : (Boolean) val;
|
return val == null ? defaultValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDate(String key) {
|
public Date getDate(String key) {
|
||||||
|
@ -180,8 +180,8 @@ public class Toml {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDate(String key, Date defaultValue) {
|
public Date getDate(String key, Date defaultValue) {
|
||||||
Object val = get(key);
|
Date val = getDate(key);
|
||||||
return val == null ? defaultValue : (Date) val;
|
return val == null ? defaultValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getDouble(String key) {
|
public Double getDouble(String key) {
|
||||||
|
@ -189,8 +189,8 @@ public class Toml {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getDouble(String key, Double defaultValue) {
|
public Double getDouble(String key, Double defaultValue) {
|
||||||
Object val = get(key);
|
Double val = getDouble(key);
|
||||||
return val == null ? defaultValue : (Double) val;
|
return val == null ? defaultValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue