Returns a Tuple that wraps the specified array, which must not be subsequently modified.
(Object[] array)
| 56 | |
| 57 | /** Returns a Tuple that wraps the specified array, which must not be subsequently modified. */ |
| 58 | static Tuple wrap(Object[] array) { |
| 59 | switch (array.length) { |
| 60 | case 0: |
| 61 | return RegularTuple.EMPTY; |
| 62 | case 1: |
| 63 | return new SingletonTuple(array[0]); |
| 64 | default: |
| 65 | return new RegularTuple(array); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /** Returns a tuple containing the given elements. */ |
| 70 | public static Tuple copyOf(Iterable<?> seq) { |
no outgoing calls
no test coverage detected