Java cleanup, Convert Vector to ArrayList

Change-Id: I323a6625f93347e69f3114fc10cb04dc759a539f
This commit is contained in:
Noel Grandin
2013-05-03 14:35:04 +02:00
parent 95e1ecbf89
commit 587c59fbc9
52 changed files with 474 additions and 435 deletions

View File

@ -38,7 +38,7 @@ class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult
{
private String aName;
private int nValue;
private java.util.Vector<XResultListener> aListeners = new java.util.Vector<XResultListener>();
private java.util.ArrayList<XResultListener> aListeners = new java.util.ArrayList<XResultListener>();
public ExampleAddInResult( String aNewName )
{
@ -56,7 +56,7 @@ class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult
public void addResultListener(com.sun.star.sheet.XResultListener aListener)
{
aListeners.addElement( aListener );
aListeners.add( aListener );
// immediately notify of initial value
aListener.modified( getResult() );
@ -64,7 +64,7 @@ class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult
public void removeResultListener(com.sun.star.sheet.XResultListener aListener)
{
aListeners.removeElement( aListener );
aListeners.remove( aListener );
}
public void incrementValue()
@ -72,10 +72,8 @@ class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult
++nValue;
com.sun.star.sheet.ResultEvent aEvent = getResult();
java.util.Enumeration<XResultListener> aEnum = aListeners.elements();
while (aEnum.hasMoreElements())
aEnum.nextElement().modified(
aEvent);
for( XResultListener l : aListeners)
l.modified(aEvent);
}
}