Package net.algart.arrays
Interface ArrayExchanger32
- All Superinterfaces:
ArrayExchanger
- All Known Implementing Classes:
JArrays.ByteAndIndexArrayExchanger
,JArrays.ByteArrayExchanger
,JArrays.CharAndIndexArrayExchanger
,JArrays.CharArrayExchanger
,JArrays.DoubleAndIndexArrayExchanger
,JArrays.DoubleArrayExchanger
,JArrays.FloatAndIndexArrayExchanger
,JArrays.FloatArrayExchanger
,JArrays.IntAndIndexArrayExchanger
,JArrays.IntArrayExchanger
,JArrays.LongAndIndexArrayExchanger
,JArrays.LongArrayExchanger
,JArrays.ShortAndIndexArrayExchanger
,JArrays.ShortArrayExchanger
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Version of ArrayExchanger
for a case of 32-bit indexes (int instead of long).
- Author:
- Daniel Alievsky
-
Method Summary
-
Method Details
-
swap
default void swap(long first, long second) This method, implemented in this interface, just calls another swap method with int indexes:swap
((int) first, (int) second);- Specified by:
swap
in interfaceArrayExchanger
- Parameters:
first
- index of the first exchanged element.second
- index of the second exchanged element.
-
swap
void swap(int first, int second) Should exchange the elements at position first and second in the data array.- Parameters:
first
- index of the first exchanged element.second
- index of the second exchanged element.
-