Skip to content

Commit 33ab8c8

Browse files
committed
Javadoc corrections and improvements
1 parent 615f266 commit 33ab8c8

40 files changed

Lines changed: 946 additions & 914 deletions

normativeTypesJava/src/org/epics/nt/HasAlarm.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/**
1212
* Interface for pvData type wrappers with, possibly optional, alarm field.
13+
* <p>
1314
* The alarm field should be a PVStructure conformant to the alarm
1415
* type alarm_t described in the NormativeTypes specification, which may or
1516
* may not have field name "alarm".
@@ -18,18 +19,18 @@
1819
public interface HasAlarm
1920
{
2021
/**
21-
* Attach a PVAlarm.
22-
* Will return false if no alarm field.
22+
* Attaches a PVAlarm to an alarm field.
23+
* Will return false if there is no alarm field.
2324
*
2425
* @param pvAlarm the PVAlarm to be attached
25-
* @return true if the operation was successfull, otherwise false.
26+
* @return true if the operation was successfull, otherwise false
2627
*/
2728
public boolean attachAlarm(PVAlarm pvAlarm);
2829

2930
/**
30-
* Get the alarm field.
31+
* Returns the alarm field.
3132
*
32-
* @return the alarm field PVStructure, which may be null
33+
* @return the alarm field or null if there is no alarm field
3334
*/
3435
public PVStructure getAlarm();
3536
}

normativeTypesJava/src/org/epics/nt/HasControl.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,27 @@
1010

1111
/**
1212
* Interface for pvData type wrappers with, possibly optional, control field.
13+
* <p>
1314
* The control field should be a PVStructure conformant to the control
1415
* type control_t described in the NormativeTypes specification, which may or
1516
* may not have field name "control".
1617
* @author dgh
1718
*/
1819
public interface HasControl
1920
{
20-
/**
21-
* Attach a PVControl.
22-
* Will return false if no control field.
23-
*
24-
* @param pvControl the PVControl to be attached
25-
* @return true if the operation was successfull, otherwise false
26-
*/
21+
/**
22+
* Attaches a PVControl to the control field.
23+
* Will return false if there is no control field.
24+
*
25+
* @param pvControl the PVControl to be attached
26+
* @return true if the operation was successfull, otherwise false
27+
*/
2728
public boolean attachControl(PVControl pvControl);
2829

2930
/**
30-
* Get the control field.
31+
* Returns the control field.
3132
*
32-
* @return the control field PVStructure, which may be null
33+
* @return the control field or null if there is no control field
3334
*/
3435
public PVStructure getControl();
3536
}

normativeTypesJava/src/org/epics/nt/HasDisplay.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,27 @@
1010

1111
/**
1212
* Interface for pvData type wrappers with, possibly optional, display field.
13+
* <p>
1314
* The display field should be a PVStructure conformant to the display
1415
* type display_t described in the NormativeTypes specification, which may or
1516
* may not have field name "display".
1617
* @author dgh
1718
*/
1819
public interface HasDisplay
1920
{
20-
/**
21-
* Attach a PVDisplay.
22-
* Will return false if no display field.
23-
*
24-
* @param pvDisplay the PVDisplay that will be attached
25-
* @return true if the operation was successfull, otherwise false
26-
*/
21+
/**
22+
* Attaches a PVDisplay to the display field.
23+
* Will return false if there is no display field.
24+
*
25+
* @param pvDisplay the PVDisplay that will be attached
26+
* @return true if the operation was successfull, otherwise false
27+
*/
2728
public boolean attachDisplay(PVDisplay pvDisplay);
2829

2930
/**
30-
* Get the display field.
31+
* Returns the display field.
3132
*
32-
* @return PVStructure which may be null
33+
* @return the display field or null if there is no display field
3334
*/
3435
public PVStructure getDisplay();
3536
}

normativeTypesJava/src/org/epics/nt/HasTimeStamp.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,27 @@
1010

