Package bak.pcj

Examples of bak.pcj.ShortIterator


        public boolean contains(short v) {
            return getEntry(v) != null;
        }

        public ShortIterator iterator() {
            return new ShortIterator() {
                Entry currEntry = null;
                int nextList = nextList(0);
                Entry nextEntry = nextList == -1 ? null : data[nextList];

                int nextList(int index) {
View Full Code Here


        public boolean contains(short v) {
            return getEntry(v) != null;
        }

        public ShortIterator iterator() {
            return new ShortIterator() {
                Entry currEntry = null;
                int nextList = nextList(0);
                Entry nextEntry = nextList == -1 ? null : data[nextList];

                int nextList(int index) {
View Full Code Here

        public boolean contains(short v) {
            return containsValue(v);
        }

        public ShortIterator iterator() {
            return new ShortIterator() {
                Entry currEntry = null;
                int nextList = nextList(0);
                Entry nextEntry = nextList == -1 ? null : data[nextList];

                int nextList(int index) {
View Full Code Here

        public boolean contains(short v) {
            return containsValue(v);
        }

        public ShortIterator iterator() {
            return new ShortIterator() {
                Entry currEntry = null;
                int nextList = nextList(0);
                Entry nextEntry = nextList == -1 ? null : data[nextList];

                int nextList(int index) {
View Full Code Here

     @since          1.1
     */
    private void writeObject(ObjectOutputStream s) throws IOException {
        s.defaultWriteObject();
        s.writeInt(data.length);
        ShortIterator i = iterator();
        while (i.hasNext())
            s.writeShort(i.next());
    }
View Full Code Here

        public boolean contains(short v) {
            return getEntry(v) != null;
        }

        public ShortIterator iterator() {
            return new ShortIterator() {
                Entry currEntry = null;
                int nextList = nextList(0);
                Entry nextEntry = nextList == -1 ? null : data[nextList];

                int nextList(int index) {
View Full Code Here

        normalize(insertionIndex);
        return true;
    }

    public ShortIterator iterator() {
        return new ShortIterator() {
            int nextIndex = 0;
            int lastIndex = -1;
            int currRange = 0;
            int currOffset = 0;
            short lastValue;
View Full Code Here

        return result;
    }

    public ShortIterator iterator() {
        if (size == 0)
            return new ShortIterator() {
                public boolean hasNext()
                { return false; }
                public short next()
                { Exceptions.endOfIterator(); throw new RuntimeException(); }
                public void remove()
                { Exceptions.noElementToRemove(); }
            };
        return new ShortIterator() {
            int nextLongIndex = nextLongIndex(0);
            int nextBitIndex = nextLongIndex < data.length ? nextBitIndex(nextLongIndex, 0) : 0;
            int lastValue = -1;

            int nextLongIndex(int index) {
View Full Code Here


    public boolean addAll(int index, ShortCollection c) {
        if (index < 0 || index > size())
            Exceptions.indexOutOfBounds(index, 0, size());
        ShortIterator i = c.iterator();
        boolean result = i.hasNext();
        while (i.hasNext()) {
            add(index, i.next());
            index++;
        }
        return result;
    }
View Full Code Here

        return !(i1.hasNext() || i2.hasNext());
    }

    public int hashCode() {
        int h = 1;
        ShortIterator i = iterator();
        while (i.hasNext())
            h = (int)(31*h + DefaultShortHashFunction.INSTANCE.hash(i.next()));
        return h;
    }
View Full Code Here

TOP

Related Classes of bak.pcj.ShortIterator

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.