Package org.apache.ldap.server.partition.impl.btree

Examples of org.apache.ldap.server.partition.impl.btree.TupleEnumeration


        if ( set == null )
        {
            return new EmptyEnumeration();
        }

        return new TupleEnumeration( key, set.iterator() );
    }
View Full Code Here


            return new EmptyEnumeration();
        }

        if ( isGreaterThan )
        {
            return new TupleEnumeration( key,
                set.tailSet( val ).iterator() );
        }
        else
        {
            // Get all values from the smallest upto val and put them into
            // a list.  They will be in ascending order so we need to reverse
            // the list after adding val which is not included in headSet.
            SortedSet headset = set.headSet( val );
            ArrayList list = new ArrayList( set.size() + 1 );
            list.addAll( headset );

            // Add largest value (val) if it is in the set.  TreeSet.headSet
            // does not get val if val is in the set.  So we add it now to
            // the end of the list.  List is now ascending from smallest to
            // val
            if ( set.contains( val ) )
            {
                list.add( val );
            }

            // Reverse the list now we have descending values from val to the
            // smallest value that key has.  Return tuple cursor over list.
            Collections.reverse( list );
            return new TupleEnumeration( key, list.iterator() );
        }
    }
View Full Code Here

        if ( set == null )
        {
            return new EmptyEnumeration();
        }

        return new TupleEnumeration( key, set.iterator() );
    }
View Full Code Here

            return new EmptyEnumeration();
        }

        if ( isGreaterThan )
        {
            return new TupleEnumeration( key,
                set.tailSet( val ).iterator() );
        }
        else
        {
            // Get all values from the smallest upto val and put them into
            // a list.  They will be in ascending order so we need to reverse
            // the list after adding val which is not included in headSet.
            SortedSet headset = set.headSet( val );
            ArrayList list = new ArrayList( set.size() + 1 );
            list.addAll( headset );

            // Add largest value (val) if it is in the set.  TreeSet.headSet
            // does not get val if val is in the set.  So we add it now to
            // the end of the list.  List is now ascending from smallest to
            // val
            if ( set.contains( val ) )
            {
                list.add( val );
            }

            // Reverse the list now we have descending values from val to the
            // smallest value that key has.  Return tuple cursor over list.
            Collections.reverse( list );
            return new TupleEnumeration( key, list.iterator() );
        }
    }
View Full Code Here

        if ( set == null )
        {
            return new EmptyEnumeration();
        }

        return new TupleEnumeration( key, set.iterator() );
    }
View Full Code Here

            return new EmptyEnumeration();
        }

        if ( isGreaterThan )
        {
            return new TupleEnumeration( key,
                set.tailSet( val ).iterator() );
        }
        else
        {
            // Get all values from the smallest upto val and put them into
            // a list.  They will be in ascending order so we need to reverse
            // the list after adding val which is not included in headSet.
            SortedSet headset = set.headSet( val );
            ArrayList list = new ArrayList( set.size() + 1 );
            list.addAll( headset );

            // Add largest value (val) if it is in the set.  TreeSet.headSet
            // does not get val if val is in the set.  So we add it now to
            // the end of the list.  List is now ascending from smallest to
            // val
            if ( set.contains( val ) )
            {
                list.add( val );
            }

            // Reverse the list now we have descending values from val to the
            // smallest value that key has.  Return tuple cursor over list.
            Collections.reverse( list );
            return new TupleEnumeration( key, list.iterator() );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ldap.server.partition.impl.btree.TupleEnumeration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.