bcds.phison.multfailures
Class ElemsSequencerBase<V,E>

java.lang.Object
  extended by bcds.phison.multfailures.ElemsSequencerBase<V,E>
All Implemented Interfaces:
ElemsSequencer<V,E>, WithEnvParams
Direct Known Subclasses:
SequencerBC, SequencerCC, SequencerDegree, SequencerFromFile, SequencerRandom, SequencerSpreaders

public abstract class ElemsSequencerBase<V,E>
extends java.lang.Object
implements ElemsSequencer<V,E>

Provides default implementations of methods in the ElemsSequencer interface.

Author:
Juan Segovia S.

Constructor Summary
ElemsSequencerBase()
           
 
Method Summary
 java.util.List<E> arrangeDirectedLinks(java.util.Random rnd)
          This method just throws an exception.
 java.util.List<V> arrangeNodes(java.util.Random rnd)
          This method just throws an exception.
 java.util.List<E> arrangeUndirectedLinks(java.util.Random rnd)
          This method just throws an exception.
 Environ getEnviron()
          Returns the environment associated to this object.
 java.lang.Object[] getEnvParams()
          Returns an empty array.
 java.lang.String getName()
          Returns this instance's unqualified class name.
 void setup(TED<V,E> ted, Environ env)
          Saves the parameters for future use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElemsSequencerBase

public ElemsSequencerBase()
Method Detail

setup

public void setup(TED<V,E> ted,
                  Environ env)
Saves the parameters for future use. The parameter ted must not be null. If env is null, a new empty environment is created. Default values are incorporated by calling getEnvParams and the types of already-present values are adapted, if possible.

Specified by:
setup in interface ElemsSequencer<V,E>

arrangeNodes

public java.util.List<V> arrangeNodes(java.util.Random rnd)
This method just throws an exception.

Specified by:
arrangeNodes in interface ElemsSequencer<V,E>
Throws:
UnsupportedOperationException();

arrangeDirectedLinks

public java.util.List<E> arrangeDirectedLinks(java.util.Random rnd)
This method just throws an exception.

Specified by:
arrangeDirectedLinks in interface ElemsSequencer<V,E>
Throws:
UnsupportedOperationException();

arrangeUndirectedLinks

public java.util.List<E> arrangeUndirectedLinks(java.util.Random rnd)
This method just throws an exception.

Specified by:
arrangeUndirectedLinks in interface ElemsSequencer<V,E>
Throws:
UnsupportedOperationException();

getName

public java.lang.String getName()
Returns this instance's unqualified class name. Purpose: comply with WithEnvParams.

Specified by:
getName in interface WithEnvParams

getEnvParams

public java.lang.Object[] getEnvParams()
Returns an empty array. This is the default implementation, suitable for those that do not need additional environment parameters.

Specified by:
getEnvParams in interface WithEnvParams

getEnviron

public Environ getEnviron()
Returns the environment associated to this object. This method exists for complying with WithEnvParams.

Specified by:
getEnviron in interface WithEnvParams