mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
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:
parent
6f16898846
commit
7dfc244ce7
4 changed files with 48 additions and 28 deletions
|
@ -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ÄÖÜäöüßáàâéèêíìîóòôúùû\\. -/&#;]+?";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue