浏览代码

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

正在加载...
取消
保存