Home | History | Annotate | Download | only in protobuf

Lines Matching refs:left

118   private final ByteString left;
127 * @param left string on the left of this node, should have {@code size() >
132 private RopeByteString(ByteString left, ByteString right) {
133 this.left = left;
135 leftLength = left.size();
137 treeDepth = Math.max(left.getTreeDepth(), right.getTreeDepth()) + 1;
151 * @param left string on the left
155 static ByteString concatenate(ByteString left, ByteString right) {
157 return left;
160 if (left.size() == 0) {
164 final int newLength = left.size() + right.size();
168 return concatenateBytes(left, right);
171 if (left instanceof RopeByteString) {
172 final RopeByteString leftRope = (RopeByteString) left;
176 // where a short string is concatenated to a left-hand node whose
183 // given left tree.
185 return new RopeByteString(leftRope.left, newRight);
188 if (leftRope.left.getTreeDepth() > leftRope.right.getTreeDepth()
190 // Typically for concatenate-built strings the left-side is deeper than
196 return new RopeByteString(leftRope.left, newRight);
201 int newDepth = Math.max(left.getTreeDepth(), right.getTreeDepth()) + 1;
204 return new RopeByteString(left, right);
207 return new Balancer().balance(left, right);
214 * @param left string on the left
218 private static ByteString concatenateBytes(ByteString left,
220 int leftSize = left.size();
223 left.copyTo(bytes, 0, 0, leftSize);
235 * @param left string on the left of this node
239 static RopeByteString newInstanceForTest(ByteString left, ByteString right) {
240 return new RopeByteString(left, right);
259 return left.byteAt(index);
293 * left and right edges of the substring, and referencing any wholly contained
321 // Substring on the left
322 return left.substring(beginIndex, endIndex);
331 ByteString leftSub = left.substring(beginIndex);
346 left.copyToInternal(target, sourceOffset, targetOffset, numberToCopy);
352 left.copyToInternal(target, sourceOffset, targetOffset, leftLength);
360 left.copyTo(target);
385 left.writeTo(outputStream);
393 left.writeToInternal(out, sourceOffset, numberToWrite);
398 left.writeToInternal(out, sourceOffset, numberToWriteInLeft);
405 left.writeTo(output);
419 int leftPartial = left.partialIsValidUtf8(Utf8.COMPLETE, 0, leftLength);
428 return left.partialIsValidUtf8(state, offset, length);
433 int leftPartial = left.partialIsValidUtf8(state, offset, leftLength);
531 return left.partialHash(h, offset, length);
536 int leftPartial = left.partialHash(h, offset, leftLength);
557 * The tree is balanced by traversing subtrees in left to right order, and the
565 // Stack containing the part of the string, starting from the left, that
570 private ByteString balance(ByteString left, ByteString right) {
571 doBalance(left);
581 // create one from concatenating left and right
594 doBalance(rbs.left);
634 ByteString left = prefixesStack.pop();
635 newTree = new RopeByteString(left, newTree);
646 ByteString left = prefixesStack.pop();
647 newTree = new RopeByteString(left, newTree);
693 pos = rbs.left;