Finally use Java7 <>
This commit is contained in:
@@ -42,7 +42,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
/*
|
||||
* Shared Tag Compound Cache.
|
||||
*/
|
||||
private static final WeakHashMap<SharedSearchObject, WeakReference<SharedSearchObject>> SHARED_TAG_COMPOUND = new WeakHashMap<SharedSearchObject, WeakReference<SharedSearchObject>>();
|
||||
private static final WeakHashMap<SharedSearchObject, WeakReference<SharedSearchObject>> SHARED_TAG_COMPOUND = new WeakHashMap<>();
|
||||
private final Item item;
|
||||
private final int meta;
|
||||
private SharedSearchObject sso;
|
||||
@@ -114,7 +114,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
sso.setShared( clone );
|
||||
clone.sso = sso;
|
||||
|
||||
SHARED_TAG_COMPOUND.put( sso, new WeakReference<SharedSearchObject>( sso ) );
|
||||
SHARED_TAG_COMPOUND.put( sso, new WeakReference<>( sso ) );
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import appeng.api.storage.data.IItemList;
|
||||
public final class FluidList implements IItemList<IAEFluidStack>
|
||||
{
|
||||
|
||||
private final Map<IAEFluidStack, IAEFluidStack> records = new HashMap<IAEFluidStack, IAEFluidStack>();
|
||||
private final Map<IAEFluidStack, IAEFluidStack> records = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void add( final IAEFluidStack option )
|
||||
@@ -177,7 +177,7 @@ public final class FluidList implements IItemList<IAEFluidStack>
|
||||
@Override
|
||||
public Iterator<IAEFluidStack> iterator()
|
||||
{
|
||||
return new MeaningfulFluidIterator<IAEFluidStack>( this.records.values().iterator() );
|
||||
return new MeaningfulFluidIterator<>( this.records.values().iterator() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,7 +36,7 @@ import appeng.api.storage.data.IItemList;
|
||||
public final class ItemList implements IItemList<IAEItemStack>
|
||||
{
|
||||
|
||||
private final NavigableMap<IAEItemStack, IAEItemStack> records = new ConcurrentSkipListMap<IAEItemStack, IAEItemStack>();
|
||||
private final NavigableMap<IAEItemStack, IAEItemStack> records = new ConcurrentSkipListMap<>();
|
||||
|
||||
@Override
|
||||
public void add( final IAEItemStack option )
|
||||
@@ -92,7 +92,7 @@ public final class ItemList implements IItemList<IAEItemStack>
|
||||
}
|
||||
else
|
||||
{
|
||||
final Collection<IAEItemStack> output = new LinkedList<IAEItemStack>();
|
||||
final Collection<IAEItemStack> output = new LinkedList<>();
|
||||
|
||||
for( final IAEItemStack is : or.getAEEquivalents() )
|
||||
{
|
||||
@@ -205,7 +205,7 @@ public final class ItemList implements IItemList<IAEItemStack>
|
||||
@Override
|
||||
public Iterator<IAEItemStack> iterator()
|
||||
{
|
||||
return new MeaningfulItemIterator<IAEItemStack>( this.records.values().iterator() );
|
||||
return new MeaningfulItemIterator<>( this.records.values().iterator() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,7 +54,7 @@ public class OreHelper
|
||||
}
|
||||
} );
|
||||
|
||||
private final Map<ItemRef, OreReference> references = new HashMap<ItemRef, OreReference>();
|
||||
private final Map<ItemRef, OreReference> references = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Test if the passed {@link ItemStack} is an ore.
|
||||
@@ -73,7 +73,7 @@ public class OreHelper
|
||||
final Collection<Integer> ores = ref.getOres();
|
||||
final Collection<String> set = ref.getEquivalents();
|
||||
|
||||
final Set<String> toAdd = new HashSet<String>();
|
||||
final Set<String> toAdd = new HashSet<>();
|
||||
|
||||
for( final String ore : OreDictionary.getOreNames() )
|
||||
{
|
||||
|
||||
@@ -35,8 +35,8 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
public class OreReference
|
||||
{
|
||||
|
||||
private final List<String> otherOptions = new LinkedList<String>();
|
||||
private final Set<Integer> ores = new HashSet<Integer>();
|
||||
private final List<String> otherOptions = new LinkedList<>();
|
||||
private final Set<Integer> ores = new HashSet<>();
|
||||
private List<IAEItemStack> aeOtherOptions = null;
|
||||
|
||||
Collection<String> getEquivalents()
|
||||
@@ -48,7 +48,7 @@ public class OreReference
|
||||
{
|
||||
if( this.aeOtherOptions == null )
|
||||
{
|
||||
this.aeOtherOptions = new ArrayList<IAEItemStack>( this.otherOptions.size() );
|
||||
this.aeOtherOptions = new ArrayList<>( this.otherOptions.size() );
|
||||
|
||||
// SUMMON AE STACKS!
|
||||
for( final String oreName : this.otherOptions )
|
||||
|
||||
Reference in New Issue
Block a user