- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {StringBuilder s =
new StringBuilder()
new StringBuilder(32)
String str;new StringBuilder(str)
- Smart code suggestions by Codota
}
/** * Only keep one reference to the same chunk. Only leaf references are * removed (references to inner nodes are not removed, as they could * indirectly point to other chunks). */ void removeDuplicateChunkReferences() { HashSet<Integer> chunks = new HashSet<>(); // we don't need references to leaves in the same chunk chunks.add(DataUtils.getPageChunkId(pos)); for (int i = 0; i < children.length; i++) { long p = children[i]; int chunkId = DataUtils.getPageChunkId(p); boolean wasNew = chunks.add(chunkId); if (DataUtils.getPageType(p) == DataUtils.PAGE_TYPE_NODE) { continue; } if (wasNew) { continue; } removeChild(i--); } }
int c = DataUtils.getPageChunkId(pos); targetChunkSet.add(c); if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) { return;
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
/** * Remove this page and all child pages. */ void removeAllRecursive() { if (children != null) { for (int i = 0, size = map.getChildPageCount(this); i < size; i++) { PageReference ref = children[i]; if (ref.page != null) { ref.page.removeAllRecursive(); } else { long c = children[i].pos; int type = DataUtils.getPageType(c); if (type == DataUtils.PAGE_TYPE_LEAF) { int mem = DataUtils.getPageMaxLength(c); map.removePage(c, mem); } else { map.readPage(c).removeAllRecursive(); } } } } removePage(); }
for (int i = 0; i < getChildPageCount(p); i++) { long childPos = p.getChildPagePos(i); if (childPos != 0 && DataUtils.getPageType(childPos) == DataUtils.PAGE_TYPE_LEAF) {
private PageChildren readPageChunkReferences(int mapId, long pos, int parentChunk) { if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) { return null;
/** * Only keep one reference to the same chunk. Only leaf references are * removed (references to inner nodes are not removed, as they could * indirectly point to other chunks). */ void removeDuplicateChunkReferences() { HashSet<Integer> chunks = new HashSet<>(); // we don't need references to leaves in the same chunk chunks.add(DataUtils.getPageChunkId(pos)); for (int i = 0; i < children.length; i++) { long p = children[i]; int chunkId = DataUtils.getPageChunkId(p); boolean wasNew = chunks.add(chunkId); if (DataUtils.getPageType(p) == DataUtils.PAGE_TYPE_NODE) { continue; } if (wasNew) { continue; } removeChild(i--); } }
/** * Only keep one reference to the same chunk. Only leaf references are * removed (references to inner nodes are not removed, as they could * indirectly point to other chunks). */ void removeDuplicateChunkReferences() { HashSet<Integer> chunks = New.hashSet(); // we don't need references to leaves in the same chunk chunks.add(DataUtils.getPageChunkId(pos)); for (int i = 0; i < children.length; i++) { long p = children[i]; int chunkId = DataUtils.getPageChunkId(p); boolean wasNew = chunks.add(chunkId); if (DataUtils.getPageType(p) == DataUtils.PAGE_TYPE_NODE) { continue; } if (wasNew) { continue; } removeChild(i--); } }
/** * Only keep one reference to the same chunk. Only leaf references are * removed (references to inner nodes are not removed, as they could * indirectly point to other chunks). */ void removeDuplicateChunkReferences() { HashSet<Integer> chunks = New.hashSet(); // we don't need references to leaves in the same chunk chunks.add(DataUtils.getPageChunkId(pos)); for (int i = 0; i < children.length; i++) { long p = children[i]; int chunkId = DataUtils.getPageChunkId(p); boolean wasNew = chunks.add(chunkId); if (DataUtils.getPageType(p) == DataUtils.PAGE_TYPE_NODE) { continue; } if (wasNew) { continue; } removeChild(i--); } }
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
int c = DataUtils.getPageChunkId(pos); targetChunkSet.add(c); if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) { return;
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
int c = DataUtils.getPageChunkId(pos); targetChunkSet.add(c); if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) { return;
int c = DataUtils.getPageChunkId(pos); targetChunkSet.add(c); if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) { return;
/** * Remove this page and all child pages. */ void removeAllRecursive() { if (children != null) { for (int i = 0, size = map.getChildPageCount(this); i < size; i++) { PageReference ref = children[i]; if (ref.page != null) { ref.page.removeAllRecursive(); } else { long c = children[i].pos; int type = DataUtils.getPageType(c); if (type == DataUtils.PAGE_TYPE_LEAF) { int mem = DataUtils.getPageMaxLength(c); map.removePage(c, mem); } else { map.readPage(c).removeAllRecursive(); } } } } removePage(); }
/** * Remove this page and all child pages. */ void removeAllRecursive() { if (children != null) { for (int i = 0, size = map.getChildPageCount(this); i < size; i++) { PageReference ref = children[i]; if (ref.page != null) { ref.page.removeAllRecursive(); } else { long c = children[i].pos; int type = DataUtils.getPageType(c); if (type == DataUtils.PAGE_TYPE_LEAF) { int mem = DataUtils.getPageMaxLength(c); map.removePage(c, mem); } else { map.readPage(c).removeAllRecursive(); } } } } removePage(); }
/** * Remove this page and all child pages. */ void removeAllRecursive() { if (children != null) { for (int i = 0, size = map.getChildPageCount(this); i < size; i++) { PageReference ref = children[i]; if (ref.page != null) { ref.page.removeAllRecursive(); } else { long c = children[i].pos; int type = DataUtils.getPageType(c); if (type == DataUtils.PAGE_TYPE_LEAF) { int mem = DataUtils.getPageMaxLength(c); map.removePage(c, mem); } else { map.readPage(c).removeAllRecursive(); } } } } removePage(); }
private PageChildren readPageChunkReferences(int mapId, long pos, int parentChunk) { if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) { return null;
private PageChildren readPageChunkReferences(int mapId, long pos, int parentChunk) { if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) { return null;