OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 package fletch; | 5 package dartino; |
6 | 6 |
7 import java.nio.ByteBuffer; | 7 import java.nio.ByteBuffer; |
8 import java.nio.CharBuffer; | 8 import java.nio.CharBuffer; |
9 | 9 |
10 class Builder { | 10 class Builder { |
11 public Builder() { } | 11 public Builder() { } |
12 | 12 |
13 public Builder(BuilderSegment segment, int base) { | 13 public Builder(BuilderSegment segment, int base) { |
14 this.segment = segment; | 14 this.segment = segment; |
15 this.base = base; | 15 this.base = base; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 CharBuffer cb = stringBuilder.segment.buffer().asCharBuffer(); | 94 CharBuffer cb = stringBuilder.segment.buffer().asCharBuffer(); |
95 int base = stringBuilder.base / 2; | 95 int base = stringBuilder.base / 2; |
96 for (int i = 0; i < length; i++) { | 96 for (int i = 0; i < length; i++) { |
97 cb.put(base + i, value.charAt(i)); | 97 cb.put(base + i, value.charAt(i)); |
98 } | 98 } |
99 } | 99 } |
100 | 100 |
101 protected BuilderSegment segment; | 101 protected BuilderSegment segment; |
102 protected int base; | 102 protected int base; |
103 } | 103 } |
OLD | NEW |