Package uk.ac.starlink.table.join
Class RowLinkN
java.lang.Object
uk.ac.starlink.table.join.RowLink
uk.ac.starlink.table.join.RowLinkN
- All Implemented Interfaces:
Comparable<RowLink>
- Direct Known Subclasses:
PairsRowLink
RowLink implementation for an arbitrary number of RowRefs.
- Since:
- 1 Sep 2021
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionRowLinkN
(Collection<RowRef> rows) Constructs a RowLinkN from a collection of rows.protected
Constructs a RowLinkN from an array of row refs which is retained and may be modified (sorted) in place. -
Method Summary
Modifier and TypeMethodDescriptionstatic RowLinkN
fromModifiableArray
(RowRef[] rows) Constructs a RowLinkN from an array of row refs which is retained and may be modified (sorted) in place.getRef
(int i) Returns thei
th row ref in this ordered sequence of refs.int
size()
Returns the number of rows linked by this object.
-
Constructor Details
-
RowLinkN
Constructs a RowLinkN from a collection of rows.- Parameters:
rows
- collection of row refs, copied and not retained
-
RowLinkN
Constructs a RowLinkN from an array of row refs which is retained and may be modified (sorted) in place. Use with care.- Parameters:
rows
- array of rows which is retained and may be modified
-
-
Method Details
-
size
public int size()Description copied from class:RowLink
Returns the number of rows linked by this object. -
getRef
Description copied from class:RowLink
Returns thei
th row ref in this ordered sequence of refs. The sequence must be as defined byRowRef.compareTo
. -
fromModifiableArray
Constructs a RowLinkN from an array of row refs which is retained and may be modified (sorted) in place. Calling code should not make subsequent modifications to this array.- Parameters:
rows
- array of rows which is retained and may be modified- Returns:
- new RowLink
-