Package aQute.bnd.osgi
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
Creates an instance of aPropertyKeyrecord class.- Parameters:
processor- the value for theprocessorrecord componentkey- the value for thekeyrecord componentfloor- the value for thefloorrecord component
-
-
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
Get the value of the property key- Returns:
- a processed value
-
getProvenance
Return the provenance of this key. This is generally the absolute path to the source file but can be a logical name as well. -
getRawValue
Get the raw value of the property key- Returns:
- a raw value
-
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
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
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
-