本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}