public void validateSubPartitionValues(List<String> subPartitionValues) throws IllegalArgumentException {
  int subPartitionValuesCount=CollectionUtils.size(subPartitionValues);
  Assert.isTrue(subPartitionValuesCount <= BusinessObjectDataEntity.MAX_SUBPARTITIONS,String.format("Exceeded maximum number of allowed subpartitions: %d.",BusinessObjectDataEntity.MAX_SUBPARTITIONS));
  for (int i=0; i < subPartitionValuesCount; i++) {
    subPartitionValues.set(i,alternateKeyHelper.validateStringParameter("subpartition value",subPartitionValues.get(i)));
  }
}

public void validateSubPartitionValues ( List < String > subPartitionValues ) throws IllegalArgumentException { int subPartitionValuesCount = CollectionUtils . size ( subPartitionValues ) ; Assert . isTrue ( subPartitionValuesCount <= BusinessObjectDataEntity . MAX_SUBPARTITIONS , String . format ( "Exceeded maximum number of allowed subpartitions: %d." , BusinessObjectDataEntity . MAX_SUBPARTITIONS ) ) ; for ( int i = 0 ; i < subPartitionValuesCount ; i ++ ) { subPartitionValues . set ( i , alternateKeyHelper . validateStringParameter ( "subpartition value" , subPartitionValues . get ( i ) ) ) ; } }
validates a list of sub - partition values . this method also trims the sub - partition values .
