congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IItemList.iterator
Code IndexAdd Tabnine to your IDE (free)

How to use
iterator
method
in
appeng.api.storage.data.IItemList

Best Java code snippets using appeng.api.storage.data.IItemList.iterator (Showing top 5 results out of 315)

origin: AppliedEnergistics/Applied-Energistics-2

@Override
public Iterator<T> iterator()
{
  return this.target.iterator();
}
origin: AppliedEnergistics/Applied-Energistics-2

public IMEAdaptorIterator( final IMEAdaptor parent, final IItemList<IAEItemStack> availableItems )
{
  this.stack = availableItems.iterator();
  this.containerSize = parent.getMaxSlots();
  this.parent = parent;
}
origin: AppliedEnergistics/Applied-Energistics-2

public void partition()
{
  IAEFluidTank h = this.storageBus.getConfig();
  final IMEInventory<IAEFluidStack> cellInv = this.storageBus.getInternalHandler();
  Iterator<IAEFluidStack> i = new NullIterator<>();
  if( cellInv != null )
  {
    final IItemList<IAEFluidStack> list = cellInv
        .getAvailableItems( AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ).createList() );
    i = list.iterator();
  }
  for( int x = 0; x < h.getSlots(); x++ )
  {
    if( i.hasNext() && this.isSlotEnabled( ( x / 9 ) - 2 ) )
    {
      h.setFluidInSlot( x, i.next() );
    }
    else
    {
      h.setFluidInSlot( x, null );
    }
  }
  this.detectAndSendChanges();
}
origin: AppliedEnergistics/Applied-Energistics-2

public void partition()
{
  final IItemHandler inv = this.getUpgradeable().getInventoryByName( "config" );
  final IMEInventory<IAEItemStack> cellInv = this.storageBus.getInternalHandler();
  Iterator<IAEItemStack> i = new NullIterator<>();
  if( cellInv != null )
  {
    final IItemList<IAEItemStack> list = cellInv
        .getAvailableItems( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ).createList() );
    i = list.iterator();
  }
  for( int x = 0; x < inv.getSlots(); x++ )
  {
    if( i.hasNext() && this.isSlotEnabled( ( x / 9 ) - 2 ) )
    {
      // TODO: check if ok
      final ItemStack g = i.next().asItemStackRepresentation();
      ItemHandlerUtil.setStackInSlot( inv, x, g );
    }
    else
    {
      ItemHandlerUtil.setStackInSlot( inv, x, ItemStack.EMPTY );
    }
  }
  this.detectAndSendChanges();
}
origin: AppliedEnergistics/Applied-Energistics-2

public void partition()
{
  final IItemHandler inv = this.getUpgradeable().getInventoryByName( "config" );
  final ItemStack is = this.getUpgradeable().getInventoryByName( "cell" ).getStackInSlot( 0 );
  final IStorageChannel channel = is.getItem() instanceof IStorageCell ? ( (IStorageCell) is.getItem() ).getChannel() : AEApi.instance()
      .storage()
      .getStorageChannel( IItemStorageChannel.class );
  final IMEInventory cellInv = AEApi.instance().registries().cell().getCellInventory( is, null, channel );
  Iterator<IAEStack> i = new NullIterator<>();
  if( cellInv != null )
  {
    final IItemList list = cellInv.getAvailableItems( channel.createList() );
    i = list.iterator();
  }
  for( int x = 0; x < inv.getSlots(); x++ )
  {
    if( i.hasNext() )
    {
      // TODO: check if ok
      final ItemStack g = i.next().asItemStackRepresentation();
      ItemHandlerUtil.setStackInSlot( inv, x, g );
    }
    else
    {
      ItemHandlerUtil.setStackInSlot( inv, x, ItemStack.EMPTY );
    }
  }
  this.detectAndSendChanges();
}
appeng.api.storage.dataIItemListiterator

Popular methods of IItemList

  • add
  • isEmpty
  • findPrecise
  • resetStatus
  • size
  • forEach
  • getFirstItem
  • addCrafting
  • addRequestable
  • addStorage
  • findFuzzy
  • spliterator
  • findFuzzy,
  • spliterator

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now