本文整理匯總了Java中java.lang.Override類的典型用法代碼示例。如果您正苦於以下問題:Java Override類的具體用法?Java Override怎麽用?Java Override使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Override類屬於java.lang包,在下文中一共展示了Override類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: marshaller
import java.lang.Override; //導入依賴的package包/類
public ResponseFieldMarshaller marshaller() {
return new ResponseFieldMarshaller() {
@Override
public void marshal(ResponseWriter writer) {
writer.writeString($responseFields[0], __typename);
writer.writeObject($responseFields[1], nearestAntennaFromOrange != null ? nearestAntennaFromOrange.marshaller() : null);
writer.writeObject($responseFields[2], nearestAntennaFromBouygues != null ? nearestAntennaFromBouygues.marshaller() : null);
writer.writeObject($responseFields[3], nearestAntennaFromSfr != null ? nearestAntennaFromSfr.marshaller() : null);
writer.writeObject($responseFields[4], nearestAntennaFromFree != null ? nearestAntennaFromFree.marshaller() : null);
final AsStreet $asStreet = asStreet;
if ($asStreet != null) {
$asStreet.marshaller().marshal(writer);
}
final AsCity $asCity = asCity;
if ($asCity != null) {
$asCity.marshaller().marshal(writer);
}
final AsHouseNumber $asHouseNumber = asHouseNumber;
if ($asHouseNumber != null) {
$asHouseNumber.marshaller().marshal(writer);
}
}
};
}
示例2: parse
import java.lang.Override; //導入依賴的package包/類
@Override
public SimpleGenericModel<T> parse(JsonParser jsonParser) throws IOException {
SimpleGenericModel<T> instance = new SimpleGenericModel<T>();
if (jsonParser.getCurrentToken() == null) {
jsonParser.nextToken();
}
if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
jsonParser.skipChildren();
return null;
}
while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
String fieldName = jsonParser.getCurrentName();
jsonParser.nextToken();
parseField(instance, fieldName, jsonParser);
jsonParser.skipChildren();
}
return instance;
}
示例3: toString
import java.lang.Override; //導入依賴的package包/類
@Override
public String toString() {
if ($toString == null) {
$toString = "NearestAntennaFromFree3{"
+ "__typename=" + __typename + ", "
+ "coordinates=" + coordinates + ", "
+ "generation=" + generation + ", "
+ "provider=" + provider + ", "
+ "lastUpdate=" + lastUpdate + ", "
+ "status=" + status + ", "
+ "dist=" + dist + ", "
+ "insee=" + insee + ", "
+ "city=" + city + ", "
+ "addressLabel=" + addressLabel + ", "
+ "fragments=" + fragments
+ "}";
}
return $toString;
}
示例4: decode
import java.lang.Override; //導入依賴的package包/類
@Override
public Layout decode(ProtoReader reader) throws IOException {
Builder builder = new Builder();
long token = reader.beginMessage();
for (int tag; (tag = reader.nextTag()) != -1;) {
switch (tag) {
case 1: builder.x(ProtoAdapter.FLOAT.decode(reader)); break;
case 2: builder.y(ProtoAdapter.FLOAT.decode(reader)); break;
case 3: builder.width(ProtoAdapter.FLOAT.decode(reader)); break;
case 4: builder.height(ProtoAdapter.FLOAT.decode(reader)); break;
default: {
FieldEncoding fieldEncoding = reader.peekFieldEncoding();
Object value = fieldEncoding.rawProtoAdapter().decode(reader);
builder.addUnknownField(tag, fieldEncoding, value);
}
}
}
reader.endMessage(token);
return builder.build();
}
示例5: setRequestOptions
import java.lang.Override; //導入依賴的package包/類
@Override
protected void setRequestOptions(@NonNull RequestOptions toSet) {
if (toSet instanceof com.bumptech.glide.test.GlideOptions) {
super.setRequestOptions(toSet);
} else {
super.setRequestOptions(new com.bumptech.glide.test.GlideOptions().apply(toSet));
}
}
示例6: equals
import java.lang.Override; //導入依賴的package包/類
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Coordinates) {
Coordinates that = (Coordinates) o;
return ((this.latitude == null) ? (that.latitude == null) : this.latitude.equals(that.latitude))
&& ((this.longitude == null) ? (that.longitude == null) : this.longitude.equals(that.longitude));
}
return false;
}
示例7: hashCode
import java.lang.Override; //導入依賴的package包/類
@Override
public int hashCode() {
if (!$hashCodeMemoized) {
int h = 1;
h *= 1000003;
h ^= __typename.hashCode();
h *= 1000003;
h ^= (coordinates == null) ? 0 : coordinates.hashCode();
h *= 1000003;
h ^= (generation == null) ? 0 : generation.hashCode();
h *= 1000003;
h ^= (provider == null) ? 0 : provider.hashCode();
h *= 1000003;
h ^= (lastUpdate == null) ? 0 : lastUpdate.hashCode();
h *= 1000003;
h ^= (status == null) ? 0 : status.hashCode();
h *= 1000003;
h ^= (dist == null) ? 0 : dist.hashCode();
h *= 1000003;
h ^= (insee == null) ? 0 : insee.hashCode();
h *= 1000003;
h ^= (city == null) ? 0 : city.hashCode();
h *= 1000003;
h ^= (addressLabel == null) ? 0 : addressLabel.hashCode();
h *= 1000003;
h ^= fragments.hashCode();
$hashCode = h;
$hashCodeMemoized = true;
}
return $hashCode;
}
示例8: redact
import java.lang.Override; //導入依賴的package包/類
@Override
public ShapeStyle redact(ShapeStyle value) {
Builder builder = value.newBuilder();
if (builder.fill != null) builder.fill = RGBAColor.ADAPTER.redact(builder.fill);
if (builder.stroke != null) builder.stroke = RGBAColor.ADAPTER.redact(builder.stroke);
builder.clearUnknownFields();
return builder.build();
}
示例9: equals
import java.lang.Override; //導入依賴的package包/類
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Fragments) {
Fragments that = (Fragments) o;
return this.antennaFields.equals(that.antennaFields);
}
return false;
}
示例10: bindToUpdateStatement
import java.lang.Override; //導入依賴的package包/類
@Override
public final void bindToUpdateStatement(DatabaseStatement statement, WeatherForecastData model) {
statement.bindNumberOrNull(1, model.getId());
statement.bindStringOrNull(2, model.getMessage());
statement.bindNumberOrNull(3, model.getCnt());
statement.bindStringOrNull(4, model.getCod());
statement.bindNumberOrNull(5, model.getDt());
statement.bindNumberOrNull(6, model.getId());
}
示例11: bindToInsertStatement
import java.lang.Override; //導入依賴的package包/類
@Override
public final void bindToInsertStatement(DatabaseStatement statement, WeatherForecastData model,
int start) {
statement.bindNumberOrNull(1 + start, model.getId());
statement.bindStringOrNull(2 + start, model.getMessage());
statement.bindNumberOrNull(3 + start, model.getCnt());
statement.bindStringOrNull(4 + start, model.getCod());
statement.bindNumberOrNull(5 + start, model.getDt());
}
示例12: reset
import java.lang.Override; //導入依賴的package包/類
@Override
public void reset() {
allocationSizeInBytes = INITIAL_VALUE_ALLOCATION;
allocationMonitor = 0;
zeroVector();
super.reset();
}
示例13: transforms
import java.lang.Override; //導入依賴的package包/類
@Override
@SafeVarargs
@SuppressWarnings("varargs")
@CheckResult
public final GlideOptions transforms(@NonNull Transformation<Bitmap>... arg0) {
return (GlideOptions) super.transforms(arg0);
}
示例14: setUp
import java.lang.Override; //導入依賴的package包/類
@BeforeClass
public void setUp() throws Exception {
shouldRun = ensureInet6AddressFamily() && ensureIPv6OnLoopback();
server = HttpServer.create(new InetSocketAddress(0), 0);
server.createContext("/", ex -> {
ex.sendResponseHeaders(200, response.length());
try (BufferedWriter writer = new BufferedWriter(
new OutputStreamWriter(ex.getResponseBody(), "UTF-8"))) {
writer.write(response);
}
ex.close();
});
server.start();
socks = new SocksServer(0, false);
socks.addUser("user", "pass");
socks.start();
Authenticator.setDefault(new Authenticator() {
@Override
protected java.net.PasswordAuthentication getPasswordAuthentication() {
return new java.net.PasswordAuthentication(
"user", "pass".toCharArray());
}
});
}
示例15: equals
import java.lang.Override; //導入依賴的package包/類
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof Both)) return false;
Both<?, ?> o = (Both<?, ?>) other;
return o.one.equals(this.one)
&& o.two.equals(this.two);
}