public List<Integer> finish(boolean right){
  if (!active || right != this.right) {
    return null;
  }
 else   if (slots.isEmpty()) {
    return null;
  }
 else {
    List<Integer> result=new ArrayList<>(slots);
    reset();
    return result;
  }
}

public List < Integer > finish ( boolean right ) { if ( ! active || right != this . right ) { return null ; } else if ( slots . isEmpty ( ) ) { return null ; } else { List < Integer > result = new ArrayList < > ( slots ) ; reset ( ) ; return result ; } }
finish an in - progress drag operation if possible .
