net.sourceforge.jparam.conversion.weights
Class ScalarConversionWeight
java.lang.Object
|
+--net.sourceforge.jparam.conversion.weights.ScalarConversionWeight
- All Implemented Interfaces:
- java.lang.Comparable
- public class ScalarConversionWeight
- extends java.lang.Object
- implements java.lang.Comparable
A class representing the weight of a single scalar conversion, from one
type to another
Chained conversion are supported
- Author:
- Ron_Sidi
Method Summary |
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
java.lang.String |
toString()
Return a string representation of this weight, all types of conversion
ordered from hardest to easiest, along with the count of each |
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
_CONV_IMPOSSIBLE
static final int _CONV_IMPOSSIBLE
_CONV_USER
static final int _CONV_USER
_CONV_TENTATIVE
static final int _CONV_TENTATIVE
_CONV_TO_PARENT
static final int _CONV_TO_PARENT
_CONV_STANDARD
static final int _CONV_STANDARD
_CONV_PROMOTION
static final int _CONV_PROMOTION
_CONV_EXACT
static final int _CONV_EXACT
WEIGHT_NAME
static final java.lang.String[] WEIGHT_NAME
CONV_IMPOSSIBLE
public static final ScalarConversionWeight CONV_IMPOSSIBLE
CONV_USER
public static final ScalarConversionWeight CONV_USER
CONV_TENTATIVE
public static final ScalarConversionWeight CONV_TENTATIVE
CONV_TO_PARENT
public static final ScalarConversionWeight CONV_TO_PARENT
CONV_PROMOTE
public static final ScalarConversionWeight CONV_PROMOTE
CONV_STANDARD
public static final ScalarConversionWeight CONV_STANDARD
CONV_EXACT
public static final ScalarConversionWeight CONV_EXACT
NUMBER_OF_CONVERSION_TYPES
int NUMBER_OF_CONVERSION_TYPES
weights
int[] weights
ScalarConversionWeight
public ScalarConversionWeight(ScalarConversionWeight first,
ScalarConversionWeight second)
- Create a
ScalarConversionWeight
representing both
conversions
- Parameters:
first
- second
-
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interface java.lang.Comparable
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Return a string representation of this weight, all types of conversion
ordered from hardest to easiest, along with the count of each
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
Copyright © 2004 SourceForge. All Rights Reserved.