Package javolution.util.FastCollection

Examples of javolution.util.FastCollection.Record


    public void remove() {
        if (_current != null) {
            // Uses the previous record (not affected by the remove)
            // to set the next record.
            final Record previous = _current.getPrevious();
            _collection.delete(_current);
            _current = null;
            _next = previous.getNext();
        } else {
            throw new IllegalStateException();
        }
    }
View Full Code Here


  public abstract void delete(Record record, E value);

  public final E getFirst()
  {
    final Record first = head().getNext();
    if(first == tail())
      return null;

    return valueOf(first);
  }
View Full Code Here

    return valueOf(first);
  }

  public final E getLast()
  {
    final Record last = tail().getPrevious();
    if(last == head())
      return null;

    return valueOf(last);
  }
View Full Code Here

    return valueOf(last);
  }

  public final E removeFirst()
  {
    final Record first = head().getNext();
    if(first == tail())
      return null;

    final E value = valueOf(first);
    delete(first, value);
View Full Code Here

    return value;
  }

  public final E removeLast()
  {
    final Record last = tail().getPrevious();
    if(last == head())
      return null;

    final E value = valueOf(last);
    delete(last, value);
View Full Code Here

TOP

Related Classes of javolution.util.FastCollection.Record

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.