Finally use Java7 <>

This commit is contained in:
yueh
2017-07-20 21:21:45 +02:00
parent 8ec8babb6a
commit 7de90ed0ae
145 changed files with 315 additions and 315 deletions
@@ -58,7 +58,7 @@ public class CellInventory implements ICellInventory
private static final String ITEM_PRE_FORMATTED_SLOT = "PF#";
private static final String ITEM_PRE_FORMATTED_NAME = "PN";
private static final String ITEM_PRE_FORMATTED_FUZZY = "FP";
private static final HashSet<Integer> BLACK_LIST = new HashSet<Integer>();
private static final HashSet<Integer> BLACK_LIST = new HashSet<>();
private static String[] itemSlots;
private static String[] itemSlotCount;
private final NBTTagCompound tagCompound;
@@ -96,11 +96,11 @@ public class CellInventoryHandler extends MEInventoryHandler<IAEItemStack> imple
{
if( hasFuzzy )
{
this.setPartitionList( new FuzzyPriorityList<IAEItemStack>( priorityList, fzMode ) );
this.setPartitionList( new FuzzyPriorityList<>( priorityList, fzMode ) );
}
else
{
this.setPartitionList( new PrecisePriorityList<IAEItemStack>( priorityList ) );
this.setPartitionList( new PrecisePriorityList<>( priorityList ) );
}
}
}
@@ -37,7 +37,7 @@ public class ItemWatcher implements IStackWatcher
private final GridStorageCache gsc;
private final IStackWatcherHost myObject;
private final Set<IAEStack> myInterests = new HashSet<IAEStack>();
private final Set<IAEStack> myInterests = new HashSet<>();
public ItemWatcher( final GridStorageCache cache, final IStackWatcherHost host )
{
@@ -53,13 +53,13 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
}
else
{
this.internal = new MEPassThrough<T>( i, channel );
this.internal = new MEPassThrough<>( i, channel );
}
this.myPriority = 0;
this.myWhitelist = IncludeExclude.WHITELIST;
this.setBaseAccess( AccessRestriction.READ_WRITE );
this.myPartitionList = new DefaultPriorityList<T>();
this.myPartitionList = new DefaultPriorityList<>();
}
IncludeExclude getWhitelist()
@@ -49,7 +49,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
private final InventoryAdaptor adaptor;
private final IItemList<IAEItemStack> list = AEApi.instance().storage().createItemList();
private final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object>();
private final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap<>();
private final NavigableMap<Integer, CachedItemStack> memory;
private BaseActionSource mySource;
private StorageFilter mode = StorageFilter.EXTRACTABLE_ONLY;
@@ -57,7 +57,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
public MEMonitorIInventory( final InventoryAdaptor adaptor )
{
this.adaptor = adaptor;
this.memory = new ConcurrentSkipListMap<Integer, CachedItemStack>();
this.memory = new ConcurrentSkipListMap<>();
}
@Override
@@ -143,7 +143,7 @@ public class MEMonitorIInventory implements IMEMonitor<IAEItemStack>, ITickingMo
public TickRateModulation onTick()
{
final LinkedList<IAEItemStack> changes = new LinkedList<IAEItemStack>();
final LinkedList<IAEItemStack> changes = new LinkedList<>();
this.list.resetStatus();
int high = 0;
@@ -38,7 +38,7 @@ import appeng.util.inv.ItemListIgnoreCrafting;
public class MEMonitorPassThrough<T extends IAEStack<T>> extends MEPassThrough<T> implements IMEMonitor<T>, IMEMonitorHandlerReceiver<T>
{
private final HashMap<IMEMonitorHandlerReceiver<T>, Object> listeners = new HashMap<IMEMonitorHandlerReceiver<T>, Object>();
private final HashMap<IMEMonitorHandlerReceiver<T>, Object> listeners = new HashMap<>();
private BaseActionSource changeSource;
private IMEMonitor<T> monitor;
@@ -47,8 +47,8 @@ import appeng.util.ItemSorters;
public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHandler<T>
{
private static final ThreadLocal<LinkedList> DEPTH_MOD = new ThreadLocal<LinkedList>();
private static final ThreadLocal<LinkedList> DEPTH_SIM = new ThreadLocal<LinkedList>();
private static final ThreadLocal<LinkedList> DEPTH_MOD = new ThreadLocal<>();
private static final ThreadLocal<LinkedList> DEPTH_SIM = new ThreadLocal<>();
private static final Comparator<Integer> PRIORITY_SORTER = ( o1, o2 ) -> ItemSorters.compareInt( o2, o1 );
private static int currentPass = 0;