Record Class Processor.PropertyKey
java.lang.Object
java.lang.Record
aQute.bnd.osgi.Processor.PropertyKey
- All Implemented Interfaces:
Comparable<Processor.PropertyKey>
- Enclosing class:
Processor
public static record Processor.PropertyKey(Processor processor, String key, int floor)
extends Record
implements Comparable<Processor.PropertyKey>
A Property Key is the pair of a Processor and a key it defines. It also
defines if this is the firsts definition viewed from this Processor. The
floor indicates where the property is defined relative to its parents.
Zero is in the current processor, 1, is its parents, and so on.
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyKey(Processor processor, String key, int floor) Creates an instance of aPropertyKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.static List<Processor.PropertyKey> Find visible property keys.intfloor()Returns the value of thefloorrecord component.Return the provenance of this key.Get the raw value of the property keygetValue()Get the value of the property keyfinal inthashCode()Returns a hash code value for this object.booleanCheck if this PropertyKey belongs to the given processorkey()Returns the value of thekeyrecord component.Returns the value of theprocessorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PropertyKey
-
-
Method Details
-
isLocalTo
Check if this PropertyKey belongs to the given processor- Parameters:
p- the processor to check- Returns:
- true if our processor is the same as p
-
getValue
-
getProvenance
-
getRawValue
-
compareTo
- Specified by:
compareToin interfaceComparable<Processor.PropertyKey>
-
findVisible
Find visible property keys. "Visible" in this context means that among thePropertyKeyobjects with the same key, only the one with the lowest floor number is included in the result.- Parameters:
keys-- Returns:
- only unique keys which are visible (lowest floor value)
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
processor
Returns the value of theprocessorrecord component.- Returns:
- the value of the
processorrecord component
-
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
floor
public int floor()Returns the value of thefloorrecord component.- Returns:
- the value of the
floorrecord component
-