Java Code Examples for org.eclipse.collections.api.set.primitive.IntSet#size()

The following examples show how to use org.eclipse.collections.api.set.primitive.IntSet#size() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SingleColumnIntegerAttribute.java    From reladomo with Apache License 2.0 6 votes vote down vote up
@Override
public Operation in(IntSet intSet)
{
    Operation op;
    switch (intSet.size())
    {
        case 0:
            op = new None(this);
            break;
        case 1:
            op = this.eq(intSet.intIterator().next());
            break;
        default:
            op = new IntegerInOperation(this, intSet);
            break;
    }

    return op;
}
 
Example 2
Source File: SingleColumnIntegerAttribute.java    From reladomo with Apache License 2.0 6 votes vote down vote up
@Override
public Operation notIn(IntSet intSet)
{
    Operation op;
    switch (intSet.size())
    {
        case 0:
            op = new All(this);
            break;
        case 1:
            op = this.notEq(intSet.intIterator().next());
            break;
        default:
            op = new IntegerNotInOperation(this, intSet);
            break;
    }

    return op;
}
 
Example 3
Source File: CalculatedIntegerAttribute.java    From reladomo with Apache License 2.0 6 votes vote down vote up
@Override
public Operation in(IntSet set)
{
    Operation op;
    switch (set.size())
    {
        case 0:
            op = new None(this);
            break;
        case 1:
            op = this.eq(set.intIterator().next());
            break;
        default:
            op = new IntegerInOperation(this, set);
            break;
    }

    return op;
}
 
Example 4
Source File: CalculatedIntegerAttribute.java    From reladomo with Apache License 2.0 6 votes vote down vote up
@Override
public Operation notIn(IntSet set)
{
    Operation op;
    switch (set.size())
    {
        case 0:
            op = new All(this);
            break;
        case 1:
            op = this.notEq(set.intIterator().next());
            break;
        default:
            op = new IntegerNotInOperation(this, set);
            break;
    }

    return op;
}