Skip to content
Snippets Groups Projects
Commit e383420e authored by Philippe Suter's avatar Philippe Suter
Browse files

First file in Java lib :'(

parent b476f36f
No related branches found
No related tags found
No related merge requests found
package leon.codegen.runtime;
import java.util.Arrays;
public final class Tuple {
private int arity;
private Object[] elements;
public Tuple(int arity, Object[] elements) {
this.arity = arity;
this.elements = Arrays.copyOf(elements, elements.length);
}
public final Object get(int index) {
if(index < 0 || index >= arity) {
throw new IllegalArgumentException("Invalid tuple index : " + index);
}
return this.elements[index];
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment