Produced by Araxis Merge on 4/5/2017 4:21:47 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\working_scrub\Unredacted\eHX Code Base\eHX_Bld2_Source Code_CIF_2017-02-14\NHIN_adapter\AdapterLIB\src\main\java\gov\va\med\nhin\adapter\utils\collections | BoundedArrayList.java | Fri Feb 10 15:41:44 2017 UTC |
| 2 | eHX-CIF.zip\eHX-CIF\eHX Code Base\eHX_Bld2_Source Code_CIF_2017-02-14\NHIN_adapter\AdapterLIB\src\main\java\gov\va\med\nhin\adapter\utils\collections | BoundedArrayList.java | Mon Apr 3 14:25:50 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 122 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /* | |
| 2 | * To chan ge this li cense head er, choose License H eaders in Project Pr operties. | |
| 3 | * To chan ge this te mplate fil e, choose Tools | Te mplates | |
| 4 | * and ope n the temp late in th e editor. | |
| 5 | */ | |
| 6 | package go v.va.med.n hin.adapte r.utils.co llections; | |
| 7 | ||
| 8 | import jav a.util.*; | |
| 9 | ||
| 10 | /** | |
| 11 | * | |
| 12 | * @author DN S VAZQUD | |
| 13 | */ | |
| 14 | public cla ss Bounded ArrayList< T> extends ArrayList <T> | |
| 15 | { | |
| 16 | privat e long max Capacity; | |
| 17 | ||
| 18 | public BoundedAr rayList() | |
| 19 | { | |
| 20 | th is(500); | |
| 21 | } | |
| 22 | ||
| 23 | public BoundedAr rayList(in t maxCapac ity) | |
| 24 | { | |
| 25 | th is.maxCapa city = max Capacity; | |
| 26 | } | |
| 27 | ||
| 28 | @Overr ide | |
| 29 | public boolean a ddAll(int index, Col lection<? extends T> c) | |
| 30 | { | |
| 31 | ch eckCapacit y(c.size() ); | |
| 32 | re turn super .addAll(in dex, c); / /To change body of g enerated m ethods, ch oose Tools | Templat es. | |
| 33 | } | |
| 34 | ||
| 35 | @Overr ide | |
| 36 | public boolean a ddAll(Coll ection<? e xtends T> c) | |
| 37 | { | |
| 38 | ch eckCapacit y(c.size() ); | |
| 39 | re turn super .addAll(c) ; //To cha nge body o f generate d methods, choose To ols | Temp lates. | |
| 40 | } | |
| 41 | ||
| 42 | @Overr ide | |
| 43 | public void add( int index, T element ) | |
| 44 | { | |
| 45 | ch eckCapacit y(1); | |
| 46 | su per.add(in dex, eleme nt); //To change bod y of gener ated metho ds, choose Tools | T emplates. | |
| 47 | } | |
| 48 | ||
| 49 | @Overr ide | |
| 50 | public boolean a dd(T e) | |
| 51 | { | |
| 52 | ch eckCapacit y(1); | |
| 53 | re turn super .add(e); / /To change body of g enerated m ethods, ch oose Tools | Templat es. | |
| 54 | } | |
| 55 | ||
| 56 | privat e void che ckCapacity (int size) | |
| 57 | { | |
| 58 | if (size() + size > ma xCapacity) { | |
| 59 | throw ne w RuntimeE xception(" Cannot add item(s) t o list bec ause max c apacity of list has been reach ed."); | |
| 60 | } | |
| 61 | } | |
| 62 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.