mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Work on security framework
This commit is contained in:
1 parent
e53c00d2b8
commit
1b2aee283e
21 files changed
+667
-19
No files matched your search
@@ -91,17 +91,17 @@ public class HashList<T> implements Iterable<T>
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public void swap( int source, int target )
|
||||
public void swap(int source, int target)
|
||||
{
|
||||
// Make sure both source and target ar legal values
|
||||
if( source == target ) return;
|
||||
if( source < 0 || target < 0 ) return;
|
||||
if( source >= list.size() || target >= list.size() ) return;
|
||||
// Make sure both source and target are legal values
|
||||
if(source == target) return;
|
||||
if(source < 0 || target < 0) return;
|
||||
if(source >= list.size() || target >= list.size()) return;
|
||||
|
||||
// Perform swap
|
||||
T temp = list.get( source );
|
||||
list.set( source, list.get( target ) );
|
||||
list.set( target, temp );
|
||||
T temp = list.get(source);
|
||||
list.set(source, list.get( target));
|
||||
list.set(target, temp);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user