ch.bfh.algo.core.sequence
Class DefaultGenericArrayStrategy<P>

java.lang.Object
  extended by ch.bfh.algo.core.sequence.DefaultGenericArrayStrategy<P>
All Implemented Interfaces:
ArrayStrategy<P>

public class DefaultGenericArrayStrategy<P>
extends Object
implements ArrayStrategy<P>


Constructor Summary
DefaultGenericArrayStrategy(ArrayFactory<P> factory)
           
DefaultGenericArrayStrategy(int enlarge, int shrink, ArrayFactory<P> factory)
           
 
Method Summary
 P[] enlarge(int used, P[] array)
           
 P[] initialize(int size)
           
 P[] shrink(int used, P[] array)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGenericArrayStrategy

public DefaultGenericArrayStrategy(ArrayFactory<P> factory)

DefaultGenericArrayStrategy

public DefaultGenericArrayStrategy(int enlarge,
                                   int shrink,
                                   ArrayFactory<P> factory)
Method Detail

initialize

public P[] initialize(int size)
Specified by:
initialize in interface ArrayStrategy<P>

enlarge

public P[] enlarge(int used,
                   P[] array)
Specified by:
enlarge in interface ArrayStrategy<P>

shrink

public P[] shrink(int used,
                  P[] array)
Specified by:
shrink in interface ArrayStrategy<P>