Class DifferentiableManager

java.lang.Object
math.differentialcalculus.DifferentiableManager

public class DifferentiableManager
extends java.lang.Object
Author:
GBEMIRO
  • Constructor Details

  • Method Details

    • getDIFFERENTIABLES

      public java.util.ArrayList<Differentiable> getDIFFERENTIABLES()
    • count

      public int count()
      Returns:
      The number of Differentiable objects stored by an object of this class.
    • contains

      public boolean contains​(java.lang.String name)
      Parameters:
      name - The name of the Differentiable.
      Returns:
      true if a Differentiable exists by the name supplied.
    • indexOf

      public int indexOf​(java.lang.String name)
      Parameters:
      name - The name of the dependent variable of the Differentiable.
      Returns:
      the index of the Differentiable object that has the name supplied. If no such Differentiable object exists, then it returns -1.
    • getDifferentiable

      public Differentiable getDifferentiable​(java.lang.String name) throws java.lang.ClassNotFoundException
      Parameters:
      name - The name of the Differentiable.
      Returns:
      the Differentiable object that has the name supplied if it exists. If no such Differentiable object exists, then it returns null.
      Throws:
      java.lang.ClassNotFoundException - if no Differentiable object by that name exists.
    • getDifferentiable

      public Differentiable getDifferentiable​(int index) throws java.lang.ClassNotFoundException
      Parameters:
      index - The index of the Differentiable in this DifferentiableManager object. If no such index exists, then it returns null.
      Throws:
      java.lang.ClassNotFoundException - if no Differentiable object by that name exists.
    • lookUp

      public Differentiable lookUp​(java.lang.String name)
      Attempts to retrieve a Differentiable object from a DifferentiableManager based on its name.
      Parameters:
      name - The name of the Differentiable object.
      Returns:
      the Differentiable object that has that name or null if the Differentiable is not found.
    • add

      public void add​(Differentiable diff)
      Parameters:
      diff - The Differentiable object to add to this object.
    • delete

      public void delete​(java.lang.String name)
      Removes a Differentiable object from this DifferentiableManager.
    • firstDifferentiable

      public Differentiable firstDifferentiable()
    • lastDifferentiable

      public Differentiable lastDifferentiable()
    • update

      public int update​(java.lang.String name, java.lang.String newName)
      It updates the name of a Differentiable object in this DifferentiableManager with the parameter newName.
      Parameters:
      name - The name of the Differentiable in this DifferentiableManager that we wish to update.
      newName - The new name to give the Differentiable.
      Returns:
      The index of the object, if a Differentiable by that name is already recorded in the DifferentiableManager and -1 the Differentiable is not found.
    • update

      public int update​(java.lang.String name, java.util.ArrayList<java.lang.String> data)
      Updates a Differentiable object in this DifferentiableManager.
      Parameters:
      name - The name of the Differentiable object to be updated.
      data - The data to be used to update the object if found.
      Returns:
      The index of the object, if a Differentiable by that name is already recorded in the DifferentiableManager and -1 the Differentiable is not found.
    • clearAll

      public void clearAll()