我想创建一个非常通用的实用程序方法来使用任何集合并将其转换为从Number(Long,Double,Float,Integer等)扩展的用户可选类的集合 我想出了使用Google Collections转换Collection并返回Immutable List的代码. import java.util.List;import com.google.common.b