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
+23 -3
View File
@@ -27,8 +27,8 @@ import appeng.util.item.AEItemStack;
public class ItemSlot
{
public int slot;
public boolean isExtractable;
private int slot;
private boolean isExtractable;
// one or the other..
private IAEItemStack aeItemStack;
private ItemStack itemStack;
@@ -49,9 +49,29 @@ public class ItemSlot
return this.aeItemStack == null ? ( this.itemStack == null ? null : ( this.aeItemStack = AEItemStack.create( this.itemStack ) ) ) : this.aeItemStack;
}
public void setAEItemStack( final IAEItemStack is )
void setAEItemStack( final IAEItemStack is )
{
this.aeItemStack = is;
this.itemStack = null;
}
public boolean isExtractable()
{
return this.isExtractable;
}
void setExtractable( final boolean isExtractable )
{
this.isExtractable = isExtractable;
}
public int getSlot()
{
return this.slot;
}
public void setSlot( final int slot )
{
this.slot = slot;
}
}