## Examples of Function

• abstrasy.Function
sor.eu/eupl Sauf obligation légale ou contractuelle écrite, le logiciel distribué sous la Licence est distribué "en l’état", SANS GARANTIES OU CONDITIONS QUELLES QU’ELLES SOIENT, expresses ou implicites. Consultez la Licence pour les autorisations et les restrictions linguistiques spécifiques relevant de la Licence. @author Luc Bruninx @version 1.0
• aima.core.logic.fol.parsing.ast.Function
@author Ravi Mohan @author Ciaran O'Reilly
• anvil.script.Function
interface Function @author : Jani Lehtim�ki
• at.salzburgresearch.nodekeeper.eca.function.Function
...

Author: Thomas Kurz (tkurz@apache.org)

• ca.nengo.math.Function

A mathematical function from an n-D space to a 1-D space. For simplicity we always map to a 1-D space, and model maps to n-D spaces with n Functions.

Instances of Function are immutable once they are created (ie their parameters do not change over time).

@author Bryan Tripp
• caltrop.interpreter.Function
Interface Function marks a given {@link Operation} as a function, as opposed to being a {@link Filter}.

A Function is responsible for taking Tuple arguments and returning one or more result Tuples.

To implement a Function, (optionally) sub-class {@link BaseOperation} and have the new sub-class {@code implement}this interface.

• chunmap.util.Function
@author yangjiandong
• co.nubetech.crux.model.Function
• com.alibaba.druid.sql.visitor.functions.Function
• com.barrybecker4.common.math.function.Function
Defines interface for generic 1-1 function f(x). @author Barry Becker
• com.basho.riak.client.core.query.functions.Function
A Function for use with bucket properties or asMap reduce. Instances are created via the provided static factory methods or by using the Builder. @author Brian Roach @since 2.0
• com.dubture.twig.core.model.Function
... DLTK {@link SourceMethod} is private .... @author Robert Gruendler
• com.emitrom.touch4j.client.core.Function
Generic interface to use as callback
• com.firefly.template.Function
• com.gemstone.gemfire.cache.execute.Function
example "feed_attribute == 30" can be represented as: FeedId feedId = (FeedId of Feed associated with feed_attribute) FeedAttributeId feedAttributeId = (FeedAttributeId of feed_attribute) Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new FeedAttributeOperand(feedId, feedAttributeId))); function.setOperator(Operator.IN); function.setRhsOperand( Arrays.asList((Operand) new ConstantOperand(30L))); // Another example matching on multiple values: "feed_item_id IN (10, 20, 30)" can be represented as: Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID))); function.setOperator(Operator.IN); function.setRhsOperand(Arrays.asList( (Operand) new ConstantOperand(10L), new ConstantOperand(20L), new ConstantOperand(30L)));
example "feed_attribute == 30" can be represented as: FeedId feedId = (FeedId of Feed associated with feed_attribute) FeedAttributeId feedAttributeId = (FeedAttributeId of feed_attribute) Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new FeedAttributeOperand(feedId, feedAttributeId))); function.setOperator(Operator.IN); function.setRhsOperand( Arrays.asList((Operand) new ConstantOperand(30L))); // Another example matching on multiple values: "feed_item_id IN (10, 20, 30)" can be represented as: Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID))); function.setOperator(Operator.IN); function.setRhsOperand(Arrays.asList( (Operand) new ConstantOperand(10L), new ConstantOperand(20L), new ConstantOperand(30L)));
example "feed_attribute == 30" can be represented as: FeedId feedId = (FeedId of Feed associated with feed_attribute) FeedAttributeId feedAttributeId = (FeedAttributeId of feed_attribute) Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new FeedAttributeOperand(feedId, feedAttributeId))); function.setOperator(Operator.IN); function.setRhsOperand( Arrays.asList((Operand) new ConstantOperand(30L))); // Another example matching on multiple values: "feed_item_id IN (10, 20, 30)" can be represented as: Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID))); function.setOperator(Operator.IN); function.setRhsOperand(Arrays.asList( (Operand) new ConstantOperand(10L), new ConstantOperand(20L), new ConstantOperand(30L)));
example "feed_attribute == 30" can be represented as: FeedId feedId = (FeedId of Feed associated with feed_attribute) FeedAttributeId feedAttributeId = (FeedAttributeId of feed_attribute) Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new FeedAttributeOperand(feedId, feedAttributeId))); function.setOperator(Operator.IN); function.setRhsOperand( Arrays.asList((Operand) new ConstantOperand(30L))); // Another example matching on multiple values: "feed_item_id IN (10, 20, 30)" can be represented as: Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID))); function.setOperator(Operator.IN); function.setRhsOperand(Arrays.asList( (Operand) new ConstantOperand(10L), new ConstantOperand(20L), new ConstantOperand(30L)));
example "feed_attribute == 30" can be represented as: FeedId feedId = (FeedId of Feed associated with feed_attribute) FeedAttributeId feedAttributeId = (FeedAttributeId of feed_attribute) Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new FeedAttributeOperand(feedId, feedAttributeId))); function.setOperator(Operator.IN); function.setRhsOperand( Arrays.asList((Operand) new ConstantOperand(30L))); // Another example matching on multiple values: "feed_item_id IN (10, 20, 30)" can be represented as: Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID))); function.setOperator(Operator.IN); function.setRhsOperand(Arrays.asList( (Operand) new ConstantOperand(10L), new ConstantOperand(20L), new ConstantOperand(30L)));
example "feed_attribute == 30" can be represented as: FeedId feedId = (FeedId of Feed associated with feed_attribute) FeedAttributeId feedAttributeId = (FeedAttributeId of feed_attribute) Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new FeedAttributeOperand(feedId, feedAttributeId))); function.setOperator(Operator.IN); function.setRhsOperand( Arrays.asList((Operand) new ConstantOperand(30L))); // Another example matching on multiple values: "feed_item_id IN (10, 20, 30)" can be represented as: Function function = new Function(); function.setLhsOperand( Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID))); function.setOperator(Operator.IN); function.setRhsOperand(Arrays.asList( (Operand) new ConstantOperand(10L), new ConstantOperand(20L), new ConstantOperand(30L)));
Determines an output value based on an input value. @author Kevin Bourrillion @since Guava release 02 (imported from Google Collections Library)
Extend this class to implement functions callbacks.
Interface for functions. When a function is called, its arguments have already been evaluated down into non-error values.
• com.grits.objects.Function
• com.gwtext.client.core.Function
Generic callback interface. @author Sanjiv Jivan
• com.iisigroup.cap.auth.model.Function
權限物件
• com.intellij.util.Function
@author max @author Konstantin Bulenkov
• com.jetdrone.vertx.yoke.engine.Function
# Function
• com.kenai.jffi.Function
Native function invocation context This class holds all the information that JFFI needs to correctly call a native function.
• com.moreemrecife.jpa.Function
The persistent class for the function database table.
• com.odiago.flumebase.lang.Function
Abstract base class that defines a callable function. Subclasses of this exist for scalar, aggregate, and table functions.
• com.orange.wink.parse.objects.Function
@author Sylvain Lalande
• com.puppetlabs.geppetto.pp.pptp.Function
A representation of the model object 'Function'.

