• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TextBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.ipc.invalidation.util.TextBuilder的典型用法代码示例。如果您正苦于以下问题:Java TextBuilder类的具体用法?Java TextBuilder怎么用?Java TextBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TextBuilder类属于com.google.ipc.invalidation.util包,在下文中一共展示了TextBuilder类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
@Override public void toCompactString(TextBuilder builder) {
  builder.append("<ClientHeader:");
  builder.append(" protocol_version=").append(protocolVersion);
  if (hasClientToken()) {
    builder.append(" client_token=").append(clientToken);
  }
  if (registrationSummary != null) {
    builder.append(" registration_summary=").append(registrationSummary);
  }
  builder.append(" client_time_ms=").append(clientTimeMs);
  builder.append(" max_known_server_time_ms=").append(maxKnownServerTimeMs);
  if (hasMessageId()) {
    builder.append(" message_id=").append(messageId);
  }
  if (hasClientType()) {
    builder.append(" client_type=").append(clientType);
  }
  builder.append('>');
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:20,代码来源:ClientProtocol.java


示例2: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
@Override public void toCompactString(TextBuilder builder) {
  builder.append("<ClientDowncall:");
  if (hasSerial()) {
    builder.append(" serial=").append(serial);
  }
  builder.append(" version=").append(version);
  if (hasStart()) {
    builder.append(" start=").append(start);
  }
  if (hasStop()) {
    builder.append(" stop=").append(stop);
  }
  if (ack != null) {
    builder.append(" ack=").append(ack);
  }
  if (registrations != null) {
    builder.append(" registrations=").append(registrations);
  }
  builder.append('>');
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:21,代码来源:AndroidService.java


示例3: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
@Override public void toCompactString(TextBuilder builder) {
  builder.append("<AndroidEndpointId:");
  if (hasC2DmRegistrationId()) {
    builder.append(" c2dm_registration_id=").append(c2DmRegistrationId);
  }
  if (hasClientKey()) {
    builder.append(" client_key=").append(clientKey);
  }
  if (hasSenderId()) {
    builder.append(" sender_id=").append(senderId);
  }
  if (channelVersion != null) {
    builder.append(" channel_version=").append(channelVersion);
  }
  if (hasPackageName()) {
    builder.append(" package_name=").append(packageName);
  }
  builder.append('>');
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:20,代码来源:AndroidChannel.java


示例4: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
@Override public void toCompactString(TextBuilder builder) {
  builder.append("<ProtocolHandlerState:");
  if (hasMessageId()) {
    builder.append(" message_id=").append(messageId);
  }
  if (hasLastKnownServerTimeMs()) {
    builder.append(" last_known_server_time_ms=").append(lastKnownServerTimeMs);
  }
  if (hasNextMessageSendTimeMs()) {
    builder.append(" next_message_send_time_ms=").append(nextMessageSendTimeMs);
  }
  if (hasBatcherState()) {
    builder.append(" batcher_state=").append(batcherState);
  }
  builder.append('>');
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:17,代码来源:JavaClient.java


示例5: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
/**
 * Appends a description of the given {@code registration} downcall to the given {@code builder}.
 */
public static TextBuilder toCompactString(TextBuilder builder,
    RegistrationDowncall registration) {
  if (registration == null) {
    return builder;
  }
  List<ObjectIdP> objects;
  if (registration.getRegistrationsCount() > 0) {
    builder.append("register(");
    objects = registration.getRegistrationsList();
  } else {
    builder.append("unregister(");
    objects = registration.getUnregistrationsList();
  }
  return CommonProtoStrings2.toCompactStringForObjectIds(builder, objects).append(")");
}
 
开发者ID:morristech,项目名称:android-chromium,代码行数:19,代码来源:AndroidStrings.java


示例6: toCompactStringForRegistrationStatuses

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
/** See spec in implementation notes. */
public static TextBuilder toCompactStringForRegistrationStatuses(TextBuilder builder,
    Collection<RegistrationStatus> registrationStatuses) {
  if (registrationStatuses == null) {
    return builder;
  }

  boolean first = true;
  builder.append("RegOps: ");
  for (RegistrationStatus registrationStatus : registrationStatuses) {
    if (!first) {
      builder.append(", ");
    }
    toCompactString(builder, registrationStatus);
    first = false;
  }
  return builder;
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:19,代码来源:CommonProtoStrings2.java


示例7: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
/** See spec in implementation notes. */
public static TextBuilder toCompactString(TextBuilder builder,
    InvalidationP invalidation) {
  if (invalidation == null) {
    return builder;
  }
  builder.append("(Inv: ");
  toCompactString(builder, invalidation.getObjectId());
  builder.append(", ");
  if (invalidation.getIsTrickleRestart()) {
    builder.append("<");
  }
  builder.append(invalidation.getVersion());
  if (invalidation.hasPayload()) {
    builder.append(", P:");
    toCompactString(builder, invalidation.getPayload());
  }
  builder.append(')');
  return builder;
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:21,代码来源:CommonProtoStrings2.java


示例8: toCompactStringForObjectIds

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
/** See spec in implementation notes. */
public static TextBuilder toCompactStringForObjectIds(TextBuilder builder,
    Collection<ObjectIdP> objectIds) {
  if (objectIds == null) {
    return builder;
  }
  boolean first = true;
  builder.append("ObjectIds: ");
  for (ObjectIdP objectId : objectIds) {
    if (!first) {
      builder.append(", ");
    }
    toCompactString(builder, objectId);
    first = false;
  }
  return builder;
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:18,代码来源:CommonProtoStrings2.java


示例9: toCompactStringForInvalidations

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
/** See spec in implementation notes. */
public static TextBuilder toCompactStringForInvalidations(TextBuilder builder,
    final Collection<InvalidationP> invalidations) {
  if (invalidations == null) {
    return builder;
  }
  boolean first = true;
  for (InvalidationP invalidation : invalidations) {
    if (!first) {
      builder.append(", ");
    }
    toCompactString(builder, invalidation);
    first = false;
  }
  return builder;
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:17,代码来源:CommonProtoStrings2.java


示例10: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
/** Appends a description of the given client {@code downcall} to the given {@code builder}. */
public static TextBuilder toCompactString(TextBuilder builder,
    ClientDowncall downcall) {
  if (downcall == null) {
    return builder;
  }
  builder.append(ProtocolIntents.CLIENT_DOWNCALL_KEY).append("::");
  if (downcall.hasStart()) {
    builder.append("start()");
  } else if (downcall.hasStop()) {
    builder.append("stop()");
  } else if (downcall.hasAck()) {
    toCompactString(builder, downcall.getAck());
  } else if (downcall.hasRegistrations()) {
    toCompactString(builder, downcall.getRegistrations());
  } else {
    builder.append(UNKNOWN_MESSAGE);
  }
  return builder;
}
 
开发者ID:R4md4c,项目名称:cordova-android-chromium,代码行数:21,代码来源:AndroidStrings.java


示例11: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
@Override
public void toCompactString(TextBuilder builder) {
  builder.append("<RecurringTask: name=").append(name)
      .append(", initialDelayMs=").append(initialDelayMs)
      .append(", timeoutDelayMs=").append(timeoutDelayMs)
      .append(", isScheduled=").append(isScheduled)
      .append(">");
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:9,代码来源:RecurringTask.java


示例12: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
@Override
public void toCompactString(TextBuilder builder) {
  builder
      .append("<SimpleRegistrationStore: registrations=")
      .append(registrations.values())
      .append(", digest=")
      .append(digest)
      .append(">");
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:10,代码来源:SimpleRegistrationStore.java


示例13: toCompactString

import com.google.ipc.invalidation.util.TextBuilder; //导入依赖的package包/类
@Override
public void toCompactString(TextBuilder builder) {
  builder.append("Storage state: ");
  for (Map.Entry<String, byte[]> entry : ticlPersistentState.entrySet()) {
    builder.appendFormat("<%s, %s>, ", entry.getKey(), Bytes.toString(entry.getValue()));
  }
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:8,代码来源:MemoryStorageImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PauseOnScrollListener类代码示例发布时间:2022-05-23
下一篇:
Java ParseException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap