Class Tuple

Object
Tuple

public class Tuple extends Object
Ysld Tuple implementation.
  • Method Details

    • of

      public static Tuple of(Object... values)
      Return a tuple comprised of the passed values
    • of

      public static Tuple of(int n)
      Returns an empty tuple of length n.
    • parse

      public Tuple parse(List<?> seq) throws IllegalArgumentException
      Parse the values of seq and write them to this Tuple
      Throws:
      IllegalArgumentException - if seq and this differ in length
    • parse

      public Tuple parse(Object obj) throws IllegalArgumentException
      Parse an object to this Tuple
      Throws:
      IllegalArgumentException - if obj cannot be parsed to a Tuple
    • at

      public Object at(int i)
      Returns:
      the ith value of the tuple
    • strAt

      public String strAt(int i)
      Returns:
      the ith value of the tuple, as a String.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      A String representation of the tuple, of the form "(a, b)".
    • toList

      public List<?> toList()
      Return this tuple as a List.
    • isNull

      public boolean isNull()
      Returns:
      true if all values of the tuple are null, false otherwise.