jfreerails.world.track
Class LegalTrackConfigurations

java.lang.Object
  extended by jfreerails.world.track.LegalTrackConfigurations
All Implemented Interfaces:
java.io.Serializable, FreerailsSerializable

public final class LegalTrackConfigurations
extends java.lang.Object
implements FreerailsSerializable

Stores the legal track configurations for a type of track.

Author:
Luke.
See Also:
Serialized Form

Field Summary
private  ImHashSet<TrackConfiguration> legalConfigs
           
private  int maximumConsecutivePieces
           
private static long serialVersionUID
           
 
Constructor Summary
LegalTrackConfigurations(int max, java.util.ArrayList<java.lang.String> legalTrackTemplatesArrayList)
           
LegalTrackConfigurations(int max, java.lang.String[] legalTrackTemplatesArray)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Iterator<TrackConfiguration> getLegalConfigurationsIterator()
           
 int getMaximumConsecutivePieces()
           
 int hashCode()
           
private static void processTemplate(java.lang.String trackTemplateString, java.util.HashSet<TrackConfiguration> temp)
           
 boolean trackConfigurationIsLegal(TrackConfiguration trackConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

legalConfigs

private final ImHashSet<TrackConfiguration> legalConfigs

maximumConsecutivePieces

private final int maximumConsecutivePieces
Constructor Detail

LegalTrackConfigurations

public LegalTrackConfigurations(int max,
                                java.util.ArrayList<java.lang.String> legalTrackTemplatesArrayList)

LegalTrackConfigurations

public LegalTrackConfigurations(int max,
                                java.lang.String[] legalTrackTemplatesArray)
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getLegalConfigurationsIterator

public java.util.Iterator<TrackConfiguration> getLegalConfigurationsIterator()

getMaximumConsecutivePieces

public int getMaximumConsecutivePieces()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

processTemplate

private static void processTemplate(java.lang.String trackTemplateString,
                                    java.util.HashSet<TrackConfiguration> temp)

trackConfigurationIsLegal

public boolean trackConfigurationIsLegal(TrackConfiguration trackConfiguration)