mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
Remove Location.toDebugString(), use toString() instead.
This commit is contained in:
parent
f2b0467f6b
commit
1b987a6b72
29 changed files with 31 additions and 36 deletions
|
@ -1464,7 +1464,7 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
||||||
return "<Address type=\"WGS84\" x=\"" + location.lon + "\" y=\"" + location.lat + "\" name=\""
|
return "<Address type=\"WGS84\" x=\"" + location.lon + "\" y=\"" + location.lat + "\" name=\""
|
||||||
+ (location.place != null ? location.place + ", " : "") + location.name + "\" />";
|
+ (location.place != null ? location.place + ", " : "") + location.name + "\" />";
|
||||||
else
|
else
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final String locationId(final Location location)
|
protected final String locationId(final Location location)
|
||||||
|
|
|
@ -152,7 +152,7 @@ public final class BahnProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ public final class BvgProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class DsbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: '" + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: '" + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class EireannProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class InvgProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class JetProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ public class LuProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class NasaProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class NriProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class NsProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class NvvProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ public class OebbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class PlProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class RtProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class SbbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ public class SeProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class SeptaProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class ShProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class SncbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ public class StockholmProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ public class VbbProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: '" + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: '" + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class VbnProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class VgsProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ public class ZvvProvider extends AbstractHafasProvider
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException("cannot handle: " + location.toDebugString());
|
throw new IllegalArgumentException("cannot handle: " + location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,12 +126,7 @@ public final class Location implements Serializable
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return name; // invoked by AutoCompleteTextView in landscape orientation
|
return "[" + type + " " + id + " " + lat + "/" + lon + " " + (place != null ? "\"" + place + "\"" : "null") + " \"" + name + "\"]";
|
||||||
}
|
|
||||||
|
|
||||||
public String toDebugString()
|
|
||||||
{
|
|
||||||
return "[" + type + " " + id + " " + lat + "/" + lon + " " + (place != null ? "'" + place + "'" : "null") + " '" + name + "']";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -42,7 +42,7 @@ public final class StationDepartures implements Serializable
|
||||||
final StringBuilder builder = new StringBuilder(getClass().getName());
|
final StringBuilder builder = new StringBuilder(getClass().getName());
|
||||||
builder.append("[");
|
builder.append("[");
|
||||||
if (location != null)
|
if (location != null)
|
||||||
builder.append(location.toDebugString());
|
builder.append(location);
|
||||||
if (departures != null)
|
if (departures != null)
|
||||||
builder.append(" ").append(departures.size()).append(" departures");
|
builder.append(" ").append(departures.size()).append(" departures");
|
||||||
builder.append("]");
|
builder.append("]");
|
||||||
|
|
|
@ -301,7 +301,7 @@ public final class Trip implements Serializable
|
||||||
if (destination != null)
|
if (destination != null)
|
||||||
{
|
{
|
||||||
builder.append(",");
|
builder.append(",");
|
||||||
builder.append("destination=").append(destination.toDebugString());
|
builder.append("destination=").append(destination);
|
||||||
}
|
}
|
||||||
builder.append(",");
|
builder.append(",");
|
||||||
builder.append("departure=").append(departureStop);
|
builder.append("departure=").append(departureStop);
|
||||||
|
@ -339,9 +339,9 @@ public final class Trip implements Serializable
|
||||||
final StringBuilder builder = new StringBuilder(getClass().getName() + "[");
|
final StringBuilder builder = new StringBuilder(getClass().getName() + "[");
|
||||||
builder.append("type=").append(type);
|
builder.append("type=").append(type);
|
||||||
builder.append(",");
|
builder.append(",");
|
||||||
builder.append("departure=").append(departure.toDebugString());
|
builder.append("departure=").append(departure);
|
||||||
builder.append(",");
|
builder.append(",");
|
||||||
builder.append("arrival=").append(arrival.toDebugString());
|
builder.append("arrival=").append(arrival);
|
||||||
builder.append(",");
|
builder.append(",");
|
||||||
builder.append("distance=").append(distance);
|
builder.append("distance=").append(distance);
|
||||||
builder.append(",");
|
builder.append(",");
|
||||||
|
|
|
@ -63,7 +63,7 @@ public abstract class AbstractProviderLiveTest
|
||||||
{
|
{
|
||||||
System.out.print(autocompletes.size() + " ");
|
System.out.print(autocompletes.size() + " ");
|
||||||
for (final Location autocomplete : autocompletes)
|
for (final Location autocomplete : autocompletes)
|
||||||
System.out.print(autocomplete.toDebugString() + " ");
|
System.out.print(autocomplete + " ");
|
||||||
System.out.println();
|
System.out.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue