mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-08 13:28:48 +00:00
moved Product to oeffi, where it is being used
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@33 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
528bf29b36
commit
8ea4f316bb
1 changed files with 0 additions and 48 deletions
|
@ -1,48 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2010 the original author or authors.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.schildbach.pte;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Andreas Schildbach
|
|
||||||
*/
|
|
||||||
public enum Product
|
|
||||||
{
|
|
||||||
HIGH_SPEED_TRAIN, REGIONAL_TRAIN, SUBURBAN_TRAIN, SUBWAY, TRAM, BUS, FERRY, CABLECAR;
|
|
||||||
|
|
||||||
public static Product fromCode(char code)
|
|
||||||
{
|
|
||||||
if (code == 'I')
|
|
||||||
return Product.HIGH_SPEED_TRAIN;
|
|
||||||
else if (code == 'R')
|
|
||||||
return Product.REGIONAL_TRAIN;
|
|
||||||
else if (code == 'S')
|
|
||||||
return Product.SUBURBAN_TRAIN;
|
|
||||||
else if (code == 'U')
|
|
||||||
return Product.SUBWAY;
|
|
||||||
else if (code == 'T')
|
|
||||||
return Product.TRAM;
|
|
||||||
else if (code == 'B')
|
|
||||||
return Product.BUS;
|
|
||||||
else if (code == 'F')
|
|
||||||
return Product.FERRY;
|
|
||||||
else if (code == 'C')
|
|
||||||
return Product.CABLECAR;
|
|
||||||
else
|
|
||||||
throw new IllegalArgumentException(Character.toString(code));
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue