當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。