Lines Matching defs:Integer

31  * The {@code Integer} class wraps a value of the primitive type
32 * {@code int} in an object. An object of type {@code Integer}
52 public final class Integer extends Number implements Comparable<Integer> {
71 public static final Class<Integer> TYPE = (Class<Integer>) Class.getPrimitiveClass("int");
120 * {@code Integer.toString(n, 16).toUpperCase()}
186 * {@code Integer.toHexString(n).toUpperCase()}
299 // accelerate Integer.toString. In particular we want to
303 // as the "classic" Integer.toString code on a non-JIT VM.
328 if (i == Integer.MIN_VALUE)
343 * Will fail if i == Integer.MIN_VALUE
380 99999999, 999999999, Integer.MAX_VALUE };
470 int limit = -Integer.MAX_VALUE;
479 limit = Integer.MIN_VALUE;
531 * Returns an {@code Integer} object holding the value
537 * method. The result is an {@code Integer} object that
540 * <p>In other words, this method returns an {@code Integer}
544 * {@code new Integer(Integer.parseInt(s, radix))}
549 * @return an {@code Integer} object holding the value
555 public static Integer valueOf(String s, int radix) throws NumberFormatException {
556 return Integer.valueOf(parseInt(s,radix));
560 * Returns an {@code Integer} object holding the
565 * {@code Integer} object that represents the integer value
568 * <p>In other words, this method returns an {@code Integer}
572 * {@code new Integer(Integer.parseInt(s))}
576 * @return an {@code Integer} object holding the value
581 public static Integer valueOf(String s) throws NumberFormatException {
582 return Integer.valueOf(parseInt(s, 10));
591 * During VM initialization, java.lang.Integer.IntegerCache.high property
599 static final Integer cache[];
605 sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high");
609 // Maximum array size is Integer.MAX_VALUE
610 h = Math.min(i, Integer.MAX_VALUE - (-low) -1);
614 cache = new Integer[(high - low) + 1];
617 cache[k] = new Integer(j++);
624 * Returns an {@code Integer} instance representing the specified
625 * {@code int} value. If a new {@code Integer} instance is not
627 * the constructor {@link #Integer(int)}, as this method is likely
635 * @return an {@code Integer} instance representing {@code i}.
638 public static Integer valueOf(int i) {
642 return new Integer(i);
646 * The value of the {@code Integer}.
653 * Constructs a newly allocated {@code Integer} object that
657 * {@code Integer} object.
659 public Integer(int value) {
664 * Constructs a newly allocated {@code Integer} object that
671 * {@code Integer}.
674 * @see java.lang.Integer#parseInt(java.lang.String, int)
676 public Integer(String s) throws NumberFormatException {
681 * Returns the value of this {@code Integer} as a
689 * Returns the value of this {@code Integer} as a
697 * Returns the value of this {@code Integer} as an
705 * Returns the value of this {@code Integer} as a
713 * Returns the value of this {@code Integer} as a
721 * Returns the value of this {@code Integer} as a
730 * {@code Integer}'s value. The value is converted to signed
733 * java.lang.Integer#toString(int)} method.
743 * Returns a hash code for this {@code Integer}.
747 * {@code Integer} object.
756 * {@code null} and is an {@code Integer} object that
764 if (obj instanceof Integer) {
765 return value == ((Integer)obj).intValue();
778 * value and an {@code Integer} object representing this value is
786 * <p>In other words, this method returns an {@code Integer}
794 * @return the {@code Integer} value of the property.
798 public static Integer getInteger(String nm) {
810 * value and an {@code Integer} object representing this value is
814 * <p>The second argument is the default value. An {@code Integer} object
820 * <p>In other words, this method returns an {@code Integer} object
824 * {@code getInteger(nm, new Integer(val))}
830 * Integer result = getInteger(nm, null);
831 * return (result == null) ? new Integer(val) : result;
834 * to avoid the unnecessary allocation of an {@code Integer}
839 * @return the {@code Integer} value of the property.
843 public static Integer getInteger(String nm, int val) {
844 Integer result = getInteger(nm, null);
845 return (result == null) ? Integer.valueOf(val) : result;
854 * integer value, as per the {@code Integer.decode} method,
855 * and an {@code Integer} object representing this value is
879 * @return the {@code Integer} value of the property.
882 * @see java.lang.Integer#decode
884 public static Integer getInteger(String nm, Integer val) {
893 return Integer.decode(v);
901 * Decodes a {@code String} into an {@code Integer}.
928 * Integer.parseInt} method with the indicated radix (10, 16, or
936 * @return an {@code Integer} object holding the {@code int}
940 * @see java.lang.Integer#parseInt(java.lang.String, int)
942 public static Integer decode(String nm) throws NumberFormatException {
946 Integer result;
976 result = Integer.valueOf(nm.substring(index), radix);
977 result = negative ? Integer.valueOf(-result.intValue()) : result;
979 // If number is Integer.MIN_VALUE, we'll end up here. The next line
984 result = Integer.valueOf(constant, radix);
990 * Compares two {@code Integer} objects numerically.
992 * @param anotherInteger the {@code Integer} to be compared.
993 * @return the value {@code 0} if this {@code Integer} is
994 * equal to the argument {@code Integer}; a value less than
995 * {@code 0} if this {@code Integer} is numerically less
996 * than the argument {@code Integer}; and a value greater
997 * than {@code 0} if this {@code Integer} is numerically
998 * greater than the argument {@code Integer} (signed
1002 public int compareTo(Integer anotherInteger) {
1010 * Integer.valueOf(x).compareTo(Integer.valueOf(y))