Lines Matching refs:target

713      * Compares this {@code LinkProperties} interface name against the target
715 * @param target LinkProperties to compare.
719 public boolean isIdenticalInterfaceName(LinkProperties target) {
720 return TextUtils.equals(getInterfaceName(), target.getInterfaceName());
724 * Compares this {@code LinkProperties} interface addresses against the target
726 * @param target LinkProperties to compare.
730 public boolean isIdenticalAddresses(LinkProperties target) {
731 Collection<InetAddress> targetAddresses = target.getAddresses();
738 * Compares this {@code LinkProperties} DNS addresses against the target
740 * @param target LinkProperties to compare.
744 public boolean isIdenticalDnses(LinkProperties target) {
745 Collection<InetAddress> targetDnses = target.getDnsServers();
746 String targetDomains = target.getDomains();
757 * Compares this {@code LinkProperties} Routes against the target
759 * @param target LinkProperties to compare.
763 public boolean isIdenticalRoutes(LinkProperties target) {
764 Collection<RouteInfo> targetRoutes = target.getRoutes();
770 * Compares this {@code LinkProperties} HttpProxy against the target
772 * @param target LinkProperties to compare.
776 public boolean isIdenticalHttpProxy(LinkProperties target) {
777 return getHttpProxy() == null ? target.getHttpProxy() == null :
778 getHttpProxy().equals(target.getHttpProxy());
782 * Compares this {@code LinkProperties} stacked links against the target
784 * @param target LinkProperties to compare.
788 public boolean isIdenticalStackedLinks(LinkProperties target) {
789 if (!mStackedLinks.keySet().equals(target.mStackedLinks.keySet())) {
795 if (!stacked.equals(target.mStackedLinks.get(iface))) {
803 * Compares this {@code LinkProperties} MTU against the target
805 * @param target LinkProperties to compare.
809 public boolean isIdenticalMtu(LinkProperties target) {
810 return getMtu() == target.getMtu();
814 * Compares this {@code LinkProperties} Tcp buffer sizes against the target.
816 * @param target LinkProperties to compare.
820 public boolean isIdenticalTcpBufferSizes(LinkProperties target) {
821 return Objects.equals(mTcpBufferSizes, target.mTcpBufferSizes);
826 * Compares this {@code LinkProperties} instance against the target
844 LinkProperties target = (LinkProperties) obj;
850 return isIdenticalInterfaceName(target) &&
851 isIdenticalAddresses(target) &&
852 isIdenticalDnses(target) &&
853 isIdenticalRoutes(target) &&
854 isIdenticalHttpProxy(target) &&
855 isIdenticalStackedLinks(target) &&
856 isIdenticalMtu(target) &&
857 isIdenticalTcpBufferSizes(target);
864 * @param target a LinkProperties with the new list of addresses
868 public CompareResult<LinkAddress> compareAddresses(LinkProperties target) {
871 * address which are common between mLinkAddresses and target
873 * are in target but not in mLinkAddresses are placed in the
879 if (target != null) {
880 for (LinkAddress newAddress : target.getLinkAddresses()) {
893 * @param target a LinkProperties with the new list of dns addresses
897 public CompareResult<InetAddress> compareDnses(LinkProperties target) {
900 * dns address which are common between mDnses and target
902 * are in target but not in mDnses are placed in the
909 if (target != null) {
910 for (InetAddress newAddress : target.getDnsServers()) {
923 * @param target a LinkProperties with the new list of routes
927 public CompareResult<RouteInfo> compareAllRoutes(LinkProperties target) {
930 * routes which are common between mRoutes and target
932 * are in target but not in mRoutes are placed in added.
938 if (target != null) {
939 for (RouteInfo r : target.getAllRoutes()) {
952 * @param target a LinkProperties with the new list of interface names
956 public CompareResult<String> compareAllInterfaceNames(LinkProperties target) {
959 * interface names which are common between this and target
961 * are in target but not in this are placed in added.
967 if (target != null) {
968 for (String r : target.getAllInterfaceNames()) {