當前位置: 首頁>>代碼示例>>Java>>正文


Java TIntSet.contains方法代碼示例

本文整理匯總了Java中gnu.trove.set.TIntSet.contains方法的典型用法代碼示例。如果您正苦於以下問題:Java TIntSet.contains方法的具體用法?Java TIntSet.contains怎麽用?Java TIntSet.contains使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在gnu.trove.set.TIntSet的用法示例。


在下文中一共展示了TIntSet.contains方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: equals

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
/** {@inheritDoc) */
public boolean equals( Object other ) {
    if (! ( other instanceof TIntSet ) ) {
        return false;
    }
    final TIntSet that = ( TIntSet ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            if ( ! that.contains( _set[i] ) ) {
                return false;
            }
        }
    }
    return true;
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:19,代碼來源:TIntObjectHashMap.java

示例2: equals

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TIntSet ) ) {
        return false;
    }
    TIntSet that = ( TIntSet ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            if ( ! that.contains( _set[i] ) ) {
                return false;
            }
        }
    }
    return true;
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:19,代碼來源:TIntHashSet.java

示例3: equals

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
public boolean equals( Object other ) {
    if (! ( other instanceof TIntSet ) ) {
        return false;
    }
    final TIntSet that = ( TIntSet ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            if ( ! that.contains( _set[i] ) ) {
                return false;
            }
        }
    }
    return true;
}
 
開發者ID:funkemunky,項目名稱:HCFCore,代碼行數:18,代碼來源:TIntObjectHashMap.java

示例4: equals

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
/** {@inheritDoc) */
@Override
public boolean equals( Object other ) {
    if (! ( other instanceof TIntSet ) ) {
        return false;
    }
    final TIntSet that = ( TIntSet ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            if ( ! that.contains( _set[i] ) ) {
                return false;
            }
        }
    }
    return true;
}
 
開發者ID:palantir,項目名稱:trove-3.0.3,代碼行數:20,代碼來源:TIntObjectHashMap.java

示例5: equals

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
/** {@inheritDoc} */
@Override
public boolean equals( Object other ) {
    if ( ! ( other instanceof TIntSet ) ) {
        return false;
    }
    TIntSet that = ( TIntSet ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    for ( int i = capacity(); i-- > 0; ) {
        if ( _states.get(i) == FULL ) {
            if ( ! that.contains( _set.get( i ) ) ) {
                return false;
            }
        }
    }
    return true;
}
 
開發者ID:palantir,項目名稱:trove-3.0.3,代碼行數:20,代碼來源:TIntOffheapHashSet.java

示例6: equals

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
/** {@inheritDoc} */
@Override
public boolean equals( Object other ) {
    if ( ! ( other instanceof TIntSet ) ) {
        return false;
    }
    TIntSet that = ( TIntSet ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            if ( ! that.contains( _set[i] ) ) {
                return false;
            }
        }
    }
    return true;
}
 
開發者ID:palantir,項目名稱:trove-3.0.3,代碼行數:20,代碼來源:TIntHashSet.java

示例7: createPresenceBitset

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
public static bitset createPresenceBitset(TIntSet have, int timestampsSize) {
    boolean bits[] = new boolean[timestampsSize];

    for (int i = 0; i < timestampsSize; ++i)
        bits[i] = have.contains(i);
    return bitset(bits);
}
 
開發者ID:groupon,項目名稱:monsoon,代碼行數:8,代碼來源:ToXdr.java

示例8: generateActions

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
public int generateActions(int tenantId, TIntSet itemTypeIds, int actionTypeId, Date since) {
    Preconditions.checkNotNull(itemTypeIds);
    Preconditions.checkArgument(itemTypeIds.size() > 0, "at least one itemtype must be given");

    if (since == null) since = getNewestActionDate(tenantId, itemTypeIds);

    if (isOnSameDataSourceAsEasyrec()) {
        Object[] args = new Object[]{tenantId, actionTypeId, since};

        String query = QUERY_GENERATE.replace("@@@", generateItemTypeInClause(itemTypeIds));

        return getJdbcTemplate().update(query, args, ARGT_GENERATE);
    }

    // when not on same datasource the tenantId is ignored and all actions are copied

    Iterator<ActionVO<Integer, Integer>> actions = actionDAO
            .getActionIterator(5000, new TimeConstraintVO(since, null));
    int result = 0;

    while (actions.hasNext()) {
        ActionVO<Integer, Integer> actionVO = actions.next();

        if (actionVO.getTenant() != tenantId) continue;
        if (actionVO.getActionType() != actionTypeId) continue;
        if (!itemTypeIds.contains(actionVO.getItem().getType())) continue;

        result += insertAction(actionVO);
    }

    return result;
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:33,代碼來源:ActionDAOMysqlImpl.java

示例9: getItemIds

import gnu.trove.set.TIntSet; //導入方法依賴的package包/類
@Nonnull
public Set<TenantItem> getItemIds(final int tenantId, final TIntSet itemTypeIds) {
    Set<TenantItem> result = Sets.newHashSet();

    for (Deviation deviation : deviations) {
        if (!itemTypeIds.contains(deviation.getItem1TypeId()) && !itemTypeIds.contains(deviation.getItem2TypeId()))
            continue;

        result.add(new TenantItem(deviation.getItem1Id(), deviation.getItem1TypeId()));
        result.add(new TenantItem(deviation.getItem2Id(), deviation.getItem2TypeId()));
    }

    return result;
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:15,代碼來源:InMemoryDeviationDAO.java


注:本文中的gnu.trove.set.TIntSet.contains方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。