本文整理汇总了Java中java.lang.Object类的典型用法代码示例。如果您正苦于以下问题:Java Object类的具体用法?Java Object怎么用?Java Object使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Object类属于java.lang包,在下文中一共展示了Object类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decode
import java.lang.Object; //导入依赖的package包/类
@Override
public Phone 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.number(ProtoAdapter.STRING.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();
}
示例2: decode
import java.lang.Object; //导入依赖的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();
}
示例3: decode
import java.lang.Object; //导入依赖的package包/类
@Override
public ShapeArgs 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.d(ProtoAdapter.STRING.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();
}
示例4: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof ShapeStyle)) return false;
ShapeStyle o = (ShapeStyle) other;
return unknownFields().equals(o.unknownFields())
&& Internal.equals(fill, o.fill)
&& Internal.equals(stroke, o.stroke)
&& Internal.equals(strokeWidth, o.strokeWidth)
&& Internal.equals(lineCap, o.lineCap)
&& Internal.equals(lineJoin, o.lineJoin)
&& Internal.equals(miterLimit, o.miterLimit)
&& Internal.equals(lineDashI, o.lineDashI)
&& Internal.equals(lineDashII, o.lineDashII)
&& Internal.equals(lineDashIII, o.lineDashIII);
}
示例5: testStreamZip
import java.lang.Object; //导入依赖的package包/类
@Test
public void testStreamZip() throws IOException {
try (ZipFile zf = new ZipFile(new File(System.getProperty("test.src", "."), "input.zip"))) {
zf.stream().forEach(e -> assertTrue(e instanceof ZipEntry));
zf.stream().forEach(e -> assertEquals(e.toString(), "ReadZip.java"));
Object elements[] = zf.stream().toArray();
assertEquals(1, elements.length);
assertEquals(elements[0].toString(), "ReadZip.java");
}
}
示例6: decode
import java.lang.Object; //导入依赖的package包/类
@Override
public SpriteEntity 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.imageKey(ProtoAdapter.STRING.decode(reader)); break;
case 2: builder.frames.add(FrameEntity.ADAPTER.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();
}
示例7: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof AntennaFields) {
AntennaFields that = (AntennaFields) o;
return this.__typename.equals(that.__typename)
&& ((this.coordinates == null) ? (that.coordinates == null) : this.coordinates.equals(that.coordinates))
&& ((this.generation == null) ? (that.generation == null) : this.generation.equals(that.generation))
&& ((this.provider == null) ? (that.provider == null) : this.provider.equals(that.provider))
&& ((this.lastUpdate == null) ? (that.lastUpdate == null) : this.lastUpdate.equals(that.lastUpdate))
&& ((this.status == null) ? (that.status == null) : this.status.equals(that.status))
&& ((this.dist == null) ? (that.dist == null) : this.dist.equals(that.dist))
&& ((this.insee == null) ? (that.insee == null) : this.insee.equals(that.insee))
&& ((this.city == null) ? (that.city == null) : this.city.equals(that.city))
&& ((this.addressLabel == null) ? (that.addressLabel == null) : this.addressLabel.equals(that.addressLabel));
}
return false;
}
示例8: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof NearestAntennaFromBouygues) {
NearestAntennaFromBouygues that = (NearestAntennaFromBouygues) o;
return this.__typename.equals(that.__typename)
&& ((this.coordinates == null) ? (that.coordinates == null) : this.coordinates.equals(that.coordinates))
&& ((this.generation == null) ? (that.generation == null) : this.generation.equals(that.generation))
&& ((this.provider == null) ? (that.provider == null) : this.provider.equals(that.provider))
&& ((this.lastUpdate == null) ? (that.lastUpdate == null) : this.lastUpdate.equals(that.lastUpdate))
&& ((this.status == null) ? (that.status == null) : this.status.equals(that.status))
&& ((this.dist == null) ? (that.dist == null) : this.dist.equals(that.dist))
&& ((this.insee == null) ? (that.insee == null) : this.insee.equals(that.insee))
&& ((this.city == null) ? (that.city == null) : this.city.equals(that.city))
&& ((this.addressLabel == null) ? (that.addressLabel == null) : this.addressLabel.equals(that.addressLabel))
&& this.fragments.equals(that.fragments);
}
return false;
}
示例9: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof Phone)) return false;
Phone o = (Phone) other;
return Internal.equals(unknownFields(), o.unknownFields())
&& Internal.equals(number, o.number);
}
示例10: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof Value)) return false;
Value o = (Value) other;
return o.param1 == param1
&& o.param2 == param2
&& o.param3 == param3
&& o.param4 == param4;
}
示例11: like
import java.lang.Object; //导入依赖的package包/类
@Override
public final boolean like(Object other, String group) {
return group != null
&& other != null
&& other instanceof ModelDummyGroup
&& groupFieldsEqual((ModelDummyGroup) other, group)
&& !equals(other);
}
示例12: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof Value1)) return false;
Value1 o = (Value1) other;
return o.param1 == param1
&& o.param2 == param2;
}
示例13: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof Branch)) return false;
Branch<?, ?> o = (Branch<?, ?>) other;
return o.left.equals(this.left)
&& o.right.equals(this.right);
}
示例14: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (obj instanceof ProtectionSpecificHeader) {
if (this.getClass().equals(obj.getClass())) {
return data.equals(((ProtectionSpecificHeader) obj).data);
}
}
return false;
}
示例15: equals
import java.lang.Object; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (obj instanceof Version) {
Version other = (Version) obj;
return projectVersion.equals(other.projectVersion)
&& gitVersion.equals(other.gitVersion)
&& gitBranch.equals(other.gitBranch)
&& buildTimestamp == other.buildTimestamp;
}
return false;
}