This repository was archived by the owner on Aug 17, 2019. It is now read-only.
File tree 2 files changed +32
-32
lines changed
src/main/scala/com/ckkloverdos/convert
2 files changed +32
-32
lines changed Original file line number Diff line number Diff line change @@ -58,4 +58,36 @@ trait ConverterBase {
58
58
None
59
59
}
60
60
}
61
+
62
+ def convertToByte [S : Type ](sourceValue : S ): Maybe [Byte ] = convert[Byte ](sourceValue)
63
+
64
+ def convertToByteEx [S : Type ](sourceValue : S ): Byte = convertEx[Byte ](sourceValue)
65
+
66
+ def convertToBoolean [S : Type ](sourceValue : S ): Maybe [Boolean ] = convert[Boolean ](sourceValue)
67
+
68
+ def convertToBooleanEx [S : Type ](sourceValue : S ): Boolean = convertEx[Boolean ](sourceValue)
69
+
70
+ def convertToShort [S : Type ](sourceValue : S ): Maybe [Short ] = convert[Short ](sourceValue)
71
+
72
+ def convertToShortEx [S : Type ](sourceValue : S ): Short = convertEx[Short ](sourceValue)
73
+
74
+ def convertToChar [S : Type ](sourceValue : S ): Maybe [Char ] = convert[Char ](sourceValue)
75
+
76
+ def convertToCharEx [S : Type ](sourceValue : S ): Char = convertEx[Char ](sourceValue)
77
+
78
+ def convertToInt [S : Type ](sourceValue : S ): Maybe [Int ] = convert[Int ](sourceValue)
79
+
80
+ def convertToIntEx [S : Type ](sourceValue : S ): Int = convertEx[Int ](sourceValue)
81
+
82
+ def convertToLong [S : Type ](sourceValue : S ): Maybe [Long ] = convert[Long ](sourceValue)
83
+
84
+ def convertToLongEx [S : Type ](sourceValue : S ): Long = convertEx[Long ](sourceValue)
85
+
86
+ def convertToFloat [S : Type ](sourceValue : S ): Maybe [Float ] = convert[Float ](sourceValue)
87
+
88
+ def convertToFloatEx [S : Type ](sourceValue : S ): Float = convertEx[Float ](sourceValue)
89
+
90
+ def convertToDouble [S : Type ](sourceValue : S ): Maybe [Double ] = convert[Double ](sourceValue)
91
+
92
+ def convertToDoubleEx [S : Type ](sourceValue : S ): Double = convertEx[Double ](sourceValue)
61
93
}
Original file line number Diff line number Diff line change @@ -64,38 +64,6 @@ class Converters(selector: ConverterSelectionStrategy) extends ConverterBase {
64
64
throw new ConverterException (errMsg, exception)
65
65
}
66
66
}
67
-
68
- def convertToByte [S : Type ](sourceValue : S ): Maybe [Byte ] = convert[Byte ](sourceValue)
69
-
70
- def convertToByteEx [S : Type ](sourceValue : S ): Byte = convertEx[Byte ](sourceValue)
71
-
72
- def convertToBoolean [S : Type ](sourceValue : S ): Maybe [Boolean ] = convert[Boolean ](sourceValue)
73
-
74
- def convertToBooleanEx [S : Type ](sourceValue : S ): Boolean = convertEx[Boolean ](sourceValue)
75
-
76
- def convertToShort [S : Type ](sourceValue : S ): Maybe [Short ] = convert[Short ](sourceValue)
77
-
78
- def convertToShortEx [S : Type ](sourceValue : S ): Short = convertEx[Short ](sourceValue)
79
-
80
- def convertToChar [S : Type ](sourceValue : S ): Maybe [Char ] = convert[Char ](sourceValue)
81
-
82
- def convertToCharEx [S : Type ](sourceValue : S ): Char = convertEx[Char ](sourceValue)
83
-
84
- def convertToInt [S : Type ](sourceValue : S ): Maybe [Int ] = convert[Int ](sourceValue)
85
-
86
- def convertToIntEx [S : Type ](sourceValue : S ): Int = convertEx[Int ](sourceValue)
87
-
88
- def convertToLong [S : Type ](sourceValue : S ): Maybe [Long ] = convert[Long ](sourceValue)
89
-
90
- def convertToLongEx [S : Type ](sourceValue : S ): Long = convertEx[Long ](sourceValue)
91
-
92
- def convertToFloat [S : Type ](sourceValue : S ): Maybe [Float ] = convert[Float ](sourceValue)
93
-
94
- def convertToFloatEx [S : Type ](sourceValue : S ): Float = convertEx[Float ](sourceValue)
95
-
96
- def convertToDouble [S : Type ](sourceValue : S ): Maybe [Double ] = convert[Double ](sourceValue)
97
-
98
- def convertToDoubleEx [S : Type ](sourceValue : S ): Double = convertEx[Double ](sourceValue)
99
67
}
100
68
101
69
object Converters {
You can’t perform that action at this time.
0 commit comments