当前位置: 首页>>代码示例>>Java>>正文


Java Objects类代码示例

本文整理汇总了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;
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:11,代码来源:NetworkTemplate.java

示例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;
    }
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:12,代码来源:NetworkTemplate.java

示例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;
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:11,代码来源:NetworkIdentity.java

示例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;
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:15,代码来源:NetworkPolicy.java

示例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;
}
 
开发者ID:cuplv,项目名称:droidel,代码行数:9,代码来源:ActivityThread.java

示例6: hashCode

import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public int hashCode() {
    return Objects.hashCode(mMatchRule, mSubscriberId, mNetworkId);
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:5,代码来源:NetworkTemplate.java

示例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));
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:8,代码来源:NetworkTemplate.java

示例8: hashCode

import com.android.internal.util.Objects; //导入依赖的package包/类
@Override
public int hashCode() {
    return Objects.hashCode(mType, mSubType, mSubscriberId, mNetworkId, mRoaming);
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:5,代码来源:NetworkIdentity.java

示例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);
}
 
开发者ID:moezbhatti,项目名称:qksms,代码行数:6,代码来源:NetworkPolicy.java


注:本文中的com.android.internal.util.Objects类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。