Skip to content

Commit

Permalink
FunctionParameter implemented for later implementation of automatic f…
Browse files Browse the repository at this point in the history
…unction calls.
  • Loading branch information
jbytecode committed Mar 7, 2015
1 parent b2bb77d commit f40d5b9
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 3 deletions.
Binary file added RCaller/.RData
Binary file not shown.
3 changes: 0 additions & 3 deletions RCaller/src/main/java/examples/SampleGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import jdk.nashorn.internal.objects.Global;
import rcaller.EventHandler;
import rcaller.Globals;
import rcaller.RCaller;
import rcaller.RCode;
Expand Down
78 changes: 78 additions & 0 deletions RCaller/src/main/java/rcaller/FunctionParameter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
*
RCaller, A solution for calling R from Java
Copyright (C) 2010-2015 Mehmet Hakan Satman
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
* Mehmet Hakan Satman - [email protected]
* http://www.mhsatman.com
* Google code project: http://code.google.com/p/rcaller/
* Please visit the blog page with rcaller label:
* http://stdioe.blogspot.com.tr/search/label/rcaller
*/
package rcaller;

public class FunctionParameter {

public final static int PARAM_LITERAL = 1;
public final static int PARAM_OBJECT = 2;

private String parameterName;
private String value;
private int type;

public String getParameterName() {
return parameterName;
}

public void setParameterName(String parameterName) {
this.parameterName = parameterName;
}

public String getValue() {
return value;
}

public void setValue(String value) {
this.value = value;
}

public int getType() {
return type;
}

public void setType(int type) {
this.type = type;
}

public FunctionParameter(String parametername, String value, int type) {
this.parameterName = parametername;
this.value = value;
this.type = type;
}

@Override
public String toString() {
if (this.type == PARAM_LITERAL) {
return (this.parameterName + " = " + "\"" + this.value + "\"");
} else if (this.type == PARAM_OBJECT) {
return (this.parameterName + " = " + this.value);
} else {
throw new RuntimeException("FunctionParameter " + this.type + " is not defined");
}
}

}
10 changes: 10 additions & 0 deletions bibtex.bib
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
@article{satman2014rcaller,
title={RCaller: A Software Library for Calling R from Java},
author={Satman, M Hakan},
journal={British Journal of Mathematics \& Computer Science},
volume={4},
number={15},
pages={2188--2196},
year={2014}
}

@misc{RCaller,
title = {RCaller: A library for calling R from Java},
author = {{RCaller Development Team}},
Expand Down

0 comments on commit f40d5b9

Please sign in to comment.