Java Utililty Methods Array Invert

List of utility methods to do Array Invert

Description

The list of methods to do Array Invert are organized into topic(s).

Method

Object[]invertArray(Object[] data)
Turns an Object array backwards
Object[] result = new Object[data.length];
int n = 0;
for (int i = data.length - 1; i >= 0; i--) {
    result[n] = data[i];
    n++;
return result;
voidinvertBits(byte[] input)
invert Bits
for (int i = input.length - 1; i >= 0; i--) {
    input[i] = (byte) ~input[i];
Boolean[]InvertBitsInByte(Boolean[] booleanByte)
Invert Bits In Byte
int dataLenght = booleanByte.length;
Boolean[] invertedBytes = new Boolean[dataLenght];
int index = 0;
for (boolean bit : booleanByte) {
    invertedBytes[dataLenght - index - 1] = bit;
    ++index;
return invertedBytes;
...
voidinvertByteArray(byte[] array)
invert Byte Array
for (int i = 0; i < array.length; i++) {
    short temp = array[i];
Boolean[]InvertBytes(Boolean[] dataToInvert)
Invert Bytes
Boolean[] fakeByte = new Boolean[8];
Boolean[] result = new Boolean[dataToInvert.length];
Boolean[] fakeByteReversed;
int k = 0;
for (int i = 0; i <= dataToInvert.length; ++i) {
    if (i % 8 == 0 && i != 0) {
        fakeByteReversed = InvertBitsInByte(fakeByte);
        int positionWhithinByte = 0;
...
floatinvertedLength3(float[] a)
inverted Length
float length = length3(a);
if (length == 0.f) {
    return 0.f;
return 1.f / length;
double[]inverter(double[] vector)
inverter
double[] vetorInverso = new double[vector.length];
int j = vector.length - 1;
for (int i = 0; i < vetorInverso.length; i++) {
    vetorInverso[i] = vector[j];
    j--;
return vetorInverso;
intinvertHostNameFast(byte[] tokens, int offset, int length, byte[] destinationBuffer)
invert Host Name Fast
int lastScanStart = offset + length - 1;
int currentIndex = lastScanStart;
int destinationOffset = 0;
while (currentIndex >= offset) {
    if (tokens[currentIndex] == '.') {
        if (lastScanStart - currentIndex != 0) {
            System.arraycopy(tokens, currentIndex + 1, destinationBuffer, destinationOffset,
                    lastScanStart - currentIndex);
...
long[]invertI(long[] v)
Invert v inplace.
for (int i = 0; i < v.length; i++) {
    v[i] = ~v[i];
return v;
voidinvertirTabla2(int[] tabla)
invertir Tabla
int tabla2[];
int a = tabla.length;
tabla2 = Arrays.copyOf(tabla, tabla.length);
for (int i = 0; i < tabla.length; i++) {
    a--;
    tabla[i] = tabla2[a];