本文整理汇总了Java中com.android.internal.util.Objects类的典型用法代码示例。如果您正苦于以下问题:Java Objects类的具体用法?Java Objects怎么用?Java Objects使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Objects类属于com.android.internal.util包,在下文中一共展示了Objects类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equals
import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (obj instanceof NetworkTemplate) {
final NetworkTemplate other = (NetworkTemplate) obj;
return mMatchRule == other.mMatchRule
&& Objects.equal(mSubscriberId, other.mSubscriberId)
&& Objects.equal(mNetworkId, other.mNetworkId);
}
return false;
}
示例2: matchesWifi
import com.android.internal.util.Objects; //导入依赖的package包/类
/**
* Check if matches Wi-Fi network template.
*/
private boolean matchesWifi(NetworkIdentity ident) {
switch (ident.mType) {
case TYPE_WIFI:
return Objects.equal(mNetworkId, ident.mNetworkId);
default:
return false;
}
}
示例3: equals
import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (obj instanceof NetworkIdentity) {
final NetworkIdentity ident = (NetworkIdentity) obj;
return mType == ident.mType && mSubType == ident.mSubType && mRoaming == ident.mRoaming
&& Objects.equal(mSubscriberId, ident.mSubscriberId)
&& Objects.equal(mNetworkId, ident.mNetworkId);
}
return false;
}
示例4: equals
import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
if (obj instanceof NetworkPolicy) {
final NetworkPolicy other = (NetworkPolicy) obj;
return cycleDay == other.cycleDay && warningBytes == other.warningBytes
&& limitBytes == other.limitBytes
&& lastWarningSnooze == other.lastWarningSnooze
&& lastLimitSnooze == other.lastLimitSnooze && metered == other.metered
&& inferred == other.inferred
&& Objects.equal(cycleTimezone, other.cycleTimezone)
&& Objects.equal(template, other.template);
}
return false;
}
示例5: equals
import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public boolean equals(Object o) {
if (o instanceof ProviderKey) {
final ProviderKey other = (ProviderKey) o;
return Objects.equal(authority, other.authority) && userId == other.userId;
}
return false;
}
示例6: hashCode
import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public int hashCode() {
return Objects.hashCode(mMatchRule, mSubscriberId, mNetworkId);
}
示例7: matchesMobile
import com.android.internal.util.Objects; //导入依赖的package包/类
/**
* Check if mobile network with matching IMSI.
*/
private boolean matchesMobile(NetworkIdentity ident) {
// TODO: consider matching against WiMAX subscriber identity
return ident.mType == TYPE_WIMAX || ((sForceAllNetworkTypes || contains(DATA_USAGE_NETWORK_TYPES, ident.mType)) && Objects.equal(mSubscriberId, ident.mSubscriberId));
}
示例8: hashCode
import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public int hashCode() {
return Objects.hashCode(mType, mSubType, mSubscriberId, mNetworkId, mRoaming);
}
示例9: hashCode
import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public int hashCode() {
return Objects.hashCode(template, cycleDay, cycleTimezone, warningBytes, limitBytes,
lastWarningSnooze, lastLimitSnooze, metered, inferred);
}