FileDocCategorySizeDatePackage
CellIdentityCdma.javaAPI DocAndroid 5.1 API6894Thu Mar 12 22:22:42 GMT 2015android.telephony

CellIdentityCdma

public final class CellIdentityCdma extends Object implements android.os.Parcelable
CellIdentity is to represent a unique CDMA cell

Fields Summary
private static final String
LOG_TAG
private static final boolean
DBG
private final int
mNetworkId
private final int
mSystemId
private final int
mBasestationId
private final int
mLongitude
Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. It is represented in units of 0.25 seconds and ranges from -2592000 to 2592000, both values inclusive (corresponding to a range of -180 to +180 degrees).
private final int
mLatitude
Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. It is represented in units of 0.25 seconds and ranges from -1296000 to 1296000, both values inclusive (corresponding to a range of -90 to +90 degrees).
public static final Creator
CREATOR
Implement the Parcelable interface
Constructors Summary
public CellIdentityCdma()

hide


          
      
        mNetworkId = Integer.MAX_VALUE;
        mSystemId = Integer.MAX_VALUE;
        mBasestationId = Integer.MAX_VALUE;
        mLongitude = Integer.MAX_VALUE;
        mLatitude = Integer.MAX_VALUE;
    
private CellIdentityCdma(android.os.Parcel in)
Construct from Parcel, type has already been processed

        mNetworkId = in.readInt();
        mSystemId = in.readInt();
        mBasestationId = in.readInt();
        mLongitude = in.readInt();
        mLatitude = in.readInt();
        if (DBG) log("CellIdentityCdma(Parcel): " + toString());
    
public CellIdentityCdma(int nid, int sid, int bid, int lon, int lat)
public constructor

param
nid Network Id 0..65535
param
sid CDMA System Id 0..32767
param
bid Base Station Id 0..65535
param
lon Longitude is a decimal number ranges from -2592000 to 2592000
param
lat Latitude is a decimal number ranges from -1296000 to 1296000
hide

        mNetworkId = nid;
        mSystemId = sid;
        mBasestationId = bid;
        mLongitude = lon;
        mLatitude = lat;
    
private CellIdentityCdma(CellIdentityCdma cid)

        mNetworkId = cid.mNetworkId;
        mSystemId = cid.mSystemId;
        mBasestationId = cid.mBasestationId;
        mLongitude = cid.mLongitude;
        mLatitude = cid.mLatitude;
    
Methods Summary
android.telephony.CellIdentityCdmacopy()

        return new CellIdentityCdma(this);
    
public intdescribeContents()
Implement the Parcelable interface

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

        if (super.equals(other)) {
            try {
                CellIdentityCdma o = (CellIdentityCdma)other;
                return mNetworkId == o.mNetworkId &&
                        mSystemId == o.mSystemId &&
                        mBasestationId == o.mBasestationId &&
                        mLatitude == o.mLatitude &&
                        mLongitude == o.mLongitude;
            } catch (ClassCastException e) {
                return false;
            }
        } else {
            return false;
        }
    
public intgetBasestationId()

return
Base Station Id 0..65535, Integer.MAX_VALUE if unknown

        return mBasestationId;
    
public intgetLatitude()

return
Base station latitude, which is a decimal number as specified in 3GPP2 C.S0005-A v6.0. It is represented in units of 0.25 seconds and ranges from -1296000 to 1296000, both values inclusive (corresponding to a range of -90 to +90 degrees). Integer.MAX_VALUE if unknown.

        return mLatitude;
    
public intgetLongitude()

return
Base station longitude, which is a decimal number as specified in 3GPP2 C.S0005-A v6.0. It is represented in units of 0.25 seconds and ranges from -2592000 to 2592000, both values inclusive (corresponding to a range of -180 to +180 degrees). Integer.MAX_VALUE if unknown.

        return mLongitude;
    
public intgetNetworkId()

return
Network Id 0..65535, Integer.MAX_VALUE if unknown

        return mNetworkId;
    
public intgetSystemId()

return
System Id 0..32767, Integer.MAX_VALUE if unknown

        return mSystemId;
    
public inthashCode()

        int primeNum = 31;
        return (mNetworkId * primeNum) + (mSystemId * primeNum) + (mBasestationId * primeNum) +
                (mLatitude * primeNum) + (mLongitude * primeNum);
    
private static voidlog(java.lang.String s)
log


          
         
        Rlog.w(LOG_TAG, s);
    
public java.lang.StringtoString()

        StringBuilder sb = new StringBuilder("CellIdentityCdma:{");
        sb.append(" mNetworkId="); sb.append(mNetworkId);
        sb.append(" mSystemId="); sb.append(mSystemId);
        sb.append(" mBasestationId="); sb.append(mBasestationId);
        sb.append(" mLongitude="); sb.append(mLongitude);
        sb.append(" mLatitude="); sb.append(mLatitude);
        sb.append("}");

        return sb.toString();
    
public voidwriteToParcel(android.os.Parcel dest, int flags)
Implement the Parcelable interface

        if (DBG) log("writeToParcel(Parcel, int): " + toString());
        dest.writeInt(mNetworkId);
        dest.writeInt(mSystemId);
        dest.writeInt(mBasestationId);
        dest.writeInt(mLongitude);
        dest.writeInt(mLatitude);