I am trying to read and understand some Java code. Here it is:
protected LoadTarget<? super PopulationLoadContext> createTarget(PopulationLoadContext context) {
return createTransactionalTargetGroup(RiskScoresTables.All_Tables);
}
What does the <? super PopulationLoadContext>
mean?
In Java, that is a lower-bounded wildcard in generics, which stands for PopulationLoadContext
or any superclass of that class.
It could be a LoadTarget<PopulationLoadContext>
, or it could be a LoadTarget<Object>
, or anything in between (if in between classes exist).