]> gerrit.simantics Code Review - simantics/platform.git/blob - Tuple0.java
ab79f10a34a82bdac9d4284f2f5693a9ad6ea08e
[simantics/platform.git] / Tuple0.java
1 package org.simantics.scl.runtime.tuple;
2
3 public enum Tuple0 implements Tuple {
4     INSTANCE;
5     
6     private static final Object[] EMPTY_ARRAY = new Object[0];
7
8     @Override
9     public int length() {       
10         return 0;
11     }
12
13     @Override
14     public Object get(int id) {
15         throw new IndexOutOfBoundsException();
16     }
17
18     @Override
19     public Object[] toArray() {
20         return EMPTY_ARRAY;
21     }
22     
23     @Override
24     public String toString() {
25         return "()";
26     }
27 }