All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scudata.dm.query.utils.NameComprator Maven / Gradle / Ivy

Go to download

SPL(Structured Process Language) A programming language specially for structured data computing.

There is a newer version: 20240823
Show newest version
package com.scudata.dm.query.utils;

import java.util.Comparator;

import com.scudata.common.RQException;

public class NameComprator implements Comparator
{
	public int compare(String NameA, String NameB) 
	{
		if(NameA == null || NameB == null)
		{
			throw new RQException("?ַ???Ϊ??ֵ?޷??Ƚϴ?С");
		}
		//????????ǰ?棬?̵????ں???
        if(NameA.length() < NameB.length())
        {
        	return 1;
        }
        else if(NameA.length() > NameB.length())
        {
        	return -1;
        }
        else
        {
        	return 0;
        }
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy