code: public synchronized boolean push(T value) throws NullPointerException
      {
          if (value.equals(getCurrentValue()))
          {
              return false;
          }
  
          if (stack.size() > currentLoc + 1)
          {
              Iterator<T> iter = stack.listIterator(currentLoc + 1);
              while (iter.hasNext())
              {
                  iter.next();
                  iter.remove();
              }
          }
  
          stack.add(value);
          currentLoc++;
  
          return true;
      }
docs: Push the given value onto the stack. This will invalidate all future
  changes, which removes redo capability until an undo is called.<br>
  <br>
  Note that this method will do nothing if the new value is the same as the
  current value.
  
  @param value
  the new value to push
  @return <code>true</code> if {@link #getCurrentValue()} changes as a
  result of this call; <code>false</code> otherwise
  @throws NullPointerException
  if the given value is <code>null</code>