开发者

What is Scala's Comparable trait?

I am searching for Scala counterpart of C# IComparable, and I found Comparable trait. I mean -- Comparable is mentioned, but when I search for it at http://www.scala-lang.org/api/current/scala/ I get 0 hits. Because of the name, using Google I get a lot of "how Scala is comparable to..." results.

Is there any resource I could read about this mysteriou开发者_JS百科s Comparable thing? After all Ordered extends it, so it has to exist.


The Comparable that you saw mentioned must have been java.lang.Comparable. There is no trait named Comparable in Scala stdlib. Scala's Ordered trait extends java.lang.Comparable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