Lines Matching defs:RouteInfo
49 public final class RouteInfo implements Parcelable {
86 * Constructs a RouteInfo object.
102 public RouteInfo(IpPrefix destination, InetAddress gateway, String iface, int type) {
151 throw new IllegalArgumentException("address family mismatch in RouteInfo constructor");
163 public RouteInfo(IpPrefix destination, InetAddress gateway, String iface) {
170 public RouteInfo(LinkAddress destination, InetAddress gateway, String iface) {
177 * Constructs a {@code RouteInfo} object.
191 public RouteInfo(IpPrefix destination, InetAddress gateway) {
200 public RouteInfo(LinkAddress destination, InetAddress gateway) {
205 * Constructs a default {@code RouteInfo} object.
211 public RouteInfo(InetAddress gateway) {
216 * Constructs a {@code RouteInfo} object representing a direct connected subnet.
223 public RouteInfo(IpPrefix destination) {
230 public RouteInfo(LinkAddress destination) {
237 public RouteInfo(IpPrefix destination, int type) {
244 public static RouteInfo makeHostRoute(InetAddress host, String iface) {
251 public static RouteInfo makeHostRoute(InetAddress host, InetAddress gateway, String iface) {
255 return new RouteInfo(new IpPrefix(host, 32), gateway, iface);
257 return new RouteInfo(new IpPrefix(host, 128), gateway, iface);
378 * @return the RouteInfo from the Collection that best fits the given address
382 public static RouteInfo selectBestRoute(Collection<RouteInfo> routes, InetAddress dest) {
385 RouteInfo bestRoute = null;
387 for (RouteInfo route : routes) {
422 * Compares this RouteInfo object against the specified object and indicates if they are equal.
428 if (!(obj instanceof RouteInfo)) return false;
430 RouteInfo target = (RouteInfo) obj;
439 * Returns a hashcode for this <code>RouteInfo</code> object.
469 public static final Creator<RouteInfo> CREATOR =
470 new Creator<RouteInfo>() {
471 public RouteInfo createFromParcel(Parcel in) {
483 return new RouteInfo(dest, gateway, iface, type);
486 public RouteInfo[] newArray(int size) {
487 return new RouteInfo[size];