2016-12-29 16:36:27 +00:00
|
|
|
public interface FiltroStringa{
|
|
|
|
String getString(Object obj);
|
2016-12-30 12:52:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class FiltroSupporto implements FiltroStringa{
|
|
|
|
|
|
|
|
public String getString(Object obj){
|
|
|
|
if(obj instanceof OperaMult)
|
|
|
|
return ((OperaMult) obj).getSupporto();
|
|
|
|
else
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class FiltroTecnica implements FiltroStringa{
|
|
|
|
|
|
|
|
public String getString(Object obj){
|
|
|
|
if(obj instanceof Stampa)
|
|
|
|
return ((Stampa) obj).getTecnica();
|
|
|
|
else
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class FiltroAutore implements FiltroStringa{
|
|
|
|
|
|
|
|
public String getString(Object obj){
|
|
|
|
return ((Opera) obj).getAutore();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class FiltroTitolo implements FiltroStringa{
|
|
|
|
|
|
|
|
public String getString(Object obj){
|
|
|
|
return ((Opera) obj).getTitolo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class FiltroPosizione implements FiltroStringa{
|
|
|
|
|
|
|
|
public String getString(Object obj){
|
|
|
|
return ((Opera) obj).getPos();
|
|
|
|
}
|
2016-12-29 16:36:27 +00:00
|
|
|
}
|