Interface OxygenLevel

All Known Implementing Classes:
PlanetOxygenService

public interface OxygenLevel
Used to adjust and check oxygen levels.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addOxygen(float kilogramsToAdd)
    Add x kilograms of oxygen to the object in question.
    float
    Gets the amount of oxygen present in the object in kilos.
    int
    Gets the oxygen present as a percentage of the upper limit (Float 0.0 - 100.0).
    void
    removeOxygen(float kilogramsToRemove)
    Remove x kilograms of oxygen from the object in question.
    void
    setOxygen(float oxygen)
    Sets the amount of oxygen present in the object in kilos.
  • Method Details

    • addOxygen

      void addOxygen(float kilogramsToAdd)
      Add x kilograms of oxygen to the object in question.
      Parameters:
      kilogramsToAdd - the float number of kilograms to add.
    • removeOxygen

      void removeOxygen(float kilogramsToRemove)
      Remove x kilograms of oxygen from the object in question.
      Parameters:
      kilogramsToRemove - the float number of kilograms to remove.
    • getOxygen

      float getOxygen()
      Gets the amount of oxygen present in the object in kilos.
      Returns:
      the amount of oxygen present in kilos.
    • setOxygen

      void setOxygen(float oxygen)
      Sets the amount of oxygen present in the object in kilos.
      Parameters:
      oxygen - the float number of kilograms to set the oxygen level to.
    • getOxygenPercentage

      int getOxygenPercentage()
      Gets the oxygen present as a percentage of the upper limit (Float 0.0 - 100.0).
      Returns:
      The oxygen present as a percentage of the upper limit.