private void moveNativeFirst ( List < ImageFormat > v ) { int index = 0 ; for ( int i = 0 ; i < v . size ( ) ; i ++ ) //if not native format if ( ! formats . contains ( v . get ( index ) ) ) { //put it at the end v . add ( v . remove ( index ) ) ; } else index ++ ; }
This method moves the native formats in the given vector to the beginning of the vector .