compareTo 抽象方法

int compareTo(
  1. BigInt other
)
override

比较此实例与other

如果this小于other,返回负数;如果它们相等,返回零;如果this大于other,返回正数。

示例

print(BigInt.from(1).compareTo(BigInt.from(2))); // => -1
print(BigInt.from(2).compareTo(BigInt.from(1))); // => 1
print(BigInt.from(1).compareTo(BigInt.from(1))); // => 0

实现

int compareTo(BigInt other);