JumboEnumSet.java revision 0
4609N/A * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. 647N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 647N/A * This code is free software; you can redistribute it and/or modify it 647N/A * under the terms of the GNU General Public License version 2 only, as 647N/A * published by the Free Software Foundation. Sun designates this 647N/A * particular file as subject to the "Classpath" exception as provided 647N/A * by Sun in the LICENSE file that accompanied this code. 647N/A * This code is distributed in the hope that it will be useful, but WITHOUT 647N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 647N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 647N/A * version 2 for more details (a copy is included in the LICENSE file that 647N/A * accompanied this code). 647N/A * You should have received a copy of the GNU General Public License version 647N/A * 2 along with this work; if not, write to the Free Software Foundation, 2362N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 647N/A * CA 95054 USA or visit www.sun.com if you need additional information or 5270N/A * Private implementation class for EnumSet, for "jumbo" enum types 5270N/A * (i.e., those with more than 64 elements). 3986N/A * Bit vector representation of this set. The ith bit of the jth 647N/A * element of this array represents the presence of universe[64*j +i] 4609N/A // Redundant - maintained for performance 1945N/A * Returns an iterator over the elements contained in this set. The 1945N/A * iterator traverses the elements in their <i>natural order</i> (which is 1945N/A * the order in which the enum constants are declared). The returned 1945N/A * Iterator is a "weakly consistent" iterator that will never throw {@link 1945N/A * ConcurrentModificationException}. 1945N/A * @return an iterator over the elements contained in this set 4609N/A * A bit vector representing the elements in the current "word" 5270N/A * of the set not yet returned by this iterator. 647N/A * The index corresponding to unseen in the elements array. 4854N/A * The bit representing the last element returned by this iterator 4854N/A * but not removed, or zero if no such element exists. 4854N/A * The index corresponding to lastReturned in the elements array. 5270N/A * Returns the number of elements in this set. 5270N/A * @return the number of elements in this set 4854N/A * Returns <tt>true</tt> if this set contains no elements. 4854N/A * @return <tt>true</tt> if this set contains no elements 1945N/A * Returns <tt>true</tt> if this set contains the specified element. 1945N/A * @param e element to be checked for containment in this collection 1945N/A * @return <tt>true</tt> if this set contains the specified element 5270N/A * Adds the specified element to this set if it is not already present. 5270N/A * @param e element to be added to this set 5270N/A * @return <tt>true</tt> if the set changed as a result of the call 5270N/A * @throws NullPointerException if <tt>e</tt> is null 5270N/A * Removes the specified element from this set if it is present. 1945N/A * @param e element to be removed from this set, if present 1945N/A * @return <tt>true</tt> if the set contained the specified element 3986N/A * Returns <tt>true</tt> if this set contains all of the elements 3986N/A * in the specified collection. 3986N/A * @param c collection to be checked for containment in this set 3986N/A * @return <tt>true</tt> if this set contains all of the elements 3986N/A * in the specified collection 3986N/A * @throws NullPointerException if the specified collection is null 653N/A * Adds all of the elements in the specified collection to this set. 647N/A * @param c collection whose elements are to be added to this set 647N/A * @return <tt>true</tt> if this set changed as a result of the call 647N/A * @throws NullPointerException if the specified collection or any of 647N/A * its elements are null 647N/A * Removes from this set all of its elements that are contained in 653N/A * the specified collection. 647N/A * @param c elements to be removed from this set 647N/A * @return <tt>true</tt> if this set changed as a result of the call 647N/A * @throws NullPointerException if the specified collection is null 647N/A * Retains only the elements in this set that are contained in the 653N/A * specified collection. 647N/A * @param c elements to be retained in this set 647N/A * @return <tt>true</tt> if this set changed as a result of the call 647N/A * @throws NullPointerException if the specified collection is null 647N/A * Removes all of the elements from this set. 3986N/A * Compares the specified object with this set for equality. Returns 4854N/A * <tt>true</tt> if the given object is also a set, the two sets have 4854N/A * the same size, and every member of the given set is contained in 4854N/A * @param e object to be compared for equality with this set 3986N/A * @return <tt>true</tt> if the specified object is equal to this set 3986N/A * Recalculates the size of the set. Returns true if it's changed.