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
@@ -35,7 +35,7 @@ import appeng.helpers.IInterfaceHost;
public class ContainerInterface extends ContainerUpgradeable
{
final DualityInterface myDuality;
private final DualityInterface myDuality;
@GuiSync( 3 )
public YesNo bMode = YesNo.NO;
@@ -51,7 +51,7 @@ public class ContainerInterface extends ContainerUpgradeable
for( int x = 0; x < DualityInterface.NUMBER_OF_PATTERN_SLOTS; x++ )
{
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, this.invPlayer ) );
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, this.getInventoryPlayer() ) );
}
for( int x = 0; x < DualityInterface.NUMBER_OF_CONFIG_SLOTS; x++ )
@@ -93,7 +93,27 @@ public class ContainerInterface extends ContainerUpgradeable
@Override
protected void loadSettingsFromHost( final IConfigManager cm )
{
this.bMode = (YesNo) cm.getSetting( Settings.BLOCK );
this.iTermMode = (YesNo) cm.getSetting( Settings.INTERFACE_TERMINAL );
this.setBlockingMode( (YesNo) cm.getSetting( Settings.BLOCK ) );
this.setInterfaceTerminalMode( (YesNo) cm.getSetting( Settings.INTERFACE_TERMINAL ) );
}
public YesNo getBlockingMode()
{
return this.bMode;
}
private void setBlockingMode( final YesNo bMode )
{
this.bMode = bMode;
}
public YesNo getInterfaceTerminalMode()
{
return this.iTermMode;
}
private void setInterfaceTerminalMode( final YesNo iTermMode )
{
this.iTermMode = iTermMode;
}
}