I am getting a issue i have below code
public void columnsList(List<TableRecord> records){
for(TableRecord record : records){
Table table = record.getTable();
//Do sort here on stampDate
Field[] fields = table.fields();
for(Field field : fields){
field.getName();
record.getValue(field);
}
}
}
and records object contain Object of different class type
List<TableRecord> records = new List<TableRecord>();
records.add(new AddressRecord());
records.add(new CityRecord());
records.add(new UserRecord());
Now how i need to sort them by stampDate variable which is in each class how can we do it when we have different classes in list