}
if( category == Copies.class ){
return new CopiesSupported(1, settings.get_MaximumCopies() );
}
if( category == Media.class ){
PaperSizeCollection sizes = settings.get_PaperSizes();
List<Media> medias = new ArrayList<Media>();
for( int i = 0; i < sizes.get_Count(); i++ ){
PaperSize media = sizes.get_Item(i);
MediaSizeName mediaName = findMatchingMedia( sizes.get_Item(i) );
if( mediaName != null
&& !medias.contains( mediaName )){ // slow but better than creating a HashSet here
medias.add( mediaName);
}
}