blob: fdd71ef3fffc79c31b122eeb98964909c99716e4 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
sources: generator.ftl
outputFile: ../../../../build/overloadedNumberRules.java
data: {
t: csv(prices.csv, { separator: ',' })
# Conversion target types sorted by decreasing probablity of occurence
toCsFreqSorted: [ Integer, Long, Double, Float, Byte, Short, BigDecimal, BigInteger ]
# Conversion target types associated to conversion price boost. The prices from the spreadsheet
# will be multipied by 10000 and the boost will be added to it. Thus, if the price of two possible
# targets are the same according the spreadsheet (and only then!), the choice will depend on
# this boost.
# The more specific the (the smaller) type is, the lower the boost should be. This is improtant,
# because this number is also used for comparing the specificity of numerical types where
# there's no argument type available.
# Note where the price from the spreadsheet is 0 or "-" or "N/A", the boost is not used.
toCsCostBoosts: {
'Byte': 1, 'Short': 2, 'Integer': 3, 'Long': 4, 'BigInteger': 5,
'Float': 6, 'Double': 7,
'BigDecimal': 8
}
# Conversion source types sorted by decreasing probablity of occurence
fromCsFreqSorted: [
Integer,
IntegerBigDecimal,
BigDecimal,
Long,
Double,
Float,
Byte,
BigInteger,
LongOrInteger
DoubleOrFloat,
DoubleOrIntegerOrFloat,
DoubleOrInteger,
DoubleOrLong,
IntegerOrByte,
DoubleOrByte,
LongOrByte
Short,
LongOrShort
ShortOrByte
FloatOrInteger,
FloatOrByte,
FloatOrShort,
BigIntegerOrInteger,
BigIntegerOrLong,
BigIntegerOrDouble,
BigIntegerOrFloat,
BigIntegerOrByte,
IntegerOrShort,
DoubleOrShort,
BigIntegerOrShort,
]
}