@Override public void validateParameters(){
  Set<String> uniqueIds=new HashSet<>();
  for (  Step step : steps) {
    uniqueIds.add(step.getIdentifier());
  }
  if (uniqueIds.size() != steps.size()) {
    throw new InvalidTaskException("OrderedTask has steps with duplicate ids");
  }
}

@ Override public void validateParameters ( ) { Set < String > uniqueIds = new HashSet < > ( ) ; for ( Step step : steps ) { uniqueIds . add ( step . getIdentifier ( ) ) ; } if ( uniqueIds . size ( ) != steps . size ( ) ) { throw new InvalidTaskException ( "OrderedTask has steps with duplicate ids" ) ; } }
validates that there are no duplicate identifiers in the list of steps
