@@ -44,127 +44,127 @@ class Props(val map: Map[String, String])(implicit conv: Converters = Converters
44
44
45
45
def getBoolean (key : String ): Maybe [Boolean ] = map.get(key) match {
46
46
case Some (value) ⇒
47
- handleKeyError (key, conv.convertToBoolean(value))
47
+ handleKeyLookup (key, conv.convertToBoolean(value))
48
48
49
49
case None ⇒
50
50
NoVal
51
51
}
52
52
53
53
def getBooleanEx (key : String ): Boolean = map.get(key) match {
54
54
case Some (value) ⇒
55
- handleKeyError (key, conv.convertToBooleanEx(value))
55
+ handleKeyLookupEx (key, conv.convertToBooleanEx(value))
56
56
57
57
case None ⇒
58
58
throw new IllegalArgumentException (" Unknown key %s" .format(key))
59
59
}
60
60
61
61
def getByte (key : String ): Maybe [Byte ] = map.get(key) match {
62
62
case Some (value) ⇒
63
- handleKeyError (key, conv.convertToByte(value))
63
+ handleKeyLookup (key, conv.convertToByte(value))
64
64
65
65
case None ⇒
66
66
NoVal
67
67
}
68
68
69
69
def getByteEx (key : String ): Byte = map.get(key) match {
70
70
case Some (value) ⇒
71
- handleKeyError (key, conv.convertToByteEx(value))
71
+ handleKeyLookupEx (key, conv.convertToByteEx(value))
72
72
73
73
case None ⇒
74
74
throw new IllegalArgumentException (" Unknown key %s" .format(key))
75
75
}
76
76
77
77
def getShort (key : String ): Maybe [Short ] = map.get(key) match {
78
78
case Some (value) ⇒
79
- handleKeyError (key, conv.convertToShort(value))
79
+ handleKeyLookup (key, conv.convertToShort(value))
80
80
81
81
case None ⇒
82
82
NoVal
83
83
}
84
84
85
85
def getShortEx (key : String ): Short = map.get(key) match {
86
86
case Some (value) ⇒
87
- handleKeyError (key, conv.convertToShortEx(value))
87
+ handleKeyLookupEx (key, conv.convertToShortEx(value))
88
88
89
89
case None ⇒
90
90
throw new IllegalArgumentException (" Unknown key %s" .format(key))
91
91
}
92
92
93
93
def getInt (key : String ): Maybe [Int ] = map.get(key) match {
94
94
case Some (value) ⇒
95
- handleKeyError (key, conv.convertToInt(value))
95
+ handleKeyLookup (key, conv.convertToInt(value))
96
96
97
97
case None ⇒
98
98
NoVal
99
99
}
100
100
101
101
def getIntEx (key : String ): Int = map.get(key) match {
102
102
case Some (value) ⇒
103
- handleKeyError (key, conv.convertToIntEx(value))
103
+ handleKeyLookupEx (key, conv.convertToIntEx(value))
104
104
105
105
case None ⇒
106
106
throw new IllegalArgumentException (" Unknown key %s" .format(key))
107
107
}
108
108
109
109
def getLong (key : String ): Maybe [Long ] = map.get(key) match {
110
110
case Some (value) ⇒
111
- handleKeyError (key, conv.convertToLong(value))
111
+ handleKeyLookup (key, conv.convertToLong(value))
112
112
113
113
case None ⇒
114
114
NoVal
115
115
}
116
116
117
117
def getLongEx (key : String ): Long = map.get(key) match {
118
118
case Some (value) ⇒
119
- handleKeyError (key, conv.convertToLongEx(value))
119
+ handleKeyLookupEx (key, conv.convertToLongEx(value))
120
120
121
121
case None ⇒
122
122
throw new IllegalArgumentException (" Unknown key %s" .format(key))
123
123
}
124
124
125
125
def getDouble (key : String ): Maybe [Double ] = map.get(key) match {
126
126
case Some (value) ⇒
127
- handleKeyError (key, conv.convertToDouble(value))
127
+ handleKeyLookup (key, conv.convertToDouble(value))
128
128
129
129
case None ⇒
130
130
NoVal
131
131
}
132
132
133
133
def getDoubleEx (key : String ): Double = map.get(key) match {
134
134
case Some (value) ⇒
135
- handleKeyError (key, conv.convertToDoubleEx(value))
135
+ handleKeyLookupEx (key, conv.convertToDoubleEx(value))
136
136
137
137
case None ⇒
138
138
throw new IllegalArgumentException (" Unknown key %s" .format(key))
139
139
}
140
140
141
141
def getFloat (key : String ): Maybe [Float ] = map.get(key) match {
142
142
case Some (value) ⇒
143
- handleKeyError (key, conv.convertToFloat(value))
143
+ handleKeyLookup (key, conv.convertToFloat(value))
144
144
145
145
case None ⇒
146
146
NoVal
147
147
}
148
148
149
149
def getFloatEx (key : String ): Float = map.get(key) match {
150
150
case Some (value) ⇒
151
- handleKeyError (key, conv.convertToFloatEx(value))
151
+ handleKeyLookupEx (key, conv.convertToFloatEx(value))
152
152
153
153
case None ⇒
154
154
throw new IllegalArgumentException (" Unknown key %s" .format(key))
155
155
}
156
156
157
157
def getProps (key : String ): Maybe [Props ] = map.get(key) match {
158
158
case Some (value) ⇒
159
- handleKeyError (key, conv.convert[Props ](value))
159
+ handleKeyLookup (key, conv.convert[Props ](value))
160
160
161
161
case None ⇒
162
162
NoVal
163
163
}
164
164
165
165
def getPropsEx (key : String ): Props = map.get(key) match {
166
166
case Some (value) ⇒
167
- handleKeyError (key, conv.convertEx[Props ](value))
167
+ handleKeyLookupEx (key, conv.convertEx[Props ](value))
168
168
169
169
case None ⇒
170
170
throw new IllegalArgumentException (" Unknown key %s" .format(key))
@@ -173,7 +173,7 @@ class Props(val map: Map[String, String])(implicit conv: Converters = Converters
173
173
174
174
def getList (key : String , separatorRegex : String = " \\ s*,\\ s*" ) = map.get(key) match {
175
175
case Some (value) ⇒
176
- handleKeyError (key, value.split(separatorRegex).toList)
176
+ handleKeyLookupEx (key, value.split(separatorRegex).toList)
177
177
178
178
case None ⇒
179
179
Nil
0 commit comments