Package org.sonar.plugins.python.indexer
Record Class NamespacePackageTelemetry
java.lang.Object
java.lang.Record
org.sonar.plugins.python.indexer.NamespacePackageTelemetry
- Record Components:
packagesWithInit- The number of packages with an __init__.py file.packagesWithoutInit- The number of packages without an __init__.py file.duplicatePackagesWithoutInit- The number of packages without an __init__.py file that appear multiple times. Each occurrence increments this count.namespacePackagesInRegularPackage- The number of packages without an __init__.py file that have at least one parent with an __init__.py file.
public record NamespacePackageTelemetry(int packagesWithInit, int packagesWithoutInit, int duplicatePackagesWithoutInit, int namespacePackagesInRegularPackage)
extends Record
Telemetry data for namespace packages.
-
Constructor Summary
ConstructorsConstructorDescriptionNamespacePackageTelemetry(int packagesWithInit, int packagesWithoutInit, int duplicatePackagesWithoutInit, int namespacePackagesInRegularPackage) Creates an instance of aNamespacePackageTelemetryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theduplicatePackagesWithoutInitrecord component.static NamespacePackageTelemetryempty()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thenamespacePackagesInRegularPackagerecord component.intReturns the value of thepackagesWithInitrecord component.intReturns the value of thepackagesWithoutInitrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NamespacePackageTelemetry
public NamespacePackageTelemetry(int packagesWithInit, int packagesWithoutInit, int duplicatePackagesWithoutInit, int namespacePackagesInRegularPackage) Creates an instance of aNamespacePackageTelemetryrecord class.- Parameters:
packagesWithInit- the value for thepackagesWithInitrecord componentpackagesWithoutInit- the value for thepackagesWithoutInitrecord componentduplicatePackagesWithoutInit- the value for theduplicatePackagesWithoutInitrecord componentnamespacePackagesInRegularPackage- the value for thenamespacePackagesInRegularPackagerecord component
-
-
Method Details
-
empty
-
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. All components in this record class are compared with '=='. -
packagesWithInit
public int packagesWithInit()Returns the value of thepackagesWithInitrecord component.- Returns:
- the value of the
packagesWithInitrecord component
-
packagesWithoutInit
public int packagesWithoutInit()Returns the value of thepackagesWithoutInitrecord component.- Returns:
- the value of the
packagesWithoutInitrecord component
-
duplicatePackagesWithoutInit
public int duplicatePackagesWithoutInit()Returns the value of theduplicatePackagesWithoutInitrecord component.- Returns:
- the value of the
duplicatePackagesWithoutInitrecord component
-
namespacePackagesInRegularPackage
public int namespacePackagesInRegularPackage()Returns the value of thenamespacePackagesInRegularPackagerecord component.- Returns:
- the value of the
namespacePackagesInRegularPackagerecord component
-