I have built myself a generic collection class which is defined like this.
public class StatisticItemHits{...}
This class can be
You could make StatisticItemHits an abstract class and create two subclasses:
StatisticItemHits
StatisticItemHitsInt : StatisticItemHits{}
StatisticItemHitsString : StatisticItemHits{}
That way there can only be an int and string-representation of StatisticItemHits