\' Gambas class file
Private $dato As New Collection
Private arrayKey As New String[]
Private contador As Integer = 0
Property count As Integer
Property Length As Integer
Private Function count_Read() As Integer
Dim c As Integer
c = $dato.Count
Return c
End
Private Sub count_write(v As Integer)
End
Public Sub add(valor As Variant, key As String)
$dato.Add(valor, key)
arrayKey.add(key)
End
Public Sub Clear()
$dato.Clear()
arrayKey.Clear()
End
Public Sub Copy() As MejoraColeccion
Dim m As New MejoraColeccion
Dim a As Integer
For a = 0 To Me.count - 1
m.add(Me[a], Me.Key(a))
Next
Return m
End
Public Function Exist(key As String) As Boolean
Return $dato.Exist(key)
End
Public Sub Remove(key As Integer)
Try $dato.Remove(key)
Try arrayKey.Remove(arrayKey.Find(key))
End
Public Function _get(v As Variant) As String
Dim c As String
c = Str$(v)
If IsNumber(c) Then
Try Return $dato[arrayKey[v]]
If Error Then
Return Null \'por si se produce un error
Endif
Else
Try Return $dato[v]
If Error Then
Return Null \'por si se produce un error
Endif
Endif
End
Public Function Key(v As Integer) As String
Return arrayKey[v]
End
Private Function Length_Read() As Integer
Dim c As String
c = $dato.Length
Return c
End
Private Sub Length_Write(Value As Integer)
End