Lines Matching refs:idSet
90 ByteString encode(EntryIDSet idSet);
428 public ByteString encode(EntryIDSet idSet)
430 final ByteStringBuilder builder = new ByteStringBuilder(getEstimatedSize(idSet));
431 return ByteString.wrap(append(builder, idSet).getBackingArray(), 0, builder.length());
457 private static int getEstimatedSize(EntryIDSet idSet)
459 return idSet.isDefined() ? idSet.getIDs().length * LONG_SIZE : LONG_SIZE;
474 private static ByteStringBuilder append(ByteStringBuilder builder, EntryIDSet idSet)
476 checkNotNull(idSet, "idSet must not be null");
479 if (idSet.isDefined())
481 for (long value : idSet.getIDs())
503 public ByteString encode(EntryIDSet idSet)
505 checkNotNull(idSet, "idSet must not be null");
506 final ByteStringBuilder builder = new ByteStringBuilder(getEstimatedSize(idSet));
507 return ByteString.wrap(append(builder, idSet).getBackingArray(), 0, builder.length());
523 private static ByteStringBuilder append(ByteStringBuilder builder, EntryIDSet idSet)
525 checkNotNull(idSet, "idSet must not be null");
528 if (idSet.isDefined())
530 builder.appendCompactUnsigned(idSet.size());
532 for (long value : idSet.getIDs())
545 private static int getEstimatedSize(EntryIDSet idSet)
547 checkNotNull(idSet, "idSet must not be null");
548 return idSet.getIDs().length * ByteStringBuilder.MAX_COMPACT_SIZE + INT_SIZE;