Class AbstractCombined<T>

java.lang.Object
alexiil.mc.lib.attributes.misc.AbstractCombined<T>
All Implemented Interfaces:
Combined
Direct Known Subclasses:
CombinedFixedFluidInvView, CombinedFixedItemInvView, CombinedFluidExtractable, CombinedFluidInsertable, CombinedGroupedFluidInvView, CombinedGroupedItemInvView, CombinedItemExtractable, CombinedItemInsertable

public abstract class AbstractCombined<T>
extends java.lang.Object
implements Combined
Implementation helper class for LBA Combined.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.util.List<? extends T> list  
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected AbstractCombined​(java.util.List<? extends T> list)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    java.lang.Object getSubObject​(int index)  
    int getSubObjectCount()  
    int hashCode()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • list

      protected final java.util.List<? extends T> list
  • Constructor Details

  • Method Details

    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • getSubObjectCount

      public int getSubObjectCount()
      Specified by:
      getSubObjectCount in interface Combined
      Returns:
      The number of sub-objects that this combines to make. May return -1 if this cannot easily expose the sub-objects cleanly.
    • getSubObject

      public java.lang.Object getSubObject​(int index)
      Specified by:
      getSubObject in interface Combined
      Parameters:
      index - The index, between 0 and Combined.getSubObjectCount().
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object