parse additional message for Frankfurt

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@154 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-09-08 17:06:44 +00:00
parent 6f16898846
commit 7dfc244ce7
4 changed files with 48 additions and 28 deletions

View file

@ -241,10 +241,28 @@ public final class ParserUtils
}
}
public static <T> T selectNotNull(final T... groups)
{
T selected = null;
for (final T group : groups)
{
if (group != null)
{
if (selected == null)
selected = group;
else
throw new IllegalStateException("ambiguous");
}
}
return selected;
}
public static String extractId(final String link)
{
return link.substring(link.length() - 10);
}
public static final String P_PLATFORM = "[\\wÄÖÜäöüßáàâéèêíìîóòôúùû\\. -/&#;]+?";
}