X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.commands%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcommands%2Finternal%2Fchecker%2FFunctionCheckItem.java;h=8d15d9a2973195521b6819154b212ea81181f391;hp=756f639af3b16756a6f75555678b89b5e5557dd4;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/internal/checker/FunctionCheckItem.java b/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/internal/checker/FunctionCheckItem.java index 756f639af..8d15d9a29 100644 --- a/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/internal/checker/FunctionCheckItem.java +++ b/bundles/org.simantics.scl.commands/src/org/simantics/scl/commands/internal/checker/FunctionCheckItem.java @@ -1,33 +1,33 @@ -package org.simantics.scl.commands.internal.checker; - -import java.util.List; - -import org.simantics.scl.compiler.types.Type; -import org.simantics.scl.runtime.function.Function; - -public class FunctionCheckItem implements CheckItem { - - Type parameterType; - CheckItem next; - - public FunctionCheckItem(Type parameterType, CheckItem next) { - this.parameterType = parameterType; - this.next = next; - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public boolean check(Object check, Object[] parameters, int pos) { - if(pos == parameters.length) - return true; - Object nextCheck = ((Function)check).apply(parameters[pos]); - return next.check(nextCheck, parameters, pos+1); - } - - @Override - public void collectParameterTypes(List types) { - types.add(parameterType); - next.collectParameterTypes(types); - } - -} +package org.simantics.scl.commands.internal.checker; + +import java.util.List; + +import org.simantics.scl.compiler.types.Type; +import org.simantics.scl.runtime.function.Function; + +public class FunctionCheckItem implements CheckItem { + + Type parameterType; + CheckItem next; + + public FunctionCheckItem(Type parameterType, CheckItem next) { + this.parameterType = parameterType; + this.next = next; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public boolean check(Object check, Object[] parameters, int pos) { + if(pos == parameters.length) + return true; + Object nextCheck = ((Function)check).apply(parameters[pos]); + return next.check(nextCheck, parameters, pos+1); + } + + @Override + public void collectParameterTypes(List types) { + types.add(parameterType); + next.collectParameterTypes(types); + } + +}