unit Myc.Data.Tuple; interface type ITuple = interface {$region 'private'} function GetItems(Idx: Integer): T; function GetCount: Integer; {$endregion} property Items[Idx: Integer]: T read GetItems; default; property Count: Integer read GetCount; end; // Concrete generic implementation TTupleImpl = class(TInterfacedObject, ITuple) private FItems: TArray; function GetItems(Idx: Integer): T; function GetCount: Integer; public constructor Create(const AItems: TArray); end; implementation { TTupleImpl } constructor TTupleImpl.Create(const AItems: TArray); begin inherited Create; FItems := AItems; end; function TTupleImpl.GetCount: Integer; begin Result := Length(FItems); end; function TTupleImpl.GetItems(Idx: Integer): T; begin Result := FItems[Idx]; end; end.