@@ -0,0 +1,2318 @@
+package no.ssb.vtl.model;%0A%0A/*-%0A * ========================LICENSE_START=================================%0A * Java VTL%0A * %25%25%0A * Copyright (C) 2016 - 2017 Hadrien Kohl%0A * %25%25%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A *      http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * =========================LICENSE_END==================================%0A */%0A%0Aimport com.google.common.collect.ImmutableMap;%0A%0Aimport java.util.Map;%0A%0A/**%0A * Represents a VTL Function.%0A */%0Apublic abstract class VTLFunction extends VTLExpression %7B%0A%0A    private final Map%3CString, VTLExpression%3E context;%0A%0A    protected VTLFunction(Map%3CString, VTLExpression%3E context) %7B%0A        this.context = context;%0A    %7D%0A%0A    public static Builder create(Class%3C? extends VTLObject%3E returnType) %7B%0A        return new Builder(returnType);%0A    %7D%0A%0A    @Override%0A    public Class%3C? extends VTLObject%3E getType() %7B%0A        return null;%0A    %7D%0A%0A    @FunctionalInterface%0A    interface Body %7B%0A        VTLObject execute();%0A    %7D%0A%0A    /**%0A     * Builder for VTLFunction.%0A     */%0A    private static class Builder %7B%0A%0A        private final Class%3C? extends VTLObject%3E type;%0A        ImmutableMap.Builder%3CString, Class%3C? extends VTLObject%3E%3E signature;%0A        ImmutableMap.Builder%3CString, VTLObject%3E defaultValues;%0A%0A        private Builder(Class%3C? extends VTLObject%3E type) %7B%0A            this.type = type;%0A        %7D%0A%0A        public Builder withArgument(String name, Class%3C? extends VTLObject%3E type) %7B%0A            signature.put(name, type);%0A            return this;%0A        %7D%0A%0A        public Builder withArgument(String name, VTLObject defaultValue) %7B%0A            defaultValues.put(name, defaultValue);%0A            return withArgument(name, defaultValue.getClass());%0A        %7D%0A%0A        public VTLFunction build(Map%3CString, VTLExpression%3E context) %7B%0A            throw new UnsupportedOperationException(%22TODO%22);%0A        %7D%0A    %7D%0A%7D%0A

Add a function class to the model