Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Side by Side Diff: third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/util/TextBuilder.java

Issue 1246033002: Roll cacheinvalidation to 20150720 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at 6 * You may obtain a copy of the License at
7 * 7 *
8 * http://www.apache.org/licenses/LICENSE-2.0 8 * http://www.apache.org/licenses/LICENSE-2.0
9 * 9 *
10 * Unless required by applicable law or agreed to in writing, software 10 * Unless required by applicable law or agreed to in writing, software
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 */ 100 */
101 public TextBuilder append(int i) { 101 public TextBuilder append(int i) {
102 builder.append(i); 102 builder.append(i);
103 return this; 103 return this;
104 } 104 }
105 105
106 /** 106 /**
107 * Appends the toString representation of {@code object} to this builder. 107 * Appends the toString representation of {@code object} to this builder.
108 */ 108 */
109 public TextBuilder append(Object object) { 109 public TextBuilder append(Object object) {
110 builder.append(object); 110 if (object instanceof InternalBase) {
111 return this; 111 return append((InternalBase) object);
112 } else {
113 builder.append(object);
114 return this;
115 }
112 } 116 }
113 117
114 /** 118 /**
115 * Appends the {@code InternalBase#toCompactString} representation of {@code o bject} to this 119 * Appends the {@code InternalBase#toCompactString} representation of {@code o bject} to this
116 * builder. 120 * builder.
117 */ 121 */
118 public TextBuilder append(InternalBase object) { 122 public TextBuilder append(InternalBase object) {
119 if (object == null) { 123 if (object == null) {
120 return append("null"); 124 return append("null");
121 } 125 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 public TextBuilder appendFormat(String format, Object... args) { 197 public TextBuilder appendFormat(String format, Object... args) {
194 formatter.format(format, args); 198 formatter.format(format, args);
195 return this; 199 return this;
196 } 200 }
197 201
198 @Override 202 @Override
199 public String toString() { 203 public String toString() {
200 return builder.toString(); 204 return builder.toString();
201 } 205 }
202 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698