posted 11 years ago
Hello Geeks
Problem : I Have Objects called T-Shirts in my application, T-shirts have many attributes such as NECK TYPE, FIT TYPE, SIZE, COLOR etc. Now i want the client to be able to get the T-shirts which satisfies all the criteria he mentions, for instance he says i want T-shrits which are black in color , XL size and SLIM fit type OR I want ORANGE color T-Shirts.
I have a T-shirt class inside which i have defined various enums for NECK,FIT,SLEEVES,PRICE,COLOR and so on.
Now i want to write a method which will accept any number of these enums and filters the T-shirt according to that and return the desired result.
getTshirt(Enum... ){} // Logically something of this sort
Could you please tell me the best way of doing this ???
Regards