Package javaewah

Examples of javaewah.IntIterator


        return false;

      EWAHCompressedBitmap curr = bitset.combine()
          .xor(ones(indexObjectCount));

      IntIterator ii = curr.intIterator();
      if (ii.hasNext() && ii.next() < indexObjectCount)
        return false;
      bitset = new ComboBitset(curr);
      return true;
    }
View Full Code Here


    private final IntIterator ofObjectType(int type) {
      return packIndex.ofObjectType(bitmap, type).intIterator();
    }

    public Iterator<BitmapObject> iterator() {
      final IntIterator dynamic = bitmap.andNot(ones(indexObjectCount))
          .intIterator();
      final IntIterator commits = ofObjectType(Constants.OBJ_COMMIT);
      final IntIterator trees = ofObjectType(Constants.OBJ_TREE);
      final IntIterator blobs = ofObjectType(Constants.OBJ_BLOB);
      final IntIterator tags = ofObjectType(Constants.OBJ_TAG);
      return new Iterator<BitmapObject>() {
        private final BitmapObjectImpl out = new BitmapObjectImpl();
        private int type;
        private IntIterator cached = dynamic;

        public boolean hasNext() {
          if (!cached.hasNext()) {
            if (commits.hasNext()) {
              type = Constants.OBJ_COMMIT;
              cached = commits;
            } else if (trees.hasNext()) {
              type = Constants.OBJ_TREE;
              cached = trees;
            } else if (blobs.hasNext()) {
              type = Constants.OBJ_BLOB;
              cached = blobs;
            } else if (tags.hasNext()) {
              type = Constants.OBJ_TAG;
              cached = tags;
            } else {
              return false;
            }
View Full Code Here

TOP

Related Classes of javaewah.IntIterator

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.