final variables and parameters

This commit is contained in:
thatsIch
2015-09-30 14:24:40 +02:00
parent 059523f543
commit 8b3a954f73
732 changed files with 9253 additions and 9256 deletions
@@ -34,7 +34,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
public final long id;
public final long sortBy;
public ClientDCInternalInv( int size, long id, long sortBy, String unlocalizedName )
public ClientDCInternalInv( final int size, final long id, final long sortBy, final String unlocalizedName )
{
this.inv = new AppEngInternalInventory( null, size );
this.unlocalizedName = unlocalizedName;
@@ -44,7 +44,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
public String getName()
{
String s = StatCollector.translateToLocal( this.unlocalizedName + ".name" );
final String s = StatCollector.translateToLocal( this.unlocalizedName + ".name" );
if( s.equals( this.unlocalizedName + ".name" ) )
{
return StatCollector.translateToLocal( this.unlocalizedName );
@@ -53,7 +53,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
}
@Override
public int compareTo( @Nonnull ClientDCInternalInv o )
public int compareTo( @Nonnull final ClientDCInternalInv o )
{
return ItemSorters.compareLong( this.sortBy, o.sortBy );
}
@@ -31,7 +31,7 @@ public class InternalSlotME
public final int yPos;
private final ItemRepo repo;
public InternalSlotME( ItemRepo def, int offset, int displayX, int displayY )
public InternalSlotME( final ItemRepo def, final int offset, final int displayX, final int displayY )
{
this.repo = def;
this.offset = offset;
+23 -23
View File
@@ -61,7 +61,7 @@ public class ItemRepo
private String NEIWord = null;
private boolean hasPower;
public ItemRepo( IScrollSource src, ISortSource sortSrc )
public ItemRepo( final IScrollSource src, final ISortSource sortSrc )
{
this.src = src;
this.sortSrc = sortSrc;
@@ -89,14 +89,14 @@ public class ItemRepo
return this.dsp.get( idx );
}
void setSearch( String search )
void setSearch( final String search )
{
this.searchString = search == null ? "" : search;
}
public void postUpdate( IAEItemStack is )
public void postUpdate( final IAEItemStack is )
{
IAEItemStack st = this.list.findPrecise( is );
final IAEItemStack st = this.list.findPrecise( is );
if( st != null )
{
@@ -109,7 +109,7 @@ public class ItemRepo
}
}
public void setViewCell( ItemStack[] list )
public void setViewCell( final ItemStack[] list )
{
this.myPartitionList = ItemViewCell.createFilter( list );
this.updateView();
@@ -123,15 +123,15 @@ public class ItemRepo
this.view.ensureCapacity( this.list.size() );
this.dsp.ensureCapacity( this.list.size() );
Enum viewMode = this.sortSrc.getSortDisplay();
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
final Enum viewMode = this.sortSrc.getSortDisplay();
final Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
if( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH )
{
this.updateNEI( this.searchString );
}
this.innerSearch = this.searchString;
boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
final boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
// boolean terminalSearchMods = Configuration.INSTANCE.settings.getSetting( Settings.SEARCH_MODS ) != YesNo.NO;
boolean searchMod = false;
@@ -146,13 +146,13 @@ public class ItemRepo
{
m = Pattern.compile( this.innerSearch.toLowerCase(), Pattern.CASE_INSENSITIVE );
}
catch( Throwable ignore )
catch( final Throwable ignore )
{
try
{
m = Pattern.compile( Pattern.quote( this.innerSearch.toLowerCase() ), Pattern.CASE_INSENSITIVE );
}
catch( Throwable __ )
catch( final Throwable __ )
{
return;
}
@@ -185,7 +185,7 @@ public class ItemRepo
continue;
}
String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
final String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
notDone = true;
if( m.matcher( dspName.toLowerCase() ).find() )
@@ -196,7 +196,7 @@ public class ItemRepo
if( terminalSearchToolTips && notDone )
{
for( Object lp : Platform.getTooltip( is ) )
for( final Object lp : Platform.getTooltip( is ) )
{
if( lp instanceof String && m.matcher( (CharSequence) lp ).find() )
{
@@ -213,8 +213,8 @@ public class ItemRepo
*/
}
Enum SortBy = this.sortSrc.getSortBy();
Enum SortDir = this.sortSrc.getSortDir();
final Enum SortBy = this.sortSrc.getSortBy();
final Enum SortDir = this.sortSrc.getSortDir();
ItemSorters.Direction = (appeng.api.config.SortDir) SortDir;
ItemSorters.init();
@@ -236,31 +236,31 @@ public class ItemRepo
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_NAME );
}
for( IAEItemStack is : this.view )
for( final IAEItemStack is : this.view )
{
this.dsp.add( is.getItemStack() );
}
}
private void updateNEI( String filter )
private void updateNEI( final String filter )
{
try
{
if( this.NEIWord == null || !this.NEIWord.equals( filter ) )
{
Class c = ReflectionHelper.getClass( this.getClass().getClassLoader(), "codechicken.nei.LayoutManager" );
Field fldSearchField = c.getField( "searchField" );
Object searchField = fldSearchField.get( c );
final Class c = ReflectionHelper.getClass( this.getClass().getClassLoader(), "codechicken.nei.LayoutManager" );
final Field fldSearchField = c.getField( "searchField" );
final Object searchField = fldSearchField.get( c );
Method a = searchField.getClass().getMethod( "setText", String.class );
Method b = searchField.getClass().getMethod( "onTextChange", String.class );
final Method a = searchField.getClass().getMethod( "setText", String.class );
final Method b = searchField.getClass().getMethod( "onTextChange", String.class );
this.NEIWord = filter;
a.invoke( searchField, filter );
b.invoke( searchField, "" );
}
}
catch( Throwable ignore )
catch( final Throwable ignore )
{
}
@@ -281,7 +281,7 @@ public class ItemRepo
return this.hasPower;
}
public void setPower( boolean hasPower )
public void setPower( final boolean hasPower )
{
this.hasPower = hasPower;
}
@@ -32,26 +32,26 @@ public class SlotDisconnected extends AppEngSlot
public final ClientDCInternalInv mySlot;
public SlotDisconnected( ClientDCInternalInv me, int which, int x, int y )
public SlotDisconnected( final ClientDCInternalInv me, final int which, final int x, final int y )
{
super( me.inv, which, x, y );
this.mySlot = me;
}
@Override
public boolean isItemValid( ItemStack par1ItemStack )
public boolean isItemValid( final ItemStack par1ItemStack )
{
return false;
}
@Override
public void putStack( ItemStack par1ItemStack )
public void putStack( final ItemStack par1ItemStack )
{
}
@Override
public boolean canTakeStack( EntityPlayer par1EntityPlayer )
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
{
return false;
}
@@ -61,11 +61,11 @@ public class SlotDisconnected extends AppEngSlot
{
if( Platform.isClient() )
{
ItemStack is = super.getStack();
final ItemStack is = super.getStack();
if( is != null && is.getItem() instanceof ItemEncodedPattern )
{
ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
ItemStack out = iep.getOutput( is );
final ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
final ItemStack out = iep.getOutput( is );
if( out != null )
{
return out;
@@ -76,7 +76,7 @@ public class SlotDisconnected extends AppEngSlot
}
@Override
public void onPickupFromSlot( EntityPlayer par1EntityPlayer, ItemStack par2ItemStack )
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
{
}
@@ -93,13 +93,13 @@ public class SlotDisconnected extends AppEngSlot
}
@Override
public ItemStack decrStackSize( int par1 )
public ItemStack decrStackSize( final int par1 )
{
return null;
}
@Override
public boolean isHere( IInventory inv, int slotIn )
public boolean isHere( final IInventory inv, final int slotIn )
{
return false;
}
+7 -7
View File
@@ -32,7 +32,7 @@ public class SlotME extends Slot
public final InternalSlotME mySlot;
public SlotME( InternalSlotME me )
public SlotME( final InternalSlotME me )
{
super( null, 0, me.xPos, me.yPos );
this.mySlot = me;
@@ -48,12 +48,12 @@ public class SlotME extends Slot
}
@Override
public void onPickupFromSlot( EntityPlayer par1EntityPlayer, ItemStack par2ItemStack )
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
{
}
@Override
public boolean isItemValid( ItemStack par1ItemStack )
public boolean isItemValid( final ItemStack par1ItemStack )
{
return false;
}
@@ -79,7 +79,7 @@ public class SlotME extends Slot
}
@Override
public void putStack( ItemStack par1ItemStack )
public void putStack( final ItemStack par1ItemStack )
{
}
@@ -91,19 +91,19 @@ public class SlotME extends Slot
}
@Override
public ItemStack decrStackSize( int par1 )
public ItemStack decrStackSize( final int par1 )
{
return null;
}
@Override
public boolean isHere( IInventory inv, int slotIn )
public boolean isHere( final IInventory inv, final int slotIn )
{
return false;
}
@Override
public boolean canTakeStack( EntityPlayer par1EntityPlayer )
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
{
return false;
}