mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
distance in footways
This commit is contained in:
parent
fb34a5920d
commit
ae4d78cbbc
5 changed files with 24 additions and 9 deletions
|
@ -107,6 +107,15 @@ public final class XmlPullUtil
|
|||
return Integer.parseInt(pp.getAttributeValue(null, attrName).trim());
|
||||
}
|
||||
|
||||
public static int optIntAttr(final XmlPullParser pp, final String attrName, final int defaultValue)
|
||||
{
|
||||
final String attr = pp.getAttributeValue(null, attrName);
|
||||
if (attr != null)
|
||||
return Integer.parseInt(attr.trim());
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public static float floatAttr(final XmlPullParser pp, final String attrName)
|
||||
{
|
||||
return Float.parseFloat(pp.getAttributeValue(null, attrName).trim());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue