FileDocCategorySizeDatePackage
LocaleUtilDecoderCandidate.javaAPI DocAzureus 3.0.3.42613Thu Feb 09 19:42:46 GMT 2006org.gudy.azureus2.core3.internat

LocaleUtilDecoderCandidate

public class LocaleUtilDecoderCandidate extends Object implements Comparable

Fields Summary
private int
index
private String
value
private LocaleUtilDecoder
decoder
Constructors Summary
protected LocaleUtilDecoderCandidate(int _index)

		index	= _index;
	
Methods Summary
public intcompareTo(java.lang.Object o)

	  LocaleUtilDecoderCandidate candidate = (LocaleUtilDecoderCandidate)o;
      
	  int	res;
      
	  if( value == null && candidate.value == null){
      
		res	= 0;
        
	  }else if ( value == null ){
      	
		res = 1;
        
	  }else if ( candidate.value == null ){
      	
		res = -1;
      	
	  }else{
      
		res = value.length() - candidate.value.length();
        
		if ( res == 0 ){
        	
			res = index - candidate.index;
		}
	  }
      
	  if ( decoder != null && candidate.getDecoder() != null ){
	  	
	  	// System.out.println( "comp:" + decoder.getName() + "/" + candidate.getDecoder().getName() + " -> " + res );
	  }
	  return( res );
	
public LocaleUtilDecodergetDecoder()

	  return decoder;
	
public java.lang.StringgetValue()

	  return value;
	
public voidsetDetails(LocaleUtilDecoder _decoder, java.lang.String _value)

		decoder	= _decoder;
		value	= _value;