FileDocCategorySizeDatePackage
ScoredNetwork.javaAPI DocAndroid 5.1 API4004Thu Mar 12 22:22:10 GMT 2015android.net

ScoredNetwork

public class ScoredNetwork extends Object implements android.os.Parcelable
A network identifier along with a score for the quality of that network.
hide

Fields Summary
public final NetworkKey
networkKey
A {@link NetworkKey} uniquely identifying this network.
public final RssiCurve
rssiCurve
The {@link RssiCurve} representing the scores for this network based on the RSSI.

This field is optional and may be set to null to indicate that no score is available for this network at this time. Such networks, along with networks for which the scorer has not responded, are always prioritized below scored networks, regardless of the score.

public static final Parcelable.Creator
CREATOR
Constructors Summary
public ScoredNetwork(NetworkKey networkKey, RssiCurve rssiCurve)
Construct a new {@link ScoredNetwork}.

param
networkKey the {@link NetworkKey} uniquely identifying this network.
param
rssiCurve the {@link RssiCurve} representing the scores for this network based on the RSSI. This field is optional, and may be skipped to represent a network which the scorer has opted not to score at this time. Passing a null value here is strongly preferred to not returning any {@link ScoredNetwork} for a given {@link NetworkKey} because it indicates to the system not to request scores for this network in the future, although the scorer may choose to issue an out-of-band update at any time.

        this.networkKey = networkKey;
        this.rssiCurve = rssiCurve;
    
private ScoredNetwork(android.os.Parcel in)

        networkKey = NetworkKey.CREATOR.createFromParcel(in);
        if (in.readByte() == 1) {
            rssiCurve = RssiCurve.CREATOR.createFromParcel(in);
        } else {
            rssiCurve = null;
        }
    
Methods Summary
public intdescribeContents()

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

        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ScoredNetwork that = (ScoredNetwork) o;

        return Objects.equals(networkKey, that.networkKey) &&
                Objects.equals(rssiCurve, that.rssiCurve);
    
public inthashCode()

        return Objects.hash(networkKey, rssiCurve);
    
public java.lang.StringtoString()

        return "ScoredNetwork[key=" + networkKey + ",score=" + rssiCurve + "]";
    
public voidwriteToParcel(android.os.Parcel out, int flags)

        networkKey.writeToParcel(out, flags);
        if (rssiCurve != null) {
            out.writeByte((byte) 1);
            rssiCurve.writeToParcel(out, flags);
        } else {
            out.writeByte((byte) 0);
        }