ScoredNetworkpublic class ScoredNetwork extends Object implements android.os.ParcelableA network identifier along with a score for the quality of that network. |
Fields Summary |
---|
public final NetworkKey | networkKeyA {@link NetworkKey} uniquely identifying this network. | public final RssiCurve | rssiCurveThe {@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}.
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 int | describeContents()
return 0;
| public boolean | equals(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 int | hashCode()
return Objects.hash(networkKey, rssiCurve);
| public java.lang.String | toString()
return "ScoredNetwork[key=" + networkKey + ",score=" + rssiCurve + "]";
| public void | writeToParcel(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);
}
|
|