Java Array Index Of arrayIndexOffset(int index, long baseOffset, long indexScale)

Here you can find the source of arrayIndexOffset(int index, long baseOffset, long indexScale)

Description

array Index Offset

License

Apache License

Declaration

protected static long arrayIndexOffset(int index, long baseOffset, long indexScale) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    protected static long arrayIndexOffset(int index, long baseOffset, long indexScale) {
        if (index < 0)
            throw new IndexOutOfBoundsException("index " + index);
        return baseOffset + (long) index * indexScale;
    }/*from   w  w  w.  j a  va  2  s.  c om*/
}

Related

  1. arrayIndexFor(final String raw)
  2. ArrayIndexOf(byte[] data, byte[] dest)
  3. arrayIndexOf(int needle, int[] haystack)
  4. arrayIndexOf(int value, int[] arr)
  5. arrayIndexOf(Object[] array, Object element)
  6. indexOf(byte[] array, byte[] target, int fromIndex)
  7. indexOf(byte[] array, byte[] target, int start)
  8. indexOf(byte[] target, byte[] key)
  9. indexOf(char toBeFound, char[] array)