Interface IModifiable<I,V,R>

All Known Subinterfaces:
IDataColumn, IModifiableByColumn<R>, IModifiableByIndex<V,R>, IModifiableByName<V,R>
All Known Implementing Classes:
DataColumn, DataColumnCollection

public interface IModifiable<I,V,R>
IModifiable. Generic interface defining add / update / insert / delete. Created by Martin Cooper on 15/07/2017.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.vavr.control.Try<R>
    add(V value)
    Adds an item to the collection.
    io.vavr.control.Try<R>
    insert(I index, V value)
    Inserts an item into the collection.
    io.vavr.control.Try<R>
    remove(I index)
    Removes an item from the collection.
    io.vavr.control.Try<R>
    replace(I index, V value)
    Replaces an item in the collection.
  • Method Details

    • add

      io.vavr.control.Try<R> add(V value)
      Adds an item to the collection.
      Parameters:
      value - The item to add.
      Returns:
      Returns a new collection with the item added.
    • replace

      io.vavr.control.Try<R> replace(I index, V value)
      Replaces an item in the collection.
      Parameters:
      index - The index to replace the item at.
      value - The new item to use.
      Returns:
      Returns a new collection with the item replaced.
    • insert

      io.vavr.control.Try<R> insert(I index, V value)
      Inserts an item into the collection.
      Parameters:
      index - The index to insert the item at.
      value - The item to insert.
      Returns:
      Returns a new collection with the item inserted.
    • remove

      io.vavr.control.Try<R> remove(I index)
      Removes an item from the collection.
      Parameters:
      index - The index to remove the item at.
      Returns:
      Returns a new collection with the item removed.