当前位置: 首页>>代码示例>>Java>>正文


Java Object类代码示例

本文整理汇总了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();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:Phone.java

示例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();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:21,代码来源:Layout.java

示例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();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:18,代码来源:ShapeEntity.java

示例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);
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:17,代码来源:ShapeEntity.java

示例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");
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:12,代码来源:StreamZipEntriesTest.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();
}
 
开发者ID:yyued,项目名称:SVGAPlayer-Android,代码行数:19,代码来源:SpriteEntity.java

示例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;
}
 
开发者ID:gdrouet,项目名称:nightclazz-graphql,代码行数:21,代码来源:AntennaFields.java

示例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;
}
 
开发者ID:gdrouet,项目名称:nightclazz-graphql,代码行数:22,代码来源:SearchQuery.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:Phone.java

示例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;
}
 
开发者ID:spotify,项目名称:dataenum,代码行数:11,代码来源:PrimitiveValue.java

示例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);
}
 
开发者ID:ccheptea,项目名称:auto-value-variant,代码行数:9,代码来源:ModelDummyGroup.java

示例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;
}
 
开发者ID:spotify,项目名称:dataenum,代码行数:9,代码来源:InPackage.java

示例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);
}
 
开发者ID:spotify,项目名称:dataenum,代码行数:9,代码来源:RecursiveGenericValue.java

示例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;
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:10,代码来源:ProtectionSpecificHeader.java

示例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;
}
 
开发者ID:powsybl,项目名称:powsybl-core,代码行数:12,代码来源:Version.java


注:本文中的java.lang.Object类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。