1111
/**
1212
* Interface for pvData type wrappers with, possibly optional, time stamp field.
13+
* <p>
1314
* The time stamp field should be a PVStructure conformant to the time stamp
1415
* type time_t described in the NormativeTypes specification, which may or
1516
* may not have field name "timeStamp"
1617
* @author dgh
1718
*/
1819
public interface HasTimeStamp
1920
{
20-
/**
21-
* Attach a PVTimeStamp.
22-
* Will return false if no time stamp field.
23-
*
24-
* @param pvTimeStamp the PVTimeStamp that will be attached
25-
* @return true if the operation was successfull, otherwise false
26-
*/
21+
/**
22+
* Attaches a PVTimeStamp to the time stamp field.
23+
* Will return false if there is no time stamp field.
24+
*
25+
* @param pvTimeStamp the PVTimeStamp that will be attached
26+
* @return true if the operation was successfull, otherwise false
27+
*/
2728
public boolean attachTimeStamp(PVTimeStamp pvTimeStamp);
2829

2930
/**
30-
* Get the timeStamp.
31+
* Returns the time stamp field.
3132
*
32-
* @return the time stamp PVStructure, which may be null
33+
* @return the time tamp field or null if there is no time stamp field
3334
*/
3435
public PVStructure getTimeStamp();
3536
}

normativeTypesJava/src/org/epics/nt/NTAggregate.java

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ public class NTAggregate
3232
/**
3333
* Creates an NTAggregate wrapping the specified PVStructure if the latter is compatible.
3434
* <p>
35-
* Checks the supplied structure is compatible with NTAggregate
36-
* and if so returns a NTAggregate which wraps it.
35+
* Checks the supplied PVStructure is compatible with NTAggregate
36+
* and if so returns an NTAggregate which wraps it.
3737
* This method will return null if the structure is is not compatible
3838
* or is null.
39+
*
3940
* @param pvStructure the PVStructure to be wrapped
4041
* @return the NTAggregate instance on success, null otherwise
4142
*/
@@ -61,10 +62,10 @@ public static NTAggregate wrapUnsafe(PVStructure pvStructure)
6162
}
6263

6364
/**
64-
* Checks if the specified structure reports to be a compatible NTAggregate.
65+
* Returns whether the specified Structure reports to be a compatible NTAggregate.
6566
* <p>
66-
* Checks whether the specified structure reports compatibility with this
67-
* version of NTAggregate through type ID, including checking version numbers.
67+
* Checks if the specified Structure reports compatibility with this
68+
* version of NTAggregate through its type ID, including checking version numbers.
6869
* The return value does not depend on whether the structure is actually
6970
* compatible in terms of its introspection type.
7071
*
@@ -77,10 +78,10 @@ public static boolean is_a(Structure structure)
7778
}
7879

7980
/**
80-
* Checks if the specified structure reports to be a compatible NTAggregate.
81+
* Returns whether the specified PVStructure reports to be a compatible NTAggregate.
8182
* <p>
82-
* Checks whether the specified structure reports compatibility with this
83-
* version of NTAggregate through type ID, including checking version numbers.
83+
* Checks if the specified PVStructure reports compatibility with this
84+
* version of NTAggregate through its type ID, including checking version numbers.
8485
* The return value does not depend on whether the structure is actually
8586
* compatible in terms of its introspection type.
8687
*
@@ -93,10 +94,10 @@ public static boolean is_a(PVStructure pvStructure)
9394
}
9495

9596
/**
96-
* Checks if the specified structure is compatible with NTAggregate.
97+
* Returns whether the specified Structure is compatible with NTAggregate.
9798
* <p>
98-
* Checks whether the specified structure is compatible with this version
99-
* of NTAggregate through introspection interface.
99+
* Checks if the specified Structure is compatible with this version
100+
* of NTAggregate through the introspection interface.
100101
*
101102
* @param structure the Structure to test
102103
* @return (false,true) if (is not, is) a compatible NTAggregate
@@ -181,10 +182,10 @@ public static boolean isCompatible(Structure structure)
181182
}
182183

183184
/**
184-
* Checks if the specified structure is compatible with NTAggregate.
185+
* Returns whether the specified PVStructure is compatible with NTAggregate.
185186
* <p>
186-
* Checks whether the specified structure is compatible with this version
187-
* of NTAggregate through introspection interface.
187+
* Checks if the specified PVStructure is compatible with this version
188+
* of NTAggregate through the introspection interface.
188189
*
189190
* @param pvStructure the PVStructure to test
190191
* @return (false,true) if (is not, is) a compatible NTAggregate
@@ -197,20 +198,21 @@ public static boolean isCompatible(PVStructure pvStructure)
197198
}
198199

199200
/**
200-
* Checks if the specified structure is a valid NTAggregate.
201-
* <p>
202-
* Checks whether the wrapped structure is valid with respect to this
201+
* Returns whether the wrapped PVStructure is valid with respect to this
203202
* version of NTAggregate.
203+
* <p>
204+
* Unlike isCompatible(), isValid() may perform checks on the value
205+
* data as well as the introspection data.
204206
*
205-
* @return (false,true) if (is not, is) a valid NTAggregate
207+
* @return (false,true) if wrapped PVStructure (is not, is) a valid NTAggregate
206208
*/
207209
public boolean isValid()
208210
{
209211
return true;
210212
}
211213

