⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comparator.java

📁 真的很麻烦也
💻 JAVA
字号:
public class Comparator
{
	public boolean isComparable(Object o)
	{
		return true;
	}
	public boolean isLessThan(Object a, Object b)
	//the value 0 if the argument string is equal to this string; 
	//a value less than 0 if this string is lexicographically less than the string argument; 
	//and a value greater than 0 if this string is lexicographically greater than the string argument.

	{
		return (a.toString().compareTo(b.toString()))<0;
	}
	public boolean isGreaterThan(Object a, Object b)
	{
		return (a.toString().compareTo(b.toString()))>0;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -