首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 允许用户定义的类型进行比较(因此可以进行排序)

允许用户定义的类型进行比较(因此可以进行排序)

资 源 简 介

Allows two objects of the same user-defined type to be compared provided that the user-defined type has a method func (so SomeType) Compare(objectSomeType) (result int) which returns 0 for equal,1 for greater than or -1 for less than. The test source file gives an example of usage.

文 件 列 表

compare.go
compare_test.go
LICENSING
Makefile
VIP VIP
0.188084s