@ SuppressWarnings ( "unchecked" ) public E getElem ( int index , int xor ) { if ( xor < ( 1 << 5 ) ) { // level = 0 return ( E ) display0 [ index & 31 ] ; } else if ( xor < ( 1 << 10 ) ) { // level = 1 return ( E ) ( ( Object [ ] ) display1 [ ( index >> 5 ) & 31 ] ) [ index & 31 ] ; } else if ( xor < ( 1 << 15 ) ) { // level = 2 return ( E ) ( ( Object [ ] ) ( ( Object [ ] ) display2 [ ( index >> 10 ) & 31 ] ) [ ( index >> 5 ) & 31 ] ) [ index & 31 ] ; } else if ( xor < ( 1 << 20 ) ) { // level = 3 return ( E ) ( ( Object [ ] ) ( ( Object [ ] ) ( ( Object [ ] ) display3 [ ( index >> 15 ) & 31 ] ) [ ( index >> 10 ) & 31 ] ) [ ( index >> 5 ) & 31 ] ) [ index & 31 ] ; } else if ( xor < ( 1 << 25 ) ) { // level = 4 return ( E ) ( ( Object [ ] ) ( ( Object [ ] ) ( ( Object [ ] ) ( ( Object [ ] ) display4 [ ( index >> 20 ) & 31 ] ) [ ( index >> 15 ) & 31 ] ) [ ( index >> 10 ) & 31 ] ) [ ( index >> 5 ) & 31 ] ) [ index & 31 ] ; } else if ( xor < ( 1 << 30 ) ) { // level = 5 return ( E ) ( ( Object [ ] ) ( ( Object [ ] ) ( ( Object [ ] ) ( ( Object [ ] ) ( ( Object [ ] ) display5 [ ( index >> 25 ) & 31 ] ) [ ( index >> 20 ) & 31 ] ) [ ( index >> 15 ) & 31 ] ) [ ( index >> 10 ) & 31 ] ) [ ( index >> 5 ) & 31 ] ) [ index & 31 ] ; } else { // level = 6 throw new IllegalArgumentException ( ) ; } }
requires structure is at pos oldIndex = xor ^ index