org.eclipse.january.dataset

## Class StringDataset

- java.lang.Object
- - org.eclipse.january.dataset.LazyDatasetBase
  - - org.eclipse.january.dataset.AbstractDataset
    - - org.eclipse.january.dataset.StringDatasetBase
      - - org.eclipse.january.dataset.StringDataset

- All Implemented Interfaces:
    Serializable, Dataset, IDataset, ILazyDataset, IMetadataProvider, INameable
  Direct Known Subclasses:
    DateDatasetImpl

      public class StringDataset
      extends StringDatasetBase

  Extend dataset for objects
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.january.dataset.StringDatasetBase

      `data`

    - ### Fields inherited from class org.eclipse.january.dataset.AbstractDataset

      `base, BLOCK_CLOSE, BLOCK_OPEN, odata, offset, size, stride, stringFormat`

    - ### Fields inherited from class org.eclipse.january.dataset.LazyDatasetBase

      `metadata, name, shape`

    - ### Fields inherited from interface org.eclipse.january.dataset.Dataset

      `ARRAYFLOAT32, ARRAYFLOAT64, ARRAYINT16, ARRAYINT32, ARRAYINT64, ARRAYINT8, ARRAYMUL, BOOL, COMPLEX, COMPLEX128, COMPLEX64, DATE, FLOAT, FLOAT32, FLOAT64, INT, INT16, INT32, INT64, INT8, OBJECT, RGB, RGB8, STRING`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StringDataset` | `clone()` Clone dataset
    `boolean` | `containsInfs()`
    `boolean` | `containsNans()`
    `boolean` | `getBoolean()` Get first item as a boolean.
    `boolean` | `getBoolean(int... pos)`
    `boolean` | `getBoolean(int i)` Get an item from given position as a boolean.
    `boolean` | `getBoolean(int i, int j)` Get an item from given position as a boolean.
    `byte` | `getByte()` Get first item as a byte.
    `byte` | `getByte(int... pos)`
    `byte` | `getByte(int i)` Get an item from given position as a byte.
    `byte` | `getByte(int i, int j)` Get an item from given positionj as a byte.
    `double` | `getDouble()` Get first item as a double.
    `double` | `getDouble(int... pos)`
    `double` | `getDouble(int i)` Get an item from given position as a double.
    `double` | `getDouble(int i, int j)` Get an item from given position as a double.
    `boolean` | `getElementBooleanAbs(int index)` Get an element from given absolute index as a boolean.
    `double` | `getElementDoubleAbs(int index)` Get an element from given absolute index as a double.
    `long` | `getElementLongAbs(int index)` Get an element from given absolute index as a long.
    `float` | `getFloat()` Get first item as a float.
    `float` | `getFloat(int... pos)`
    `float` | `getFloat(int i)` Get an item from given position as a float.
    `float` | `getFloat(int i, int j)` Get an item from given position as a float.
    `int` | `getInt(int... pos)`
    `int` | `getInt(int i)` Get an item from given position as an int.
    `int` | `getInt(int i, int j)` Get an item from given position as an int.
    `long` | `getLong()` Get first item as a long.
    `long` | `getLong(int... pos)`
    `long` | `getLong(int i)` Get an item from given position as a long.
    `long` | `getLong(int i, int j)` Get an item from given position as a long.
    `short` | `getShort()` Get first item as a short.
    `short` | `getShort(int... pos)`
    `short` | `getShort(int i)` Get an item from given position as a short.
    `short` | `getShort(int i, int j)` Get an item from given position as a short.
    `StringDataset` | `getSlice(SliceIterator siter)` Get a slice of the dataset.
    `String` | `getStringAbs(int index)` Get an item from given absolute index as a string.
    `StringDataset` | `getView(boolean deepCopyMetadata)`
    `StringDataset` | `iadd(Object o)` In-place addition
    `StringDataset` | `idivide(Object o)` In-place division
    `StringDataset` | `ifloor()` In-place floor
    `StringDataset` | `imultiply(Object o)` In-place multiplication
    `StringDataset` | `ipower(Object o)` In-place raise to power of argument
    `StringDataset` | `iremainder(Object o)` In-place remainder of division
    `StringDataset` | `isubtract(Object o)` In-place subtraction
    `double` | `residual(Object o)` Calculate residual of dataset with object See `Dataset.residual(Object o, boolean ignoreNaNs)` with ignoreNaNs = false

    - ### Methods inherited from class org.eclipse.january.dataset.StringDatasetBase

      `containsInvalidNumbers, copyItemsFromAxes, createArray, equals, fill, fillDataset, get, get, get, get, getAbs, getBufferLength, getData, getInt, getObject, getObject, getObject, getObject, getObjectAbs, getString, getString, getString, getString, getUniqueItems, hashCode, maxPos, minPos, residual, resize, set, set, set, set, setAbs, setBy1DIndex, setByBoolean, setByIndexes, setData, setItem, setItem, setItem, setItem, setItemDirect, setItemsOnAxes, setObjectAbs, setSlice, sort`

    - ### Methods inherited from class org.eclipse.january.dataset.AbstractDataset

      `all, all, any, any, argMax, argMax, argMin, argMin, calcSteps, cast, cast, cast, cast, checkAxis, checkAxis, checkCompatibility, copy, copy, copyToView, count, count, count, createStrides, createStrides, createStrides, createStrides, fillData, flatten, get1DIndex, get1DIndex, get1DIndex, get1DIndexFromShape, get1DIndexFromShape, getBooleanIterator, getBooleanIterator, getBroadcastView, getBuffer, getBy1DIndex, getByBoolean, getByIndexes, getDType, getElementClass, getElementsPerItem, getError, getError, getError, getError, getErrorArray, getErrorArray, getErrorArray, getErrorBuffer, getErrors, getFirst1DIndex, getIndices, getInternalSquaredError, getItemBytes, getIterator, getIterator, getMaxLineLength, getNbytes, getNDPosition, getOffset, getPositionIterator, getRank, getRealPart, getRealView, getShape, getShapeRef, getSize, getSlice, getSlice, getSlice, getSlice, getSlice, getSlice, getSliceIterator, getSliceIterator, getSliceIteratorFromAxes, getSliceView, getSliceView, getSliceView, getStats, getStrides, getStringStats, getTransposedView, hasFloatingPointElements, ifloorDivide, internalGetSliceIterator, isCompatibleWith, isComplex, max, max, max, mean, mean, mean, min, min, min, overrideInternal, peakToPeak, peakToPeak, peakToPeak, product, product, product, reshape, residual, rootMeanSquare, rootMeanSquare, rootMeanSquare, setErrorBuffer, setMaxLineLength, setShape, setSlice, setSlice, setSlice, setStringFormat, squeeze, squeeze, squeezeEnds, stdDeviation, stdDeviation, stdDeviation, stdDeviation, stdDeviation, stdDeviation, sum, sum, sum, swapAxes, synchronizedCopy, toString, toString, transpose, variance, variance, variance, variance, variance, variance`

    - ### Methods inherited from class org.eclipse.january.dataset.LazyDatasetBase

      `addMetadata, checkPermutatedAxes, checkSliceND, clearMetadata, copyMetadata, copyMetadata, createFromSerializable, dirtyMetadata, findMetadataTypeSubInterfaces, getErrorMetadata, getFirstMetadata, getMetadata, getMetadata, getMetadataMap, getName, hasErrors, reshapeMetadata, restoreMetadata, setDirty, setErrors, setMetadata, setName, sliceMetadata, transposeMetadata`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.january.dataset.Dataset

      `setDirty`

    - ### Methods inherited from interface org.eclipse.january.dataset.IDataset

      `getMetadata`

    - ### Methods inherited from interface org.eclipse.january.dataset.ILazyDataset

      `addMetadata, clearMetadata, hasErrors, setErrors, setMetadata`

    - ### Methods inherited from interface org.eclipse.january.dataset.IMetadataProvider

      `getFirstMetadata, getMetadata`

    - ### Methods inherited from interface org.eclipse.january.INameable

      `getName, setName`

- - ### Method Detail

    - #### getView

          public StringDataset getView(boolean deepCopyMetadata)

      Specified by:
        `getView` in interface `Dataset`
      Overrides:
        `getView` in class `StringDatasetBase`
      Parameters:
        `deepCopyMetadata` - if true then deep-copy metadata
      Returns:
        whole view of dataset (i.e. data buffer is shared)

    - #### clone

          public StringDataset clone()

      Description copied from interface: `ILazyDataset`
      Clone dataset
      Specified by:
        `clone` in interface `Dataset`
      Specified by:
        `clone` in interface `IDataset`
      Specified by:
        `clone` in interface `ILazyDataset`
      Overrides:
        `clone` in class `StringDatasetBase`
      Returns:
        a (shallow) copy of dataset

    - #### getSlice

          public StringDataset getSlice(SliceIterator siter)

      Description copied from class: `AbstractDataset`
      Get a slice of the dataset. The returned dataset is a copied selection of items
      Overrides:
        `getSlice` in class `StringDatasetBase`
      Parameters:
        `siter` - Slice iterator
      Returns:
        The dataset of the sliced data

    - #### getElementBooleanAbs

          public boolean getElementBooleanAbs(int index)

      Description copied from interface: `Dataset`
      Get an element from given absolute index as a boolean. See warning in interface doc
      Specified by:
        `getElementBooleanAbs` in interface `Dataset`
      Overrides:
        `getElementBooleanAbs` in class `StringDatasetBase`
      Parameters:
        `index` - in array
      Returns:
        element as boolean

    - #### getElementDoubleAbs

          public double getElementDoubleAbs(int index)

      Description copied from interface: `Dataset`
      Get an element from given absolute index as a double. See warning in interface doc
      Specified by:
        `getElementDoubleAbs` in interface `Dataset`
      Overrides:
        `getElementDoubleAbs` in class `StringDatasetBase`
      Parameters:
        `index` - in array
      Returns:
        element as double

    - #### getElementLongAbs

          public long getElementLongAbs(int index)

      Description copied from interface: `Dataset`
      Get an element from given absolute index as a long. See warning in interface doc
      Specified by:
        `getElementLongAbs` in interface `Dataset`
      Overrides:
        `getElementLongAbs` in class `StringDatasetBase`
      Parameters:
        `index` - in array
      Returns:
        element as long

    - #### getDouble

          public double getDouble()

      Description copied from interface: `Dataset`
      Get first item as a double. The dataset must not be null
      Specified by:
        `getDouble` in interface `Dataset`
      Overrides:
        `getDouble` in class `StringDatasetBase`
      Returns:
        item

    - #### getDouble

          public double getDouble(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a double. The dataset must be 1D
      Specified by:
        `getDouble` in interface `Dataset`
      Overrides:
        `getDouble` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getDouble

          public double getDouble(int i,
                                  int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a double. The dataset must be 2D
      Specified by:
        `getDouble` in interface `Dataset`
      Overrides:
        `getDouble` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getDouble

          public double getDouble(int... pos)

      Specified by:
        `getDouble` in interface `IDataset`
      Overrides:
        `getDouble` in class `StringDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a double

    - #### getFloat

          public float getFloat()

      Description copied from interface: `Dataset`
      Get first item as a float. The dataset must not be null
      Specified by:
        `getFloat` in interface `Dataset`
      Overrides:
        `getFloat` in class `StringDatasetBase`
      Returns:
        item

    - #### getFloat

          public float getFloat(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a float. The dataset must be 1D
      Specified by:
        `getFloat` in interface `Dataset`
      Overrides:
        `getFloat` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getFloat

          public float getFloat(int i,
                                int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a float. The dataset must be 2D
      Specified by:
        `getFloat` in interface `Dataset`
      Overrides:
        `getFloat` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getFloat

          public float getFloat(int... pos)

      Specified by:
        `getFloat` in interface `IDataset`
      Overrides:
        `getFloat` in class `StringDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a float

    - #### getLong

          public long getLong()

      Description copied from interface: `Dataset`
      Get first item as a long. The dataset must not be null
      Specified by:
        `getLong` in interface `Dataset`
      Overrides:
        `getLong` in class `StringDatasetBase`
      Returns:
        item

    - #### getLong

          public long getLong(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a long. The dataset must be 1D
      Specified by:
        `getLong` in interface `Dataset`
      Overrides:
        `getLong` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getLong

          public long getLong(int i,
                              int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a long. The dataset must be 2D
      Specified by:
        `getLong` in interface `Dataset`
      Overrides:
        `getLong` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getLong

          public long getLong(int... pos)

      Specified by:
        `getLong` in interface `IDataset`
      Overrides:
        `getLong` in class `StringDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a long

    - #### getInt

          public int getInt(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as an int. The dataset must be 1D
      Specified by:
        `getInt` in interface `Dataset`
      Overrides:
        `getInt` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getInt

          public int getInt(int i,
                            int j)

      Description copied from interface: `Dataset`
      Get an item from given position as an int. The dataset must be 2D
      Specified by:
        `getInt` in interface `Dataset`
      Overrides:
        `getInt` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getInt

          public int getInt(int... pos)

      Specified by:
        `getInt` in interface `IDataset`
      Overrides:
        `getInt` in class `StringDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as an int

    - #### getShort

          public short getShort()

      Description copied from interface: `Dataset`
      Get first item as a short. The dataset must not be null
      Specified by:
        `getShort` in interface `Dataset`
      Overrides:
        `getShort` in class `StringDatasetBase`
      Returns:
        item

    - #### getShort

          public short getShort(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a short. The dataset must be 1D
      Specified by:
        `getShort` in interface `Dataset`
      Overrides:
        `getShort` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getShort

          public short getShort(int i,
                                int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a short. The dataset must be 2D
      Specified by:
        `getShort` in interface `Dataset`
      Overrides:
        `getShort` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getShort

          public short getShort(int... pos)

      Specified by:
        `getShort` in interface `IDataset`
      Overrides:
        `getShort` in class `StringDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a short

    - #### getByte

          public byte getByte()

      Description copied from interface: `Dataset`
      Get first item as a byte. The dataset must not be null
      Specified by:
        `getByte` in interface `Dataset`
      Overrides:
        `getByte` in class `StringDatasetBase`
      Returns:
        item

    - #### getByte

          public byte getByte(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a byte. The dataset must be 1D
      Specified by:
        `getByte` in interface `Dataset`
      Overrides:
        `getByte` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getByte

          public byte getByte(int i,
                              int j)

      Description copied from interface: `Dataset`
      Get an item from given positionj as a byte. The dataset must be 2D
      Specified by:
        `getByte` in interface `Dataset`
      Overrides:
        `getByte` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getByte

          public byte getByte(int... pos)

      Specified by:
        `getByte` in interface `IDataset`
      Overrides:
        `getByte` in class `StringDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a byte

    - #### getBoolean

          public boolean getBoolean()

      Description copied from interface: `Dataset`
      Get first item as a boolean. The dataset must not be null
      Specified by:
        `getBoolean` in interface `Dataset`
      Overrides:
        `getBoolean` in class `StringDatasetBase`
      Returns:
        item

    - #### getBoolean

          public boolean getBoolean(int i)

      Description copied from interface: `Dataset`
      Get an item from given position as a boolean. The dataset must be 1D
      Specified by:
        `getBoolean` in interface `Dataset`
      Overrides:
        `getBoolean` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
      Returns:
        item

    - #### getBoolean

          public boolean getBoolean(int i,
                                    int j)

      Description copied from interface: `Dataset`
      Get an item from given position as a boolean. The dataset must be 2D
      Specified by:
        `getBoolean` in interface `Dataset`
      Overrides:
        `getBoolean` in class `StringDatasetBase`
      Parameters:
        `i` - position in first dimension
        `j` - position in second dimension
      Returns:
        item

    - #### getBoolean

          public boolean getBoolean(int... pos)

      Specified by:
        `getBoolean` in interface `IDataset`
      Overrides:
        `getBoolean` in class `StringDatasetBase`
      Parameters:
        `pos` - position
      Returns:
        Item in given position as a boolean

    - #### getStringAbs

          public String getStringAbs(int index)

      Description copied from interface: `Dataset`
      Get an item from given absolute index as a string. See warning in interface doc
      Specified by:
        `getStringAbs` in interface `Dataset`
      Overrides:
        `getStringAbs` in class `StringDatasetBase`
      Parameters:
        `index` - in array
      Returns:
        item

    - #### containsInfs

          public boolean containsInfs()

      Specified by:
        `containsInfs` in interface `Dataset`
      Overrides:
        `containsInfs` in class `StringDatasetBase`
      Returns:
        true if dataset contains any infinities

    - #### containsNans

          public boolean containsNans()

      Specified by:
        `containsNans` in interface `Dataset`
      Overrides:
        `containsNans` in class `StringDatasetBase`
      Returns:
        true if dataset contains any NaNs

    - #### iadd

          public StringDataset iadd(Object o)

      Description copied from interface: `Dataset`
      In-place addition
      Specified by:
        `iadd` in interface `Dataset`
      Overrides:
        `iadd` in class `StringDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        sum dataset

    - #### isubtract

          public StringDataset isubtract(Object o)

      Description copied from interface: `Dataset`
      In-place subtraction
      Specified by:
        `isubtract` in interface `Dataset`
      Overrides:
        `isubtract` in class `StringDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        difference dataset

    - #### imultiply

          public StringDataset imultiply(Object o)

      Description copied from interface: `Dataset`
      In-place multiplication
      Specified by:
        `imultiply` in interface `Dataset`
      Overrides:
        `imultiply` in class `StringDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        product dataset

    - #### idivide

          public StringDataset idivide(Object o)

      Description copied from interface: `Dataset`
      In-place division
      Specified by:
        `idivide` in interface `Dataset`
      Overrides:
        `idivide` in class `StringDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        dividend dataset

    - #### iremainder

          public StringDataset iremainder(Object o)

      Description copied from interface: `Dataset`
      In-place remainder of division
      Specified by:
        `iremainder` in interface `Dataset`
      Overrides:
        `iremainder` in class `StringDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        remaindered dataset

    - #### ifloor

          public StringDataset ifloor()

      Description copied from interface: `Dataset`
      In-place floor
      Specified by:
        `ifloor` in interface `Dataset`
      Overrides:
        `ifloor` in class `StringDatasetBase`
      Returns:
        floored dataset

    - #### ipower

          public StringDataset ipower(Object o)

      Description copied from interface: `Dataset`
      In-place raise to power of argument
      Specified by:
        `ipower` in interface `Dataset`
      Overrides:
        `ipower` in class `StringDatasetBase`
      Parameters:
        `o` - object to use
      Returns:
        raised dataset

    - #### residual

          public double residual(Object o)

      Description copied from interface: `Dataset`
      Calculate residual of dataset with object See `Dataset.residual(Object o, boolean ignoreNaNs)` with ignoreNaNs = false
      Specified by:
        `residual` in interface `Dataset`
      Overrides:
        `residual` in class `AbstractDataset`
      Parameters:
        `o` - object to use
      Returns:
        sum of the squares of the differences

Copyright © 2014–2022 Eclipse Foundation. All rights reserved.