Lines Matching full:code
104 Static utility methods pertaining to <code>byte</code> primitives that interpret
105 values as <i>unsigned</i> (that is, any negative value <code>b</code> is treated
106 as the positive value <code>256 + b</code>). The corresponding methods that treat
107 the values as signed are found in <A HREF="../../../../com/google/common/primitives/SignedBytes.html" title="class in com.google.common.primitives"><CODE>SignedBytes</CODE></A>, and the methods for
108 which signedness is not an issue are in <A HREF="../../../../com/google/common/primitives/Bytes.html" title="class in com.google.common.primitives"><CODE>Bytes</CODE></A>.
132 <CODE>static byte</CODE></FONT></TD>
133 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/UnsignedBytes.html#checkedCast(long)">checkedCast</A></B>(long value)</CODE>
136 Returns the <code>byte</code> value that, when treated as unsigned, is equal to
137 <code>value</code>, if possible.</TD>
141 <CODE>static int</CODE></FONT></TD>
142 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/UnsignedBytes.html#compare(byte, byte)">compare</A></B>(byte a,
143 byte b)</CODE>
146 Compares the two specified <code>byte</code> values, treating them as unsigned
151 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
152 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/UnsignedBytes.html#join(java.lang.String, byte...)">join</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> separator,
153 byte... array)</CODE>
156 Returns a string containing the supplied <code>byte</code> values separated by
157 <code>separator</code>.</TD>
161 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A><byte[]></CODE></FONT></TD>
162 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/UnsignedBytes.html#lexicographicalComparator()">lexicographicalComparator</A></B>()</CODE>
165 Returns a comparator that compares two <code>byte</code> arrays
170 <CODE>static byte</CODE></FONT></TD>
171 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/UnsignedBytes.html#max(byte...)">max</A></B>(byte... array)</CODE>
174 Returns the greatest value present in <code>array</code>.</TD>
178 <CODE>static byte</CODE></FONT></TD>
179 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/UnsignedBytes.html#min(byte...)">min</A></B>(byte... array)</CODE>
182 Returns the least value present in <code>array</code>.</TD>
186 <CODE>static byte</CODE></FONT></TD>
187 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/UnsignedBytes.html#saturatedCast(long)">saturatedCast</A></B>(long value)</CODE>
190 Returns the <code>byte</code> value that, when treated as unsigned, is nearest
191 in value to <code>value</code>.</TD>
200 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
221 <DD>Returns the <code>byte</code> value that, when treated as unsigned, is equal to
222 <code>value</code>, if possible.
225 <DT><B>Parameters:</B><DD><CODE>value</CODE> - a value between 0 and 255 inclusive
226 <DT><B>Returns:</B><DD>the <code>byte</code> value that, when treated as unsigned, equals
227 <code>value</code>
229 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>value</code> is negative or greater
240 <DD>Returns the <code>byte</code> value that, when treated as unsigned, is nearest
241 in value to <code>value</code>.
244 <DT><B>Parameters:</B><DD><CODE>value</CODE> - any <code>long</code> value
245 <DT><B>Returns:</B><DD><code>(byte) 255</code> if <code>value >= 255</code>, <code>(byte) 0</code> if
246 <code>value <= 0</code>, and <code>value</code> cast to <code>byte</code> otherwise</DL>
257 <DD>Compares the two specified <code>byte</code> values, treating them as unsigned
258 values between 0 and 255 inclusive. For example, <code>(byte) -127</code> is
259 considered greater than <code>(byte) 127</code> because it is seen as having
260 the value of positive <code>129</code>.
263 <DT><B>Parameters:</B><DD><CODE>a</CODE> - the first <code>byte</code> to compare<DD><CODE>b</CODE> - the second <code>byte</code> to compare
264 <DT><B>Returns:</B><DD>a negative value if <code>a</code> is less than <code>b</code>; a positive
265 value if <code>a</code> is greater than <code>b</code>; or zero if they are equal</DL>
275 <DD>Returns the least value present in <code>array</code>.
278 <DT><B>Parameters:</B><DD><CODE>array</CODE> - a <i>nonempty</i> array of <code>byte</code> values
279 <DT><B>Returns:</B><DD>the value present in <code>array</code> that is less than or equal to
282 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>array</code> is empty</DL>
292 <DD>Returns the greatest value present in <code>array</code>.
295 <DT><B>Parameters:</B><DD><CODE>array</CODE> - a <i>nonempty</i> array of <code>byte</code> values
296 <DT><B>Returns:</B><DD>the value present in <code>array</code> that is greater than or equal
299 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>array</code> is empty</DL>
310 <DD>Returns a string containing the supplied <code>byte</code> values separated by
311 <code>separator</code>. For example, <code>join(":", (byte) 1, (byte) 2,
312 (byte) 255)</code> returns the string <code>"1:2:255"</code>.
315 <DT><B>Parameters:</B><DD><CODE>separator</CODE> - the text that should appear between consecutive values in
316 the resulting string (but not at the start or end)<DD><CODE>array</CODE> - an array of <code>byte</code> values, possibly empty</DL>
326 <DD>Returns a comparator that compares two <code>byte</code> arrays
327 CODE>compare(byte, byte)</CODE></A>), the first pair of values that follow any common
329 array as the lesser. For example, <code>[] < [0x01] < [0x01, 0x7F] <
330 [0x01, 0x80] < [0x02]</code>. Values are treated as unsigned.
332 <p>The returned comparator is inconsistent with <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang"><CODE>Object.equals(Object)</CODE></A> (since arrays support only identity equality), but
333 it is consistent with <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html?is-external=true#equals(byte[], byte[])" title="class or interface in java.util"><CODE>Arrays.equals(byte[], byte[])</CODE></A>.