212214
/**
213-
* Create an NTAggregate builder instance.
215+
* Creates an NTAggregate builder instance.
214216
*
215217
* @return builder instance.
216218
*/
@@ -220,109 +222,109 @@ public static NTAggregateBuilder createBuilder()
220222
}
221223

222224
/**
223-
* Get the pvStructure.
225+
* Returns the PVStructure wrapped by this instance.
224226
*
225-
* @return PVStructure
227+
* @return the PVStructure wrapped by this instance
226228
*/
227229
public PVStructure getPVStructure()
228230
{
229231
return pvNTAggregate;
230232
}
231233

232234
/**
233-
* Get the value field.
235+
* Returns the value field.
234236
*
235-
* @return the PVDouble for the aggregate
237+
* @return the value field
236238
*/
237239
public PVDouble getValue()
238240
{
239241
return pvValue;
240242
}
241243

242244
/**
243-
* Get the N field.
245+
* Returns the N field.
244246
*
245-
* @return the PVLong for the aggregate
247+
* @return the N field
246248
*/
247249
public PVLong getN()
248250
{
249251
return pvNTAggregate.getSubField(PVLong.class, "N");
250252
}
251253

252254
/**
253-
* Get the dispersion field.
255+
* Returns the dispersion field.
254256
*
255-
* @return the PVDouble for the aggregate
257+
* @return the dispersion or null if no such field
256258
*/
257259
public PVDouble getDispersion()
258260
{
259261
return pvNTAggregate.getSubField(PVDouble.class, "dispersion");
260262
}
261263

262264
/**
263-
* Get the first field.
264-
*
265-
* @return the last value for the aggregate
265+
* Returns the first field.
266+
267+
* @return the first field or null if no such field
266268
*/
267269
public PVDouble getFirst()
268270
{
269271
return pvNTAggregate.getSubField(PVDouble.class, "first");
270272
}
271273

272274
/**
273-
* Get the firstTimeStamp field.
275+
* Returns the firstTimeStamp field.
274276
*
275-
* @return the timeStamp for the first value of the aggregate
277+
* @return the firstTimeStamp field or null if no such field
276278
*/
277279
public PVStructure getFirstTimeStamp()
278280
{
279281
return pvNTAggregate.getSubField(PVStructure.class, "firstTimeStamp");
280282
}
281283

282284
/**
283-
* Get the last field.
285+
* Returns the last field.
284286
*
285-
* @return the last value for the aggregate
287+
* @return the last field or null if no such field
286288
*/
287289
public PVDouble getLast()
288290
{
289291
return pvNTAggregate.getSubField(PVDouble.class, "last");
290292
}
291293

292294
/**
293-
* Get the lastTimeStamp field.
295+
* Returns the lastTimeStamp field.
294296
*
295-
* @return the timeStamp for the last value of the aggregate
297+
* @return the lastTimeStamp field or null if no such field
296298
*/
297299
public PVStructure getLastTimeStamp()
298300
{
299301
return pvNTAggregate.getSubField(PVStructure.class, "lastTimeStamp");
300302
}
301303

302304
/**
303-
* Get the max field.
305+
* Returns the max field.
304306
*
305-
* @return the max for the aggregate
307+
* @return the max field or null if no such field
306308
*/
307309
public PVDouble getMax()
308310
{
309311
return pvNTAggregate.getSubField(PVDouble.class, "max");
310312
}
311313

312314
/**
313-
* Get the min field.
315+
* Returns the min field.
314316
*
315-
* @return the max for the aggregate
317+
* @return the min field or null if no such field
316318
*/
317319
public PVDouble getMin()
318320
{
319321
return pvNTAggregate.getSubField(PVDouble.class, "min");
320322
}
321323

322324
/**
323-
* Get the descriptor field.
325+
* Returns the descriptor field.
324326
*
325-
* @return the PVString or null if no descriptor field
327+
* @return the descriptor field or null if no such field
326328
*/
327329
public PVString getDescriptor()
328330
{

0 commit comments

Comments
 (0)