38 lines
1.0 KiB
Java
38 lines
1.0 KiB
Java
|
package com.zerohighdef.geoffrey.Models;
|
||
|
|
||
|
import com.google.gson.JsonObject;
|
||
|
|
||
|
public class GeoffreyTunnel {
|
||
|
private String locationName;
|
||
|
private String tunnelDirection;
|
||
|
private int tunnelNumber;
|
||
|
|
||
|
public GeoffreyTunnel(JsonObject tunnelJSON) {
|
||
|
this.locationName = tunnelJSON.get("location_name").getAsString();
|
||
|
this.tunnelDirection = tunnelJSON.get("tunnel_direction").getAsString();
|
||
|
this.tunnelNumber = tunnelJSON.get("tunnel_number").getAsInt();
|
||
|
}
|
||
|
|
||
|
public GeoffreyTunnel(String locationName, String tunnelDirection, int tunnelNumber) {
|
||
|
this.locationName = locationName;
|
||
|
this.tunnelDirection = tunnelDirection;
|
||
|
this.tunnelNumber = tunnelNumber;
|
||
|
}
|
||
|
|
||
|
public String getTunnelLocationString() {
|
||
|
return tunnelDirection + " " + tunnelNumber;
|
||
|
}
|
||
|
|
||
|
public int getTunnelNumber() {
|
||
|
return tunnelNumber;
|
||
|
}
|
||
|
|
||
|
public String getTunnelDirection() {
|
||
|
return tunnelDirection;
|
||
|
}
|
||
|
|
||
|
public String getLocationName() {
|
||
|
return locationName;
|
||
|
}
|
||
|
}
|