Package alexiil.mc.lib.attributes
Class ItemAttributeList<T>
java.lang.Object
alexiil.mc.lib.attributes.AbstractAttributeList<T>
alexiil.mc.lib.attributes.ItemAttributeList<T>
- 
Field SummaryFields inherited from class alexiil.mc.lib.attributes.AbstractAttributeListattribute, list
- 
Constructor SummaryConstructorsConstructorDescriptionItemAttributeList(Attribute<T> attribute)ItemAttributeList(Attribute<T> attribute, Predicate<T> searchMatcher)
- 
Method SummaryModifier and TypeMethodDescriptionvoidDirectly adds the given object to this list.combine(AttributeList<T> after, CombinableAttribute<T> combinable)intbooleanvoidOffers the given object to this list.Methods inherited from class alexiil.mc.lib.attributes.AbstractAttributeListassertAdding, assertUsing, combine, get, getCount, getFirst, getFirstOrNull
- 
Constructor Details- 
ItemAttributeList
- 
ItemAttributeList- Parameters:
- searchMatcher- A filter for all- addedobjects.
 
 
- 
- 
Method Details- 
addDirectly adds the given object to this list.- Parameters:
- object- The object to add.
 
- 
offerOffers the given object to this list. If the given object is not an instance of the currentAbstractAttributeList.attribute(and it cannot beconvertedinto it) then this will not affect this list.- Parameters:
- object- The object to offer, which may implement- Convertibleif it can be converted into many different forms.
 
- 
hasOfferedAnypublic boolean hasOfferedAny()- Returns:
- True if any calls to add(Object)have been made. (Including calls tooffer(Object)and it's variants).
 
- 
getOfferedCountpublic int getOfferedCount()- Returns:
- The number of calls to add(Object)(including calls tooffer(Object)and it's variants).
 
- 
combine- Returns:
- A combined version of this list and then the second given list, or the attribute's default value if both lists are empty.
 
 
-