當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。