Tabnine Logo
IItemList.findPrecise
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: AppliedEnergistics/Applied-Energistics-2

@Override
public T findPrecise( final T i )
{
  return this.target.findPrecise( i );
}
origin: AppliedEnergistics/Applied-Energistics-2

@Override
public boolean isPrioritized( final IAEItemStack input )
{
  return this.itemListCache.findPrecise( input ) != null;
}
origin: AppliedEnergistics/Applied-Energistics-2

@Override
public IAEItemStack injectItems( final IAEItemStack input, final Actionable mode, final IActionSource src )
{
  final IAEItemStack local = this.itemListCache.findPrecise( input );
  if( local == null )
  {
    return input;
  }
  return null;
}
origin: AppliedEnergistics/Applied-Energistics-2

@Override
public boolean canAccept( final IAEItemStack input )
{
  return this.itemListCache.findPrecise( input ) != null;
}
origin: AppliedEnergistics/Applied-Energistics-2

@Override
public boolean isListed( final T input )
{
  return this.list.findPrecise( input ) != null;
}
origin: AppliedEnergistics/Applied-Energistics-2

public IAEItemStack making( final IAEItemStack what )
{
  return this.waitingFor.findPrecise( what );
}
origin: AppliedEnergistics/Applied-Energistics-2

public boolean canAccept( final IAEItemStack input )
{
  if( input instanceof IAEItemStack )
  {
    final IAEItemStack is = this.waitingFor.findPrecise( input );
    if( is != null && is.getStackSize() > 0 )
    {
      return true;
    }
  }
  return false;
}
origin: AppliedEnergistics/Applied-Energistics-2

  void ignore( final IAEItemStack what )
  {
    final IAEItemStack list = this.localCache.findPrecise( what );
    if( list != null )
    {
      list.setStackSize( 0 );
    }
  }
}
origin: AppliedEnergistics/Applied-Energistics-2

@Override
public IAEItemStack extractItems( final IAEItemStack request, final Actionable mode, final IActionSource src )
{
  final IAEItemStack local = this.itemListCache.findPrecise( request );
  if( local == null )
  {
    return null;
  }
  return request.copy();
}
origin: AppliedEnergistics/Applied-Energistics-2

private long getTotal( final IAEItemStack is )
{
  final IAEItemStack a = this.storage.findPrecise( is );
  final IAEItemStack b = this.active.findPrecise( is );
  final IAEItemStack c = this.pending.findPrecise( is );
  long total = 0;
  if( a != null )
  {
    total += a.getStackSize();
  }
  if( b != null )
  {
    total += b.getStackSize();
  }
  if( c != null )
  {
    total += c.getStackSize();
  }
  return total;
}
origin: AppliedEnergistics/Applied-Energistics-2

private long getTotal( final IAEItemStack is )
{
  final IAEItemStack a = this.storage.findPrecise( is );
  final IAEItemStack c = this.pending.findPrecise( is );
  final IAEItemStack m = this.missing.findPrecise( is );
  long total = 0;
  if( a != null )
  {
    total += a.getStackSize();
  }
  if( c != null )
  {
    total += c.getStackSize();
  }
  if( m != null )
  {
    total += m.getStackSize();
  }
  return total;
}
origin: AppliedEnergistics/Applied-Energistics-2

public void postUpdate( final IAEFluidStack is )
{
  final IAEFluidStack st = this.list.findPrecise( is );
  if( st != null )
  {
    st.reset();
    st.add( is );
  }
  else
  {
    this.list.add( is );
  }
}
origin: AppliedEnergistics/Applied-Energistics-2

public void postUpdate( final IAEItemStack is )
{
  final IAEItemStack st = this.list.findPrecise( is );
  if( st != null )
  {
    st.reset();
    st.add( is );
  }
  else
  {
    this.list.add( is );
  }
}
origin: AppliedEnergistics/Applied-Energistics-2

private void handleInput( final IItemList<IAEItemStack> s, final IAEItemStack l )
{
  IAEItemStack a = s.findPrecise( l );
  if( l.getStackSize() <= 0 )
  {
    if( a != null )
    {
      a.reset();
    }
  }
  else
  {
    if( a == null )
    {
      s.add( l.copy() );
      a = s.findPrecise( l );
    }
    if( a != null )
    {
      a.setStackSize( l.getStackSize() );
    }
  }
}
origin: AppliedEnergistics/Applied-Energistics-2

private void handleInput( final IItemList<IAEItemStack> s, final IAEItemStack l )
{
  IAEItemStack a = s.findPrecise( l );
  if( l.getStackSize() <= 0 )
  {
    if( a != null )
    {
      a.reset();
    }
  }
  else
  {
    if( a == null )
    {
      s.add( l.copy() );
      a = s.findPrecise( l );
    }
    if( a != null )
    {
      a.setStackSize( l.getStackSize() );
    }
  }
}
origin: AppliedEnergistics/Applied-Energistics-2

private void updateReportingValue( final IMEMonitor<IAEItemStack> itemInventory )
{
  if( this.configuredItem != null )
  {
    final IAEItemStack result = itemInventory.getStorageList().findPrecise( this.configuredItem );
    if( result == null )
    {
      this.configuredItem.setStackSize( 0 );
    }
    else
    {
      this.configuredItem.setStackSize( result.getStackSize() );
    }
  }
}
origin: AppliedEnergistics/Applied-Energistics-2

@Override
public IAEItemStack extractItems( final IAEItemStack request, final Actionable mode, final IActionSource src )
{
  if( this.hasPermission( src ) )
  {
    final IAEItemStack target = this.getStoredItems().findPrecise( request );
    if( target != null )
    {
      final IAEItemStack output = target.copy();
      if( mode == Actionable.SIMULATE )
      {
        return output;
      }
      target.setStackSize( 0 );
      this.securityTile.inventoryChanged();
      return output;
    }
  }
  return null;
}
origin: AppliedEnergistics/Applied-Energistics-2

private void updateReportingValue( final IMEMonitor<IAEFluidStack> monitor )
{
  final IAEFluidStack myStack = this.config.getFluidInSlot( 0 );
  if( myStack == null )
  {
    this.lastReportedValue = 0;
    for( final IAEFluidStack st : monitor.getStorageList() )
    {
      this.lastReportedValue += st.getStackSize();
    }
  }
  else
  {
    final IAEFluidStack r = monitor.getStorageList().findPrecise( myStack );
    if( r == null )
    {
      this.lastReportedValue = 0;
    }
    else
    {
      this.lastReportedValue = r.getStackSize();
    }
  }
  this.updateState();
}
origin: AppliedEnergistics/Applied-Energistics-2

final T l = this.getCellItems().findPrecise( request );
if( l != null )
origin: AppliedEnergistics/Applied-Energistics-2

final IAEItemStack list = this.localCache.findPrecise( request );
if( list == null || list.getStackSize() == 0 )
appeng.api.storage.dataIItemListfindPrecise

Popular methods of IItemList

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

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Collectors (java.util.stream)
  • Option (scala)
  • From CI to AI: The AI layer in your organization
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