Reduces visibility of internal fields/methods

Reduces the visibility of all fields to private and create setters/getters
when necessary. Exceptions are fields with GuiSync as these need to be
public.

Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
yueh
2015-10-08 15:42:42 +02:00
parent f054bd699b
commit e94a0cfccf
497 changed files with 7865 additions and 6908 deletions
@@ -51,20 +51,40 @@ public enum TickRates
PressureTunnel( 1, 120 );
public int min;
public int max;
private int min;
private int max;
TickRates( final int min, final int max )
{
this.min = min;
this.max = max;
this.setMin( min );
this.setMax( max );
}
public void Load( final AEConfig config )
{
config.addCustomCategoryComment( "TickRates", " Min / Max Tickrates for dynamic ticking, most of these components also use sleeping, to prevent constant ticking, adjust with care, non standard rates are not supported or tested." );
this.min = config.get( "TickRates", this.name() + ".min", this.min ).getInt( this.min );
this.max = config.get( "TickRates", this.name() + ".max", this.max ).getInt( this.max );
this.setMin( config.get( "TickRates", this.name() + ".min", this.getMin() ).getInt( this.getMin() ) );
this.setMax( config.get( "TickRates", this.name() + ".max", this.getMax() ).getInt( this.getMax() ) );
}
public int getMax()
{
return this.max;
}
public void setMax( final int max )
{
this.max = max;
}
public int getMin()
{
return this.min;
}
public void setMin( final int min )
{
this.min = min;
}
}