mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 06:08:52 +00:00
Fare: Rename field 'network' to 'name'.
This commit is contained in:
parent
e307648053
commit
fc7596f1a2
2 changed files with 7 additions and 7 deletions
|
@ -88,7 +88,7 @@ public class VbnProvider extends AbstractHafasClientInterfaceProvider {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean hideFare(Fare fare) {
|
protected boolean hideFare(Fare fare) {
|
||||||
final String fareNameLc = fare.network.toLowerCase(Locale.US);
|
final String fareNameLc = fare.name.toLowerCase(Locale.US);
|
||||||
if (fareNameLc.contains("2 adults"))
|
if (fareNameLc.contains("2 adults"))
|
||||||
return true;
|
return true;
|
||||||
if (fareNameLc.contains("3 adults"))
|
if (fareNameLc.contains("3 adults"))
|
||||||
|
|
|
@ -37,16 +37,16 @@ public final class Fare implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6136489996930976421L;
|
private static final long serialVersionUID = -6136489996930976421L;
|
||||||
|
|
||||||
public final String network;
|
public final String name;
|
||||||
public final Type type;
|
public final Type type;
|
||||||
public final Currency currency;
|
public final Currency currency;
|
||||||
public final float fare;
|
public final float fare;
|
||||||
public final @Nullable String unitName;
|
public final @Nullable String unitName;
|
||||||
public final @Nullable String units;
|
public final @Nullable String units;
|
||||||
|
|
||||||
public Fare(final String network, final Type type, final Currency currency, final float fare, final String unitName,
|
public Fare(final String name, final Type type, final Currency currency, final float fare, final String unitName,
|
||||||
final String units) {
|
final String units) {
|
||||||
this.network = checkNotNull(network);
|
this.name = checkNotNull(name);
|
||||||
this.type = checkNotNull(type);
|
this.type = checkNotNull(type);
|
||||||
this.currency = checkNotNull(currency);
|
this.currency = checkNotNull(currency);
|
||||||
this.fare = fare;
|
this.fare = fare;
|
||||||
|
@ -61,7 +61,7 @@ public final class Fare implements Serializable {
|
||||||
if (!(o instanceof Fare))
|
if (!(o instanceof Fare))
|
||||||
return false;
|
return false;
|
||||||
final Fare other = (Fare) o;
|
final Fare other = (Fare) o;
|
||||||
if (!Objects.equal(this.network, other.network))
|
if (!Objects.equal(this.name, other.name))
|
||||||
return false;
|
return false;
|
||||||
if (!Objects.equal(this.type, other.type))
|
if (!Objects.equal(this.type, other.type))
|
||||||
return false;
|
return false;
|
||||||
|
@ -78,12 +78,12 @@ public final class Fare implements Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hashCode(network, type, currency, fare, unitName, units);
|
return Objects.hashCode(name, type, currency, fare, unitName, units);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return MoreObjects.toStringHelper(this).addValue(network).addValue(type).addValue(currency).addValue(fare)
|
return MoreObjects.toStringHelper(this).addValue(name).addValue(type).addValue(currency).addValue(fare)
|
||||||
.addValue(unitName).addValue(units).toString();
|
.addValue(unitName).addValue(units).toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue