FileDocCategorySizeDatePackage
UidRange.javaAPI DocAndroid 5.1 API2807Thu Mar 12 22:22:10 GMT 2015android.net

UidRange

public final class UidRange extends Object implements android.os.Parcelable
An inclusive range of UIDs.
hide

Fields Summary
public final int
start
public final int
stop
public static final Creator
CREATOR
Constructors Summary
public UidRange(int startUid, int stopUid)

        if (startUid < 0) throw new IllegalArgumentException("Invalid start UID.");
        if (stopUid < 0) throw new IllegalArgumentException("Invalid stop UID.");
        if (startUid > stopUid) throw new IllegalArgumentException("Invalid UID range.");
        start = startUid;
        stop  = stopUid;
    
Methods Summary
public static android.net.UidRangecreateForUser(int userId)

        return new UidRange(userId * PER_USER_RANGE, (userId + 1) * PER_USER_RANGE - 1);
    
public intdescribeContents()

        return 0;
    
public booleanequals(java.lang.Object o)

        if (this == o) {
            return true;
        }
        if (o instanceof UidRange) {
            UidRange other = (UidRange) o;
            return start == other.start && stop == other.stop;
        }
        return false;
    
public intgetStartUser()

        return start / PER_USER_RANGE;
    
public inthashCode()

        int result = 17;
        result = 31 * result + start;
        result = 31 * result + stop;
        return result;
    
public java.lang.StringtoString()

        return start + "-" + stop;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeInt(start);
        dest.writeInt(stop);