Record Class DependencyList
- Record Components:
dependencies- array of dependencies; must contain no null elements (defensive copy made; not validated element-wise -- callers passing nulls will surface NPEs in downstream consumers)
A list of dependencies for a SQL object such as a view or metric view.
- When
null, the dependency information is not provided. - When the array is empty, dependencies are provided but the object has none.
- When the array is non-empty, each entry describes one dependency.
Records' auto-generated equals/hashCode on array fields fall through to
Object.equals(java.lang.Object) (reference equality), so this record overrides them to use
Arrays.equals(Object[], Object[]) / Arrays.hashCode(Object[]) on
dependencies; per-element equality delegates to the element's overridden
equals (TableDependency / FunctionDependency both implement value
semantics on their nameParts array). The defensive-copy accessor override clones
on read so callers cannot mutate the record's internal array.
- Since:
- 4.2.0
-
Constructor Summary
ConstructorsConstructorDescriptionDependencyList(Dependency[] dependencies) Creates an instance of aDependencyListrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns a defensive copy of the underlying dependencies array.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.static DependencyListof(Dependency[] dependencies) toString()Returns a string representation of this record class.
-
Constructor Details
-
DependencyList
Creates an instance of aDependencyListrecord class.- Parameters:
dependencies- the value for thedependenciesrecord component
-
-
Method Details
-
dependencies
Returns a defensive copy of the underlying dependencies array. -
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 withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
of
-