What does T mean when used as a method signature? Is it a return type?

前端 未结 2 811
臣服心动
臣服心动 2021-01-14 09:47
abstract public  T iterEdges(EdgeFun func, T accum);

This is for a multithreaded library for graphs. I am not asking for anything

2条回答
  •  醉酒成梦
    2021-01-14 10:47

    It is a generic method. The first is for the generic type that would be used. The function is also declaring that is returns that type T. The parameters are showing that they use that generic parameter type.

提交回复
热议问题