@@ -35,6 +35,22 @@ class Dataset(object):
35
35
36
36
def binarySearch (self , column , key ):
37
37
# type: (int, Any) -> int
38
+ """Performs a binary search on the specified column, looking for
39
+ the specified key.
40
+
41
+ Args:
42
+ column: The column to search in.
43
+ key: The key to search for.
44
+
45
+ Returns:
46
+ The index of the key in the column, or a negative number if
47
+ the key is not found.
48
+
49
+ Raises:
50
+ ClassCastException: If the column is not Comparable.
51
+ UnsupportedOperationException: If the Dataset implementation
52
+ declines to implement this operation.
53
+ """
38
54
pass
39
55
40
56
def getColumnAsList (self , col ):
@@ -55,6 +71,9 @@ def getColumnCount(self):
55
71
56
72
Returns:
57
73
The number of columns in the dataset.
74
+
75
+ Raises:
76
+ NotImplementedError: If the method is not implemented.
58
77
"""
59
78
raise NotImplementedError
60
79
@@ -67,6 +86,9 @@ def getColumnIndex(self, colName):
67
86
68
87
Returns:
69
88
The index of the column with the name colName.
89
+
90
+ Raises:
91
+ NotImplementedError: If the method is not implemented.
70
92
"""
71
93
raise NotImplementedError
72
94
@@ -79,6 +101,9 @@ def getColumnName(self, col):
79
101
80
102
Returns:
81
103
The name of the column at the index colIndex.
104
+
105
+ Raises:
106
+ NotImplementedError: If the method is not implemented.
82
107
"""
83
108
raise NotImplementedError
84
109
@@ -88,6 +113,9 @@ def getColumnNames(self):
88
113
89
114
Returns:
90
115
A list with the names of all the columns.
116
+
117
+ Raises:
118
+ NotImplementedError: If the method is not implemented.
91
119
"""
92
120
raise NotImplementedError
93
121
@@ -100,6 +128,9 @@ def getColumnType(self, col):
100
128
101
129
Returns:
102
130
The type of the column at the index.
131
+
132
+ Raises:
133
+ NotImplementedError: If the method is not implemented.
103
134
"""
104
135
raise NotImplementedError
105
136
@@ -109,6 +140,9 @@ def getColumnTypes(self):
109
140
110
141
Returns:
111
142
A list with the types of all the columns.
143
+
144
+ Raises:
145
+ NotImplementedError: If the method is not implemented.
112
146
"""
113
147
raise NotImplementedError
114
148
@@ -121,11 +155,12 @@ def getPrimitiveValueAt(self, row, col):
121
155
row: The row index. Zero-based index.
122
156
col: The column index. Zero-based index.
123
157
158
+ Returns:
159
+ If the given column is a numeric type or a Date, then
160
+ the value will be returned as a double.
161
+
124
162
Raises:
125
- IllegalArgumentException: if the value at row, col is not a
126
- number or Date.
127
- UnsupportedOperationException: If the Dataset implementation
128
- declines to implement this operation.
163
+ NotImplementedError: If the method is not implemented.
129
164
"""
130
165
raise NotImplementedError
131
166
@@ -137,9 +172,11 @@ def getQualityAt(self, row, col):
137
172
row: The row index. Zero-based index.
138
173
col: The column index. Zero-based index.
139
174
175
+ Returns:
176
+ The quality of the value at the given location.
177
+
140
178
Raises:
141
- ArrayIndexOutOfBoundsException: If the given row, col is out
142
- of range and hasQualityData() returns true.
179
+ NotImplementedError: If the method is not implemented.
143
180
"""
144
181
raise NotImplementedError
145
182
@@ -149,6 +186,9 @@ def getRowCount(self):
149
186
150
187
Returns:
151
188
The number of rows in the dataset.
189
+
190
+ Raises:
191
+ NotImplementedError: If the method is not implemented.
152
192
"""
153
193
raise NotImplementedError
154
194
@@ -163,6 +203,9 @@ def getValueAt(self, row, col):
163
203
164
204
Returns:
165
205
The value found at the row and column.
206
+
207
+ Raises:
208
+ NotImplementedError: If the method is not implemented.
166
209
"""
167
210
raise NotImplementedError
168
211
@@ -274,6 +317,10 @@ def getPrimitiveValueAt(self, row, col):
274
317
row: The row index. Zero-based index.
275
318
col: The column index. Zero-based index.
276
319
320
+ Returns:
321
+ If the given column is a numeric type or a Date, then
322
+ the value will be returned as a double.
323
+
277
324
Raises:
278
325
IllegalArgumentException: if the value at row, col is not a
279
326
number or Date.
@@ -290,6 +337,9 @@ def getQualityAt(self, row, col):
290
337
row: The row index. Zero-based index.
291
338
col: The column index. Zero-based index.
292
339
340
+ Returns:
341
+ The quality of the value at the given location.
342
+
293
343
Raises:
294
344
ArrayIndexOutOfBoundsException: If the given row, col is out
295
345
of range and hasQualityData() returns true.
@@ -501,12 +551,12 @@ def getPathLength(self):
501
551
502
552
def isAncestorOf (self , path ):
503
553
# type: (Path) -> bool
504
- pass
554
+ return True
505
555
506
556
@staticmethod
507
557
def isRelative (path ):
508
558
# type: (StringPath) -> bool
509
- pass
559
+ return True
510
560
511
561
def isRoot (self ):
512
562
# type: () -> bool
@@ -538,7 +588,7 @@ def compareTo(self, o):
538
588
539
589
def isAncestorOf (self , child ):
540
590
# type: (Path) -> bool
541
- pass
591
+ return True
542
592
543
593
544
594
class TypeUtilities (Object ):
0 commit comments