Package aQute.bnd.header
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 Attrs
static 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 Pattern
Pattern for List with list typeprivate final Map<String,
Attrs.Type> static final Attrs.DataType<Version>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(StringBuilder sb) private void
append
(StringBuilder sb, String key, String value) void
append
(StringBuilder sb, Map.Entry<String, String> e) void
clear()
boolean
containsKey
(Object name) Deprecated.boolean
containsKey
(String name) boolean
containsValue
(Object value) Deprecated.boolean
containsValue
(String value) static Object
convert
(Attrs.Type t, String s) static Object
static Attrs
entrySet()
boolean
Deprecated.void
forEach
(BiConsumer<? super String, ? super String> action) Deprecated.private Attrs.Type
getObjectType
(Object member) <T> T
getTyped
(Attrs.DataType<T> type, String adname) int
hashCode()
Deprecated.static boolean
isAttribute
(String key) Predicate which returns true if the specified key is an attribute key.static boolean
isDirective
(String key) Predicate which returns true if the specified key is a directive key.boolean
isEmpty()
boolean
keySet()
void
Merge the attributesput
(String key, Attrs.Type type, String value) void
void
void
putAllTyped
(Map<? extends String, ? extends Object> attrs) private String
void
Deprecated.Return a new Attrs that has only the attributes that match the predicate.int
size()
splitListAttribute
(String input) stream()
static String
toDirective
(String key) Check if a directive, if so, return directive name otherwise nulltoString()
static Attrs.Type
values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.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 -
map
-
types
-
EMPTY_ATTRS
-
-
Constructor Details
-
Attrs
-
Attrs
public Attrs() -
Attrs
-
Attrs
-
Attrs
-
-
Method Details
-
putAllTyped
-
putTyped
-
getObjectType
-
clear
public void clear() -
containsKey
-
containsKey
Deprecated.- Specified by:
containsKey
in interfaceMap<String,
String>
-
containsValue
-
containsValue
Deprecated.- Specified by:
containsValue
in interfaceMap<String,
String>
-
entrySet
-
stream
-
forEach
-
get
Deprecated. -
get
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
put
-
putType
-
getType
-
putAll
-
putAll
-
remove
Deprecated. -
remove
-
size
public int size() -
values
-
getVersion
-
toString
-
append
-
append
-
toString
-
append
-
equals
Deprecated. -
hashCode
Deprecated. -
isEqual
-
getTyped
-
getTyped
-
toType
-
convert
-
convert
-
splitListAttribute
- Throws:
IllegalArgumentException
-
mergeWith
Merge the attributes -
toDirective
Check if a directive, if so, return directive name otherwise null -
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
-