A semantic search engine for source code https://bitshift.benkurtovic.com/
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

24 lignes
491 B

  1. package com.bitshift.parsing.utils;
  2. import java.util.List;
  3. import java.util.Arrays;
  4. public class Tuple<T> {
  5. private List<T> _objects;
  6. public Tuple(T... args) {
  7. _objects = Arrays.asList(args);
  8. }
  9. public String toString() {
  10. StringBuilder builder = new StringBuilder();
  11. for(T o: this._objects) {
  12. builder.append(o + ",");
  13. }
  14. String s = builder.toString();
  15. return "(" + s.substring(0, s.length() - 1) + ")";
  16. }
  17. }