I want to find max product from the list of Products(nested)
public class Product {
private String id;
private String name;
private String status;
private String parentId;
private AdditionalEntity additionalEntity;
}
public class AdditionalEntity {
private String storagePlan;
}
I want to get the max product based on storage plan and the value of storagePlan can be null, 100hrs, 150hrs, 300hrs, 500hrs. The storage plan can have duplicates like two products having the same hours (1500hrs). In that case, we can return any of the product(having 1500hrs). AdditionalEntity can also be null.