泛型 – unkwown Type的Min / MaxValue

前端之家收集整理的这篇文章主要介绍了泛型 – unkwown Type的Min / MaxValue前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
是否有可能获得未知类型T的MinValue – 或MaxValue?在Int中有Int.MinValue和Int.MaxValue ??

谢谢

解决方法

is it possible to get the Min – or MaxValue of an unkwown Type T?

不,它不是,原因很简单,如果T未知,那你怎么知道它甚至有最小值或最大值?

猜你在找的Scala相关文章