Class Attrs
java.lang.Object
aQute.bnd.header.Attrs
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Attrs.DataType<Double> static final Attrsstatic final Attrs.DataType<List<Double>> static final Attrs.DataType<List<Long>> static final Attrs.DataType<List<String>> static final Attrs.DataType<List<Version>> static final Attrs.DataType<Long> static final Attrs.DataType<String> static final PatternPattern for List with list typestatic final Attrs.DataType<Version> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(StringBuilder sb) voidappend(StringBuilder sb, Map.Entry<String, String> e) voidclear()booleancontainsKey(Object name) Deprecated.booleancontainsKey(String name) booleancontainsValue(Object value) Deprecated.booleancontainsValue(String value) static Objectconvert(Attrs.Type t, String s) static Objectstatic AttrsentrySet()booleanDeprecated.voidforEach(BiConsumer<? super String, ? super String> action) Deprecated.<T> TgetTyped(Attrs.DataType<T> type, String adname) inthashCode()Deprecated.static booleanisAttribute(String key) Predicate which returns true if the specified key is an attribute key.static booleanisDirective(String key) Predicate which returns true if the specified key is a directive key.booleanisEmpty()booleankeySet()voidMerge the attributesput(String key, Attrs.Type type, String value) voidvoidvoidputAllTyped(Map<? extends String, ? extends Object> attrs) voidDeprecated.Return a new Attrs that has only the attributes that match the predicate.intsize()stream()static StringtoDirective(String key) Check if a directive, if so, return directive name otherwise nulltoString()static Attrs.Typevalues()Methods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
STRING
-
LONG
-
DOUBLE
-
VERSION
-
LIST_STRING
-
LIST_LONG
-
LIST_DOUBLE
-
LIST_VERSION
-
TYPED
Pattern for List with list type -
EMPTY_ATTRS
-
-
Constructor Details
-
Attrs
public Attrs() -
Attrs
-
Attrs
-
Attrs
-
-
Method Details
-
putAllTyped
-
putTyped
-
clear
-
containsKey
-
containsKey
Deprecated.- Specified by:
containsKeyin interfaceMap<String,String>
-
containsValue
-
containsValue
Deprecated.- Specified by:
containsValuein interfaceMap<String,String>
-
entrySet
-
stream
-
forEach
-
get
-
get
-
get
-
isEmpty
-
keySet
-
put
-
put
-
getType
-
putAll
-
putAll
-
remove
-
remove
-
size
-
values
-
getVersion
-
toString
-
append
-
append
-
toString
-
equals
-
hashCode
-
isEqual
-
getTyped
-
getTyped
-
toType
-
convert
-
convert
-
mergeWith
Merge the attributes -
toDirective
-
isAttribute
Predicate which returns true if the specified key is an attribute key. -
isDirective
Predicate which returns true if the specified key is a directive key. -
create
-
with
-
select
Return a new Attrs that has only the attributes that match the predicate. The primary use case for this is AttributeClasses.- Parameters:
predicate- a predicate that returns true if the attribute must be included in the result- Returns:
- a new Attrs that can be used and modified by the caller
-