// ** This file was generated with DemFGen (vers:12/15/2010) package gen; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; import java.lang.Integer; /** Representation of SCGConfig */ public class SCGConfig{ protected final TournamentStyle tournamentStyle; protected final int turnDuration; protected final int maxNumAvatars; protected final double minStrengthening; protected final double initialReputation; protected final double maxReputation; protected final double reputationFactor; protected final int minProposals; protected final int maxProposals; protected final int numRounds; protected final boolean proposedClaimMustBeNew; /** Construct a(n) SCGConfig Instance */ public SCGConfig(TournamentStyle tournamentStyle, int turnDuration, int maxNumAvatars, double minStrengthening, double initialReputation, double maxReputation, double reputationFactor, int minProposals, int maxProposals, int numRounds, boolean proposedClaimMustBeNew){ this.tournamentStyle = tournamentStyle; this.turnDuration = turnDuration; this.maxNumAvatars = maxNumAvatars; this.minStrengthening = minStrengthening; this.initialReputation = initialReputation; this.maxReputation = maxReputation; this.reputationFactor = reputationFactor; this.minProposals = minProposals; this.maxProposals = maxProposals; this.numRounds = numRounds; this.proposedClaimMustBeNew = proposedClaimMustBeNew; } /** Is the given object Equal to this SCGConfig? */ public boolean equals(Object o){ if(!(o instanceof SCGConfig))return false; if(o == this)return true; SCGConfig oo = (SCGConfig)o; return (((Object)tournamentStyle).equals(oo.tournamentStyle))&&(((Object)turnDuration).equals(oo.turnDuration))&&(((Object)maxNumAvatars).equals(oo.maxNumAvatars))&&(((Object)minStrengthening).equals(oo.minStrengthening))&&(((Object)initialReputation).equals(oo.initialReputation))&&(((Object)maxReputation).equals(oo.maxReputation))&&(((Object)reputationFactor).equals(oo.reputationFactor))&&(((Object)minProposals).equals(oo.minProposals))&&(((Object)maxProposals).equals(oo.maxProposals))&&(((Object)numRounds).equals(oo.numRounds))&&(((Object)proposedClaimMustBeNew).equals(oo.proposedClaimMustBeNew)); } /** Parse an instance of SCGConfig from the given String */ public static SCGConfig parse(String inpt) throws gen.ParseException{ return new gen.TheParser(new java.io.StringReader(inpt)).parse_SCGConfig(); } /** Parse an instance of SCGConfig from the given Stream */ public static SCGConfig parse(java.io.InputStream inpt) throws gen.ParseException{ return new gen.TheParser(inpt).parse_SCGConfig(); } /** Parse an instance of SCGConfig from the given Reader */ public static SCGConfig parse(java.io.Reader inpt) throws gen.ParseException{ return new gen.TheParser(inpt).parse_SCGConfig(); } /** Field Class for SCGConfig.tournamentStyle */ public static class tournamentStyle extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.turnDuration */ public static class turnDuration extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.maxNumAvatars */ public static class maxNumAvatars extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.minStrengthening */ public static class minStrengthening extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.initialReputation */ public static class initialReputation extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.maxReputation */ public static class maxReputation extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.reputationFactor */ public static class reputationFactor extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.minProposals */ public static class minProposals extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.maxProposals */ public static class maxProposals extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.numRounds */ public static class numRounds extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for SCGConfig.proposedClaimMustBeNew */ public static class proposedClaimMustBeNew extends edu.neu.ccs.demeterf.Fields.any{} /** DGP method from Class Display */ public String display(){ return gen.Display.DisplayM(this); } /** DGP method from Class Print */ public String print(){ return gen.Print.PrintM(this); } /** DGP method from Class ToStr */ public String toStr(){ return gen.ToStr.ToStrM(this); } /** Updater for field SCGConfig.tournamentStyle */ public SCGConfig updateTournamentStyle(TournamentStyle _tournamentStyle){ return new SCGConfig(_tournamentStyle, turnDuration, maxNumAvatars, minStrengthening, initialReputation, maxReputation, reputationFactor, minProposals, maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.turnDuration */ public SCGConfig updateTurnDuration(int _turnDuration){ return new SCGConfig(tournamentStyle, _turnDuration, maxNumAvatars, minStrengthening, initialReputation, maxReputation, reputationFactor, minProposals, maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.maxNumAvatars */ public SCGConfig updateMaxNumAvatars(int _maxNumAvatars){ return new SCGConfig(tournamentStyle, turnDuration, _maxNumAvatars, minStrengthening, initialReputation, maxReputation, reputationFactor, minProposals, maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.minStrengthening */ public SCGConfig updateMinStrengthening(double _minStrengthening){ return new SCGConfig(tournamentStyle, turnDuration, maxNumAvatars, _minStrengthening, initialReputation, maxReputation, reputationFactor, minProposals, maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.initialReputation */ public SCGConfig updateInitialReputation(double _initialReputation){ return new SCGConfig(tournamentStyle, turnDuration, maxNumAvatars, minStrengthening, _initialReputation, maxReputation, reputationFactor, minProposals, maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.maxReputation */ public SCGConfig updateMaxReputation(double _maxReputation){ return new SCGConfig(tournamentStyle, turnDuration, maxNumAvatars, minStrengthening, initialReputation, _maxReputation, reputationFactor, minProposals, maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.reputationFactor */ public SCGConfig updateReputationFactor(double _reputationFactor){ return new SCGConfig(tournamentStyle, turnDuration, maxNumAvatars, minStrengthening, initialReputation, maxReputation, _reputationFactor, minProposals, maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.minProposals */ public SCGConfig updateMinProposals(int _minProposals){ return new SCGConfig(tournamentStyle, turnDuration, maxNumAvatars, minStrengthening, initialReputation, maxReputation, reputationFactor, _minProposals, maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.maxProposals */ public SCGConfig updateMaxProposals(int _maxProposals){ return new SCGConfig(tournamentStyle, turnDuration, maxNumAvatars, minStrengthening, initialReputation, maxReputation, reputationFactor, minProposals, _maxProposals, numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.numRounds */ public SCGConfig updateNumRounds(int _numRounds){ return new SCGConfig(tournamentStyle, turnDuration, maxNumAvatars, minStrengthening, initialReputation, maxReputation, reputationFactor, minProposals, maxProposals, _numRounds, proposedClaimMustBeNew); } /** Updater for field SCGConfig.proposedClaimMustBeNew */ public SCGConfig updateProposedClaimMustBeNew(boolean _proposedClaimMustBeNew){ return new SCGConfig(tournamentStyle, turnDuration, maxNumAvatars, minStrengthening, initialReputation, maxReputation, reputationFactor, minProposals, maxProposals, numRounds, _proposedClaimMustBeNew); } /** Getter for field SCGConfig.tournamentStyle */ public TournamentStyle getTournamentStyle(){ return tournamentStyle; } /** Getter for field SCGConfig.turnDuration */ public int getTurnDuration(){ return turnDuration; } /** Getter for field SCGConfig.maxNumAvatars */ public int getMaxNumAvatars(){ return maxNumAvatars; } /** Getter for field SCGConfig.minStrengthening */ public double getMinStrengthening(){ return minStrengthening; } /** Getter for field SCGConfig.initialReputation */ public double getInitialReputation(){ return initialReputation; } /** Getter for field SCGConfig.maxReputation */ public double getMaxReputation(){ return maxReputation; } /** Getter for field SCGConfig.reputationFactor */ public double getReputationFactor(){ return reputationFactor; } /** Getter for field SCGConfig.minProposals */ public int getMinProposals(){ return minProposals; } /** Getter for field SCGConfig.maxProposals */ public int getMaxProposals(){ return maxProposals; } /** Getter for field SCGConfig.numRounds */ public int getNumRounds(){ return numRounds; } /** Getter for field SCGConfig.proposedClaimMustBeNew */ public boolean getProposedClaimMustBeNew(){ return proposedClaimMustBeNew; } }