Package org.jboss.hal.meta
Class AttributeCollection
- java.lang.Object
-
- org.jboss.hal.meta.AttributeCollection
-
- All Implemented Interfaces:
Iterable<Property>,Collection<Property>
public class AttributeCollection extends Object implements Collection<Property>
Wrapper around a set of attribute descriptions to avoid direct manipulation of the underlying ModelNode
-
-
Constructor Summary
Constructors Constructor Description AttributeCollection(List<Property> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Property property)booleanaddAll(Collection<? extends Property> collection)List<String>alternatives(String name)Returns the alternatives for the specified attribute.StringcapabilityReference(String name)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> collection)Stringdescription(String name)voidforEach(Consumer<? super Property> action)ModelNodeget(String name)List<Property>group(String group)booleanisDefaultValue(String name, Object value)booleanisDeprecated(String name)booleanisEmpty()Iterator<Property>iterator()Propertyproperty(String name)booleanremove(Object o)booleanremoveAll(Collection<?> collection)List<Property>required()List<String>requiredBy(String name)Returns the attributes which require the specified attribute.booleanretainAll(Collection<?> collection)intsize()Stream<Property>stream()Object[]toArray()<T> T[]toArray(T[] ts)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, toArray
-
-
-
-
Method Detail
-
alternatives
public List<String> alternatives(String name)
Returns the alternatives for the specified attribute.- Parameters:
name- the name of the attribute- Returns:
- the alternatives for
nameor an empty list ifnamehas no alternatives or if there's no attributename
-
requiredBy
public List<String> requiredBy(String name)
Returns the attributes which require the specified attribute.- Parameters:
name- the name of the attribute which is required by the matching attributes- Returns:
- the attributes which require or an empty list if no attributes require
nameor if there's no attributename
-
isDeprecated
public boolean isDeprecated(String name)
-
add
public boolean add(Property property)
- Specified by:
addin interfaceCollection<Property>
-
size
public int size()
- Specified by:
sizein interfaceCollection<Property>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<Property>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<Property>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<Property>
-
toArray
public <T> T[] toArray(T[] ts)
- Specified by:
toArrayin interfaceCollection<Property>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<Property>
-
containsAll
public boolean containsAll(Collection<?> collection)
- Specified by:
containsAllin interfaceCollection<Property>
-
addAll
public boolean addAll(Collection<? extends Property> collection)
- Specified by:
addAllin interfaceCollection<Property>
-
removeAll
public boolean removeAll(Collection<?> collection)
- Specified by:
removeAllin interfaceCollection<Property>
-
retainAll
public boolean retainAll(Collection<?> collection)
- Specified by:
retainAllin interfaceCollection<Property>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Property>
-
stream
public Stream<Property> stream()
- Specified by:
streamin interfaceCollection<Property>
-
-