private void checkAxisIndices(List<Integer> indices){
  if (indices == null) {
    return;
  }
  int count=indices.size();
  if (count == 0) {
    throw new IllegalArgumentException("Empty list not permitted.");
  }
  Set<Integer> set=new HashSet<Integer>();
  for (  Integer item : indices) {
    if (set.contains(item)) {
      throw new IllegalArgumentException("Indices must be unique.");
    }
    set.add(item);
  }
}

private void checkAxisIndices ( List < Integer > indices ) { if ( indices == null ) { return ; } int count = indices . size ( ) ; if ( count == 0 ) { throw new IllegalArgumentException ( "Empty list not permitted." ) ; } Set < Integer > set = new HashSet < Integer > ( ) ; for ( Integer item : indices ) { if ( set . contains ( item ) ) { throw new IllegalArgumentException ( "Indices must be unique." ) ; } set . add ( item ) ; } }
this method is used to perform argument checking on the list of axis indices passed to mapdatasettodomainaxes ( ) and mapdatasettorangeaxes ( ) .
