Package alexiil.mc.lib.attributes
Class AbstractAttributeList<T>
java.lang.Object
alexiil.mc.lib.attributes.AbstractAttributeList<T>
- Direct Known Subclasses:
 AttributeList,ItemAttributeList
public abstract class AbstractAttributeList<T>
extends java.lang.Object
The base class for 
AttributeList and ItemAttributeList.- 
Field Summary
 - 
Constructor Summary
Constructors Constructor Description AbstractAttributeList(Attribute<T> attribute) - 
Method Summary
Modifier and Type Method Description protected voidassertAdding()protected voidassertUsing()Tcombine(CombinableAttribute<T> combinable)Tget(int index)intgetCount()TgetFirst(DefaultedAttribute<T> defaulted)TgetFirstOrNull() 
- 
Field Details
 - 
Constructor Details
 - 
Method Details
- 
getCount
public int getCount()- Returns:
 - The number of attribute instances added to this list.
 
 - 
get
 - 
getFirstOrNull
 - 
getFirst
 - 
combine
- Returns:
 - A combined version of this list, or the attribute's default value if this list is empty.
 
 - 
assertAdding
protected void assertAdding() - 
assertUsing
protected void assertUsing() 
 -