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


Java CodedOutputByteBufferNano.computeInt32SizeNoTag方法代码示例

本文整理汇总了Java中com.google.protobuf.nano.CodedOutputByteBufferNano.computeInt32SizeNoTag方法的典型用法代码示例。如果您正苦于以下问题:Java CodedOutputByteBufferNano.computeInt32SizeNoTag方法的具体用法?Java CodedOutputByteBufferNano.computeInt32SizeNoTag怎么用?Java CodedOutputByteBufferNano.computeInt32SizeNoTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.protobuf.nano.CodedOutputByteBufferNano的用法示例。


在下文中一共展示了CodedOutputByteBufferNano.computeInt32SizeNoTag方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if (this.titleIconStyle != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(3, this.titleIconStyle);
  }
  if ((this.supportedRedirectFormDisplayType != null) && (this.supportedRedirectFormDisplayType.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.supportedRedirectFormDisplayType.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.supportedRedirectFormDisplayType[k]);
    }
    i = i + j + 1 * this.supportedRedirectFormDisplayType.length;
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:17,代码来源:ClientParametersOuterClass.java

示例2: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if (!this.start.equals("")) {
    i += CodedOutputByteBufferNano.computeStringSize(1, this.start);
  }
  if (!this.end.equals("")) {
    i += CodedOutputByteBufferNano.computeStringSize(2, this.end);
  }
  if (this.cardNumberLength != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(3, this.cardNumberLength);
  }
  if ((this.digitGrouping != null) && (this.digitGrouping.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.digitGrouping.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.digitGrouping[k]);
    }
    i = i + j + 1 * this.digitGrouping.length;
  }
  if (!this.errorMessage.equals("")) {
    i += CodedOutputByteBufferNano.computeStringSize(5, this.errorMessage);
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:26,代码来源:CreditCard.java

示例3: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if (this.subjectComponentId != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(1, this.subjectComponentId);
  }
  if ((this.affectingComponentId != null) && (this.affectingComponentId.length > 0))
  {
    int m = 0;
    for (int n = 0; n < this.affectingComponentId.length; n++) {
      m += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.affectingComponentId[n]);
    }
    i = i + m + 1 * this.affectingComponentId.length;
  }
  if ((this.affectedComponentId != null) && (this.affectedComponentId.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.affectedComponentId.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.affectedComponentId[k]);
    }
    i = i + j + 1 * this.affectedComponentId.length;
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:25,代码来源:DependencyGraphOuterClass.java

示例4: writeTo

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
public final void writeTo(CodedOutputByteBufferNano paramCodedOutputByteBufferNano)
  throws IOException
{
  if ((this.valueId != null) && (this.valueId.length > 0))
  {
    int i = 0;
    for (int j = 0; j < this.valueId.length; j++) {
      i += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.valueId[j]);
    }
    paramCodedOutputByteBufferNano.writeRawVarint32(10);
    paramCodedOutputByteBufferNano.writeRawVarint32(i);
    for (int k = 0; k < this.valueId.length; k++) {
      paramCodedOutputByteBufferNano.writeInt32NoTag(this.valueId[k]);
    }
  }
  if (!this.valueStringRegex.equals("")) {
    paramCodedOutputByteBufferNano.writeString(2, this.valueStringRegex);
  }
  super.writeTo(paramCodedOutputByteBufferNano);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:21,代码来源:DependencyGraphOuterClass.java

