瀏覽代碼

Merge conflicts

tags/v1.0^2
Benjamin Attal 10 年之前
父節點
當前提交
2793f072f0
共有 1 個文件被更改,包括 23 次插入0 次删除
  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 查看文件

@@ -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) + ")";
}
}

Loading…
取消
儲存