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

📄 stringcomparator.java

📁 这是linux下ssl vpn的实现程序
💻 JAVA
字号:
/*
 */
package com.sshtools.util;

/**
 * @author magicthize
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class StringComparator implements SortComparator {
  
  private static SortComparator instance;

  /* (non-Javadoc)
   * @see com.sshtools.util.SortComparator#sortCompare(java.lang.Object, java.lang.Object)
   */
  public int sortCompare(Object o1, Object o2) {
    return ( o1 == null && o2 != null) ? -1 : ( o1 != null && o2 == null ? 1 : String.valueOf(o1).compareTo(String.valueOf(o2)));
  }

  /**
   * @return
   */
  public static SortComparator getDefaultInstance() {
    if(instance == null) {
      instance = new StringComparator();
    }
    return instance;
  }

}

⌨️ 快捷键说明

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