简体   繁体   中英

Regarding usage of generics in java

While learning spring batch, I encountered a line as below:

stepBuilderFactory.get("step1").<Integer, Integer>chunk(3).reader(new MyReader)..

Normally, in generics, we will have class name followed by <> . Example List<Integer> But what does .<Integer, Integer>chunk(3) mean?

It means that the chunk method is generic instead of the type that get returns.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM