Class Converters
- java.lang.Object
-
- com._1c.g5.v8.dt.common.databinding.conversion.Converters
-
public class Converters extends Object
Static utility methods and constants pertaining toIConverterinstances.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConverters.DefaultConverterDefault converter implementation, does not perform any conversionstatic classConverters.FileConverterConverter from theString(file name) to theFilestatic classConverters.NameToTextConverterstatic classConverters.StringToBooleanConverterConverts theStringtoBooleanusingConverters.StringToBooleanConverter:
"true" -> true
"false" -> false)
trim(source) is empty or null -> null
source not a String -> ClassCastExceptionstatic classConverters.TrimStringConverterTrims the input string and return the result
-
Field Summary
Fields Modifier and Type Field Description static org.eclipse.core.databinding.conversion.IConverterDEFAULTstatic org.eclipse.core.databinding.conversion.IConverterNAME_TO_STRINGstatic org.eclipse.core.databinding.conversion.IConverterSTR_FILEstatic org.eclipse.core.databinding.conversion.IConverterSTR_TO_BOOLstatic org.eclipse.core.databinding.conversion.IConverterSTR_TRIM
-
Constructor Summary
Constructors Constructor Description Converters()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.core.databinding.conversion.IConverterconstant(Object value)Creates a converter that returnsvaluefor any input.static org.eclipse.core.databinding.conversion.IConverterfromFeature(org.eclipse.emf.ecore.EStructuralFeature feature)Creates a converter that returns value of the feature of the input emf-object.
-
-
-
Field Detail
-
DEFAULT
public static final org.eclipse.core.databinding.conversion.IConverter DEFAULT
- See Also:
Converters.DefaultConverter
-
STR_TO_BOOL
public static final org.eclipse.core.databinding.conversion.IConverter STR_TO_BOOL
- See Also:
Converters.StringToBooleanConverter
-
STR_TRIM
public static final org.eclipse.core.databinding.conversion.IConverter STR_TRIM
- See Also:
Converters.TrimStringConverter
-
STR_FILE
public static final org.eclipse.core.databinding.conversion.IConverter STR_FILE
- See Also:
Converters.FileConverter
-
NAME_TO_STRING
public static final org.eclipse.core.databinding.conversion.IConverter NAME_TO_STRING
- See Also:
Converters.NameToTextConverter
-
-
Method Detail
-
fromFeature
public static org.eclipse.core.databinding.conversion.IConverter fromFeature(org.eclipse.emf.ecore.EStructuralFeature feature)
Creates a converter that returns value of the feature of the input emf-object.- Parameters:
feature- the emf feature- Returns:
- a emf-feature based converter
-
constant
public static org.eclipse.core.databinding.conversion.IConverter constant(Object value)
Creates a converter that returnsvaluefor any input.- Parameters:
value- the constant value for the converter to return- Returns:
- a converter that always returns
value
-
-