Search:

Type: Posts; User: copeg

Search: Search took 0.08 seconds.

  1. Re: Looking for Collection class to do first if first out

    As a demonstration (and because I'm a nerd and find Collections fascinating) this snipped benchmarks one of the differences between LinkedList and ArrayList. This code adds thousands of identical...
  2. Re: Looking for Collection class to do first if first out

    Each has its advantage in different situations. All implement List, which is the interface which defines a collection of ordered items. Vector is synchronized so is nice for a multithreading...
  3. Re: Looking for Collection class to do first if first out

    I don't think there is, but you could just as easily extend LinkedList and override its add function

    @Override
    public void add(E object){
    super.add(object);
    if ( size() > 100){
    ...
Results 1 to 3 of 3