Class TabularData

    • Constructor Detail

      • TabularData

        public TabularData()
        Creates a new tabular data without any source association.
        Since:
        4.0.4
      • TabularData

        public TabularData​(Source source)
        Creates a new tabular data associated with the given source.
        Parameters:
        source - the source.
        Since:
        4.0.4
    • Method Detail

      • getRows

        public List<ISourceData> getRows()
        Returns the rows in this tabular data. To add a row, use the method addRow() instead of calling directly the list add method.
        Returns:
        the rows in this tabular data.
        Since:
        4.0.4
      • addRow

        public ISourceData addRow()
        Adds a row in this tabular data.
        Returns:
        the added row.
        Since:
        4.0.4
      • getTotalRows

        public int getTotalRows()
      • setTotalRows

        public void setTotalRows​(int totalRows)
      • get

        public <T> T get​(Object key,
                         Class<T> expectedClass)
        Delegates the call to the first row, or returns null if there is no first row.
        Specified by:
        get in interface ISourceData
        Type Parameters:
        T - the expected class.
        Parameters:
        key - the data entry key.
        expectedClass - the expected class.
        Returns:
        the converted data value.
      • clear

        public void clear()
        Removes all rows in this tabular data.
        Specified by:
        clear in interface Map<String,​Object>
      • containsKey

        public boolean containsKey​(Object key)
        Delegates the call to the first row, or returns false if there is no first row.
        Specified by:
        containsKey in interface Map<String,​Object>
      • containsValue

        public boolean containsValue​(Object value)
        Delegates the call to the first row, or returns false if there is no first row.
        Specified by:
        containsValue in interface Map<String,​Object>
      • get

        public Object get​(Object key)
        Delegates the call to the first row, or returns null if there is no first row.
        Specified by:
        get in interface Map<String,​Object>
      • isEmpty

        public boolean isEmpty()
        Returns true if this tabular data has no row, false otherwise.
        Specified by:
        isEmpty in interface Map<String,​Object>
      • keySet

        public Set<String> keySet()
        Delegates the call to the first row, or returns an empty set if there is no first row.
        Specified by:
        keySet in interface Map<String,​Object>
      • put

        public Object put​(String key,
                          Object value)
        Delegates the call to the first row. If there is no row one is created.
        Specified by:
        put in interface Map<String,​Object>
      • putAll

        public void putAll​(Map<? extends String,​? extends Object> t)
        Delegates the call to the first row. If there is no row one is created.
        Specified by:
        putAll in interface Map<String,​Object>
      • remove

        public Object remove​(Object key)
        Delegates the call to the first row or returns null if there is no row.
        Specified by:
        remove in interface Map<String,​Object>
      • size

        public int size()
        Returns the number of rows in this tabular data.
        Specified by:
        size in interface Map<String,​Object>
      • values

        public Collection<Object> values()
        Delegates the call to the first row, or returns an empty set if there is no first row.
        Specified by:
        values in interface Map<String,​Object>