Class Row


  • public class Row
    extends java.lang.Object
    Row.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Row.RowBuilder
      Utility class to build row objects.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object[] values  
    • Constructor Summary

      Constructors 
      Constructor Description
      Row​(java.lang.Object[] values)
      Creates a Row.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Row asCopy​(java.lang.Object... values)
      Creates a Row.
      java.lang.Object[] copyValues()
      Returns a copy of the values.
      boolean equals​(java.lang.Object obj)  
      java.lang.Object getObject​(int index)  
      (package private) java.lang.Object[] getValues()  
      int hashCode()  
      static Row.RowBuilder newBuilder​(int size)
      Create a RowBuilder object that eases creation of a new row.
      static Row of​(java.lang.Object value0)
      Creates a Row with one column value.
      static Row of​(java.lang.Object... values)
      Creates a Row with variable number of values.
      static Row of​(java.lang.Object value0, java.lang.Object value1)
      Creates a Row with two column values.
      static Row of​(java.lang.Object value0, java.lang.Object value1, java.lang.Object value2)
      Creates a Row with three column values.
      int size()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • values

        private final java.lang.Object[] values
    • Constructor Detail

      • Row

        Row​(java.lang.Object[] values)
        Creates a Row.
    • Method Detail

      • asCopy

        public static Row asCopy​(java.lang.Object... values)
        Creates a Row.

        Makes a defensive copy of the array, so the Row is immutable. (If you're worried about the extra copy, call of(Object). But the JIT probably avoids the copy.)

      • of

        public static Row of​(java.lang.Object value0)
        Creates a Row with one column value.
      • of

        public static Row of​(java.lang.Object value0,
                             java.lang.Object value1)
        Creates a Row with two column values.
      • of

        public static Row of​(java.lang.Object value0,
                             java.lang.Object value1,
                             java.lang.Object value2)
        Creates a Row with three column values.
      • of

        public static Row of​(java.lang.Object... values)
        Creates a Row with variable number of values.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getObject

        public java.lang.Object getObject​(int index)
      • getValues

        java.lang.Object[] getValues()
      • copyValues

        public java.lang.Object[] copyValues()
        Returns a copy of the values.
      • size

        public int size()
      • newBuilder

        public static Row.RowBuilder newBuilder​(int size)
        Create a RowBuilder object that eases creation of a new row.
        Parameters:
        size - Number of columns in output data.
        Returns:
        New RowBuilder object.