Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ensembl.util
Class ProgressPrinter

    java.lang.Object
      org.ensembl.util.ProgressPrinter

public class ProgressPrinter
extends java.lang.Object

Simple class to print & update a console percentage progress meter.

Constructor Summary
`ProgressPrinter(int min, int max, java.lang.String postFix)` Create a new ProgressPrinter.

Method Summary
`int` | `getCurrent()`
`int` | `getMax()`
`int` | `getMin()`
`java.lang.String` | `getPostfix()` Get the postfix to be printed.
`void` | `printUpdate(int current)`
`void` | `setCurrent(int current)`
`void` | `setMax(int max)`
`void` | `setMin(int min)`
`void` | `setPostfix(java.lang.String postfix)` Set the postfix to be printed.
`java.lang.String` | `update(int current)` Update the current value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ProgressPrinter

    public ProgressPrinter(int min,
                           int max,
                           java.lang.String postFix)

  Create a new ProgressPrinter.

Parameters:
  `min` - Minimum value.
  `max` - Maximum value.
  `postFix` - What to print after each percentage; will usually be "%"

Method Detail

### update

    public java.lang.String update(int current)

  Update the current value.

  Parameters:
    `current` - The current value (must be between min and max)
  Returns:
    A string that when printed will erase the previous output and print the new percentage.

### printUpdate

    public void printUpdate(int current)

### getCurrent

    public int getCurrent()

  Returns:
    Returns the current.

### getMax

    public int getMax()

  Returns:
    Returns the max.

### getMin

    public int getMin()

  Returns:
    Returns the min.

### setCurrent

    public void setCurrent(int current)

  Parameters:
    `current` - The current to set.

### setMax

    public void setMax(int max)

  Parameters:
    `max` - The max to set.

### setMin

    public void setMin(int min)

  Parameters:
    `min` - The min to set.

### setPostfix

    public void setPostfix(java.lang.String postfix)

  Set the postfix to be printed.

  Parameters:
    `postfix` - The new postfix.

### getPostfix

    public java.lang.String getPostfix()

  Get the postfix to be printed.

  Returns:
    The postfix.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD