private LocationIndexTree initEntries(int[] entries) { if (entries.length < 1) { // at least one depth should have been specified throw new IllegalStateException("depth needs to be at least 1"); } this.entries = entries; int depth = entries.length; shifts = new byte[depth]; bitmasks = new long[depth]; int lastEntry = entries[0]; for (int i = 0; i < depth; i++) { if (lastEntry < entries[i]) { throw new IllegalStateException("entries should decrease or stay but was:" + Arrays.toString(entries)); } lastEntry = entries[i]; shifts[i] = getShift(entries[i]); bitmasks[i] = getBitmask(shifts[i]); } return this; }
private LocationIndexTree initEntries(int[] entries) { if (entries.length < 1) { // at least one depth should have been specified throw new IllegalStateException("depth needs to be at least 1"); } this.entries = entries; int depth = entries.length; shifts = new byte[depth]; bitmasks = new long[depth]; int lastEntry = entries[0]; for (int i = 0; i < depth; i++) { if (lastEntry < entries[i]) { throw new IllegalStateException("entries should decrease or stay but was:" + Arrays.toString(entries)); } lastEntry = entries[i]; shifts[i] = getShift(entries[i]); bitmasks[i] = getBitmask(shifts[i]); } return this; }
private LocationIndexTree initEntries(int[] entries) { if (entries.length < 1) { // at least one depth should have been specified throw new IllegalStateException("depth needs to be at least 1"); } this.entries = entries; int depth = entries.length; shifts = new byte[depth]; bitmasks = new long[depth]; int lastEntry = entries[0]; for (int i = 0; i < depth; i++) { if (lastEntry < entries[i]) { throw new IllegalStateException("entries should decrease or stay but was:" + Arrays.toString(entries)); } lastEntry = entries[i]; shifts[i] = getShift(entries[i]); bitmasks[i] = getBitmask(shifts[i]); } return this; }
private LocationIndexTree initEntries( int[] entries ) { if (entries.length < 1) // at least one depth should have been specified { throw new IllegalStateException("depth needs to be at least 1"); } this.entries = entries; int depth = entries.length; shifts = new byte[depth]; bitmasks = new long[depth]; int lastEntry = entries[0]; for (int i = 0; i < depth; i++) { if (lastEntry < entries[i]) { throw new IllegalStateException("entries should decrease or stay but was:" + Arrays.toString(entries)); } lastEntry = entries[i]; shifts[i] = getShift(entries[i]); bitmasks[i] = getBitmask(shifts[i]); } return this; }