axis_examplecompt_changesinfo-opsversion-2.00version-3.01version-3.02
Last change
on this file since b770aa0 was
8780cbec,
checked in by Jay Jacobs <Jay.Jacobs@…>, 15 years ago
|
ABAC sources from Cobham
|
-
Property mode set to
100644
|
File size:
735 bytes
|
Rev | Line | |
---|
[8780cbec] | 1 | package com.algomagic.atn; |
---|
| 2 | |
---|
| 3 | import java.util.*; |
---|
| 4 | |
---|
| 5 | public class BatchUpdate { |
---|
| 6 | |
---|
| 7 | private List _updates; |
---|
| 8 | |
---|
| 9 | public BatchUpdate( List updates ) { |
---|
| 10 | _updates = updates; |
---|
| 11 | } |
---|
| 12 | |
---|
| 13 | public BatchUpdate( ) { |
---|
| 14 | _updates = new ArrayList( ); |
---|
| 15 | } |
---|
| 16 | |
---|
| 17 | public void addElementAttribute( ElementAttribute e ) { |
---|
| 18 | _updates.add( e ); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | public boolean isEmpty( ) { |
---|
| 22 | return _updates.isEmpty( ); |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | public void apply( ) { |
---|
| 27 | for( Iterator i = _updates.iterator( ); i.hasNext( ); ) { |
---|
| 28 | ElementAttribute e = (ElementAttribute)i.next( ); |
---|
| 29 | e.apply( ); |
---|
| 30 | } |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | public void undo( ) { |
---|
| 35 | for( Iterator i = _updates.iterator( ); i.hasNext( ); ) { |
---|
| 36 | ElementAttribute e = (ElementAttribute)i.next( ); |
---|
| 37 | e.undo( ); |
---|
| 38 | } |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.