The following features are supported:

• {@link com.puppetlabs.geppetto.pp.pptp.Function#isRValue RValue}

@see com.puppetlabs.geppetto.pp.pptp.PPTPPackage#getFunction() @model @generated
• com.scooterframework.orm.sqldataexpress.object.Function
Function class. A function is essentially a stored procedure that returns a result. @author (Fei) John Chen
• com.smartgwt.client.core.Function
Generic callback interface.
• com.sun.jna.Function
An abstraction for a native function pointer. An instance of `Function` represents a pointer to some native function. {@link #invoke(Class,Object[],Map)} is the primary means to callthe function.

Function call behavior may be modified by passing one of the following call flags:

• {@link Function#C_CONVENTION} Use C calling convention (default)
• {@link Function#ALT_CONVENTION} Use alternate calling convention (e.g. stdcall)
• {@link Function#THROW_LAST_ERROR} Throw a {@link LastErrorException} ifthe native function sets the system error to a non-zero value (errno or GetLastError). Setting this flag will cause the system error to be cleared prior to native function invocation.
@author Sheng Liang, originator @author Todd Fast, suitability modifications @author Timothy Wall @see Pointer
• com.sun.org.apache.xpath.internal.functions.Function
This is a superclass of all XPath functions. This allows two ways for the class to be called. One method is that the super class processes the arguments and hands the results to the derived class, the other method is that the derived class may process it's own arguments, which is faster since the arguments don't have to be added to an array, but causes a larger code footprint. @xsl.usage advanced
• com.sun.xacml.cond.Function
Interface that all functions in the system must implement. @since 1.0 @author Seth Proctor
• com.volantis.xml.expression.Function
A function within XPath.

Implementations of this must be thread safe and must not maintain any invocation specific state.

@volantis-api-include-in PublicAPI @volantis-api-include-in ProfessionalServicesAPI @volantis-api-include-in InternalAPI
• de.caterdev.modelling.process.epc.Function
• de.innovationgate.ext.org.mozilla.javascript.Function
• edu.stanford.nlp.optimization.Function
An interface for double-valued functions over double arrays. @author Dan Klein @version 1.0 @since 1.0
• functions.Function
@author true
• gargl.typedefinitions.Function
• gri.gridp.modules.Function
Object describing a single function or a way in which a program can be run. @author dan.rogers
• io.crate.planner.symbol.Function
• jcgp.backend.function.Function
Function is a callback wrapper.

A concrete implementation of Function overrides {@code run()} to performany arbitrary operation on the arguments specified. It must also override {@code getArity()} to return the function arity. @author Eduardo Pedroni
• jmathexpr.func.Function
@author Elemér Furka
• ket.math.Function
A function maps from Arguments to other Arguments.
• kodkod.ast.RelationPredicate.Function
• name.abuchen.portfolio.math.NewtonGoalSeek.Function
• net.hydromatic.optiq.Function
Named expression that accepts parameters and returns a result.

The application may occur at compile time (for a macro) or at run time (for a regular function). The result may be a relation, and so might any of the parameters.

Functions are registered in a {@link Schema}, and may be queried by name ( {@link Schema#getFunctions(String)}) then overloads resolved based on parameter types.

@see TableMacro @see ScalarFunction
• net.sf.doodleproject.numerics4j.function.Function
orld.wolfram.com/Function.html"> http://mathworld.wolfram.com/Function.html
• @version \$Revision: 1.2 \$ \$Date: 2007/10/25 04:44:15 \$
• net.sf.jpluck.plucker.functions.Function
• net.sf.jsqlparser.expression.Function
A function as MAX,COUNT...
• net.sf.minuteProject.configuration.bean.model.data.Function
• net.sourceforge.htmlunit.corejs.javascript.Function
This is interface that all functions in JavaScript must implement. The interface provides for calling functions and constructors. @see net.sourceforge.htmlunit.corejs.javascript.Scriptable @author Norris Boyd
• net.sourceforge.marathon.api.module.Function
• nexj.core.scripting.Function
Interface for invoking a function.
• nodebox.function.Function
Function wraps any kind of callable.
• noop.model.Function
@author alexeagle@google.com (Alex Eagle)
• org.apache.cassandra.cql3.functions.Function
• org.apache.commons.jxpath.Function
Extension function interface. Extension functions are grouped into {@link Functions Functions} objects, which are installed onJXPathContexts using the {@link JXPathContext#setFunctions JXPathContext.setFunctions()}call.

The Function interface can be implemented directly. However, most of the time JXPath's built-in implementations should suffice. See {@link ClassFunctions ClassFunctions} and {@link PackageFunctions PackageFunctions}. @author Dmitri Plotnikov @version \$Revision: 1.5 \$ \$Date: 2003/03/11 00:59:12 \$

• org.apache.felix.service.command.Function
A Function is a a block of code that can be executed with a set of arguments, it returns the result object of executing the script.
• org.apache.jmeter.functions.Function
Methods that a function must implement
• org.apache.poi.hssf.record.formula.functions.Function
@author Amol S. Deshmukh < amolweb at ya hoo dot com >Function serves as a marker interface.
• org.apache.poi.ss.formula.functions.Function
Common interface for all implementations of Excel built-in functions. @author Amol S. Deshmukh < amolweb at ya hoo dot com >
• org.apache.tajo.catalog.function.Function
• org.apache.vxquery.functions.Function
• org.apache.ws.jaxme.sqls.Function
@author Jochen Wiedmann
• org.apache.xpath.functions.Function
This is a superclass of all XPath functions. This allows two ways for the class to be called. One method is that the super class processes the arguments and hands the results to the derived class, the other method is that the derived class may process it's own arguments, which is faster since the arguments don't have to be added to an array, but causes a larger code footprint.
• org.atmosphere.wasync.Function
A function is asynchronously invoked when a response is received, complete or not.

This library supports predefined life cycle's events (@link Event} that can be used. For example, a Function can be defined for handling IOException:

`  class Function<IOException>() { public void on(IOEXception ex) { } } `
This function can be registered using the {@link Socket#on(Function)} as
`  socket.on(new Function<IOEXception>() { .... } `
This is the equivalent of doing
`  socket.on(Event.ERROR, new Function<IOEXception>() { .... } `
Anonymous functions call also be invoked if a {@link Decoder} match its type
`  socket.decoder(new Decoder<String, POJO>(){ @Override public POJO decode(Event e, String message) { return new POJO(message); } }  .on(new Function<POJO>() { .... } `
@param < T> @author Jeanfrancois Arcand
• org.auraframework.impl.expression.functions.Function
the thing that actually executes some function in the formula engine
• org.cfeclipse.cfml.dictionary.Function
This is a function. Functions are like tags except they have a return type. A function derives from the Procedure class but as mentioned a moment ago, it has a return value. @author Rob
• org.cfeclipse.cfmledit.dictionary.Function
• org.drools.clips.Function
• org.drools.core.rule.Function
• org.drools.eclipse.core.Function
This represents a function.
• org.drools.rule.Function
• org.eclipse.sapphire.modeling.el.Function
@author Konstantin Komissarchik
• org.foray.fotree.value.Function
Abstract superclass for all XSL-FO functions.
• org.formulacompiler.compiler.Function
• org.gdbms.engine.function.Function
Interface to be implemented to create a function. The name will be the string used in the SQL to refeer the function. A function will be created once for each instruction execution.
• org.gephi.appearance.api.Function
@author mbastian
• org.h2.expression.Function
This class implements most built-in functions of this database.
• org.hisrc.jscm.codemodel.expression.JSFunctionExpression.Function
• org.jaxen.Function
Interface for the extensible function framework.

NOTE: This class is not typically used directly, but is exposed for writers of extended XPath packages.

Implementations of `Function` are functors which are used to evaluate a function-call within an XPath expression.

@see FunctionContext @author bob mcwhirter
• org.jboss.gwt.flow.client.Function
An execution delegate able to control the outcome. @author Heiko Braun @date 3/8/13
• org.jboss.security.xacml.sunxacml.cond.Function
Interface that all functions in the system must implement. @since 1.0 @author Seth Proctor
• org.jenetics.util.Function
A function of 1 parameter. @author Franz Wilhelmstötter @since 1.0 @version 1.0 — \$Date\$
• org.jfree.report.expressions.Function
The interface for report functions. A report function separates the business logic from presentation of the result.

Since JFreeReport 0.9 functions are considered immutable. During the advancement process, the function returns a new instance with the updated state. @author Thomas Morgner

• org.jitterbit.integration.data.function.Function
TODO: Write this. @author Torgil Zethson
• org.jitterbit.integration.data.script.Function
Defines a function in the Formula Builder. @author Torgil Zethson @since 1.2
• org.lealone.expression.Function
This class implements most built-in functions of this database.
• org.maltparserx.core.feature.function.Function
@author Johan Hall
• org.mozilla.javascript.Function
This is interface that all functions in JavaScript must implement. The interface provides for calling functions and constructors. @see org.mozilla.javascript.Scriptable @author Norris Boyd
• org.mvel2.ast.Function
• org.openbel.bel.xbel.model.Function
• org.openbel.framework.common.lang.Function
The base class of the immutable BEL function model.

TODO: The function model currently lacks unit tests

• org.opengis.filter.expression.Function
is.org/docs/02-059.pdf">Implementation specification 1.0 @version Symbology Encoding Implementation Specification 1.1.0 @author Chris Dillard (SYS Technologies) @since GeoAPI 2.0
• org.openiaml.model.model.Function
• org.openquark.cal.compiler.Function
Provides an implementation of FunctionalAgent suitable for use in the type checker with functions or pattern bound variables.

Creation date: (6/6/01 2:00:01 PM) @author Bo Ilic

• org.openrdf.query.algebra.evaluation.function.Function
@author Arjohn Kampman
• org.osgi.service.command.Function
A Function is a a block of code that can be executed with a set of arguments, it returns the result object of executing the script. TODO The javadoc in this class need a good scrub before release. @ThreadSafe @version \$Revision: 5654 \$
• org.pentaho.reporting.engine.classic.core.function.Function
The interface for report functions. A report function separates the business logic from presentation of the result. The function is called whenever JFreeReport changes its state while generating the report. The working model for the functions is based on cloning the state of the function on certain checkpoints to support the ReportState implementation of JFreeReport.

Although functions support the ReportListener interface, they are not directly added to a report. A report FunctionCollection is used to control the functions. Functions are required to be cloneable.

@author Thomas Morgner

• org.pirkaengine.core.expression.Function
関数クラス. @author shuji.w6e @since 0.1.0
• org.qi4j.functional.Function
Generic function interface to map from one type to another. This can be used with the Iterables methods to transform lists of objects. @param < From> @param < To>
• org.rendersnake.js.Function
• org.sf.feeling.swt.win32.extension.function.Function
Win32 dll function utility class. @author cnfree
• org.sonar.api.issue.action.Function
@since 3.6
• org.springframework.data.repository.query.spi.Function
Value object to represent a function. Can either be backed by a static {@link Method} invocation (see{@link #Function(Method)}) or a method invocation on an instance (see {@link #Function(Method,Object)}. @author Thomas Darimont @author Oliver Gierke @since 1.9
• org.springframework.data.solr.core.query.Function
@author Christoph Strobl @since 1.1
• org.springmodules.validation.valang.functions.Function

A function is an implementation that returns a value based on one of more arguments. A function instance is created for each occurrence of the function in the validation language. @author Steven Devijver @since Apr 23, 2005

• org.syrup.Function
The function of a Task that is executed by a Worker. A concrete implementation must be a stateless (pure) Function; the Result after execution must solely depend on the Context. @author Robbert van Dalen
• org.teiid.language.Function
Represents a function. A function has a name and 0..n Expressions that are parameters.
• org.teiid.query.sql.symbol.Function
Represents a function in a sql statement. A function is a type of expression. Functions have a name and some arguments (0..n). Each argument is also an expression. After resolution, a function should have a type and a function descriptor.
• org.zkoss.openlayers.util.Function
A Javascript Object @author jumperchen
• org.zkoss.xel.Function
Represents a XEL function. @author tomyeh @since 3.0.0
• our.apache.commons.jxpath.Function
• prefuse.data.expression.Function
rg">jeffrey heer
• ptolemy.data.Function
The interface for functions contained by function tokens. @author Xiaojun Liu, Steve Neuendorffer @version \$Id: Function.java,v 1.14 2007/12/07 06:31:17 cxh Exp \$ @since Ptolemy II 4.0 @Pt.ProposedRating Yellow (liuxj) @Pt.AcceptedRating Red (liuxj)
• r.nodes.ast.Function
• railo.transformer.bytecode.statement.udf.Function
• swifu.main.Function
• term02.m04_d27.functions.Function
• tree.Function
The Class FunctionNode. @author Anatoly Kondratyev
• util.Function
• webit.script.Function
Exported function. @since 1.5.0 @author zqq
• xbird.xquery.func.Function
@author Makoto YUI (yuin405+xbird@gmail.com)

• ### Examples of abstrasy.Function

 `535455565758596061626364656667686970` ```         if (res == null)             return Node.createNothing();         Function fx = (Function) res.getExternal();         if (!fx.isOverrided())             return Node.createNothing();         res = fx.getSuperFx();         if (res == null)             return Node.createNothing();         else             return res; ```
View Full Code Here

### Examples of aima.core.logic.fol.parsing.ast.Function

 `174175176177178179180181182183184185` ```      // ((consp x) (or (occurs-in? var (first x) subst) (occurs-in? var       // (rest x) subst)))     } else if (x instanceof Function) {       // (or (occurs-in? var (first x) subst) (occurs-in? var (rest x)       // subst)))       Function fx = (Function) x;       for (Term fxt : fx.getArgs()) {         if (occurCheck(theta, var, fxt)) {           return true;         }       }     } ```
View Full Code Here

### Examples of anvil.script.Function

 `178179180181182183184185186187188189190` ```  {     switch(_typecode) {     case Type.CLASS:       {         ClassType type = (ClassType)_type;         Function ctor = type.getConstructor();         if (ctor != null) {           return ctor.execute(context, parameters);         }         throw context.InstantiationError("No constructor for "+type);       }       ```
View Full Code Here

### Examples of at.salzburgresearch.nodekeeper.eca.function.Function

 `209210211212213214215216217218219220221222223` ```                                     String name  = bindingElement.getAttribute("name");                                     String type  = bindingElement.getAttribute("type");                                     if(type==null || type.equals("")) {                                         Function f = new StaticValueFunction();                                         f.init(bindingElement.getTextContent().trim());                                         rule.bindings.add(new Binding(name,f));                                     } else {                                         Function f = createFunction(type,bindingElement.getChildNodes());                                         rule.bindings.add(new Binding(name,f));                                     }                                 }                             }                         } ```
View Full Code Here

### Examples of ca.nengo.math.Function

 `7475767778798081828384` ```     *      Creates the function through reflection of its constructor and      *      passing the user parameters to it      */     public void completeConfiguration(ConfigResult props) throws ConfigException {         try {             Function function = createFunction(props);             setFunction(function);         } catch (Exception e) {             throw new ConfigException("Error creating function");         }     } ```
View Full Code Here

### Examples of caltrop.interpreter.Function

 `106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769` ```            public int arity() {                 return 1;             }         }));         env.bind("SOP", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     System.out.println(args[0]);                     return args[0];                 } catch (Exception ex) {                     throw new FunctionCallException("SOP", args[0], ex);                 }             }             public int arity() {                 return 1;             }         }));         env.bind("logValue", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     PrintStream output = new PrintStream(new FileOutputStream(                             _theContext.stringValue(args[0]), true));                     output.println(args[1].toString());                     output.close();                     return args[1];                 } catch (Exception ex) {                     throw new FunctionCallException("logValue", args[0], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("Integers", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     int a = _theContext.intValue(args[0]);                     int b = _theContext.intValue(args[1]);                     List res = (b < a) ? Collections.EMPTY_LIST                             : new IntegerList(_theContext, a, b);                     return _theContext.createList(res);                 } catch (Exception ex) {                     throw new FunctionCallException("Integers", args[0],                             args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$not", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     BooleanToken b = (BooleanToken) args[0];                     return b.not();                 } catch (Exception ex) {                     throw new FunctionCallException("\$not", args[0], ex);                 }             }             public int arity() {                 return 1;             }         }));         env.bind("\$and", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     BooleanToken a = (BooleanToken) args[0];                     BooleanToken b = (BooleanToken) args[1];                     return a.and(b);                 } catch (Exception ex) {                     throw new FunctionCallException("\$and", args[0], args[1],                             ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$or", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     BooleanToken a = (BooleanToken) args[0];                     BooleanToken b = (BooleanToken) args[1];                     return a.or(b);                 } catch (Exception ex) {                     throw new FunctionCallException("\$or", args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$eq", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     Token b = (Token) args[1];                     return a.isEqualTo(b);                 } catch (Exception ex) {                     throw new FunctionCallException("\$eq", args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$ne", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     Token b = (Token) args[1];                     return a.isEqualTo(b).not();                 } catch (Exception ex) {                     throw new FunctionCallException("\$ne", args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$lt", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     ScalarToken a = (ScalarToken) args[0];                     ScalarToken b = (ScalarToken) args[1];                     return a.isLessThan(b);                 } catch (Exception ex) {                     throw new FunctionCallException("\$lt", args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$le", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     ScalarToken a = (ScalarToken) args[0];                     ScalarToken b = (ScalarToken) args[1];                     return a.isGreaterThan(b).not();                 } catch (Exception ex) {                     throw new FunctionCallException("\$le", args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$gt", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     ScalarToken a = (ScalarToken) args[0];                     ScalarToken b = (ScalarToken) args[1];                     return a.isGreaterThan(b);                 } catch (Exception ex) {                     throw new FunctionCallException("\$gt", args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$ge", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     ScalarToken a = (ScalarToken) args[0];                     ScalarToken b = (ScalarToken) args[1];                     return a.isLessThan(b).not();                 } catch (Exception ex) {                     throw new FunctionCallException("\$ge", args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$negate", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     ScalarToken a = (ScalarToken) args[0];                     return a.zero().subtract(a);                 } catch (Exception ex) {                     throw new FunctionCallException("\$negate", args[0], ex);                 }             }             public int arity() {                 return 1;             }         }));         env.bind("\$add", _theContext.createFunction(new Function() {             // Compute the add operation on scalar arguments, the             // list concatenation operation on lists, or the set             // union on sets.             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     Token b = (Token) args[1];                     if (a instanceof ObjectToken && b instanceof ObjectToken) {                         Object oa = ((ObjectToken) a).getValue();                         Object ob = ((ObjectToken) b).getValue();                         if (oa instanceof Collection                                 && ob instanceof Collection) {                             Collection result;                             if (oa instanceof Set) {                                 result = new HashSet((Set) oa);                             } else if (oa instanceof List) {                                 result = new ArrayList((List) oa);                             } else {                                 throw new Exception(                                         "Unknown object type: expected Set or List.");                             }                             result.addAll((Collection) ob);                             return new ObjectToken(result);                         } else {                             throw new Exception(                                     "Unknown object types: expected Collection.");                         }                     } else {                         return a.add(b);                     }                 } catch (Exception ex) {                     throw new FunctionCallException("\$add", args[0], args[1],                             ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$mul", _theContext.createFunction(new Function() {             // Compute the multiply operation on scalar arguments,             // or the set intersection operation on sets.             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     Token b = (Token) args[1];                     if (a instanceof ObjectToken && b instanceof ObjectToken) {                         Object oa = ((ObjectToken) a).getValue();                         Object ob = ((ObjectToken) b).getValue();                         if (oa instanceof Set && ob instanceof Collection) {                             Set result = new HashSet((Set) oa);                             result.retainAll((Collection) ob);                             return new ObjectToken(result);                         } else {                             throw new InterpreterException(                                     "Unknown object types: expected Set and Collection.");                         }                     } else {                         return a.multiply(b);                     }                 } catch (Exception ex) {                     throw new FunctionCallException("\$mul", args[0], args[1],                             ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$sub", _theContext.createFunction(new Function() {             // Compute the subtraction operation on scalar arguments,             // or the set subtraction operation on sets.             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     Token b = (Token) args[1];                     if (a instanceof ObjectToken && b instanceof ObjectToken) {                         Object oa = ((ObjectToken) a).getValue();                         Object ob = ((ObjectToken) b).getValue();                         if (oa instanceof Collection                                 && ob instanceof Collection) {                             Collection result;                             if (oa instanceof Set) {                                 result = new HashSet((Set) oa);                             } else if (oa instanceof List) {                                 result = new ArrayList((List) oa);                             } else {                                 throw new Exception(                                         "Unknown object type: expected Set or List.");                             }                             result.removeAll((Collection) ob);                             return new ObjectToken(result);                         } else {                             throw new InterpreterException(                                     "Unknown object types: expected Collection.");                         }                     } else {                         return a.subtract(b);                     }                 } catch (Exception ex) {                     throw new FunctionCallException("\$sub", args[0], args[1],                             ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$div", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     Token b = (Token) args[1];                     return a.divide(b);                 } catch (Exception ex) {                     throw new FunctionCallException("\$div", args[0], args[1],                             ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$mod", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     Token b = (Token) args[1];                     return a.modulo(b);                 } catch (Exception ex) {                     throw new FunctionCallException("\$mod", args[0], args[1],                             ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$size", _theContext.createFunction(new Function() {             // Compute the number of elements in the given set,             // list, or array.             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     if (a instanceof ObjectToken) {                         Object oa = ((ObjectToken) a).getValue();                         if (oa instanceof Collection) {                             return new IntToken(((Collection) oa).size());                         } else {                             throw new InterpreterException(                                     "Unknown object type: expected Collection.");                         }                     } else if (a instanceof ArrayToken) {                         return _theContext.createInteger(((ArrayToken) a)                                 .length());                     } else {                         throw new InterpreterException(                                 "Unknown type: expected Array, Set, or List");                     }                 } catch (Exception ex) {                     throw new FunctionCallException("\$size", args[0], ex);                 }             }             public int arity() {                 return 1;             }         }));         env.bind("\$createList", _theContext.createFunction(new Function() {             // Create a list that contains the results of applying             // the second argument (a one argument function) to             // every element in the first argument (a collection).             public Object apply(Object[] args) {                 try {                     Collection c = _theContext.getCollection(args[0]);                     FunctionToken f = (FunctionToken) args[1];                     Object[] argument = new Object[1];                     List res = new ArrayList();                     for (Iterator i = c.iterator(); i.hasNext();) {                         argument[0] = i.next();                         Object listFragment = _theContext.applyFunction(f,                                 argument);                         res.addAll(_theContext.getCollection(listFragment));                     }                     return _theContext.createList(res);                 } catch (Exception ex) {                     throw new FunctionCallException("Failed to create list.",                             args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$createSet", _theContext.createFunction(new Function() {             // Create a set that contains the results of applying             // the second argument (a one argument function) to             // every element in the first argument (a collection).             public Object apply(Object[] args) {                 try {                     Collection c = _theContext.getCollection(args[0]);                     FunctionToken f = (FunctionToken) args[1];                     Object[] argument = new Object[1];                     Set res = new HashSet();                     for (Iterator i = c.iterator(); i.hasNext();) {                         argument[0] = i.next();                         Object setFragment = _theContext.applyFunction(f,                                 argument);                         res.addAll(_theContext.getCollection(setFragment));                     }                     return _theContext.createSet(res);                 } catch (Exception ex) {                     throw new FunctionCallException("Failed to create set.",                             args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$createMap", _theContext.createFunction(new Function() {             // Create a map that contains the results of applying             // the second argument (a one argument function) to             // every element in the first argument (a collection).             public Object apply(Object[] args) {                 try {                     Collection c = _theContext.getCollection(args[0]);                     FunctionToken f = (FunctionToken) args[1];                     Object[] argument = new Object[1];                     Map res = new HashMap();                     for (Iterator i = c.iterator(); i.hasNext();) {                         argument[0] = i.next();                         Object mapFragment = _theContext.applyFunction(f,                                 argument);                         res.putAll(_theContext.getMap(mapFragment));                     }                     return _theContext.createMap(res);                 } catch (Exception ex) {                     throw new FunctionCallException("Failed to create map.",                             args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("\$iterate", _theContext.createProcedure(new Procedure() {             // Invoke the second argument (a one argument             // procedure) on every element of the first argument             // (a collection).             public void call(Object[] args) {                 try {                     Collection c = _theContext.getCollection(args[0]);                     Object proc = args[1];                     Object[] argument = new Object[1];                     for (Iterator i = c.iterator(); i.hasNext();) {                         argument[0] = i.next();                         _theContext.callProcedure(proc, argument);                     }                 } catch (Exception ex) {                     throw new FunctionCallException("Iteration failed.",                             args[0], args[1], ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("listToArray", _theContext.createFunction(new Function() {             // Convert the given list to an array.             public Object apply(Object[] args) {                 try {                     ObjectToken input = (ObjectToken) args[0];                     List inputList = (List) input.getValue();                     Token[] tokens = new Token[inputList.size()];                     tokens = (Token[]) inputList.toArray(tokens);                     return new ArrayToken(tokens);                 } catch (Exception ex) {                     throw new FunctionCallException("listToArray", args[0], ex);                 }             }             public int arity() {                 return 1;             }         }));         env.bind("listToMatrix", _theContext.createFunction(new Function() {             // Convert the given list to an array.             public Object apply(Object[] args) {                 try {                     ObjectToken input = (ObjectToken) args[0];                     List inputList = (List) input.getValue();                     Token[] tokens = new Token[inputList.size()];                     tokens = (Token[]) inputList.toArray(tokens);                     int rows = _theContext.intValue(args[1]);                     int columns = _theContext.intValue(args[2]);                     return MatrixToken.arrayToMatrix(tokens, rows, columns);                 } catch (Exception ex) {                     throw new FunctionCallException("listToArray", args[0], ex);                 }             }             public int arity() {                 return 3;             }         }));         //         // Xilinx SystemBuilder         //         //        constant YSCALE:   INT19 := conv_signed( integer( 1.164 * 256), 19 );         //        constant RSCALE:   INT19 := conv_signed( integer( 1.596 * 256), 19 );         //        constant GUSCALE:  INT19 := conv_signed( integer(-0.392 * 256), 19 );         //        constant GVSCALE:  INT19 := conv_signed( integer(-0.813 * 256), 19 );         //        constant BSCALE:   INT19 := conv_signed( integer( 2.017 * 256), 19 );         //        constant YOFFSET:  INT19 := conv_signed(                    16, 19 );         //        constant UVOFFSET: INT19 := conv_signed(                   128, 19 );         //         //        constant UINT9_zero: UINT9 := (others => '0' );         //         //        function INT19_mul( a: INT19; b: INT19 ) return INT19;         //        function RGBCLIP( a: INT19 ) return UINT8;         env.bind("UINT9_zero", _theContext.createInteger(0));         env.bind("YSCALE", _theContext.createInteger((int) (1.164 * 256)));         env.bind("RSCALE", _theContext.createInteger((int) (1.596 * 256)));         env.bind("GUSCALE", _theContext.createInteger((int) (-0.392 * 256)));         env.bind("GVSCALE", _theContext.createInteger((int) (-0.813 * 256)));         env.bind("BSCALE", _theContext.createInteger((int) (2.017 * 256)));         env.bind("YOFFSET", _theContext.createInteger(16));         env.bind("UVOFFSET", _theContext.createInteger(128));         env.bind("INT19_mul", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     IntToken a = (IntToken) args[0];                     IntToken b = (IntToken) args[1];                     int res = (a.intValue() * b.intValue()); // & 0x7ffff;                     return _theContext.createInteger(res);                 } catch (Exception ex) {                     throw new InterpreterException(                             "Function 'RGBCLIP': Cannot apply.", ex);                 }             }             public int arity() {                 return 2;             }         }));         env.bind("RGBCLIP", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     if (a instanceof IntToken) {                         int n = ((IntToken) a).intValue() / 256;                         int res = (n > 255) ? 255 : ((n < 0) ? 0 : n);                         return _theContext.createInteger(res);                     } else {                         throw new InterpreterException(                                 "RGBCLIP needs an IntToken.");                     }                 } catch (Exception ex) {                     throw new InterpreterException(                             "Function 'RGBCLIP': Cannot apply.", ex);                 }             }             public int arity() {                 return 1;             }         }));         env.bind("readByte", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     if (a instanceof ObjectToken) {                         InputStream s = (InputStream) ((ObjectToken) a)                                 .getValue();                         return _theContext.createInteger(s.read());                     } else {                         throw new InterpreterException("readByte needs a file.");                     }                 } catch (Exception ex) {                     throw new InterpreterException(                             "Function 'readByte': Cannot apply.", ex);                 }             }             public int arity() {                 return 1;             }         }));         env.bind("openFile", _theContext.createFunction(new Function() {             public Object apply(Object[] args) {                 try {                     Token a = (Token) args[0];                     if (a instanceof StringToken) { ```
View Full Code Here

### Examples of cascading.operation.Function

 `113114115116117118119120121122123` ```    sources.put( "lower", sourceLower );     sources.put( "upper", sourceUpper );     Tap sink = getPlatform().getTextFile( new Fields( "line" ), getOutputPath( "cogroup" ), SinkMode.REPLACE );     Function splitter = new RegexSplitter( new Fields( "num", "char" ), " " );     Pipe pipeLower = new Each( new Pipe( "lower" ), new Fields( "line" ), splitter );     Pipe pipeUpper = new Each( new Pipe( "upper" ), new Fields( "line" ), splitter );     Pipe splice = new CoGroup( pipeLower, new Fields( "num" ), pipeUpper, new Fields( "num" ), new InnerJoin( Fields.size( 4 ) ) ); ```
View Full Code Here

### Examples of chunmap.util.Function

 `6667686970717273747576` ```    text.setLineWrap(true);     text.setAutoscrolls(true);         frame.add(text);         tool.onSelectChange.add(new Function(){       @SuppressWarnings("unchecked")       @Override       public Object call(Object... args) {         List fs=(List)args[0];         if(fs.size()==0){ ```
View Full Code Here

### Examples of co.nubetech.crux.model.Function

 `919293949596979899100101102103` ```    ValueType valueType1 = new ValueType();     valueType1.setId(1001);     ValueType valueType2 = new ValueType();     valueType2.setId(1002);       Function function1 = new Function(1,"FirstFunction", "classFirstFunction", false, valueType1, valueType1);     Function function2 = new Function(2, "SecondFunction", "classSecondFunction", true, valueType1, valueType2);     Function function3 = new Function(3,"ThirdFunction", "classThirdFunction", false, valueType1, valueType2);         List functions = new ArrayList();     functions.add(function1);     functions.add(function2);     functions.add(function3); ```
View Full Code Here

### Examples of com.alibaba.druid.sql.visitor.functions.Function

 `226227228229230231232233234235236237238239240241242243` ```    }     public static boolean visit(SQLEvalVisitor visitor, SQLMethodInvokeExpr x) {         String methodName = x.getMethodName().toLowerCase();         Function function = visitor.getFunction(methodName);         if (function == null) {             function = functions.get(methodName);         }         if (function != null) {             Object result = function.eval(visitor, x);             if (result != SQLEvalVisitor.EVAL_ERROR) {                 x.getAttributes().put(EVAL_VALUE, result);             }             return false; ```
View Full Code Here