示例5: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if ((this.prefixSet != null) && (this.prefixSet.length > 0)) {
    for (int m = 0; m < this.prefixSet.length; m++)
    {
      CardFormOuterClass.PanPrefixSet localPanPrefixSet = this.prefixSet[m];
      if (localPanPrefixSet != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(1, localPanPrefixSet);
      }
    }
  }
  if (!Arrays.equals(this.panCategoryToken, WireFormatNano.EMPTY_BYTES)) {
    i += CodedOutputByteBufferNano.computeBytesSize(2, this.panCategoryToken);
  }
  if (this.format != null) {
    i += CodedOutputByteBufferNano.computeMessageSize(3, this.format);
  }
  if (this.logoIndex != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(4, this.logoIndex);
  }
  if ((this.cardSubformIndex != null) && (this.cardSubformIndex.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.cardSubformIndex.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.cardSubformIndex[k]);
    }
    i = 1 + (i + j) + CodedOutputByteBufferNano.computeRawVarint32Size(j);
  }
  if (this.panChecksumType != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(6, this.panChecksumType);
  }
  if (this.concealedVisibleDigitsCount != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(7, this.concealedVisibleDigitsCount);
  }
  if (this.minLength != -1) {
    i += CodedOutputByteBufferNano.computeInt32Size(8, this.minLength);
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:41,代码来源:CardFormOuterClass.java

示例6: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if ((this.docid != null) && (this.docid.length > 0))
  {
    int m = 0;
    int n = 0;
    for (int i1 = 0; i1 < this.docid.length; i1++)
    {
      String str = this.docid[i1];
      if (str != null)
      {
        m++;
        n += CodedOutputByteBufferNano.computeStringSizeNoTag(str);
      }
    }
    i = i + n + m * 1;
  }
  if ((this.hasIncludeChildDocs) || (this.includeChildDocs != true)) {
    i += 1 + CodedOutputByteBufferNano.computeTagSize(2);
  }
  if ((this.hasIncludeDetails) || (this.includeDetails)) {
    i += 1 + CodedOutputByteBufferNano.computeTagSize(3);
  }
  if ((this.hasSourcePackageName) || (!this.sourcePackageName.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(4, this.sourcePackageName);
  }
  if ((this.installedVersionCode != null) && (this.installedVersionCode.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.installedVersionCode.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.installedVersionCode[k]);
    }
    i = i + j + 1 * this.installedVersionCode.length;
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:38,代码来源:Details.java

示例7: writeTo

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
public final void writeTo(CodedOutputByteBufferNano paramCodedOutputByteBufferNano)
  throws IOException
{
  if (this.length != 0) {
    paramCodedOutputByteBufferNano.writeInt32(1, this.length);
  }
  if (this.firstDigits != 0L) {
    paramCodedOutputByteBufferNano.writeInt64(2, this.firstDigits);
  }
  if ((this.middleDigits != null) && (this.middleDigits.length > 0))
  {
    int m = 0;
    for (int n = 0; n < this.middleDigits.length; n++) {
      m += CodedOutputByteBufferNano.computeRawVarint64Size(this.middleDigits[n]);
    }
    paramCodedOutputByteBufferNano.writeRawVarint32(26);
    paramCodedOutputByteBufferNano.writeRawVarint32(m);
    for (int i1 = 0; i1 < this.middleDigits.length; i1++) {
      paramCodedOutputByteBufferNano.writeRawVarint64(this.middleDigits[i1]);
    }
  }
  if ((this.lastDigitBitset != null) && (this.lastDigitBitset.length > 0))
  {
    int i = 0;
    for (int j = 0; j < this.lastDigitBitset.length; j++) {
      i += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.lastDigitBitset[j]);
    }
    paramCodedOutputByteBufferNano.writeRawVarint32(34);
    paramCodedOutputByteBufferNano.writeRawVarint32(i);
    for (int k = 0; k < this.lastDigitBitset.length; k++) {
      paramCodedOutputByteBufferNano.writeInt32NoTag(this.lastDigitBitset[k]);
    }
  }
  super.writeTo(paramCodedOutputByteBufferNano);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:36,代码来源:CardFormOuterClass.java

示例8: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if (this.responseTimeMillis != -1L) {
    i += CodedOutputByteBufferNano.computeInt64Size(1, this.responseTimeMillis);
  }
  if (!Arrays.equals(this.sessionData, WireFormatNano.EMPTY_BYTES)) {
    i += CodedOutputByteBufferNano.computeBytesSize(2, this.sessionData);
  }
  if (!Arrays.equals(this.logToken, WireFormatNano.EMPTY_BYTES)) {
    i += CodedOutputByteBufferNano.computeBytesSize(5, this.logToken);
  }
  if (!this.requestId.equals("")) {
    i += CodedOutputByteBufferNano.computeStringSize(6, this.requestId);
  }
  if (!Arrays.equals(this.analyticsToken, WireFormatNano.EMPTY_BYTES)) {
    i += CodedOutputByteBufferNano.computeBytesSize(7, this.analyticsToken);
  }
  if ((this.globalClientFeatures != null) && (this.globalClientFeatures.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.globalClientFeatures.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.globalClientFeatures[k]);
    }
    i = i + j + 1 * this.globalClientFeatures.length;
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:29,代码来源:ResponseContextOuterClass.java

示例9: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if (this.minLength != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(1, this.minLength);
  }
  if (this.maxLength != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(2, this.maxLength);
  }
  if (this.keyboardLayout != 0) {
    i += CodedOutputByteBufferNano.computeInt32Size(4, this.keyboardLayout);
  }
  if ((this.validation != null) && (this.validation.length > 0)) {
    for (int m = 0; m < this.validation.length; m++)
    {
      Validation localValidation = this.validation[m];
      if (localValidation != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(5, localValidation);
      }
    }
  }
  if (!this.initialValue.equals("")) {
    i += CodedOutputByteBufferNano.computeStringSize(6, this.initialValue);
  }
  if (this.isMasked) {
    i += 1 + CodedOutputByteBufferNano.computeTagSize(8);
  }
  if (this.templateFormattingScheme != null) {
    i += CodedOutputByteBufferNano.computeMessageSize(14, this.templateFormattingScheme);
  }
  if ((this.keyboardLayoutVariation != null) && (this.keyboardLayoutVariation.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.keyboardLayoutVariation.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.keyboardLayoutVariation[k]);
    }
    i = 1 + (i + j) + CodedOutputByteBufferNano.computeRawVarint32Size(j);
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:41,代码来源:UiFieldOuterClass.java

示例10: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if ((this.hasResponseAddressParam) || (!this.responseAddressParam.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(1, this.responseAddressParam);
  }
  if ((this.hasResponseCheckboxesParam) || (!this.responseCheckboxesParam.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(2, this.responseCheckboxesParam);
  }
  if ((this.hasTitle) || (!this.title.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(3, this.title);
  }
  if ((this.hasDescriptionHtml) || (!this.descriptionHtml.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(4, this.descriptionHtml);
  }
  if ((this.checkbox != null) && (this.checkbox.length > 0)) {
    for (int i1 = 0; i1 < this.checkbox.length; i1++)
    {
      ChallengeProto.FormCheckbox localFormCheckbox = this.checkbox[i1];
      if (localFormCheckbox != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(5, localFormCheckbox);
      }
    }
  }
  if (this.address != null) {
    i += CodedOutputByteBufferNano.computeMessageSize(6, this.address);
  }
  if ((this.errorInputField != null) && (this.errorInputField.length > 0)) {
    for (int n = 0; n < this.errorInputField.length; n++)
    {
      ChallengeProto.InputValidationError localInputValidationError = this.errorInputField[n];
      if (localInputValidationError != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(7, localInputValidationError);
      }
    }
  }
  if ((this.hasErrorHtml) || (!this.errorHtml.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(8, this.errorHtml);
  }
  if ((this.requiredField != null) && (this.requiredField.length > 0))
  {
    int k = 0;
    for (int m = 0; m < this.requiredField.length; m++) {
      k += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.requiredField[m]);
    }
    i = i + k + 1 * this.requiredField.length;
  }
  if ((this.supportedCountry != null) && (this.supportedCountry.length > 0)) {
    for (int j = 0; j < this.supportedCountry.length; j++)
    {
      ChallengeProto.Country localCountry = this.supportedCountry[j];
      if (localCountry != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(10, localCountry);
      }
    }
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:59,代码来源:ChallengeProto.java

示例11: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if (this.item != null) {
    i += CodedOutputByteBufferNano.computeMessageSize(3, this.item);
  }
  if ((this.subItem != null) && (this.subItem.length > 0)) {
    for (int i7 = 0; i7 < this.subItem.length; i7++)
    {
      Buy.LineItem localLineItem = this.subItem[i7];
      if (localLineItem != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(4, localLineItem);
      }
    }
  }
  if ((this.checkoutOption != null) && (this.checkoutOption.length > 0)) {
    for (int i6 = 0; i6 < this.checkoutOption.length; i6++)
    {
      CheckoutOption localCheckoutOption = this.checkoutOption[i6];
      if (localCheckoutOption != null) {
        i += CodedOutputByteBufferNano.computeGroupSize(5, localCheckoutOption);
      }
    }
  }
  if ((this.hasDeprecatedCheckoutUrl) || (!this.deprecatedCheckoutUrl.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(10, this.deprecatedCheckoutUrl);
  }
  if ((this.hasAddInstrumentUrl) || (!this.addInstrumentUrl.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(11, this.addInstrumentUrl);
  }
  if ((this.footerHtml != null) && (this.footerHtml.length > 0))
  {
    int i3 = 0;
    int i4 = 0;
    for (int i5 = 0; i5 < this.footerHtml.length; i5++)
    {
      String str2 = this.footerHtml[i5];
      if (str2 != null)
      {
        i3++;
        i4 += CodedOutputByteBufferNano.computeStringSizeNoTag(str2);
      }
    }
    i = i + i4 + i3 * 2;
  }
  if ((this.eligibleInstrumentFamily != null) && (this.eligibleInstrumentFamily.length > 0))
  {
    int i1 = 0;
    for (int i2 = 0; i2 < this.eligibleInstrumentFamily.length; i2++) {
      i1 += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.eligibleInstrumentFamily[i2]);
    }
    i = i + i1 + 2 * this.eligibleInstrumentFamily.length;
  }
  if ((this.footnoteHtml != null) && (this.footnoteHtml.length > 0))
  {
    int k = 0;
    int m = 0;
    for (int n = 0; n < this.footnoteHtml.length; n++)
    {
      String str1 = this.footnoteHtml[n];
      if (str1 != null)
      {
        k++;
        m += CodedOutputByteBufferNano.computeStringSizeNoTag(str1);
      }
    }
    i = i + m + k * 2;
  }
  if ((this.eligibleInstrument != null) && (this.eligibleInstrument.length > 0)) {
    for (int j = 0; j < this.eligibleInstrument.length; j++)
    {
      Instrument localInstrument = this.eligibleInstrument[j];
      if (localInstrument != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(44, localInstrument);
      }
    }
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:80,代码来源:Buy.java

示例12: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if ((this.censoring != 0) || (this.hasCensoring)) {
    i += CodedOutputByteBufferNano.computeInt32Size(1, this.censoring);
  }
  if ((this.hasDurationSec) || (this.durationSec != 0)) {
    i += CodedOutputByteBufferNano.computeInt32Size(2, this.durationSec);
  }
  if ((this.hasOriginalReleaseDate) || (!this.originalReleaseDate.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(3, this.originalReleaseDate);
  }
  if ((this.hasLabel) || (!this.label.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(4, this.label);
  }
  if ((this.artist != null) && (this.artist.length > 0)) {
    for (int i2 = 0; i2 < this.artist.length; i2++)
    {
      ArtistDetails localArtistDetails = this.artist[i2];
      if (localArtistDetails != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(5, localArtistDetails);
      }
    }
  }
  if ((this.genre != null) && (this.genre.length > 0))
  {
    int m = 0;
    int n = 0;
    for (int i1 = 0; i1 < this.genre.length; i1++)
    {
      String str = this.genre[i1];
      if (str != null)
      {
        m++;
        n += CodedOutputByteBufferNano.computeStringSizeNoTag(str);
      }
    }
    i = i + n + m * 1;
  }
  if ((this.hasReleaseDate) || (!this.releaseDate.equals(""))) {
    i += CodedOutputByteBufferNano.computeStringSize(7, this.releaseDate);
  }
  if ((this.releaseType != null) && (this.releaseType.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.releaseType.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.releaseType[k]);
    }
    i = i + j + 1 * this.releaseType.length;
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:53,代码来源:MusicDetails.java

示例13: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if (this.purchaseStatus != null) {
    i += CodedOutputByteBufferNano.computeMessageSize(1, this.purchaseStatus);
  }
  if (this.challenge != null) {
    i += CodedOutputByteBufferNano.computeMessageSize(2, this.challenge);
  }
  if (this.cart != null) {
    i += CodedOutputByteBufferNano.computeMessageSize(3, this.cart);
  }
  if ((this.libraryUpdate != null) && (this.libraryUpdate.length > 0)) {
    for (int n = 0; n < this.libraryUpdate.length; n++)
    {
      LibraryUpdateProto.LibraryUpdate localLibraryUpdate = this.libraryUpdate[n];
      if (localLibraryUpdate != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(4, localLibraryUpdate);
      }
    }
  }
  if ((this.hasServerLogsCookie) || (!Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES))) {
    i += CodedOutputByteBufferNano.computeBytesSize(5, this.serverLogsCookie);
  }
  if ((this.applicableVoucher != null) && (this.applicableVoucher.length > 0)) {
    for (int m = 0; m < this.applicableVoucher.length; m++)
    {
      DocV2 localDocV2 = this.applicableVoucher[m];
      if (localDocV2 != null) {
        i += CodedOutputByteBufferNano.computeMessageSize(6, localDocV2);
      }
    }
  }
  if ((this.appliedVoucherIndex != null) && (this.appliedVoucherIndex.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.appliedVoucherIndex.length; k++) {
      j += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.appliedVoucherIndex[k]);
    }
    i = i + j + 1 * this.appliedVoucherIndex.length;
  }
  if (this.changeSubscription != null) {
    i += CodedOutputByteBufferNano.computeMessageSize(8, this.changeSubscription);
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:47,代码来源:Purchase.java

示例14: computeSerializedSize

import com.google.protobuf.nano.CodedOutputByteBufferNano; //导入方法依赖的package包/类
protected final int computeSerializedSize()
{
  int i = super.computeSerializedSize();
  if ((this.clientAlteringExperiment != null) && (this.clientAlteringExperiment.length > 0))
  {
    int i6 = 0;
    int i7 = 0;
    for (int i8 = 0; i8 < this.clientAlteringExperiment.length; i8++)
    {
      String str2 = this.clientAlteringExperiment[i8];
      if (str2 != null)
      {
        i6++;
        i7 += CodedOutputByteBufferNano.computeStringSizeNoTag(str2);
      }
    }
    i = i + i7 + i6 * 1;
  }
  if ((this.otherExperiment != null) && (this.otherExperiment.length > 0))
  {
    int i3 = 0;
    int i4 = 0;
    for (int i5 = 0; i5 < this.otherExperiment.length; i5++)
    {
      String str1 = this.otherExperiment[i5];
      if (str1 != null)
      {
        i3++;
        i4 += CodedOutputByteBufferNano.computeStringSizeNoTag(str1);
      }
    }
    i = i + i4 + i3 * 1;
  }
  if ((this.gwsExperiment != null) && (this.gwsExperiment.length > 0))
  {
    int i1 = 0;
    for (int i2 = 0; i2 < this.gwsExperiment.length; i2++) {
      i1 += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.gwsExperiment[i2]);
    }
    i = i + i1 + 1 * this.gwsExperiment.length;
  }
  if ((this.playExperiment != null) && (this.playExperiment.length > 0))
  {
    int m = 0;
    for (int n = 0; n < this.playExperiment.length; n++) {
      m += CodedOutputByteBufferNano.computeRawVarint64Size(this.playExperiment[n]);
    }
    i = i + m + 1 * this.playExperiment.length;
  }
  if ((this.unsupportedPlayExperiment != null) && (this.unsupportedPlayExperiment.length > 0))
  {
    int j = 0;
    for (int k = 0; k < this.unsupportedPlayExperiment.length; k++) {
      j += CodedOutputByteBufferNano.computeRawVarint64Size(this.unsupportedPlayExperiment[k]);
    }
    i = i + j + 1 * this.unsupportedPlayExperiment.length;
  }
  return i;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:60,代码来源:ClientAnalytics.java


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