code: private ILigand[] order(ILigand[] ligands) {
          ILigand[] newLigands = new ILigand[ligands.length];
          System.arraycopy(ligands, 0, newLigands, 0, ligands.length);
  
          Arrays.sort(newLigands, numberRule);
          // this above list is from low to high precendence, so we need to revert the array
          ILigand[] reverseLigands = new ILigand[newLigands.length];
          for (int i = 0; i < newLigands.length; i++) {
              reverseLigands[(newLigands.length - 1) - i] = newLigands[i];
          }
          return reverseLigands;
      }
docs: Order the ligands from high to low precedence according to atomic and mass numbers.