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:
@@ -38,9 +38,9 @@ import com.google.common.collect.ImmutableList;
|
||||
public class IMEAdaptor extends InventoryAdaptor
|
||||
{
|
||||
|
||||
final IMEInventory<IAEItemStack> target;
|
||||
final BaseActionSource src;
|
||||
int maxSlots = 0;
|
||||
private final IMEInventory<IAEItemStack> target;
|
||||
private final BaseActionSource src;
|
||||
private int maxSlots = 0;
|
||||
|
||||
public IMEAdaptor( final IMEInventory<IAEItemStack> input, final BaseActionSource src )
|
||||
{
|
||||
@@ -54,7 +54,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
return new IMEAdaptorIterator( this, this.getList() );
|
||||
}
|
||||
|
||||
IItemList<IAEItemStack> getList()
|
||||
private IItemList<IAEItemStack> getList()
|
||||
{
|
||||
return this.target.getAvailableItems( AEApi.instance().storage().createItemList() );
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
return this.doRemoveItems( amount, filter, destination, Actionable.MODULATE );
|
||||
}
|
||||
|
||||
public ItemStack doRemoveItems( final int amount, final ItemStack filter, final IInventoryDestination destination, final Actionable type )
|
||||
private ItemStack doRemoveItems( final int amount, final ItemStack filter, final IInventoryDestination destination, final Actionable type )
|
||||
{
|
||||
IAEItemStack req = null;
|
||||
|
||||
@@ -114,7 +114,7 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
return this.doRemoveItemsFuzzy( amount, filter, destination, Actionable.MODULATE, fuzzyMode );
|
||||
}
|
||||
|
||||
public ItemStack doRemoveItemsFuzzy( final int amount, final ItemStack filter, final IInventoryDestination destination, final Actionable type, final FuzzyMode fuzzyMode )
|
||||
private ItemStack doRemoveItemsFuzzy( final int amount, final ItemStack filter, final IInventoryDestination destination, final Actionable type, final FuzzyMode fuzzyMode )
|
||||
{
|
||||
final IAEItemStack reqFilter = AEItemStack.create( filter );
|
||||
if( reqFilter == null )
|
||||
@@ -185,4 +185,14 @@ public class IMEAdaptor extends InventoryAdaptor
|
||||
{
|
||||
return !this.getList().isEmpty();
|
||||
}
|
||||
|
||||
int getMaxSlots()
|
||||
{
|
||||
return this.maxSlots;
|
||||
}
|
||||
|
||||
void setMaxSlots( final int maxSlots )
|
||||
{
|
||||
this.maxSlots = maxSlots;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user