Pārlūkot izejas kodu

Merge conflicts

tags/v1.0^2
Benjamin Attal pirms 10 gadiem
vecāks
revīzija
2793f072f0
1 mainītis faili ar 23 papildinājumiem un 0 dzēšanām
  1. +23
    -0
      parsers/java/src/main/java/com/bitshift/parsing/utils/Tuple.java

+ 23
- 0
parsers/java/src/main/java/com/bitshift/parsing/utils/Tuple.java Parādīt failu

@@ -0,0 +1,23 @@
package com.bitshift.parsing.utils;

import java.util.List;
import java.util.Arrays;

public class Tuple<T> {
private List<T> _objects;

public Tuple(T... args) {
_objects = Arrays.asList(args);
}

public String toString() {
StringBuilder builder = new StringBuilder();

for(T o: this._objects) {
builder.append(o + ",");
}

String s = builder.toString();
return "(" + s.substring(0, s.length() - 1) + ")";
}
}

Notiek ielāde…
Atcelt
Saglabāt