Finally use Java7 <>
This commit is contained in:
@@ -85,9 +85,9 @@ import appeng.helpers.InventoryAction;
|
||||
public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
private static boolean switchingGuis;
|
||||
private final List<InternalSlotME> meSlots = new LinkedList<InternalSlotME>();
|
||||
private final List<InternalSlotME> meSlots = new LinkedList<>();
|
||||
// drag y
|
||||
private final Set<Slot> drag_click = new HashSet<Slot>();
|
||||
private final Set<Slot> drag_click = new HashSet<>();
|
||||
private final StackSizeRenderer stackSizeRenderer = new StackSizeRenderer();
|
||||
private GuiScrollbar myScrollBar = null;
|
||||
private boolean disableShiftClick = false;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class AEConfigGui extends GuiConfig
|
||||
|
||||
private static List<IConfigElement> getConfigElements()
|
||||
{
|
||||
final List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
final List<IConfigElement> list = new ArrayList<>();
|
||||
|
||||
for( final String cat : AEConfig.instance().getCategoryNames() )
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
private final IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
|
||||
private final IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
|
||||
|
||||
private final List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
|
||||
private final List<IAEItemStack> visual = new ArrayList<>();
|
||||
|
||||
private GuiBridge OriginalGui;
|
||||
private GuiButton cancel;
|
||||
@@ -237,7 +237,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
final int viewEnd = viewStart + 3 * this.rows;
|
||||
|
||||
String dspToolTip = "";
|
||||
final List<String> lineList = new LinkedList<String>();
|
||||
final List<String> lineList = new LinkedList<>();
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
private IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
|
||||
private IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
|
||||
|
||||
private List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
|
||||
private List<IAEItemStack> visual = new ArrayList<>();
|
||||
private GuiButton cancel;
|
||||
private int tooltip = -1;
|
||||
|
||||
@@ -113,7 +113,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
this.storage = AEApi.instance().storage().createItemList();
|
||||
this.active = AEApi.instance().storage().createItemList();
|
||||
this.pending = AEApi.instance().storage().createItemList();
|
||||
this.visual = new ArrayList<IAEItemStack>();
|
||||
this.visual = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -211,7 +211,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
final int viewEnd = viewStart + 3 * 6;
|
||||
|
||||
String dspToolTip = "";
|
||||
final List<String> lineList = new LinkedList<String>();
|
||||
final List<String> lineList = new LinkedList<>();
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
|
||||
@@ -58,12 +58,12 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
// TODO: copied from GuiMEMonitorable. It looks not changed, maybe unneeded?
|
||||
private final int offsetX = 9;
|
||||
|
||||
private final HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
|
||||
private final HashMap<Long, ClientDCInternalInv> byId = new HashMap<>();
|
||||
private final HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
|
||||
private final ArrayList<String> names = new ArrayList<String>();
|
||||
private final ArrayList<Object> lines = new ArrayList<Object>();
|
||||
private final ArrayList<String> names = new ArrayList<>();
|
||||
private final ArrayList<Object> lines = new ArrayList<>();
|
||||
|
||||
private final Map<String, Set<Object>> cachedSearches = new WeakHashMap<String, Set<Object>>();
|
||||
private final Map<String, Set<Object>> cachedSearches = new WeakHashMap<>();
|
||||
|
||||
private boolean refreshList = false;
|
||||
private MEGuiTextField searchField;
|
||||
@@ -313,7 +313,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
this.lines.add( n );
|
||||
|
||||
final ArrayList<ClientDCInternalInv> clientInventories = new ArrayList<ClientDCInternalInv>();
|
||||
final ArrayList<ClientDCInternalInv> clientInventories = new ArrayList<>();
|
||||
clientInventories.addAll( this.byName.get( n ) );
|
||||
|
||||
Collections.sort( clientInventories );
|
||||
@@ -371,7 +371,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
if( !this.cachedSearches.containsKey( searchTerm ) )
|
||||
{
|
||||
this.cachedSearches.put( searchTerm, new HashSet<Object>() );
|
||||
this.cachedSearches.put( searchTerm, new HashSet<>() );
|
||||
}
|
||||
|
||||
final Set<Object> cache = this.cachedSearches.get( searchTerm );
|
||||
|
||||
@@ -75,7 +75,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
if( appearances == null )
|
||||
{
|
||||
appearances = new HashMap<EnumPair, ButtonAppearance>();
|
||||
appearances = new HashMap<>();
|
||||
this.registerApp( 16 * 7, Settings.CONDENSER_OUTPUT, CondenserOutput.TRASH, ButtonToolTips.CondenserOutput, ButtonToolTips.Trash );
|
||||
this.registerApp( 16 * 7 + 1, Settings.CONDENSER_OUTPUT, CondenserOutput.MATTER_BALLS, ButtonToolTips.CondenserOutput, ButtonToolTips.MatterBalls );
|
||||
this.registerApp( 16 * 7 + 2, Settings.CONDENSER_OUTPUT, CondenserOutput.SINGULARITY, ButtonToolTips.CondenserOutput, ButtonToolTips.Singularity );
|
||||
|
||||
@@ -49,8 +49,8 @@ public class ItemRepo
|
||||
{
|
||||
|
||||
private final IItemList<IAEItemStack> list = AEApi.instance().storage().createItemList();
|
||||
private final ArrayList<IAEItemStack> view = new ArrayList<IAEItemStack>();
|
||||
private final ArrayList<ItemStack> dsp = new ArrayList<ItemStack>();
|
||||
private final ArrayList<IAEItemStack> view = new ArrayList<>();
|
||||
private final ArrayList<ItemStack> dsp = new ArrayList<>();
|
||||
private final IScrollSource src;
|
||||
private final ISortSource sortSrc;
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ public enum UVLModelLoader implements ICustomModelLoader
|
||||
return null;
|
||||
}
|
||||
object = object.get( "uvlightmap" ).getAsJsonObject();
|
||||
return new ImmutablePair<Float, Float>( JsonUtils.getFloat( object, "sky", 0 ), JsonUtils.getFloat( object, "block", 0 ) );
|
||||
return new ImmutablePair<>( JsonUtils.getFloat( object, "sky", 0 ), JsonUtils.getFloat( object, "block", 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user