prefer isEmpty over length() == 0
This commit is contained in:
@@ -202,7 +202,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
this.amountToCraft.setText( out );
|
||||
}
|
||||
|
||||
if( out.length() == 0 )
|
||||
if( out.isEmpty() )
|
||||
{
|
||||
out = "0";
|
||||
}
|
||||
@@ -276,7 +276,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
this.amountToCraft.setText( out );
|
||||
}
|
||||
|
||||
if( out.length() == 0 )
|
||||
if( out.isEmpty() )
|
||||
{
|
||||
out = "0";
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
if( character == ' ' && this.searchField.getText().length() == 0 )
|
||||
if( character == ' ' && this.searchField.getText().isEmpty() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
this.level.setText( Out );
|
||||
}
|
||||
|
||||
if( Out.length() == 0 )
|
||||
if( Out.isEmpty() )
|
||||
{
|
||||
Out = "0";
|
||||
}
|
||||
@@ -260,7 +260,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
this.level.setText( Out );
|
||||
}
|
||||
|
||||
if( Out.length() == 0 )
|
||||
if( Out.isEmpty() )
|
||||
{
|
||||
Out = "0";
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
if( character == ' ' && this.searchField.getText().length() == 0 )
|
||||
if( character == ' ' && this.searchField.getText().isEmpty() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ public class GuiPriority extends AEBaseGui
|
||||
this.priority.setText( out );
|
||||
}
|
||||
|
||||
if( out.length() == 0 )
|
||||
if( out.isEmpty() )
|
||||
{
|
||||
out = "0";
|
||||
}
|
||||
@@ -266,7 +266,7 @@ public class GuiPriority extends AEBaseGui
|
||||
this.priority.setText( out );
|
||||
}
|
||||
|
||||
if( out.length() == 0 )
|
||||
if( out.isEmpty() )
|
||||
{
|
||||
out = "0";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user