Typo prorityInventory
This commit is contained in:
parent
51f76fe724
commit
a95eef919f
1 changed files with 9 additions and 9 deletions
|
@ -39,21 +39,21 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
||||||
final StorageChannel myChannel;
|
final StorageChannel myChannel;
|
||||||
final SecurityCache security;
|
final SecurityCache security;
|
||||||
|
|
||||||
// final TreeMultimap<Integer, IMEInventoryHandler<T>> prorityInventory;
|
// final TreeMultimap<Integer, IMEInventoryHandler<T>> priorityInventory;
|
||||||
final TreeMap<Integer, List<IMEInventoryHandler<T>>> prorityInventory;
|
final TreeMap<Integer, List<IMEInventoryHandler<T>>> priorityInventory;
|
||||||
|
|
||||||
public NetworkInventoryHandler(StorageChannel chan, SecurityCache security) {
|
public NetworkInventoryHandler(StorageChannel chan, SecurityCache security) {
|
||||||
myChannel = chan;
|
myChannel = chan;
|
||||||
this.security = security;
|
this.security = security;
|
||||||
prorityInventory = new TreeMap( prioritySorter ); // TreeMultimap.create( prioritySorter, hashSorter );
|
priorityInventory = new TreeMap( prioritySorter ); // TreeMultimap.create( prioritySorter, hashSorter );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addNewStorage(IMEInventoryHandler<T> h)
|
public void addNewStorage(IMEInventoryHandler<T> h)
|
||||||
{
|
{
|
||||||
int priority = h.getPriority();
|
int priority = h.getPriority();
|
||||||
List<IMEInventoryHandler<T>> list = prorityInventory.get( priority );
|
List<IMEInventoryHandler<T>> list = priorityInventory.get( priority );
|
||||||
if ( list == null )
|
if ( list == null )
|
||||||
prorityInventory.put( priority, list = new ArrayList() );
|
priorityInventory.put( priority, list = new ArrayList() );
|
||||||
|
|
||||||
list.add( h );
|
list.add( h );
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator<List<IMEInventoryHandler<T>>> i = prorityInventory.values().iterator();// asMap().entrySet().iterator();
|
Iterator<List<IMEInventoryHandler<T>>> i = priorityInventory.values().iterator();// asMap().entrySet().iterator();
|
||||||
|
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
|
@ -197,7 +197,7 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator<List<IMEInventoryHandler<T>>> i = prorityInventory.descendingMap().values().iterator();// prorityInventory.asMap().descendingMap().entrySet().iterator();
|
Iterator<List<IMEInventoryHandler<T>>> i = priorityInventory.descendingMap().values().iterator();// priorityInventory.asMap().descendingMap().entrySet().iterator();
|
||||||
|
|
||||||
T output = request.copy();
|
T output = request.copy();
|
||||||
request = request.copy();
|
request = request.copy();
|
||||||
|
@ -232,8 +232,8 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
||||||
if ( diveIteration( this, Actionable.SIMULATE ) )
|
if ( diveIteration( this, Actionable.SIMULATE ) )
|
||||||
return out;
|
return out;
|
||||||
|
|
||||||
// for (Entry<Integer, IMEInventoryHandler<T>> h : prorityInventory.entries())
|
// for (Entry<Integer, IMEInventoryHandler<T>> h : priorityInventory.entries())
|
||||||
for (List<IMEInventoryHandler<T>> i : prorityInventory.values())
|
for (List<IMEInventoryHandler<T>> i : priorityInventory.values())
|
||||||
for (IMEInventoryHandler<T> j : i)
|
for (IMEInventoryHandler<T> j : i)
|
||||||
out = j.getAvailableItems( out );
|
out = j.getAvailableItems( out );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue