package org.mtransit.parser.mt.data;

public enum MInboundType {

	NONE(""), INBOUND("0"), OUTBOUND("1");

	public String id;

	MInboundType(String id) {
		this.id = id;
	}

	public static MInboundType parse(String id) {
		if (INBOUND.id.equals(id)) {
			return INBOUND;
		}
		if (OUTBOUND.id.equals(id)) {
			return OUTBOUND;
		}
		return NONE; // default
	}

	@Override
	public String toString() {
		return id;
	}

	public int intValue() {
		if (INBOUND.id.equals(this.id)) {
			return 0;
		} else if (OUTBOUND.id.equals(this.id)) {
			return 1;
		} else {
			System.out.printf("\nUnknow inbound type '%s'!\n", this.id);
			System.exit(-1);
			return -1;
		}
	}
}

@@ -79,17 +79,17 @@
 NBOUND(%22
-0
+1
 %22), OUTB
@@ -94,17 +94,17 @@
 TBOUND(%22
-1
+0
 %22);%0A%0A%09pu
@@ -481,17 +481,17 @@
 %09return 
-0
+1
 ;%0A%09%09%7D el
@@ -530,33 +530,33 @@
 d)) %7B%0A%09%09%09return 
-1
+0
 ;%0A%09%09%7D else %7B%0A%09%09%09

Fix Inbound/Outbound ID.