| package com.github.grundlefleck; | |
| @javax.annotation.Generated("com.google.auto.value.processor.AutoValueProcessor") | |
| final class AutoValue_Car extends Car { | |
| private final String model; | |
| private final int numWheels; | |
| AutoValue_Car( | |
| String model, | |
| int numWheels) { | |
| if (model == null) { | |
| throw new NullPointerException("Null model"); | |
| } | |
| this.model = model; | |
| this.numWheels = numWheels; | |
| } | |
| @Override | |
| public String model() { | |
| return model; | |
| } | |
| @Override | |
| public int numWheels() { | |
| return numWheels; | |
| } | |
| @Override | |
| public String toString() { | |
| return "Car{" | |
| + "model=" + model | |
| + ", numWheels=" + numWheels | |
| + "}"; | |
| } | |
| @Override | |
| public boolean equals(Object o) { | |
| if (o == this) { | |
| return true; | |
| } | |
| if (o instanceof Car) { | |
| Car that = (Car) o; | |
| return (this.model.equals(that.model())) | |
| && (this.numWheels == that.numWheels()); | |
| } | |
| return false; | |
| } | |
| @Override | |
| public int hashCode() { | |
| int h = 1; | |
| h *= 1000003; | |
| h ^= model.hashCode(); | |
| h *= 1000003; | |
| h ^= numWheels; | |
| return h; | |
| } | |
| } |