From 224dccbb362988345dff84c658efcaa7e7defa2d Mon Sep 17 00:00:00 2001 From: bvosburgh Date: Mon, 5 Nov 2007 18:28:21 +0000 Subject: [201159] model rework: renamed ValueModel.getValue() to value() --- .../jpt/utility/internal/SimpleStringMatcher.java | 3 - .../AbstractReadOnlyCollectionValueModel.java | 8 +-- .../value/AbstractReadOnlyListValueModel.java | 10 +-- .../value/AbstractReadOnlyPropertyValueModel.java | 6 +- .../model/value/AbstractTreeNodeValueModel.java | 8 +-- .../internal/model/value/AspectAdapter.java | 8 +-- .../model/value/BufferedPropertyValueModel.java | 16 ++--- .../model/value/CollectionAspectAdapter.java | 10 +-- .../value/CollectionListValueModelAdapter.java | 4 +- .../value/CollectionPropertyValueModelAdapter.java | 2 +- .../internal/model/value/CollectionValueModel.java | 2 +- .../model/value/CompositeCollectionValueModel.java | 8 +-- .../model/value/ExtendedListValueModelWrapper.java | 4 +- .../model/value/FilteringCollectionValueModel.java | 8 +-- .../model/value/FilteringPropertyValueModel.java | 8 +-- .../value/ItemAspectListValueModelAdapter.java | 8 +-- .../internal/model/value/ListAspectAdapter.java | 12 ++-- .../value/ListCollectionValueModelAdapter.java | 6 +- .../utility/internal/model/value/ListCurator.java | 4 +- .../internal/model/value/ListValueModel.java | 2 +- .../model/value/NullCollectionValueModel.java | 2 +- .../internal/model/value/NullListValueModel.java | 2 +- .../model/value/NullPropertyValueModel.java | 2 +- .../model/value/PropertyAspectAdapter.java | 4 +- .../value/PropertyCollectionValueModelAdapter.java | 4 +- .../model/value/ReadOnlyCollectionValueModel.java | 2 +- .../model/value/ReadOnlyListValueModel.java | 2 +- .../model/value/ReadOnlyPropertyValueModel.java | 2 +- .../model/value/SimpleCollectionValueModel.java | 2 +- .../internal/model/value/SimpleListValueModel.java | 2 +- .../model/value/SimplePropertyValueModel.java | 2 +- .../value/TransformationListValueModelAdapter.java | 4 +- .../value/TransformationPropertyValueModel.java | 8 +-- .../internal/model/value/TreeAspectAdapter.java | 8 +-- .../internal/model/value/TreeValueModel.java | 2 +- .../ValueAspectPropertyValueModelAdapter.java | 4 +- .../utility/internal/model/value/ValueModel.java | 2 +- .../value/prefs/PreferencePropertyValueModel.java | 2 +- .../prefs/PreferencesCollectionValueModel.java | 2 +- .../model/value/swing/ComboBoxModelAdapter.java | 2 +- .../model/value/swing/DateSpinnerModelAdapter.java | 6 +- .../model/value/swing/DocumentAdapter.java | 2 +- .../model/value/swing/ListSpinnerModelAdapter.java | 6 +- .../value/swing/NumberSpinnerModelAdapter.java | 6 +- .../model/value/swing/PrimitiveListTreeModel.java | 2 +- .../model/value/swing/SpinnerModelAdapter.java | 2 +- .../model/value/swing/TableModelAdapter.java | 4 +- .../value/swing/ToggleButtonModelAdapter.java | 2 +- .../model/value/swing/TreeModelAdapter.java | 8 +-- .../value/BufferedPropertyValueModelTests.java | 74 +++++++++++----------- .../model/value/CollectionAspectAdapterTests.java | 30 ++++----- .../CollectionListValueModelAdapterTests.java | 16 ++--- .../CollectionPropertyValueModelAdapterTests.java | 10 +-- .../value/CompositeCollectionValueModelTests.java | 18 +++--- .../value/ExtendedListValueModelWrapperTests.java | 26 ++++---- .../value/FilteringCollectionValueModelTests.java | 28 ++++---- .../value/FilteringPropertyValueModelTests.java | 42 ++++++------ .../model/value/ListAspectAdapterTests.java | 48 +++++++------- .../ListCollectionValueModelAdapterTests.java | 22 +++---- .../internal/model/value/ListCuratorTests.java | 34 +++++----- .../model/value/NullCollectionValueModelTests.java | 4 +- .../model/value/NullListValueModelTests.java | 4 +- .../model/value/NullPropertyValueModelTests.java | 4 +- .../model/value/PropertyAspectAdapterTests.java | 44 ++++++------- .../PropertyCollectionValueModelAdapterTests.java | 12 ++-- .../value/ReadOnlyCollectionValueModelTests.java | 6 +- .../model/value/ReadOnlyListValueModelTests.java | 6 +- .../value/SimpleCollectionValueModelTests.java | 22 +++---- .../model/value/SimpleListValueModelTests.java | 12 ++-- .../model/value/SimplePropertyValueModelTests.java | 10 +-- .../value/SortedListValueModelAdapterTests.java | 2 +- .../model/value/StaticValueModelTests.java | 6 +- .../internal/model/value/SynchronizedBag.java | 2 +- .../internal/model/value/SynchronizedList.java | 4 +- .../TransformationListValueModelAdapterTests.java | 16 ++--- .../TransformationPropertyValueModelTests.java | 38 +++++------ .../model/value/TreeAspectAdapterTests.java | 4 +- .../prefs/PreferencePropertyValueModelTests.java | 52 +++++++-------- .../PreferencesCollectionValueModelTests.java | 6 +- .../value/swing/CheckBoxModelAdapterTests.java | 2 +- .../value/swing/ComboBoxModelAdapterTests.java | 2 +- .../value/swing/ComboBoxModelAdapterUITest.java | 2 +- .../value/swing/DateSpinnerModelAdapterTests.java | 2 +- .../model/value/swing/DocumentAdapterTests.java | 4 +- .../model/value/swing/ListModelAdapterUITest.java | 2 +- .../value/swing/ListSpinnerModelAdapterTests.java | 4 +- .../swing/NumberSpinnerModelAdapterTests.java | 2 +- .../value/swing/RadioButtonModelAdapterTests.java | 6 +- .../value/swing/SpinnerModelAdapterTests.java | 2 +- .../value/swing/SpinnerModelAdapterUITest.java | 2 +- .../model/value/swing/TableModelAdapterUITest.java | 4 +- .../model/value/swing/TreeModelAdapterTests.java | 10 +-- .../model/value/swing/TreeModelAdapterUITest.java | 6 +- 93 files changed, 442 insertions(+), 445 deletions(-) diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/SimpleStringMatcher.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/SimpleStringMatcher.java index 122cd68334..7de0f24255 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/SimpleStringMatcher.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/SimpleStringMatcher.java @@ -120,9 +120,6 @@ public class SimpleStringMatcher // ********** StringMatcher implementation ********** - /** - * @see StringMatcher#setPatternString(String) - */ public synchronized void setPatternString(String patternString) { this.patternString = patternString; this.rebuildPattern(); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyCollectionValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyCollectionValueModel.java index b66ac9cb77..f8dd691623 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyCollectionValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyCollectionValueModel.java @@ -20,13 +20,13 @@ import org.eclipse.jpt.utility.internal.model.NullModel; * Implementation of CollectionValueModel that can be subclassed and used for * returning an iterator on a static collection, but still allows listeners to be added. * Listeners will NEVER be notified of any changes, because there should be none. - * Subclasses need only implement the #getValue() method to + * Subclasses need only implement the #value() method to * return an iterator on the static values required by the client code. This class is * really only useful for simplifying the building of anonymous inner * classes that implement the CollectionValueModel interface: * private CollectionValueModel buildCacheUsageOptionsHolder() { * return new AbstractReadOnlyCollectionValueModel() { - * public Object getValue() { + * public Object value() { * return MWQuery.cacheUsageOptions(); * } * public int size() { @@ -68,7 +68,7 @@ public abstract class AbstractReadOnlyCollectionValueModel } public int size() { - return CollectionTools.size((Iterator) this.getValue()); + return CollectionTools.size((Iterator) this.value()); } @@ -76,7 +76,7 @@ public abstract class AbstractReadOnlyCollectionValueModel @Override public String toString() { - return StringTools.buildToStringFor(this, CollectionTools.collection((Iterator) this.getValue())); + return StringTools.buildToStringFor(this, CollectionTools.collection((Iterator) this.value())); } } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyListValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyListValueModel.java index f1ed7a6920..dd0ba3e3f3 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyListValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyListValueModel.java @@ -20,13 +20,13 @@ import org.eclipse.jpt.utility.internal.model.NullModel; * Implementation of ListValueModel that can be subclassed and used for * returning a list iterator on a static list, but still allows listeners to be added. * Listeners will NEVER be notified of any changes, because there should be none. - * Subclasses need only implement the #getValue() method to + * Subclasses need only implement the #value() method to * return a list iterator on the static values required by the client code. This class is * really only useful for simplifying the building of anonymous inner * classes that implement the ListValueModel interface: * private ListValueModel buildCacheUsageOptionsHolder() { * return new AbstractReadOnlyListValueModel() { - * public Object getValue() { + * public Object value() { * return MWQuery.cacheUsageOptions(); * } * public int size() { @@ -76,11 +76,11 @@ public abstract class AbstractReadOnlyListValueModel } public Object getItem(int index) { - return CollectionTools.get((ListIterator) this.getValue(), index); + return CollectionTools.get((ListIterator) this.value(), index); } public int size() { - return CollectionTools.size((ListIterator) this.getValue()); + return CollectionTools.size((ListIterator) this.value()); } @@ -88,7 +88,7 @@ public abstract class AbstractReadOnlyListValueModel @Override public String toString() { - return StringTools.buildToStringFor(this, CollectionTools.collection((ListIterator) this.getValue())); + return StringTools.buildToStringFor(this, CollectionTools.collection((ListIterator) this.value())); } } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyPropertyValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyPropertyValueModel.java index b156977c56..88478aaccf 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyPropertyValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractReadOnlyPropertyValueModel.java @@ -16,13 +16,13 @@ import org.eclipse.jpt.utility.internal.model.NullModel; * Implementation of ValueModel that can be subclassed and used for * returning a static value, but still allows listeners to be added. * Listeners will NEVER be notified of any changes, because there should be none. - * Subclasses need only implement the #getValue() method to + * Subclasses need only implement the #value() method to * return the static value required by the client code. This class is * really only useful for simplifying the building of anonymous inner * classes that implement the PropertyValueModel interface: * private PropertyValueModel buildAbstractModifierHolder() { * return new AbstractReadOnlyPropertyValueModel() { - * public Object getValue() { + * public Object value() { * return Modifier.ABSTRACT; * } * }; @@ -53,7 +53,7 @@ public abstract class AbstractReadOnlyPropertyValueModel @Override public String toString() { - return StringTools.buildToStringFor(this, this.getValue()); + return StringTools.buildToStringFor(this, this.value()); } } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractTreeNodeValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractTreeNodeValueModel.java index efdc54ac2f..259934ac55 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractTreeNodeValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AbstractTreeNodeValueModel.java @@ -21,7 +21,7 @@ import org.eclipse.jpt.utility.internal.model.listener.StateChangeListener; /** * Subclasses need only implement the following methods: * - * #getValue() + * #value() * return the user-determined "value" of the node, * i.e. the object "wrapped" by the node * @@ -170,17 +170,17 @@ public abstract class AbstractTreeNodeValueModel return false; } AbstractTreeNodeValueModel other = (AbstractTreeNodeValueModel) o; - return this.getValue().equals(other.getValue()); + return this.value().equals(other.value()); } @Override public int hashCode() { - return this.getValue().hashCode(); + return this.value().hashCode(); } @Override public void toString(StringBuilder sb) { - sb.append(this.getValue()); + sb.append(this.value()); } } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AspectAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AspectAdapter.java index 1c9e82f25a..e2f30bd9a6 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AspectAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/AspectAdapter.java @@ -115,15 +115,15 @@ public abstract class AspectAdapter * The subject has changed. Notify listeners that the value has changed. */ protected synchronized void subjectChanged() { - Object oldValue = this.getValue(); + Object oldValue = this.value(); boolean hasListeners = this.hasListeners(); if (hasListeners) { this.disengageSubject(); } - this.subject = this.subjectHolder.getValue(); + this.subject = this.subjectHolder.value(); if (hasListeners) { this.engageSubject(); - this.fireAspectChange(oldValue, this.getValue()); + this.fireAspectChange(oldValue, this.value()); } } @@ -172,7 +172,7 @@ public abstract class AspectAdapter this.subjectHolder.addPropertyChangeListener(VALUE, this.subjectChangeListener); // synch our subject *after* we start listening to the subject holder, // since its value might change when a listener is added - this.subject = this.subjectHolder.getValue(); + this.subject = this.subjectHolder.value(); } protected void disengageSubjectHolder() { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/BufferedPropertyValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/BufferedPropertyValueModel.java index 89d9064404..85a7f96676 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/BufferedPropertyValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/BufferedPropertyValueModel.java @@ -120,8 +120,8 @@ public class BufferedPropertyValueModel extends PropertyValueModelWrapper { * If we are currently "buffering" a value, return that; * otherwise, return the wrapped value. */ - public Object getValue() { - return (this.bufferedValue == UNASSIGNED) ? this.valueHolder.getValue() : this.bufferedValue; + public Object value() { + return (this.bufferedValue == UNASSIGNED) ? this.valueHolder.value() : this.bufferedValue; } /** @@ -130,7 +130,7 @@ public class BufferedPropertyValueModel extends PropertyValueModelWrapper { * when the trigger is "accepted". */ public void setValue(Object value) { - Object old = this.getValue(); + Object old = this.value(); this.bufferedValue = value; this.firePropertyChanged(VALUE, old, this.bufferedValue); } @@ -215,13 +215,13 @@ public class BufferedPropertyValueModel extends PropertyValueModelWrapper { // notify our listeners that our value has been reset Object old = this.bufferedValue; this.bufferedValue = UNASSIGNED; - this.firePropertyChanged(VALUE, old, this.valueHolder.getValue()); + this.firePropertyChanged(VALUE, old, this.valueHolder.value()); } } @Override public void toString(StringBuilder sb) { - sb.append(this.getValue()); + sb.append(this.value()); } @@ -264,9 +264,9 @@ public class BufferedPropertyValueModel extends PropertyValueModelWrapper { * change notification triggered by #setValue(Object). */ @Override - public Object getValue() { + public Object value() { if (this.value == null) { - throw new IllegalStateException("The method Trigger.getValue() may only be called during change notification."); + throw new IllegalStateException("The method Trigger.value() may only be called during change notification."); } return this.value; } @@ -299,7 +299,7 @@ public class BufferedPropertyValueModel extends PropertyValueModelWrapper { * - false indicates "reset" */ public boolean booleanValue() { - return ((Boolean) this.getValue()).booleanValue(); + return ((Boolean) this.value()).booleanValue(); } /** diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionAspectAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionAspectAdapter.java index 511fd48879..0aaa8e7bd2 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionAspectAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionAspectAdapter.java @@ -25,7 +25,7 @@ import org.eclipse.jpt.utility.internal.model.listener.CollectionChangeListener; * #getValueFromSubject() * at the very minimum, override this method to return an iterator on the * subject's collection aspect; it does not need to be overridden if - * #getValue() is overridden and its behavior changed + * #value() is overridden and its behavior changed * #sizeFromSubject() * override this method to improve performance; it does not need to be overridden if * #size() is overridden and its behavior changed @@ -35,7 +35,7 @@ import org.eclipse.jpt.utility.internal.model.listener.CollectionChangeListener; * (e.g. UI) will need only to *get* the value * #addItems(Collection) and #removeItems(Collection) * override these methods to improve performance, if necessary - * #getValue() + * #value() * override this method only if returning an empty iterator when the * subject is null is unacceptable * #size() @@ -126,7 +126,7 @@ public abstract class CollectionAspectAdapter * Return the value of the subject's collection aspect. * This should be an *iterator* on the collection. */ - public Object getValue() { + public Object value() { if (this.subject == null) { return EmptyIterator.instance(); } @@ -137,7 +137,7 @@ public abstract class CollectionAspectAdapter * Return the value of the subject's collection aspect. * This should be an *iterator* on the collection. * At this point we can be sure that the subject is not null. - * @see #getValue() + * @see #value() */ protected Iterator getValueFromSubject() { throw new UnsupportedOperationException(); @@ -191,7 +191,7 @@ public abstract class CollectionAspectAdapter * @see #size() */ protected int sizeFromSubject() { - return CollectionTools.size((Iterator) this.getValue()); + return CollectionTools.size((Iterator) this.value()); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionListValueModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionListValueModelAdapter.java index 70f89e4237..3fab5b3d38 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionListValueModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionListValueModelAdapter.java @@ -111,7 +111,7 @@ public class CollectionListValueModelAdapter // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { // try to prevent backdoor modification of the list return new ReadOnlyListIterator(this.list); } @@ -234,7 +234,7 @@ public class CollectionListValueModelAdapter // ********** behavior ********** protected void buildList() { - Iterator stream = (Iterator) this.collectionHolder.getValue(); + Iterator stream = (Iterator) this.collectionHolder.value(); // if the new collection is empty, do nothing if (stream.hasNext()) { this.list.ensureCapacity(this.collectionHolder.size()); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionPropertyValueModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionPropertyValueModelAdapter.java index bc9abb5b29..746d2321af 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionPropertyValueModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionPropertyValueModelAdapter.java @@ -105,7 +105,7 @@ public abstract class CollectionPropertyValueModelAdapter /** * Return the cached value. */ - public Object getValue() { + public Object value() { return this.value; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionValueModel.java index 74ec2d1702..acc3034ae3 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CollectionValueModel.java @@ -14,7 +14,7 @@ import java.util.Collection; /** * Extend ValueModel to allow the adding and * removing of items in a collection value. - * Typically the value returned from #getValue() + * Typically the value returned from #value() * will be an Iterator. */ public interface CollectionValueModel extends ValueModel { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CompositeCollectionValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CompositeCollectionValueModel.java index 9e79db198b..1d12858258 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CompositeCollectionValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/CompositeCollectionValueModel.java @@ -140,7 +140,7 @@ public class CompositeCollectionValueModel // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { return new CompositeIterator(this.buildCollectionsIterators()); } @@ -170,7 +170,7 @@ public class CompositeCollectionValueModel // the following will trigger the firing of a number of unnecessary events // (since we don't have any listeners yet), // but it reduces the amount of duplicate code - this.addComponentSources((Iterator) this.collectionHolder.getValue()); + this.addComponentSources((Iterator) this.collectionHolder.value()); } @Override @@ -276,7 +276,7 @@ public class CompositeCollectionValueModel protected void collectionChanged(CollectionChangeEvent e) { // copy the keys so we don't eat our own tail this.removeComponentSources(new ArrayList(this.components.keySet()).iterator()); - this.addComponentSources((Iterator) this.collectionHolder.getValue()); + this.addComponentSources((Iterator) this.collectionHolder.value()); } @@ -323,7 +323,7 @@ public class CompositeCollectionValueModel * Update our cache. */ protected void addComponentItems(CollectionValueModel itemsHolder, ArrayList componentCollection) { - this.addComponentItems((Iterator) itemsHolder.getValue(), itemsHolder.size(), componentCollection); + this.addComponentItems((Iterator) itemsHolder.value(), itemsHolder.size(), componentCollection); } /** diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ExtendedListValueModelWrapper.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ExtendedListValueModelWrapper.java index 453da94926..02b36fd24f 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ExtendedListValueModelWrapper.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ExtendedListValueModelWrapper.java @@ -91,12 +91,12 @@ public class ExtendedListValueModelWrapper // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { // try to prevent backdoor modification of the lists return new ReadOnlyListIterator( new CompositeListIterator( this.prefix.listIterator(), - (ListIterator) this.listHolder.getValue(), + (ListIterator) this.listHolder.value(), this.suffix.listIterator() ) ); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/FilteringCollectionValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/FilteringCollectionValueModel.java index cc99a42402..e4d046aff3 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/FilteringCollectionValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/FilteringCollectionValueModel.java @@ -22,7 +22,7 @@ import org.eclipse.jpt.utility.internal.model.event.CollectionChangeEvent; * A FilteringCollectionValueModel wraps another * CollectionValueModel and uses a Filter * to determine which items in the collection are returned by calls - * to getValue(). + * to value(). *

* As an alternative to building a Filter, a subclass * of FilteringCollectionValueModel can override the @@ -119,7 +119,7 @@ public class FilteringCollectionValueModel // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { return this.filteredItems.iterator(); } @@ -179,7 +179,7 @@ public class FilteringCollectionValueModel /** * Return whether the FilteringCollectionValueModel should * include the specified value in the iterator returned from a call to the - * getValue() method; the value came + * value() method; the value came * from the nested collection value model. *

* This method can be overridden by a subclass as an @@ -204,7 +204,7 @@ public class FilteringCollectionValueModel */ protected void synchFilteredItems() { this.filteredItems.clear(); - CollectionTools.addAll(this.filteredItems, this.filter((Iterator) this.collectionHolder.getValue())); + CollectionTools.addAll(this.filteredItems, this.filter((Iterator) this.collectionHolder.value())); } } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/FilteringPropertyValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/FilteringPropertyValueModel.java index 9e74f2ce60..a6bb2b1950 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/FilteringPropertyValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/FilteringPropertyValueModel.java @@ -16,7 +16,7 @@ import org.eclipse.jpt.utility.internal.model.event.PropertyChangeEvent; * A FilteringPropertyValueModel wraps another * PropertyValueModel and uses a BidiFilter * to determine when the wrapped value is to be returned by calls - * to getValue() and modified by calls to + * to value() and modified by calls to * setValue(Object) *

* As an alternative to building a BidiFilter, a subclass @@ -86,8 +86,8 @@ public class FilteringPropertyValueModel extends PropertyValueModelWrapper { // ********** ValueModel implementation ********** - public Object getValue() { - return this.filterValue(this.valueHolder.getValue()); + public Object value() { + return this.filterValue(this.valueHolder.value()); } @@ -124,7 +124,7 @@ public class FilteringPropertyValueModel extends PropertyValueModelWrapper { /** * Return whether the FilteringPropertyValueModel should * return the specified value from a call to the - * getValue() method; the value came + * value() method; the value came * from the nested property value model *

* This method can be overridden by a subclass as an diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ItemAspectListValueModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ItemAspectListValueModelAdapter.java index b988471c96..4be484b91a 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ItemAspectListValueModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ItemAspectListValueModelAdapter.java @@ -77,8 +77,8 @@ public abstract class ItemAspectListValueModelAdapter extends ListValueModelWrap // ********** ValueModel implementation ********** - public Object getValue() { - return this.listHolder.getValue(); + public Object value() { + return this.listHolder.value(); } @@ -129,7 +129,7 @@ public abstract class ItemAspectListValueModelAdapter extends ListValueModelWrap } protected void engageAllItems() { - this.engageItems((ListIterator) this.listHolder.getValue()); + this.engageItems((ListIterator) this.listHolder.value()); } protected void engageItems(Iterator stream) { @@ -164,7 +164,7 @@ public abstract class ItemAspectListValueModelAdapter extends ListValueModelWrap } protected void disengageAllItems() { - this.disengageItems((ListIterator) this.listHolder.getValue()); + this.disengageItems((ListIterator) this.listHolder.value()); } protected void disengageItems(Iterator stream) { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListAspectAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListAspectAdapter.java index 858723386d..3786fa3720 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListAspectAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListAspectAdapter.java @@ -26,7 +26,7 @@ import org.eclipse.jpt.utility.internal.model.listener.ListChangeListener; * #getValueFromSubject() * at the very minimum, override this method to return a list iterator * on the subject's list aspect; it does not need to be overridden if - * #getValue() is overridden and its behavior changed + * #value() is overridden and its behavior changed * #getItem(int) * override this method to improve performance * #sizeFromSubject() @@ -38,7 +38,7 @@ import org.eclipse.jpt.utility.internal.model.listener.ListChangeListener; * (e.g. UI) will need only to *get* the value * #addItems(int, List) and #removeItems(int, int) * override these methods to improve performance, if necessary - * #getValue() + * #value() * override this method only if returning an empty list iterator when the * subject is null is unacceptable * #size() @@ -135,7 +135,7 @@ public abstract class ListAspectAdapter * Return the value of the subject's list aspect. * This should be a *list iterator* on the list. */ - public Object getValue() { + public Object value() { if (this.subject == null) { return EmptyListIterator.instance(); } @@ -146,7 +146,7 @@ public abstract class ListAspectAdapter * Return the value of the subject's list aspect. * This should be a *list iterator* on the list. * At this point we can be sure that the subject is not null. - * @see #getValue() + * @see #value() */ protected ListIterator getValueFromSubject() { throw new UnsupportedOperationException(); @@ -211,7 +211,7 @@ public abstract class ListAspectAdapter * Return the item at the specified index of the subject's list aspect. */ public Object getItem(int index) { - return CollectionTools.get((ListIterator) this.getValue(), index); + return CollectionTools.get((ListIterator) this.value(), index); } /** @@ -227,7 +227,7 @@ public abstract class ListAspectAdapter * @see #size() */ protected int sizeFromSubject() { - return CollectionTools.size((ListIterator) this.getValue()); + return CollectionTools.size((ListIterator) this.value()); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListCollectionValueModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListCollectionValueModelAdapter.java index 3b653c55ea..bd4c48641c 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListCollectionValueModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListCollectionValueModelAdapter.java @@ -29,7 +29,7 @@ import org.eclipse.jpt.utility.internal.model.listener.ListChangeListener; * NB: Since we only listen to the wrapped list when we have * listeners ourselves and we can only stay in synch with the wrapped * list while we are listening to it, results to various methods - * (e.g. #size(), getValue()) will be unpredictable whenever + * (e.g. #size(), value()) will be unpredictable whenever * we do not have any listeners. This should not be too painful since, * most likely, client objects will also be listeners. */ @@ -112,7 +112,7 @@ public class ListCollectionValueModelAdapter // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { // try to prevent backdoor modification of the list return new ReadOnlyIterator(this.collection); } @@ -223,7 +223,7 @@ public class ListCollectionValueModelAdapter // ********** behavior ********** protected void buildCollection() { - Iterator stream = (Iterator) this.listHolder.getValue(); + Iterator stream = (Iterator) this.listHolder.value(); // if the new list is empty, do nothing if (stream.hasNext()) { this.collection.ensureCapacity(this.listHolder.size()); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListCurator.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListCurator.java index 3b1e560640..7af76872f3 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListCurator.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListCurator.java @@ -28,7 +28,7 @@ import org.eclipse.jpt.utility.internal.model.listener.StateChangeListener; * #getValueForRecord() * at the very minimum, override this method to return an iterator * on the subject's collection state; it does not need to be overridden if - * #getValue() is overridden and its behavior changed + * #value() is overridden and its behavior changed */ public abstract class ListCurator extends AspectAdapter @@ -86,7 +86,7 @@ public abstract class ListCurator // **************** ValueModel contract *********************************** - public Object getValue() { + public Object value() { return new ReadOnlyListIterator(this.record); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListValueModel.java index 05cf70b051..1450cde305 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ListValueModel.java @@ -14,7 +14,7 @@ import java.util.List; /** * Extend ValueModel to allow the adding and * removing of items in a list value. - * Typically the value returned from #getValue() + * Typically the value returned from #value() * will be a ListIterator. */ public interface ListValueModel extends ValueModel { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullCollectionValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullCollectionValueModel.java index 07a573f3cc..505518aa1c 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullCollectionValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullCollectionValueModel.java @@ -51,7 +51,7 @@ public final class NullCollectionValueModel return 0; } - public Object getValue() { + public Object value() { return EmptyIterator.instance(); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullListValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullListValueModel.java index d974c434b6..f5e10e61e7 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullListValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullListValueModel.java @@ -50,7 +50,7 @@ public final class NullListValueModel return 0; } - public Object getValue() { + public Object value() { return EmptyListIterator.instance(); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullPropertyValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullPropertyValueModel.java index ebd80c1da3..50d5ce769e 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullPropertyValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/NullPropertyValueModel.java @@ -42,7 +42,7 @@ public final class NullPropertyValueModel // ********** PropertyValueModel implementation ********** - public Object getValue() { + public Object value() { return null; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/PropertyAspectAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/PropertyAspectAdapter.java index 2fc03f56c8..8d0fd79516 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/PropertyAspectAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/PropertyAspectAdapter.java @@ -161,7 +161,7 @@ public abstract class PropertyAspectAdapter /** * Return the value of the subject's property. */ - public final Object getValue() { + public final Object value() { return this.value; } @@ -258,7 +258,7 @@ public abstract class PropertyAspectAdapter /** * Return the value of the subject's property. * At this point we can be sure that the subject is not null. - * @see #getValue() + * @see #value() */ protected Object getValueFromSubject() { throw new UnsupportedOperationException(); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/PropertyCollectionValueModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/PropertyCollectionValueModelAdapter.java index 83a08f7dbf..27c0d60bec 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/PropertyCollectionValueModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/PropertyCollectionValueModelAdapter.java @@ -85,7 +85,7 @@ public class PropertyCollectionValueModelAdapter // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { if (this.value == null) { return EmptyIterator.instance(); } @@ -180,7 +180,7 @@ public class PropertyCollectionValueModelAdapter this.valueHolder.addPropertyChangeListener(VALUE, this.propertyChangeListener); // synch our value *after* we start listening to the value holder, // since its value might change when a listener is added - this.value = this.valueHolder.getValue(); + this.value = this.valueHolder.value(); } protected void disengageModel() { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyCollectionValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyCollectionValueModel.java index 6ef29bc161..4f1988ebde 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyCollectionValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyCollectionValueModel.java @@ -46,7 +46,7 @@ public class ReadOnlyCollectionValueModel // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { return this.value.iterator(); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyListValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyListValueModel.java index 53a76b120f..a152a8f197 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyListValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyListValueModel.java @@ -47,7 +47,7 @@ public class ReadOnlyListValueModel // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { return this.value.listIterator(); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyPropertyValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyPropertyValueModel.java index a687b03528..bb1a4eee83 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyPropertyValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ReadOnlyPropertyValueModel.java @@ -34,7 +34,7 @@ public class ReadOnlyPropertyValueModel // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { return this.value; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimpleCollectionValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimpleCollectionValueModel.java index 23b498ffcc..353ee5196d 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimpleCollectionValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimpleCollectionValueModel.java @@ -53,7 +53,7 @@ public class SimpleCollectionValueModel // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { // try to prevent backdoor modification of the collection return new ReadOnlyIterator(this.value); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimpleListValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimpleListValueModel.java index 6449a10a14..14d97c2bb9 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimpleListValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimpleListValueModel.java @@ -52,7 +52,7 @@ public class SimpleListValueModel // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { // try to prevent backdoor modification of the list return new ReadOnlyListIterator(this.value); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimplePropertyValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimplePropertyValueModel.java index 928f9d8b6c..20154e4bf3 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimplePropertyValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/SimplePropertyValueModel.java @@ -45,7 +45,7 @@ public class SimplePropertyValueModel } - public Object getValue() { + public Object value() { return this.value; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TransformationListValueModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TransformationListValueModelAdapter.java index 31ad9130cc..9b1717890b 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TransformationListValueModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TransformationListValueModelAdapter.java @@ -88,7 +88,7 @@ public class TransformationListValueModelAdapter extends ListValueModelWrapper { // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { // try to prevent backdoor modification of the list return new ReadOnlyListIterator(this.transformedList); } @@ -157,7 +157,7 @@ public class TransformationListValueModelAdapter extends ListValueModelWrapper { * Transform the items in the specified list value model. */ protected List transformItems(ListValueModel lvm) { - return this.transformItems((ListIterator) lvm.getValue(), lvm.size()); + return this.transformItems((ListIterator) lvm.value(), lvm.size()); } /** diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TransformationPropertyValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TransformationPropertyValueModel.java index b4cbfb8ab6..fc0b10cb8b 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TransformationPropertyValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TransformationPropertyValueModel.java @@ -16,7 +16,7 @@ import org.eclipse.jpt.utility.internal.model.event.PropertyChangeEvent; * A TransformationPropertyValueModel wraps another * PropertyValueModel and uses a BidiTransformer * to:

@@ -54,9 +54,9 @@ public class TransformationPropertyValueModel extends PropertyValueModelWrapper // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { // transform the object returned by the nested value model before returning it - return this.transform(this.valueHolder.getValue()); + return this.transform(this.valueHolder.value()); } @@ -83,7 +83,7 @@ public class TransformationPropertyValueModel extends PropertyValueModelWrapper /** * Transform the specified object and return the result. - * This is called by #getValue(). + * This is called by #value(). */ protected Object transform(Object value) { return this.transformer.transform(value); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TreeAspectAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TreeAspectAdapter.java index 8560fcd24d..44b96fd8a0 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TreeAspectAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TreeAspectAdapter.java @@ -23,12 +23,12 @@ import org.eclipse.jpt.utility.internal.model.listener.TreeChangeListener; * #getValueFromSubject() * at the very minimum, override this method to return an iterator * on the subject's tree aspect; it does not need to be overridden if - * #getValue() is overridden and its behavior changed + * #value() is overridden and its behavior changed * #addNode(Object[], Object) and #removeNode(Object[]) * override these methods if the client code needs to *change* the contents of * the subject's tree aspect; oftentimes, though, the client code * (e.g. UI) will need only to *get* the value - * #getValue() + * #value() * override this method only if returning an empty iterator when the * subject is null is unacceptable */ @@ -106,7 +106,7 @@ public abstract class TreeAspectAdapter * Return the value of the subject's tree aspect. * This should be an *iterator* on the tree. */ - public Object getValue() { + public Object value() { if (this.subject == null) { return EmptyIterator.instance(); } @@ -117,7 +117,7 @@ public abstract class TreeAspectAdapter * Return the value of the subject's tree aspect. * This should be an *iterator* on the tree. * At this point we can be sure that the subject is not null. - * @see #getValue() + * @see #value() */ protected Iterator getValueFromSubject() { // private-protected throw new UnsupportedOperationException(); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TreeValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TreeValueModel.java index 9e842326ec..f73f85d2ff 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TreeValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/TreeValueModel.java @@ -12,7 +12,7 @@ package org.eclipse.jpt.utility.internal.model.value; /** * Extend ValueModel to allow the adding and * removing of nodes in a tree value. - * Typically the value returned from #getValue() + * Typically the value returned from #value() * will be an Iterator. */ public interface TreeValueModel extends ValueModel { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ValueAspectPropertyValueModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ValueAspectPropertyValueModelAdapter.java index bbea95f45b..c87224a182 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ValueAspectPropertyValueModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ValueAspectPropertyValueModelAdapter.java @@ -56,7 +56,7 @@ public abstract class ValueAspectPropertyValueModelAdapter // ********** ValueModel implementation ********** - public Object getValue() { + public Object value() { return this.value; } @@ -90,7 +90,7 @@ public abstract class ValueAspectPropertyValueModelAdapter } protected void engageValue() { - this.value = this.valueHolder.getValue(); + this.value = this.valueHolder.value(); if (this.value != null) { this.startListeningToValue(); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ValueModel.java index 10d912f2b9..fb85042e8c 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/ValueModel.java @@ -20,7 +20,7 @@ public interface ValueModel extends Model { /** * Return the value. */ - Object getValue(); + Object value(); String VALUE = "value"; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/prefs/PreferencePropertyValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/prefs/PreferencePropertyValueModel.java index 66025000ea..1190eb371a 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/prefs/PreferencePropertyValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/prefs/PreferencePropertyValueModel.java @@ -157,7 +157,7 @@ public class PreferencePropertyValueModel /** * Return the cached (converted) value. */ - public synchronized Object getValue() { + public synchronized Object value() { return this.value; } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java index 4fc5557086..c67d351f34 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/prefs/PreferencesCollectionValueModel.java @@ -89,7 +89,7 @@ public class PreferencesCollectionValueModel /** * Return an iterator on the preference models. */ - public synchronized Object getValue() { + public synchronized Object value() { return this.preferences.values().iterator(); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ComboBoxModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ComboBoxModelAdapter.java index 11187ae123..ea9ef93449 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ComboBoxModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ComboBoxModelAdapter.java @@ -97,7 +97,7 @@ public class ComboBoxModelAdapter extends ListModelAdapter implements ComboBoxMo // ********** ComboBoxModel implementation ********** public Object getSelectedItem() { - return this.selectionHolder.getValue(); + return this.selectionHolder.value(); } public void setSelectedItem(Object selectedItem) { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DateSpinnerModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DateSpinnerModelAdapter.java index 308b7485b1..ff8d931002 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DateSpinnerModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DateSpinnerModelAdapter.java @@ -78,7 +78,7 @@ public class DateSpinnerModelAdapter extends SpinnerDateModel { * Constructor - the date holder is required. */ public DateSpinnerModelAdapter(PropertyValueModel dateHolder, Comparable start, Comparable end, int calendarField, Date defaultValue) { - super(dateHolder.getValue() == null ? defaultValue : (Date) dateHolder.getValue(), start, end, calendarField); + super(dateHolder.value() == null ? defaultValue : (Date) dateHolder.value(), start, end, calendarField); this.dateHolder = dateHolder; this.dateChangeListener = this.buildDateChangeListener(); // postpone listening to the underlying date @@ -115,7 +115,7 @@ public class DateSpinnerModelAdapter extends SpinnerDateModel { public Object getValue() { if (this.getChangeListeners().length == 0) { // sorry about this "lateral" call to super ~bjv - super.setValue(this.spinnerValueOf(this.dateHolder.getValue())); + super.setValue(this.spinnerValueOf(this.dateHolder.value())); } return super.getValue(); } @@ -137,7 +137,7 @@ public class DateSpinnerModelAdapter extends SpinnerDateModel { public void addChangeListener(ChangeListener listener) { if (this.getChangeListeners().length == 0) { this.dateHolder.addPropertyChangeListener(ValueModel.VALUE, this.dateChangeListener); - this.synchronize(this.dateHolder.getValue()); + this.synchronize(this.dateHolder.value()); } super.addChangeListener(listener); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DocumentAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DocumentAdapter.java index 394da6593d..8fb146a725 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DocumentAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/DocumentAdapter.java @@ -262,7 +262,7 @@ public class DocumentAdapter implements Document, Serializable { protected void engageStringHolder() { this.stringHolder.addPropertyChangeListener(ValueModel.VALUE, this.stringListener); - this.synchronizeDelegate((String) this.stringHolder.getValue()); + this.synchronizeDelegate((String) this.stringHolder.value()); } protected void disengageStringHolder() { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ListSpinnerModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ListSpinnerModelAdapter.java index 2e1559c6d7..dac3b9aa20 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ListSpinnerModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ListSpinnerModelAdapter.java @@ -61,7 +61,7 @@ public class ListSpinnerModelAdapter extends SpinnerListModel { * Use the model value itself as the default spinner value. */ public ListSpinnerModelAdapter(PropertyValueModel valueHolder) { - this(valueHolder, valueHolder.getValue()); + this(valueHolder, valueHolder.value()); } /** @@ -135,7 +135,7 @@ public class ListSpinnerModelAdapter extends SpinnerListModel { public Object getValue() { if (this.getChangeListeners().length == 0) { // sorry about this "lateral" call to super ~bjv - super.setValue(this.spinnerValueOf(this.valueHolder.getValue())); + super.setValue(this.spinnerValueOf(this.valueHolder.value())); } return super.getValue(); } @@ -157,7 +157,7 @@ public class ListSpinnerModelAdapter extends SpinnerListModel { public void addChangeListener(ChangeListener listener) { if (this.getChangeListeners().length == 0) { this.valueHolder.addPropertyChangeListener(ValueModel.VALUE, this.valueChangeListener); - this.synchronize(this.valueHolder.getValue()); + this.synchronize(this.valueHolder.value()); } super.addChangeListener(listener); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/NumberSpinnerModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/NumberSpinnerModelAdapter.java index 4173425a9c..7a44e797ec 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/NumberSpinnerModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/NumberSpinnerModelAdapter.java @@ -102,7 +102,7 @@ public class NumberSpinnerModelAdapter extends SpinnerNumberModel { * Constructor - the number holder is required. */ public NumberSpinnerModelAdapter(PropertyValueModel numberHolder, Comparable minimum, Comparable maximum, Number stepSize, Number defaultValue) { - super(numberHolder.getValue() == null ? defaultValue : (Number) numberHolder.getValue(), minimum, maximum, stepSize); + super(numberHolder.value() == null ? defaultValue : (Number) numberHolder.value(), minimum, maximum, stepSize); this.numberHolder = numberHolder; this.numberChangeListener = this.buildNumberChangeListener(); // postpone listening to the underlying number @@ -139,7 +139,7 @@ public class NumberSpinnerModelAdapter extends SpinnerNumberModel { public Object getValue() { if (this.getChangeListeners().length == 0) { // sorry about this "lateral" call to super ~bjv - super.setValue(this.spinnerValueOf(this.numberHolder.getValue())); + super.setValue(this.spinnerValueOf(this.numberHolder.value())); } return super.getValue(); } @@ -161,7 +161,7 @@ public class NumberSpinnerModelAdapter extends SpinnerNumberModel { public void addChangeListener(ChangeListener listener) { if (this.getChangeListeners().length == 0) { this.numberHolder.addPropertyChangeListener(ValueModel.VALUE, this.numberChangeListener); - this.synchronize(this.numberHolder.getValue()); + this.synchronize(this.numberHolder.value()); } super.addChangeListener(listener); } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/PrimitiveListTreeModel.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/PrimitiveListTreeModel.java index ca797bb7bc..c2d47004db 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/PrimitiveListTreeModel.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/PrimitiveListTreeModel.java @@ -149,7 +149,7 @@ public abstract class PrimitiveListTreeModel extends DefaultTreeModel { } private void buildList() { - for (Iterator stream = (Iterator) this.listHolder.getValue(); stream.hasNext(); ) { + for (Iterator stream = (Iterator) this.listHolder.value(); stream.hasNext(); ) { this.addPrimitive(stream.next()); } } diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/SpinnerModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/SpinnerModelAdapter.java index 9e8f805de2..760fcc7bfb 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/SpinnerModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/SpinnerModelAdapter.java @@ -195,7 +195,7 @@ public class SpinnerModelAdapter extends AbstractSpinnerModel { protected void engageValueHolder() { this.valueHolder.addPropertyChangeListener(ValueModel.VALUE, this.valueListener); - this.synchronizeDelegate(this.valueHolder.getValue()); + this.synchronizeDelegate(this.valueHolder.value()); } protected void disengageValueHolder() { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TableModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TableModelAdapter.java index 0bb09296af..4126489bb8 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TableModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TableModelAdapter.java @@ -191,7 +191,7 @@ public class TableModelAdapter extends AbstractTableModel { public Object getValueAt(int rowIndex, int columnIndex) { PropertyValueModel[] row = this.rows.get(rowIndex); - return row[columnIndex].getValue(); + return row[columnIndex].value(); } @Override @@ -291,7 +291,7 @@ public class TableModelAdapter extends AbstractTableModel { */ private void engageAllCells() { this.rows.ensureCapacity(this.listHolder.size()); - for (Iterator stream = (Iterator) this.listHolder.getValue(); stream.hasNext(); ) { + for (Iterator stream = (Iterator) this.listHolder.value(); stream.hasNext(); ) { PropertyValueModel[] row = this.columnAdapter.cellModels(stream.next()); this.engageRow(row); this.rows.add(row); diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ToggleButtonModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ToggleButtonModelAdapter.java index 01ad9d5516..921cf732f0 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ToggleButtonModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/ToggleButtonModelAdapter.java @@ -213,7 +213,7 @@ public class ToggleButtonModelAdapter extends ToggleButtonModel { protected void engageModel() { this.booleanHolder.addPropertyChangeListener(ValueModel.VALUE, this.booleanChangeListener); - this.setSelected((Boolean) this.booleanHolder.getValue()); + this.setSelected((Boolean) this.booleanHolder.value()); } protected void disengageModel() { diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TreeModelAdapter.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TreeModelAdapter.java index 4d88b74f66..5161639b51 100644 --- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TreeModelAdapter.java +++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/model/value/swing/TreeModelAdapter.java @@ -257,7 +257,7 @@ public class TreeModelAdapter extends AbstractTreeModel { */ private void engageModel() { this.rootHolder.addPropertyChangeListener(ValueModel.VALUE, this.rootListener); - this.root = (TreeNodeValueModel) this.rootHolder.getValue(); + this.root = (TreeNodeValueModel) this.rootHolder.value(); if (this.root == null) { throw new NullPointerException(); // the root cannot be null while we have listeners } @@ -297,7 +297,7 @@ public class TreeModelAdapter extends AbstractTreeModel { * non-root nodes. */ void rootChanged() { - TreeNodeValueModel newRoot = (TreeNodeValueModel) this.rootHolder.getValue(); + TreeNodeValueModel newRoot = (TreeNodeValueModel) this.rootHolder.value(); if (newRoot == null) { throw new NullPointerException(); // the root cannot be null while we have listeners } @@ -634,7 +634,7 @@ public class TreeModelAdapter extends AbstractTreeModel { TreeModelAdapter.this.removeChildren(parentPath, childIndices, childArray); childIndices = this.buildIndices(parent.getChildrenModel().size()); - childArray = this.buildArray((Iterator) parent.getChildrenModel().getValue(), parent.childrenSize()); + childArray = this.buildArray((Iterator) parent.getChildrenModel().value(), parent.childrenSize()); TreeModelAdapter.this.addChildren(parentPath, childIndices, childArray); } @@ -692,7 +692,7 @@ public class TreeModelAdapter extends AbstractTreeModel { */ @Override Iterator children() { - return (Iterator) this.node.getChildrenModel().getValue(); + return (Iterator) this.node.getChildrenModel().value(); } } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/BufferedPropertyValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/BufferedPropertyValueModelTests.java index 0d6954e23a..95cc0d30bb 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/BufferedPropertyValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/BufferedPropertyValueModelTests.java @@ -107,38 +107,38 @@ public class BufferedPropertyValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { + public void testValue() { PropertyChangeListener bufferedListener = this.buildBufferedListener(); this.bufferedIDHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); this.bufferedNameHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); this.bufferedHireDateHolder.addPropertyChangeListener(ValueModel.VALUE, bufferedListener); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(17), this.bufferedIDHolder.getValue()); + assertEquals(new Integer(17), this.idAdapter.value()); + assertEquals(new Integer(17), this.bufferedIDHolder.value()); assertEquals("Freddy", this.employee.getName()); - assertEquals("Freddy", this.nameAdapter.getValue()); - assertEquals("Freddy", this.bufferedNameHolder.getValue()); + assertEquals("Freddy", this.nameAdapter.value()); + assertEquals("Freddy", this.bufferedNameHolder.value()); Date temp = this.employee.getHireDate(); assertEquals(temp, this.employee.getHireDate()); - assertEquals(temp, this.hireDateAdapter.getValue()); - assertEquals(temp, this.bufferedHireDateHolder.getValue()); + assertEquals(temp, this.hireDateAdapter.value()); + assertEquals(temp, this.bufferedHireDateHolder.value()); this.bufferedIDHolder.setValue(new Integer(323)); assertEquals(17, this.employee.getID()); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(323), this.bufferedIDHolder.getValue()); + assertEquals(new Integer(17), this.idAdapter.value()); + assertEquals(new Integer(323), this.bufferedIDHolder.value()); this.bufferedNameHolder.setValue("Ripley"); assertEquals("Freddy", this.employee.getName()); - assertEquals("Freddy", this.nameAdapter.getValue()); - assertEquals("Ripley", this.bufferedNameHolder.getValue()); + assertEquals("Freddy", this.nameAdapter.value()); + assertEquals("Ripley", this.bufferedNameHolder.value()); this.bufferedHireDateHolder.setValue(null); assertEquals(temp, this.employee.getHireDate()); - assertEquals(temp, this.hireDateAdapter.getValue()); - assertEquals(null, this.bufferedHireDateHolder.getValue()); + assertEquals(temp, this.hireDateAdapter.value()); + assertEquals(null, this.bufferedHireDateHolder.value()); } public void testAccept() { @@ -149,33 +149,33 @@ public class BufferedPropertyValueModelTests extends TestCase { this.bufferedIDHolder.setValue(new Integer(323)); assertEquals(17, this.employee.getID()); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(323), this.bufferedIDHolder.getValue()); + assertEquals(new Integer(17), this.idAdapter.value()); + assertEquals(new Integer(323), this.bufferedIDHolder.value()); this.bufferedNameHolder.setValue("Ripley"); assertEquals("Freddy", this.employee.getName()); - assertEquals("Freddy", this.nameAdapter.getValue()); - assertEquals("Ripley", this.bufferedNameHolder.getValue()); + assertEquals("Freddy", this.nameAdapter.value()); + assertEquals("Ripley", this.bufferedNameHolder.value()); Date temp = this.employee.getHireDate(); this.bufferedHireDateHolder.setValue(null); assertEquals(temp, this.employee.getHireDate()); - assertEquals(temp, this.hireDateAdapter.getValue()); - assertEquals(null, this.bufferedHireDateHolder.getValue()); + assertEquals(temp, this.hireDateAdapter.value()); + assertEquals(null, this.bufferedHireDateHolder.value()); this.trigger.accept(); assertEquals(323, this.employee.getID()); - assertEquals(new Integer(323), this.idAdapter.getValue()); - assertEquals(new Integer(323), this.bufferedIDHolder.getValue()); + assertEquals(new Integer(323), this.idAdapter.value()); + assertEquals(new Integer(323), this.bufferedIDHolder.value()); assertEquals("Ripley", this.employee.getName()); - assertEquals("Ripley", this.nameAdapter.getValue()); - assertEquals("Ripley", this.bufferedNameHolder.getValue()); + assertEquals("Ripley", this.nameAdapter.value()); + assertEquals("Ripley", this.bufferedNameHolder.value()); assertEquals(null, this.employee.getHireDate()); - assertEquals(null, this.hireDateAdapter.getValue()); - assertEquals(null, this.bufferedHireDateHolder.getValue()); + assertEquals(null, this.hireDateAdapter.value()); + assertEquals(null, this.bufferedHireDateHolder.value()); } public void testReset() { @@ -186,33 +186,33 @@ public class BufferedPropertyValueModelTests extends TestCase { this.bufferedIDHolder.setValue(new Integer(323)); assertEquals(17, this.employee.getID()); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(323), this.bufferedIDHolder.getValue()); + assertEquals(new Integer(17), this.idAdapter.value()); + assertEquals(new Integer(323), this.bufferedIDHolder.value()); this.bufferedNameHolder.setValue("Ripley"); assertEquals("Freddy", this.employee.getName()); - assertEquals("Freddy", this.nameAdapter.getValue()); - assertEquals("Ripley", this.bufferedNameHolder.getValue()); + assertEquals("Freddy", this.nameAdapter.value()); + assertEquals("Ripley", this.bufferedNameHolder.value()); Date temp = this.employee.getHireDate(); this.bufferedHireDateHolder.setValue(null); assertEquals(temp, this.employee.getHireDate()); - assertEquals(temp, this.hireDateAdapter.getValue()); - assertEquals(null, this.bufferedHireDateHolder.getValue()); + assertEquals(temp, this.hireDateAdapter.value()); + assertEquals(null, this.bufferedHireDateHolder.value()); this.trigger.reset(); assertEquals(17, this.employee.getID()); - assertEquals(new Integer(17), this.idAdapter.getValue()); - assertEquals(new Integer(17), this.bufferedIDHolder.getValue()); + assertEquals(new Integer(17), this.idAdapter.value()); + assertEquals(new Integer(17), this.bufferedIDHolder.value()); assertEquals("Freddy", this.employee.getName()); - assertEquals("Freddy", this.nameAdapter.getValue()); - assertEquals("Freddy", this.bufferedNameHolder.getValue()); + assertEquals("Freddy", this.nameAdapter.value()); + assertEquals("Freddy", this.bufferedNameHolder.value()); assertEquals(temp, this.employee.getHireDate()); - assertEquals(temp, this.hireDateAdapter.getValue()); - assertEquals(temp, this.bufferedHireDateHolder.getValue()); + assertEquals(temp, this.hireDateAdapter.value()); + assertEquals(temp, this.bufferedHireDateHolder.value()); } public void testLazyListening() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionAspectAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionAspectAdapterTests.java index 41e8d4f936..dcb690add3 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionAspectAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionAspectAdapterTests.java @@ -157,7 +157,7 @@ public class CollectionAspectAdapterTests extends TestCase { } public void testSubjectHolder() { - assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.value())); assertNull(this.event1); this.subjectHolder1.setValue(this.subject2); @@ -166,7 +166,7 @@ public class CollectionAspectAdapterTests extends TestCase { assertEquals(this.aa1, this.event1.getSource()); assertEquals(ValueModel.VALUE, this.event1.collectionName()); assertFalse(this.event1.items().hasNext()); - assertEquals(this.subject2Names(), CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(this.subject2Names(), CollectionTools.bag((Iterator) this.aa1.value())); this.event1 = null; this.event1Type = null; @@ -176,7 +176,7 @@ public class CollectionAspectAdapterTests extends TestCase { assertEquals(this.aa1, this.event1.getSource()); assertEquals(ValueModel.VALUE, this.event1.collectionName()); assertFalse(this.event1.items().hasNext()); - assertFalse(((Iterator) this.aa1.getValue()).hasNext()); + assertFalse(((Iterator) this.aa1.value()).hasNext()); this.event1 = null; this.event1Type = null; @@ -186,11 +186,11 @@ public class CollectionAspectAdapterTests extends TestCase { assertEquals(this.aa1, this.event1.getSource()); assertEquals(ValueModel.VALUE, this.event1.collectionName()); assertFalse(this.event1.items().hasNext()); - assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.value())); } public void testAddItem() { - assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.value())); assertNull(this.event1); this.subject1.addName("jam"); @@ -201,7 +201,7 @@ public class CollectionAspectAdapterTests extends TestCase { assertEquals("jam", this.event1.items().next()); Collection namesPlus = this.subject1Names(); namesPlus.add("jam"); - assertEquals(namesPlus, CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(namesPlus, CollectionTools.bag((Iterator) this.aa1.value())); this.event1 = null; this.event1Type = null; @@ -212,11 +212,11 @@ public class CollectionAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.collectionName()); assertEquals("jaz", this.event1.items().next()); namesPlus.add("jaz"); - assertEquals(namesPlus, CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(namesPlus, CollectionTools.bag((Iterator) this.aa1.value())); } public void testRemoveItem() { - assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.value())); assertNull(this.event1); this.subject1.removeName("foo"); @@ -227,7 +227,7 @@ public class CollectionAspectAdapterTests extends TestCase { assertEquals("foo", this.event1.items().next()); Collection namesMinus = this.subject1Names(); namesMinus.remove("foo"); - assertEquals(namesMinus, CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(namesMinus, CollectionTools.bag((Iterator) this.aa1.value())); this.event1 = null; this.event1Type = null; @@ -238,11 +238,11 @@ public class CollectionAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.collectionName()); assertEquals("bar", this.event1.items().next()); namesMinus.remove("bar"); - assertEquals(namesMinus, CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(namesMinus, CollectionTools.bag((Iterator) this.aa1.value())); } public void testCollectionChange() { - assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.value())); assertNull(this.event1); this.subject1.addTwoNames("jam", "jaz"); @@ -254,17 +254,17 @@ public class CollectionAspectAdapterTests extends TestCase { Collection namesPlus2 = this.subject1Names(); namesPlus2.add("jam"); namesPlus2.add("jaz"); - assertEquals(namesPlus2, CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(namesPlus2, CollectionTools.bag((Iterator) this.aa1.value())); } - public void testGetValue() { + public void testValue() { assertEquals(this.subject1Names(), CollectionTools.bag(this.subject1.names())); - assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.bag((Iterator) this.aa1.value())); } public void testSize() { assertEquals(this.subject1Names().size(), CollectionTools.size(this.subject1.names())); - assertEquals(this.subject1Names().size(), CollectionTools.size((Iterator) this.aa1.getValue())); + assertEquals(this.subject1Names().size(), CollectionTools.size((Iterator) this.aa1.value())); } public void testHasListeners() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionListValueModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionListValueModelAdapterTests.java index 06bb67d5bf..5e65abe163 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionListValueModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionListValueModelAdapterTests.java @@ -54,14 +54,14 @@ public class CollectionListValueModelAdapterTests extends TestCase { super.tearDown(); } - public void testGetValue() { + public void testValue() { this.adapter.addListChangeListener(ValueModel.VALUE, new TestListChangeListener() { public void itemsAdded(ListChangeEvent e) {/* OK */} }); this.wrappedCollectionHolder.addItem("foo"); this.wrappedCollectionHolder.addItem("bar"); this.wrappedCollectionHolder.addItem("baz"); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(3, adapterCollection.size()); assertEquals(this.wrappedCollection, adapterCollection); } @@ -74,17 +74,17 @@ public class CollectionListValueModelAdapterTests extends TestCase { this.wrappedCollectionHolder.addItem("foo"); this.wrappedCollectionHolder.addItem("bar"); this.wrappedCollectionHolder.addItem("baz"); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(3, adapterCollection.size()); assertEquals(this.wrappedCollection, adapterCollection); this.adapter.removeListChangeListener(ValueModel.VALUE, listener); - adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(0, adapterCollection.size()); assertEquals(new HashBag(), adapterCollection); this.adapter.addListChangeListener(ValueModel.VALUE, listener); - adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(3, adapterCollection.size()); assertEquals(this.wrappedCollection, adapterCollection); } @@ -101,7 +101,7 @@ public class CollectionListValueModelAdapterTests extends TestCase { this.wrappedCollectionHolder.addItem("jaz"); assertEquals(6, this.wrappedCollection.size()); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(this.wrappedCollection, adapterCollection); assertEquals(this.wrappedCollection, CollectionTools.collection(synchList.iterator())); assertEquals(this.wrappedCollection, synchCollection); @@ -122,7 +122,7 @@ public class CollectionListValueModelAdapterTests extends TestCase { assertFalse(this.wrappedCollection.contains("foo")); assertEquals(4, this.wrappedCollection.size()); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(this.wrappedCollection, adapterCollection); assertEquals(this.wrappedCollection, CollectionTools.collection(synchList.iterator())); assertEquals(this.wrappedCollection, synchCollection); @@ -145,7 +145,7 @@ public class CollectionListValueModelAdapterTests extends TestCase { assertFalse(this.wrappedCollection.contains("foo")); assertEquals(4, this.wrappedCollection.size()); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(this.wrappedCollection, adapterCollection); } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionPropertyValueModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionPropertyValueModelAdapterTests.java index 81050b259f..6fcad061f9 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionPropertyValueModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CollectionPropertyValueModelAdapterTests.java @@ -49,11 +49,11 @@ public class CollectionPropertyValueModelAdapterTests extends TestCase { } private boolean booleanValue() { - return ((Boolean) this.adapter.getValue()).booleanValue(); + return ((Boolean) this.adapter.value()).booleanValue(); } private Collection wrappedCollection() { - return CollectionTools.collection((Iterator) this.wrappedCollectionHolder.getValue()); + return CollectionTools.collection((Iterator) this.wrappedCollectionHolder.value()); } public void testGetValue() { @@ -198,8 +198,8 @@ public class CollectionPropertyValueModelAdapterTests extends TestCase { * always return a Boolean */ @Override - public Object getValue() { - Object result = super.getValue(); + public Object value() { + Object result = super.value(); return (result == null) ? Boolean.FALSE : result; } @Override @@ -218,7 +218,7 @@ public class CollectionPropertyValueModelAdapterTests extends TestCase { } @Override protected Object buildValue() { - return Boolean.valueOf(CollectionTools.contains((Iterator) this.collectionHolder.getValue(), this.item)); + return Boolean.valueOf(CollectionTools.contains((Iterator) this.collectionHolder.value(), this.item)); } // ********** internal methods ********** diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CompositeCollectionValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CompositeCollectionValueModelTests.java index 98435a006f..ab41811819 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CompositeCollectionValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/CompositeCollectionValueModelTests.java @@ -59,7 +59,7 @@ public class CompositeCollectionValueModelTests extends TestCase { } private void verifySynch(CollectionValueModel compositeCVM) { - assertEquals(0, CollectionTools.size((Iterator) compositeCVM.getValue())); + assertEquals(0, CollectionTools.size((Iterator) compositeCVM.value())); Bag familiesSynch = new SynchronizedBag(this.buildFamiliesAspectAdapter(this.neighborhoodHolder)); Bag membersSynch = new SynchronizedBag(compositeCVM); this.populateNeighborhood(this.neighborhood); @@ -70,35 +70,35 @@ public class CompositeCollectionValueModelTests extends TestCase { assertEquals(12, CollectionTools.size(this.neighborhood.allMembers())); assertEquals(12, membersSynch.size()); assertEquals(CollectionTools.bag(this.neighborhood.allMembers()), membersSynch); - assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.getValue())); + assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.value())); jetsons.removeMember(jetsons.memberNamed("Astro")); assertEquals(3, familiesSynch.size()); assertEquals(11, CollectionTools.size(this.neighborhood.allMembers())); assertEquals(11, membersSynch.size()); assertEquals(CollectionTools.bag(this.neighborhood.allMembers()), membersSynch); - assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.getValue())); + assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.value())); jetsons.removeMember(jetsons.memberNamed("Judy")); assertEquals(3, familiesSynch.size()); assertEquals(10, CollectionTools.size(this.neighborhood.allMembers())); assertEquals(10, membersSynch.size()); assertEquals(CollectionTools.bag(this.neighborhood.allMembers()), membersSynch); - assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.getValue())); + assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.value())); jetsons.addMember("Fido"); assertEquals(3, familiesSynch.size()); assertEquals(11, CollectionTools.size(this.neighborhood.allMembers())); assertEquals(11, membersSynch.size()); assertEquals(CollectionTools.bag(this.neighborhood.allMembers()), membersSynch); - assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.getValue())); + assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.value())); this.neighborhood.removeFamily(jetsons); assertEquals(2, familiesSynch.size()); assertEquals(7, CollectionTools.size(this.neighborhood.allMembers())); assertEquals(7, membersSynch.size()); assertEquals(CollectionTools.bag(this.neighborhood.allMembers()), membersSynch); - assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.getValue())); + assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.value())); Family bears = this.neighborhood.addFamily("Bear"); bears.addMember("Yogi"); @@ -106,14 +106,14 @@ public class CompositeCollectionValueModelTests extends TestCase { assertEquals(8, CollectionTools.size(this.neighborhood.allMembers())); assertEquals(8, membersSynch.size()); assertEquals(CollectionTools.bag(this.neighborhood.allMembers()), membersSynch); - assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.getValue())); + assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.value())); bears.addMember("Boo-Boo"); assertEquals(3, familiesSynch.size()); assertEquals(9, CollectionTools.size(this.neighborhood.allMembers())); assertEquals(9, membersSynch.size()); assertEquals(CollectionTools.bag(this.neighborhood.allMembers()), membersSynch); - assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.getValue())); + assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.value())); Neighborhood n2 = new Neighborhood("Hanna-Barbera 2"); this.neighborhoodHolder.setValue(n2); @@ -122,7 +122,7 @@ public class CompositeCollectionValueModelTests extends TestCase { assertEquals(12, CollectionTools.size(n2.allMembers())); assertEquals(12, membersSynch.size()); assertEquals(CollectionTools.bag(n2.allMembers()), membersSynch); - assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.getValue())); + assertEquals(membersSynch, CollectionTools.bag((Iterator) compositeCVM.value())); } public void testNoTransformer() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ExtendedListValueModelWrapperTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ExtendedListValueModelWrapperTests.java index 39cc8d7f63..cf0f34b9ed 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ExtendedListValueModelWrapperTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ExtendedListValueModelWrapperTests.java @@ -93,27 +93,27 @@ public class ExtendedListValueModelWrapperTests extends TestCase { super.tearDown(); } - public void testGetValue() { + public void testValue() { this.extendedListHolder.addListChangeListener(ValueModel.VALUE, this.buildListener()); - assertEquals(this.buildExtendedList(), CollectionTools.list((Iterator) this.extendedListHolder.getValue())); + assertEquals(this.buildExtendedList(), CollectionTools.list((Iterator) this.extendedListHolder.value())); } public void testSize() { this.extendedListHolder.addListChangeListener(ValueModel.VALUE, this.buildListener()); - assertEquals(this.buildExtendedList().size(), CollectionTools.size((Iterator) this.extendedListHolder.getValue())); + assertEquals(this.buildExtendedList().size(), CollectionTools.size((Iterator) this.extendedListHolder.value())); assertEquals(this.buildExtendedList().size(), this.extendedListHolder.size()); } private boolean extendedListContains(Object item) { - return CollectionTools.contains((Iterator) this.extendedListHolder.getValue(), item); + return CollectionTools.contains((Iterator) this.extendedListHolder.value(), item); } private boolean extendedListContainsAll(Collection items) { - return CollectionTools.containsAll((Iterator) this.extendedListHolder.getValue(), items); + return CollectionTools.containsAll((Iterator) this.extendedListHolder.value(), items); } private boolean extendedListContainsAny(Collection items) { - List extendedList = CollectionTools.list((ListIterator) this.extendedListHolder.getValue()); + List extendedList = CollectionTools.list((ListIterator) this.extendedListHolder.value()); for (Iterator stream = items.iterator(); stream.hasNext(); ) { if (extendedList.contains(stream.next())) { return true; @@ -123,15 +123,15 @@ public class ExtendedListValueModelWrapperTests extends TestCase { } private boolean listContains(Object item) { - return CollectionTools.contains((Iterator) this.listHolder.getValue(), item); + return CollectionTools.contains((Iterator) this.listHolder.value(), item); } private boolean listContainsAll(Collection items) { - return CollectionTools.containsAll((Iterator) this.listHolder.getValue(), items); + return CollectionTools.containsAll((Iterator) this.listHolder.value(), items); } private boolean listContainsAny(Collection items) { - List extendedList = CollectionTools.list((ListIterator) this.listHolder.getValue()); + List extendedList = CollectionTools.list((ListIterator) this.listHolder.value()); for (Iterator stream = items.iterator(); stream.hasNext(); ) { if (extendedList.contains(stream.next())) { return true; @@ -290,7 +290,7 @@ public class ExtendedListValueModelWrapperTests extends TestCase { assertTrue(this.extendedListContains("x")); boolean exCaught = false; try { - this.extendedListHolder.removeItem(CollectionTools.indexOf((ListIterator) this.extendedListHolder.getValue(), "x")); + this.extendedListHolder.removeItem(CollectionTools.indexOf((ListIterator) this.extendedListHolder.value(), "x")); } catch (IllegalArgumentException ex) { if (ex.getMessage().indexOf("prefix") != -1) { exCaught = true; @@ -306,7 +306,7 @@ public class ExtendedListValueModelWrapperTests extends TestCase { assertTrue(this.extendedListContains("i")); boolean exCaught = false; try { - this.extendedListHolder.removeItem(CollectionTools.indexOf((ListIterator) this.extendedListHolder.getValue(), "i")); + this.extendedListHolder.removeItem(CollectionTools.indexOf((ListIterator) this.extendedListHolder.value(), "i")); } catch (IllegalArgumentException ex) { if (ex.getMessage().indexOf("suffix") != -1) { exCaught = true; @@ -347,7 +347,7 @@ public class ExtendedListValueModelWrapperTests extends TestCase { assertTrue(this.extendedListContains("y")); boolean exCaught = false; try { - this.extendedListHolder.removeItems(CollectionTools.indexOf((ListIterator) this.extendedListHolder.getValue(), "x"), 2); + this.extendedListHolder.removeItems(CollectionTools.indexOf((ListIterator) this.extendedListHolder.value(), "x"), 2); } catch (IllegalArgumentException ex) { if (ex.getMessage().indexOf("prefix") != -1) { exCaught = true; @@ -365,7 +365,7 @@ public class ExtendedListValueModelWrapperTests extends TestCase { assertTrue(this.extendedListContains("i")); boolean exCaught = false; try { - this.extendedListHolder.removeItems(CollectionTools.indexOf((ListIterator) this.extendedListHolder.getValue(), "D"), 2); + this.extendedListHolder.removeItems(CollectionTools.indexOf((ListIterator) this.extendedListHolder.value(), "D"), 2); } catch (IllegalArgumentException ex) { if (ex.getMessage().indexOf("suffix") != -1) { exCaught = true; diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/FilteringCollectionValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/FilteringCollectionValueModelTests.java index cd684f3082..fa95e08cfc 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/FilteringCollectionValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/FilteringCollectionValueModelTests.java @@ -70,31 +70,31 @@ public class FilteringCollectionValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { + public void testValue() { // add a listener to "activate" the wrapper this.filteredCollectionHolder.addCollectionChangeListener(ValueModel.VALUE, this.buildFilteredListener()); - assertEquals("foo", ((Iterator) this.collectionHolder.getValue()).next()); - assertFalse(((Iterator) this.filteredCollectionHolder.getValue()).hasNext()); + assertEquals("foo", ((Iterator) this.collectionHolder.value()).next()); + assertFalse(((Iterator) this.filteredCollectionHolder.value()).hasNext()); this.collectionHolder.addItem("bar"); - Iterator collectionHolderValue = (Iterator) this.collectionHolder.getValue(); + Iterator collectionHolderValue = (Iterator) this.collectionHolder.value(); assertEquals("foo", collectionHolderValue.next()); assertEquals("bar", collectionHolderValue.next()); - assertTrue(((Iterator) this.filteredCollectionHolder.getValue()).hasNext()); - assertEquals("bar", ((Iterator) this.filteredCollectionHolder.getValue()).next()); + assertTrue(((Iterator) this.filteredCollectionHolder.value()).hasNext()); + assertEquals("bar", ((Iterator) this.filteredCollectionHolder.value()).next()); this.collectionHolder.removeItem("bar"); - assertEquals("foo", ((Iterator) this.collectionHolder.getValue()).next()); - assertFalse(((Iterator) this.filteredCollectionHolder.getValue()).hasNext()); + assertEquals("foo", ((Iterator) this.collectionHolder.value()).next()); + assertFalse(((Iterator) this.filteredCollectionHolder.value()).hasNext()); this.collectionHolder.removeItem("foo"); - assertFalse(((Iterator) this.collectionHolder.getValue()).hasNext()); - assertFalse(((Iterator) this.filteredCollectionHolder.getValue()).hasNext()); + assertFalse(((Iterator) this.collectionHolder.value()).hasNext()); + assertFalse(((Iterator) this.filteredCollectionHolder.value()).hasNext()); this.collectionHolder.addItem("foo"); - assertEquals("foo", ((Iterator) this.collectionHolder.getValue()).next()); - assertFalse(((Iterator) this.filteredCollectionHolder.getValue()).hasNext()); + assertEquals("foo", ((Iterator) this.collectionHolder.value()).next()); + assertFalse(((Iterator) this.filteredCollectionHolder.value()).hasNext()); } public void testSetValue() { @@ -107,10 +107,10 @@ public class FilteringCollectionValueModelTests extends TestCase { ((SimpleCollectionValueModel) this.collectionHolder).setValue(newCollection); - Iterator collectionValues = (Iterator) this.collectionHolder.getValue(); + Iterator collectionValues = (Iterator) this.collectionHolder.value(); assertEquals("fox", collectionValues.next()); assertEquals("baz", collectionValues.next()); - Iterator filteredCollectionValues = (Iterator) this.filteredCollectionHolder.getValue(); + Iterator filteredCollectionValues = (Iterator) this.filteredCollectionHolder.value(); assertEquals("baz", filteredCollectionValues.next()); assertFalse(filteredCollectionValues.hasNext()); } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/FilteringPropertyValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/FilteringPropertyValueModelTests.java index 7a63e812fa..ad22856e42 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/FilteringPropertyValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/FilteringPropertyValueModelTests.java @@ -56,45 +56,45 @@ public class FilteringPropertyValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { - assertEquals("foo", this.objectHolder.getValue()); - assertNull(this.filteredObjectHolder.getValue()); + public void testValue() { + assertEquals("foo", this.objectHolder.value()); + assertNull(this.filteredObjectHolder.value()); this.objectHolder.setValue("bar"); - assertEquals("bar", this.objectHolder.getValue()); - assertNotNull(this.filteredObjectHolder.getValue()); - assertEquals("bar", this.filteredObjectHolder.getValue()); + assertEquals("bar", this.objectHolder.value()); + assertNotNull(this.filteredObjectHolder.value()); + assertEquals("bar", this.filteredObjectHolder.value()); this.objectHolder.setValue("baz"); - assertEquals("baz", this.objectHolder.getValue()); - assertNotNull(this.filteredObjectHolder.getValue()); - assertEquals("baz", this.filteredObjectHolder.getValue()); + assertEquals("baz", this.objectHolder.value()); + assertNotNull(this.filteredObjectHolder.value()); + assertEquals("baz", this.filteredObjectHolder.value()); this.objectHolder.setValue(null); - assertNull(this.objectHolder.getValue()); - assertNull(this.filteredObjectHolder.getValue()); + assertNull(this.objectHolder.value()); + assertNull(this.filteredObjectHolder.value()); this.objectHolder.setValue("foo"); - assertEquals("foo", this.objectHolder.getValue()); - assertNull(this.filteredObjectHolder.getValue()); + assertEquals("foo", this.objectHolder.value()); + assertNull(this.filteredObjectHolder.value()); } public void testSetValue() { this.filteredObjectHolder.setValue("bar"); - assertEquals("bar", this.objectHolder.getValue()); - assertEquals("bar", this.filteredObjectHolder.getValue()); + assertEquals("bar", this.objectHolder.value()); + assertEquals("bar", this.filteredObjectHolder.value()); this.filteredObjectHolder.setValue("foo"); - assertEquals("bar", this.objectHolder.getValue()); - assertEquals("bar", this.filteredObjectHolder.getValue()); + assertEquals("bar", this.objectHolder.value()); + assertEquals("bar", this.filteredObjectHolder.value()); this.filteredObjectHolder.setValue(null); - assertEquals("bar", this.objectHolder.getValue()); - assertEquals("bar", this.filteredObjectHolder.getValue()); + assertEquals("bar", this.objectHolder.value()); + assertEquals("bar", this.filteredObjectHolder.value()); this.filteredObjectHolder.setValue("baz"); - assertEquals("baz", this.objectHolder.getValue()); - assertEquals("baz", this.filteredObjectHolder.getValue()); + assertEquals("baz", this.objectHolder.value()); + assertEquals("baz", this.filteredObjectHolder.value()); } public void testLazyListening() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListAspectAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListAspectAdapterTests.java index 30f53d59dc..53a5615ed8 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListAspectAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListAspectAdapterTests.java @@ -165,7 +165,7 @@ public class ListAspectAdapterTests extends TestCase { } public void testSubjectHolder() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); assertNull(this.event1); this.subjectHolder1.setValue(this.subject2); @@ -174,7 +174,7 @@ public class ListAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.listName()); assertEquals(-1, this.event1.index()); assertFalse(this.event1.items().hasNext()); - assertEquals(this.subject2Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject2Names(), CollectionTools.list((ListIterator) this.aa1.value())); this.event1 = null; this.subjectHolder1.setValue(null); @@ -183,7 +183,7 @@ public class ListAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.listName()); assertEquals(-1, this.event1.index()); assertFalse(this.event1.items().hasNext()); - assertFalse(((Iterator) this.aa1.getValue()).hasNext()); + assertFalse(((Iterator) this.aa1.value()).hasNext()); this.event1 = null; this.subjectHolder1.setValue(this.subject1); @@ -192,11 +192,11 @@ public class ListAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.listName()); assertEquals(-1, this.event1.index()); assertFalse(this.event1.items().hasNext()); - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); } public void testAddItem() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); assertNull(this.event1); this.subject1.addName("jam"); @@ -207,7 +207,7 @@ public class ListAspectAdapterTests extends TestCase { assertEquals("jam", this.event1.items().next()); List namesPlus = this.subject1Names(); namesPlus.add("jam"); - assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.value())); this.event1 = null; this.aa1.addItem(2, "jaz"); @@ -217,11 +217,11 @@ public class ListAspectAdapterTests extends TestCase { assertEquals(2, this.event1.index()); assertEquals("jaz", this.event1.items().next()); namesPlus.add(2, "jaz"); - assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.value())); } public void testDefaultAddItems() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); assertNull(this.event1); List items = new ArrayList(); @@ -239,11 +239,11 @@ public class ListAspectAdapterTests extends TestCase { assertEquals("jam", this.event1.items().next()); List namesPlus = this.subject1Names(); namesPlus.addAll(2, items); - assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.value())); } public void testRemoveItem() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); assertNull(this.event1); String removedName = this.subject1.removeName(0); // should be "foo" @@ -254,7 +254,7 @@ public class ListAspectAdapterTests extends TestCase { assertEquals(removedName, this.event1.items().next()); List namesMinus = this.subject1Names(); namesMinus.remove(0); - assertEquals(namesMinus, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesMinus, CollectionTools.list((ListIterator) this.aa1.value())); this.event1 = null; Object removedItem = this.aa1.removeItem(0); @@ -264,11 +264,11 @@ public class ListAspectAdapterTests extends TestCase { assertEquals(0, this.event1.index()); assertEquals(removedItem, this.event1.items().next()); namesMinus.remove(0); - assertEquals(namesMinus, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesMinus, CollectionTools.list((ListIterator) this.aa1.value())); } public void testDefaultRemoveItems() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); assertNull(this.event1); List items = new ArrayList(); @@ -285,11 +285,11 @@ public class ListAspectAdapterTests extends TestCase { List namesPlus = this.subject1Names(); namesPlus.remove(1); namesPlus.remove(1); - assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.value())); } public void testReplaceItem() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); assertNull(this.event1); String replacedName = this.subject1.setName(0, "jelly"); // should be "foo" @@ -301,7 +301,7 @@ public class ListAspectAdapterTests extends TestCase { assertEquals(replacedName, this.event1.replacedItems().next()); List namesChanged = this.subject1Names(); namesChanged.set(0, "jelly"); - assertEquals(namesChanged, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesChanged, CollectionTools.list((ListIterator) this.aa1.value())); this.event1 = null; replacedName = this.subject1.setName(1, "roll"); // should be "bar" @@ -314,11 +314,11 @@ public class ListAspectAdapterTests extends TestCase { namesChanged = this.subject1Names(); namesChanged.set(0, "jelly"); namesChanged.set(1, "roll"); - assertEquals(namesChanged, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesChanged, CollectionTools.list((ListIterator) this.aa1.value())); } public void testDefaultReplaceItems() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); assertNull(this.event1); List items = new ArrayList(); @@ -336,11 +336,11 @@ public class ListAspectAdapterTests extends TestCase { List namesPlus = this.subject1Names(); namesPlus.set(1, items.get(0)); namesPlus.set(2, items.get(1)); - assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesPlus, CollectionTools.list((ListIterator) this.aa1.value())); } public void testListChange() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); assertNull(this.event1); this.subject1.addTwoNames("jam", "jaz"); @@ -352,12 +352,12 @@ public class ListAspectAdapterTests extends TestCase { List namesPlus2 = this.subject1Names(); namesPlus2.add(0, "jaz"); namesPlus2.add(0, "jam"); - assertEquals(namesPlus2, CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(namesPlus2, CollectionTools.list((ListIterator) this.aa1.value())); } - public void testGetValue() { + public void testValue() { assertEquals(this.subject1Names(), CollectionTools.list(this.subject1.names())); - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.aa1.value())); } public void testGetItem() { @@ -367,7 +367,7 @@ public class ListAspectAdapterTests extends TestCase { public void testSize() { assertEquals(this.subject1Names().size(), CollectionTools.size(this.subject1.names())); - assertEquals(this.subject1Names().size(), CollectionTools.size((ListIterator) this.aa1.getValue())); + assertEquals(this.subject1Names().size(), CollectionTools.size((ListIterator) this.aa1.value())); } public void testHasListeners() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListCollectionValueModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListCollectionValueModelAdapterTests.java index d6bcbf6488..216df162a4 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListCollectionValueModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListCollectionValueModelAdapterTests.java @@ -59,7 +59,7 @@ public class ListCollectionValueModelAdapterTests extends TestCase { super.tearDown(); } - public void testGetValue() { + public void testValue() { this.adapter.addCollectionChangeListener(ValueModel.VALUE, new TestListener() { public void itemsAdded(CollectionChangeEvent e) { // override failure @@ -68,7 +68,7 @@ public class ListCollectionValueModelAdapterTests extends TestCase { this.wrappedListHolder.addItem(0, "foo"); this.wrappedListHolder.addItem(1, "bar"); this.wrappedListHolder.addItem(2, "baz"); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(3, adapterCollection.size()); assertEquals(this.wrappedCollection(), adapterCollection); } @@ -81,17 +81,17 @@ public class ListCollectionValueModelAdapterTests extends TestCase { this.wrappedListHolder.addItem(0, "foo"); this.wrappedListHolder.addItem(1, "bar"); this.wrappedListHolder.addItem(2, "baz"); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(3, adapterCollection.size()); assertEquals(this.wrappedCollection(), adapterCollection); this.adapter.removeCollectionChangeListener(ValueModel.VALUE, listener); - adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(0, adapterCollection.size()); assertEquals(new HashBag(), adapterCollection); this.adapter.addCollectionChangeListener(ValueModel.VALUE, listener); - adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(3, adapterCollection.size()); assertEquals(this.wrappedCollection(), adapterCollection); } @@ -108,7 +108,7 @@ public class ListCollectionValueModelAdapterTests extends TestCase { this.wrappedListHolder.addItem(5, "jaz"); assertEquals(6, this.wrappedList.size()); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(this.wrappedCollection(), adapterCollection); assertEquals(this.wrappedCollection(), CollectionTools.collection(synchList.iterator())); assertEquals(this.wrappedCollection(), synchCollection); @@ -129,7 +129,7 @@ public class ListCollectionValueModelAdapterTests extends TestCase { assertFalse(this.wrappedList.contains("foo")); assertEquals(4, this.wrappedList.size()); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(this.wrappedCollection(), adapterCollection); assertEquals(this.wrappedCollection(), CollectionTools.collection(synchList.iterator())); assertEquals(this.wrappedCollection(), synchCollection); @@ -156,7 +156,7 @@ public class ListCollectionValueModelAdapterTests extends TestCase { assertFalse(this.wrappedList.contains("foo")); assertEquals(4, this.wrappedList.size()); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(this.wrappedCollection(), adapterCollection); } @@ -172,12 +172,12 @@ public class ListCollectionValueModelAdapterTests extends TestCase { this.wrappedListHolder.addItem(0, "foo"); this.wrappedListHolder.addItem(1, "bar"); this.wrappedListHolder.addItem(2, "baz"); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(3, adapterCollection.size()); this.adapter.addCollectionChangeListener(ValueModel.VALUE, new TestListener() { public void itemsRemoved(CollectionChangeEvent e) { assertEquals("foo", e.items().next()); - assertFalse(CollectionTools.contains((Iterator) ListCollectionValueModelAdapterTests.this.adapter.getValue(), "joo")); + assertFalse(CollectionTools.contains((Iterator) ListCollectionValueModelAdapterTests.this.adapter.value(), "joo")); assertEquals(2, ListCollectionValueModelAdapterTests.this.adapter.size()); } public void itemsAdded(CollectionChangeEvent e) { @@ -186,7 +186,7 @@ public class ListCollectionValueModelAdapterTests extends TestCase { } }); this.wrappedListHolder.replaceItem(0, "joo"); - adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(3, adapterCollection.size()); assertEquals(this.wrappedCollection(), adapterCollection); } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListCuratorTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListCuratorTests.java index c362a14ebe..49088a9f2a 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListCuratorTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ListCuratorTests.java @@ -116,7 +116,7 @@ public final class ListCuratorTests } public void testSubjectHolder() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.value())); assertNull(this.event1); this.subjectHolder1.setValue(this.subject2); @@ -125,7 +125,7 @@ public final class ListCuratorTests assertEquals(ValueModel.VALUE, this.event1.listName()); assertEquals(-1, this.event1.index()); assertFalse(this.event1.items().hasNext()); - assertEquals(this.subject2Names(), CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(this.subject2Names(), CollectionTools.list((ListIterator) this.curator.value())); this.event1 = null; this.subjectHolder1.setValue(null); @@ -134,7 +134,7 @@ public final class ListCuratorTests assertEquals(ValueModel.VALUE, this.event1.listName()); assertEquals(-1, this.event1.index()); assertFalse(this.event1.items().hasNext()); - assertFalse(((Iterator) this.curator.getValue()).hasNext()); + assertFalse(((Iterator) this.curator.value()).hasNext()); this.event1 = null; this.subjectHolder1.setValue(this.subject1); @@ -143,11 +143,11 @@ public final class ListCuratorTests assertEquals(ValueModel.VALUE, this.event1.listName()); assertEquals(-1, this.event1.index()); assertFalse(this.event1.items().hasNext()); - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.value())); } public void testAddItem() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.value())); assertNull(this.event1); this.subject1.addString("echo"); @@ -158,7 +158,7 @@ public final class ListCuratorTests assertEquals("echo", this.event1.items().next()); List stringsPlus = this.subject1Names(); stringsPlus.add("echo"); - assertEquals(stringsPlus, CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(stringsPlus, CollectionTools.list((ListIterator) this.curator.value())); this.event1 = null; this.subject1.addString(0, "zulu"); @@ -168,11 +168,11 @@ public final class ListCuratorTests assertEquals(0, this.event1.index()); assertEquals("zulu", this.event1.items().next()); stringsPlus.add(0, "zulu"); - assertEquals(stringsPlus, CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(stringsPlus, CollectionTools.list((ListIterator) this.curator.value())); } public void testRemoveItem() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.value())); assertNull(this.event1); String removedString = this.subject1.removeString(0); // should be "alpha" @@ -183,7 +183,7 @@ public final class ListCuratorTests assertEquals(removedString, this.event1.items().next()); List stringsMinus = this.subject1Names(); stringsMinus.remove(0); - assertEquals(stringsMinus, CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(stringsMinus, CollectionTools.list((ListIterator) this.curator.value())); removedString = this.subject1.removeString(2); // should be "delta" assertNotNull(this.event1); @@ -192,11 +192,11 @@ public final class ListCuratorTests assertEquals(2, this.event1.index()); assertEquals(removedString, this.event1.items().next()); stringsMinus.remove(2); - assertEquals(stringsMinus, CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(stringsMinus, CollectionTools.list((ListIterator) this.curator.value())); } public void testCompleteListChange() { - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.value())); assertNull(this.event1); this.subject1.setStrings(this.subject2Names()); @@ -204,11 +204,11 @@ public final class ListCuratorTests assertEquals(this.curator, this.event1.getSource()); assertEquals(ValueModel.VALUE, this.event1.listName()); List newStrings = this.subject2Names(); - assertEquals(newStrings, CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(newStrings, CollectionTools.list((ListIterator) this.curator.value())); } public void testPartialListChange() { - List startingList = CollectionTools.list((ListIterator) this.curator.getValue()); + List startingList = CollectionTools.list((ListIterator) this.curator.value()); assertEquals(this.subject1Names(), startingList); assertNull(this.event1); @@ -217,7 +217,7 @@ public final class ListCuratorTests List newStrings = CollectionTools.list(new String[] {new String("bravo"), new String("alpha"), "echo", "delta", "foxtrot"}); this.subject1.setStrings(newStrings); - List finalList = CollectionTools.list((ListIterator) this.curator.getValue()); + List finalList = CollectionTools.list((ListIterator) this.curator.value()); assertNotNull(this.event1); assertEquals(this.curator, this.event1.getSource()); assertEquals(ValueModel.VALUE, this.event1.listName()); @@ -226,9 +226,9 @@ public final class ListCuratorTests assertTrue(nonidenticalString != finalList.get(1)); } - public void testGetValue() { + public void testValue() { assertEquals(this.subject1Names(), CollectionTools.list(this.subject1.strings())); - assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.getValue())); + assertEquals(this.subject1Names(), CollectionTools.list((ListIterator) this.curator.value())); } public void testGetItem() { @@ -238,7 +238,7 @@ public final class ListCuratorTests public void testSize() { assertEquals(this.subject1Names().size(), CollectionTools.size(this.subject1.strings())); - assertEquals(this.subject1Names().size(), CollectionTools.size((ListIterator) this.curator.getValue())); + assertEquals(this.subject1Names().size(), CollectionTools.size((ListIterator) this.curator.value())); assertEquals(this.subject1Names().size(), this.curator.size()); } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullCollectionValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullCollectionValueModelTests.java index 5e8f390605..7c25f159cb 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullCollectionValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullCollectionValueModelTests.java @@ -90,8 +90,8 @@ public class NullCollectionValueModelTests extends TestCase { assertEquals(0, this.collectionHolder.size()); } - public void testGetValue() { - assertFalse(((Iterator) this.collectionHolder.getValue()).hasNext()); + public void testValue() { + assertFalse(((Iterator) this.collectionHolder.value()).hasNext()); } } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullListValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullListValueModelTests.java index fb6f19b3ca..26c76b76f8 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullListValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullListValueModelTests.java @@ -120,8 +120,8 @@ public class NullListValueModelTests extends TestCase { assertEquals(0, this.listHolder.size()); } - public void testGetValue() { - assertFalse(((ListIterator) this.listHolder.getValue()).hasNext()); + public void testValue() { + assertFalse(((ListIterator) this.listHolder.value()).hasNext()); } } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullPropertyValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullPropertyValueModelTests.java index 9298c1b8d8..00a03bc2d0 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullPropertyValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/NullPropertyValueModelTests.java @@ -44,8 +44,8 @@ public class NullPropertyValueModelTests extends TestCase { assertTrue(exCaught); } - public void testGetValue() { - assertNull(this.valueHolder.getValue()); + public void testValue() { + assertNull(this.valueHolder.value()); } } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/PropertyAspectAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/PropertyAspectAdapterTests.java index 191e6ac492..a495f0ca80 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/PropertyAspectAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/PropertyAspectAdapterTests.java @@ -96,7 +96,7 @@ public class PropertyAspectAdapterTests extends TestCase { } public void testSubjectHolder() { - assertEquals("foo", this.aa1.getValue()); + assertEquals("foo", this.aa1.value()); assertNull(this.event1); this.subjectHolder1.setValue(this.subject2); @@ -105,7 +105,7 @@ public class PropertyAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.propertyName()); assertEquals("foo", this.event1.oldValue()); assertEquals("bar", this.event1.newValue()); - assertEquals("bar", this.aa1.getValue()); + assertEquals("bar", this.aa1.value()); this.event1 = null; this.subjectHolder1.setValue(null); @@ -114,7 +114,7 @@ public class PropertyAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.propertyName()); assertEquals("bar", this.event1.oldValue()); assertNull(this.event1.newValue()); - assertNull(this.aa1.getValue()); + assertNull(this.aa1.value()); this.event1 = null; this.subjectHolder1.setValue(this.subject1); @@ -123,11 +123,11 @@ public class PropertyAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.propertyName()); assertEquals(null, this.event1.oldValue()); assertEquals("foo", this.event1.newValue()); - assertEquals("foo", this.aa1.getValue()); + assertEquals("foo", this.aa1.value()); } public void testPropertyChange() { - assertEquals("foo", this.aa1.getValue()); + assertEquals("foo", this.aa1.value()); assertNull(this.event1); this.subject1.setName("baz"); @@ -136,7 +136,7 @@ public class PropertyAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.propertyName()); assertEquals("foo", this.event1.oldValue()); assertEquals("baz", this.event1.newValue()); - assertEquals("baz", this.aa1.getValue()); + assertEquals("baz", this.aa1.value()); this.event1 = null; this.subject1.setName(null); @@ -145,7 +145,7 @@ public class PropertyAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.propertyName()); assertEquals("baz", this.event1.oldValue()); assertEquals(null, this.event1.newValue()); - assertEquals(null, this.aa1.getValue()); + assertEquals(null, this.aa1.value()); this.event1 = null; this.subject1.setName("foo"); @@ -154,35 +154,35 @@ public class PropertyAspectAdapterTests extends TestCase { assertEquals(ValueModel.VALUE, this.event1.propertyName()); assertEquals(null, this.event1.oldValue()); assertEquals("foo", this.event1.newValue()); - assertEquals("foo", this.aa1.getValue()); + assertEquals("foo", this.aa1.value()); } - public void testGetValue() { + public void testValue() { assertEquals("foo", this.subject1.getName()); - assertEquals("foo", this.aa1.getValue()); + assertEquals("foo", this.aa1.value()); } public void testStaleValue() { assertEquals("foo", this.subject1.getName()); - assertEquals("foo", this.aa1.getValue()); + assertEquals("foo", this.aa1.value()); this.aa1.removePropertyChangeListener(ValueModel.VALUE, this.listener1); - assertEquals(null, this.aa1.getValue()); + assertEquals(null, this.aa1.value()); this.aa1.addPropertyChangeListener(ValueModel.VALUE, this.listener1); - assertEquals("foo", this.aa1.getValue()); + assertEquals("foo", this.aa1.value()); this.aa1.removePropertyChangeListener(ValueModel.VALUE, this.listener1); this.subjectHolder1.setValue(this.subject2); - assertEquals(null, this.aa1.getValue()); + assertEquals(null, this.aa1.value()); this.aa1.addPropertyChangeListener(ValueModel.VALUE, this.listener1); - assertEquals("bar", this.aa1.getValue()); + assertEquals("bar", this.aa1.value()); } public void testSetValue() { this.aa1.setValue("baz"); - assertEquals("baz", this.aa1.getValue()); + assertEquals("baz", this.aa1.value()); assertEquals("baz", this.subject1.getName()); } @@ -208,17 +208,17 @@ public class PropertyAspectAdapterTests extends TestCase { PropertyValueModel testAA = this.buildMultipleAspectAdapter(testSubjectHolder); PropertyChangeListener testListener = this.buildMultipleValueChangeListener(); testAA.addPropertyChangeListener(ValueModel.VALUE, testListener); - assertEquals("fred:husband", testAA.getValue()); + assertEquals("fred:husband", testAA.value()); this.multipleValueEvent = null; testSubject.setName("wilma"); - assertEquals("wilma:husband", testAA.getValue()); + assertEquals("wilma:husband", testAA.value()); assertEquals("fred:husband", this.multipleValueEvent.oldValue()); assertEquals("wilma:husband", this.multipleValueEvent.newValue()); this.multipleValueEvent = null; testSubject.setDescription("wife"); - assertEquals("wilma:wife", testAA.getValue()); + assertEquals("wilma:wife", testAA.value()); assertEquals("wilma:husband", this.multipleValueEvent.oldValue()); assertEquals("wilma:wife", this.multipleValueEvent.newValue()); } @@ -257,18 +257,18 @@ public class PropertyAspectAdapterTests extends TestCase { PropertyValueModel customAA = this.buildCustomAspectAdapter(customSubjectHolder); PropertyChangeListener customListener = this.buildCustomValueChangeListener(); customAA.addPropertyChangeListener(ValueModel.VALUE, customListener); - assertEquals("fred", customAA.getValue()); + assertEquals("fred", customAA.value()); this.customValueEvent = null; customSubject.setName("wilma"); - assertEquals("wilma", customAA.getValue()); + assertEquals("wilma", customAA.value()); assertEquals("fred", this.customValueEvent.oldValue()); assertEquals("wilma", this.customValueEvent.newValue()); this.customValueEvent = null; customSubjectHolder.setValue(null); // this would fail - the value would be null... - assertEquals("", customAA.getValue()); + assertEquals("", customAA.value()); assertEquals("wilma", this.customValueEvent.oldValue()); assertEquals("", this.customValueEvent.newValue()); } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/PropertyCollectionValueModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/PropertyCollectionValueModelAdapterTests.java index 0c1994949f..3eab855988 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/PropertyCollectionValueModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/PropertyCollectionValueModelAdapterTests.java @@ -46,7 +46,7 @@ public class PropertyCollectionValueModelAdapterTests extends TestCase { } private Collection wrappedCollection() { - return CollectionTools.collection(new SingleElementIterator(this.wrappedValueHolder.getValue())); + return CollectionTools.collection(new SingleElementIterator(this.wrappedValueHolder.value())); } @Override @@ -55,12 +55,12 @@ public class PropertyCollectionValueModelAdapterTests extends TestCase { super.tearDown(); } - public void testGetValue() { + public void testValue() { this.adapter.addCollectionChangeListener(ValueModel.VALUE, new TestListener() { public void itemsAdded(CollectionChangeEvent e) {/* OK */} }); this.wrappedValueHolder.setValue("foo"); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(1, adapterCollection.size()); assertEquals(this.wrappedCollection(), adapterCollection); assertEquals("foo", adapterCollection.iterator().next()); @@ -72,18 +72,18 @@ public class PropertyCollectionValueModelAdapterTests extends TestCase { }; this.adapter.addCollectionChangeListener(ValueModel.VALUE, listener); this.wrappedValueHolder.setValue("foo"); - Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + Collection adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(1, adapterCollection.size()); assertEquals(this.wrappedCollection(), adapterCollection); assertEquals("foo", adapterCollection.iterator().next()); this.adapter.removeCollectionChangeListener(ValueModel.VALUE, listener); - adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(0, adapterCollection.size()); assertEquals(new HashBag(), adapterCollection); this.adapter.addCollectionChangeListener(ValueModel.VALUE, listener); - adapterCollection = CollectionTools.collection((Iterator) this.adapter.getValue()); + adapterCollection = CollectionTools.collection((Iterator) this.adapter.value()); assertEquals(1, adapterCollection.size()); assertEquals(this.wrappedCollection(), adapterCollection); assertEquals("foo", adapterCollection.iterator().next()); diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ReadOnlyCollectionValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ReadOnlyCollectionValueModelTests.java index 7851a1992f..929b7d2e18 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ReadOnlyCollectionValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ReadOnlyCollectionValueModelTests.java @@ -37,7 +37,7 @@ public class ReadOnlyCollectionValueModelTests extends TestCase { private CollectionValueModel buildCollectionHolder() { return new AbstractReadOnlyCollectionValueModel() { - public Object getValue() { + public Object value() { return ReadOnlyCollectionValueModelTests.collection(); } }; @@ -67,8 +67,8 @@ public class ReadOnlyCollectionValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { - assertEquals(buildCollection(), CollectionTools.bag((Iterator) this.collectionHolder.getValue())); + public void testValue() { + assertEquals(buildCollection(), CollectionTools.bag((Iterator) this.collectionHolder.value())); } public void testSize() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ReadOnlyListValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ReadOnlyListValueModelTests.java index 20cf307ed5..f92c6f25aa 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ReadOnlyListValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/ReadOnlyListValueModelTests.java @@ -38,7 +38,7 @@ public class ReadOnlyListValueModelTests extends TestCase { private ListValueModel buildListHolder() { return new AbstractReadOnlyListValueModel() { - public Object getValue() { + public Object value() { return ReadOnlyListValueModelTests.list(); } }; @@ -75,8 +75,8 @@ public class ReadOnlyListValueModelTests extends TestCase { } } - public void testGetValue() { - assertEquals(buildList(), CollectionTools.list((Iterator) this.listHolder.getValue())); + public void testValue() { + assertEquals(buildList(), CollectionTools.list((Iterator) this.listHolder.value())); } public void testSize() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimpleCollectionValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimpleCollectionValueModelTests.java index 1355f42372..26446aae96 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimpleCollectionValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimpleCollectionValueModelTests.java @@ -91,34 +91,34 @@ public class SimpleCollectionValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { - assertEquals(this.buildBag(), CollectionTools.bag((Iterator) this.bagHolder.getValue())); - assertEquals(this.buildSet(), CollectionTools.set((Iterator) this.setHolder.getValue())); + public void testValue() { + assertEquals(this.buildBag(), CollectionTools.bag((Iterator) this.bagHolder.value())); + assertEquals(this.buildSet(), CollectionTools.set((Iterator) this.setHolder.value())); } public void testSize() { - assertEquals(this.buildBag().size(), CollectionTools.size((Iterator) this.bagHolder.getValue())); - assertEquals(this.buildSet().size(), CollectionTools.size((Iterator) this.setHolder.getValue())); + assertEquals(this.buildBag().size(), CollectionTools.size((Iterator) this.bagHolder.value())); + assertEquals(this.buildSet().size(), CollectionTools.size((Iterator) this.setHolder.value())); } private boolean bagHolderContains(Object item) { - return CollectionTools.contains((Iterator) this.bagHolder.getValue(), item); + return CollectionTools.contains((Iterator) this.bagHolder.value(), item); } private boolean setHolderContains(Object item) { - return CollectionTools.contains((Iterator) this.setHolder.getValue(), item); + return CollectionTools.contains((Iterator) this.setHolder.value(), item); } private boolean bagHolderContainsAll(Collection items) { - return CollectionTools.containsAll((Iterator) this.bagHolder.getValue(), items); + return CollectionTools.containsAll((Iterator) this.bagHolder.value(), items); } private boolean setHolderContainsAll(Collection items) { - return CollectionTools.containsAll((Iterator) this.setHolder.getValue(), items); + return CollectionTools.containsAll((Iterator) this.setHolder.value(), items); } private boolean bagHolderContainsAny(Collection items) { - Bag bag = CollectionTools.bag((Iterator) this.bagHolder.getValue()); + Bag bag = CollectionTools.bag((Iterator) this.bagHolder.value()); for (String string : items) { if (bag.contains(string)) { return true; @@ -128,7 +128,7 @@ public class SimpleCollectionValueModelTests extends TestCase { } private boolean setHolderContainsAny(Collection items) { - Set set = CollectionTools.set((Iterator) this.setHolder.getValue()); + Set set = CollectionTools.set((Iterator) this.setHolder.value()); for (String string : items) { if (set.contains(string)) { return true; diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimpleListValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimpleListValueModelTests.java index d3f9a37e08..c360caaeb4 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimpleListValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimpleListValueModelTests.java @@ -77,24 +77,24 @@ public class SimpleListValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { - assertEquals(this.buildList(), CollectionTools.list((Iterator) this.listHolder.getValue())); + public void testValue() { + assertEquals(this.buildList(), CollectionTools.list((Iterator) this.listHolder.value())); } public void testSize() { - assertEquals(this.buildList().size(), CollectionTools.size((Iterator) this.listHolder.getValue())); + assertEquals(this.buildList().size(), CollectionTools.size((Iterator) this.listHolder.value())); } private boolean listContains(Object item) { - return CollectionTools.contains((Iterator) this.listHolder.getValue(), item); + return CollectionTools.contains((Iterator) this.listHolder.value(), item); } private boolean listContainsAll(Collection items) { - return CollectionTools.containsAll((Iterator) this.listHolder.getValue(), items); + return CollectionTools.containsAll((Iterator) this.listHolder.value(), items); } private boolean listContainsAny(Collection items) { - List list = CollectionTools.list((ListIterator) this.listHolder.getValue()); + List list = CollectionTools.list((ListIterator) this.listHolder.value()); for (Iterator stream = items.iterator(); stream.hasNext(); ) { if (list.contains(stream.next())) { return true; diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimplePropertyValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimplePropertyValueModelTests.java index 2c17c5ac82..b4c0707f38 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimplePropertyValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SimplePropertyValueModelTests.java @@ -39,17 +39,17 @@ public class SimplePropertyValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { - assertEquals("foo", this.objectHolder.getValue()); + public void testValue() { + assertEquals("foo", this.objectHolder.value()); } public void testSetValue() { this.objectHolder.setValue("bar"); - assertEquals("bar", this.objectHolder.getValue()); + assertEquals("bar", this.objectHolder.value()); this.objectHolder.setValue(null); - assertEquals(null, this.objectHolder.getValue()); + assertEquals(null, this.objectHolder.value()); this.objectHolder.setValue("baz"); - assertEquals("baz", this.objectHolder.getValue()); + assertEquals("baz", this.objectHolder.value()); } public void testPropertyChange1() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SortedListValueModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SortedListValueModelAdapterTests.java index b0641fdbcd..bb9c30195f 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SortedListValueModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SortedListValueModelAdapterTests.java @@ -64,7 +64,7 @@ public class SortedListValueModelAdapterTests extends TestCase { Collection sortedSet = new TreeSet(comparator); sortedSet.addAll(expected); List expectedList = new ArrayList(sortedSet); - List actualList = CollectionTools.list((ListIterator) actual.getValue()); + List actualList = CollectionTools.list((ListIterator) actual.value()); assertEquals(expectedList, actualList); } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/StaticValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/StaticValueModelTests.java index b2cc7b113b..c9b65bd21b 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/StaticValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/StaticValueModelTests.java @@ -31,7 +31,7 @@ public class StaticValueModelTests extends TestCase { private ValueModel buildObjectHolder() { return new AbstractReadOnlyPropertyValueModel() { - public Object getValue() { + public Object value() { return "foo"; } }; @@ -43,8 +43,8 @@ public class StaticValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { - assertEquals("foo", this.objectHolder.getValue()); + public void testValue() { + assertEquals("foo", this.objectHolder.value()); } public void testToString() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SynchronizedBag.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SynchronizedBag.java index ebf188d95f..0b8eeb0d9b 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SynchronizedBag.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SynchronizedBag.java @@ -126,7 +126,7 @@ class SynchronizedBag implements Bag, CollectionChangeListener { public void collectionChanged(CollectionChangeEvent e) { this.synchBag.clear(); - CollectionTools.addAll(this.synchBag, (Iterator) ((CollectionValueModel) e.getSource()).getValue()); + CollectionTools.addAll(this.synchBag, (Iterator) ((CollectionValueModel) e.getSource()).value()); } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SynchronizedList.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SynchronizedList.java index 91fd406e8f..63d3d5f1c4 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SynchronizedList.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/SynchronizedList.java @@ -34,7 +34,7 @@ public class SynchronizedList implements List, ListChangeListener, ListDat public SynchronizedList(ListValueModel listValueModel) { listValueModel.addListChangeListener(ValueModel.VALUE, this); - for (Iterator stream = (ListIterator) listValueModel.getValue(); stream.hasNext(); ) { + for (Iterator stream = (ListIterator) listValueModel.value(); stream.hasNext(); ) { this.add(stream.next()); } } @@ -176,7 +176,7 @@ public class SynchronizedList implements List, ListChangeListener, ListDat public void listChanged(ListChangeEvent e) { this.synchList.clear(); - CollectionTools.addAll(this.synchList, (Iterator) ((ListValueModel) e.getSource()).getValue()); + CollectionTools.addAll(this.synchList, (Iterator) ((ListValueModel) e.getSource()).value()); } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TransformationListValueModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TransformationListValueModelAdapterTests.java index b4884c88c3..ac5bef16ae 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TransformationListValueModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TransformationListValueModelAdapterTests.java @@ -116,35 +116,35 @@ public class TransformationListValueModelAdapterTests extends TestCase { super.tearDown(); } - public void testGetValue() { + public void testValue() { this.transformedListHolder.addListChangeListener(ValueModel.VALUE, this.buildListener()); - assertEquals(this.buildTransformedList(), CollectionTools.list((Iterator) this.transformedListHolder.getValue())); + assertEquals(this.buildTransformedList(), CollectionTools.list((Iterator) this.transformedListHolder.value())); } public void testStaleValue() { ListChangeListener listener = this.buildListener(); this.transformedListHolder.addListChangeListener(ValueModel.VALUE, listener); - assertEquals(this.buildTransformedList(), CollectionTools.list((Iterator) this.transformedListHolder.getValue())); + assertEquals(this.buildTransformedList(), CollectionTools.list((Iterator) this.transformedListHolder.value())); this.transformedListHolder.removeListChangeListener(ValueModel.VALUE, listener); - assertEquals(Collections.EMPTY_LIST, CollectionTools.list((Iterator) this.transformedListHolder.getValue())); + assertEquals(Collections.EMPTY_LIST, CollectionTools.list((Iterator) this.transformedListHolder.value())); } public void testSize() { this.transformedListHolder.addListChangeListener(ValueModel.VALUE, this.buildListener()); - assertEquals(this.buildTransformedList().size(), CollectionTools.size((Iterator) this.transformedListHolder.getValue())); + assertEquals(this.buildTransformedList().size(), CollectionTools.size((Iterator) this.transformedListHolder.value())); } private boolean transformedListContains(Object item) { - return CollectionTools.contains((Iterator) this.transformedListHolder.getValue(), item); + return CollectionTools.contains((Iterator) this.transformedListHolder.value(), item); } private boolean transformedListContainsAll(Collection items) { - return CollectionTools.containsAll((Iterator) this.transformedListHolder.getValue(), items); + return CollectionTools.containsAll((Iterator) this.transformedListHolder.value(), items); } private boolean transformedListContainsAny(Collection items) { - List transformedList = CollectionTools.list((ListIterator) this.transformedListHolder.getValue()); + List transformedList = CollectionTools.list((ListIterator) this.transformedListHolder.value()); for (Iterator stream = items.iterator(); stream.hasNext(); ) { if (transformedList.contains(stream.next())) { return true; diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TransformationPropertyValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TransformationPropertyValueModelTests.java index 038799a508..536f6b2dd6 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TransformationPropertyValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TransformationPropertyValueModelTests.java @@ -56,43 +56,43 @@ public class TransformationPropertyValueModelTests extends TestCase { super.tearDown(); } - public void testGetValue() { - assertEquals("foo", this.objectHolder.getValue()); - assertEquals("FOO", this.transformationObjectHolder.getValue()); + public void testValue() { + assertEquals("foo", this.objectHolder.value()); + assertEquals("FOO", this.transformationObjectHolder.value()); this.objectHolder.setValue("bar"); - assertEquals("bar", this.objectHolder.getValue()); - assertEquals("BAR", this.transformationObjectHolder.getValue()); + assertEquals("bar", this.objectHolder.value()); + assertEquals("BAR", this.transformationObjectHolder.value()); this.objectHolder.setValue("baz"); - assertEquals("baz", this.objectHolder.getValue()); - assertEquals("BAZ", this.transformationObjectHolder.getValue()); + assertEquals("baz", this.objectHolder.value()); + assertEquals("BAZ", this.transformationObjectHolder.value()); this.objectHolder.setValue(null); - assertNull(this.objectHolder.getValue()); - assertNull(this.transformationObjectHolder.getValue()); + assertNull(this.objectHolder.value()); + assertNull(this.transformationObjectHolder.value()); this.objectHolder.setValue("foo"); - assertEquals("foo", this.objectHolder.getValue()); - assertEquals("FOO", this.transformationObjectHolder.getValue()); + assertEquals("foo", this.objectHolder.value()); + assertEquals("FOO", this.transformationObjectHolder.value()); } public void testSetValue() { this.transformationObjectHolder.setValue("BAR"); - assertEquals("bar", this.objectHolder.getValue()); - assertEquals("BAR", this.transformationObjectHolder.getValue()); + assertEquals("bar", this.objectHolder.value()); + assertEquals("BAR", this.transformationObjectHolder.value()); this.transformationObjectHolder.setValue("Foo"); - assertEquals("foo", this.objectHolder.getValue()); - assertEquals("FOO", this.transformationObjectHolder.getValue()); + assertEquals("foo", this.objectHolder.value()); + assertEquals("FOO", this.transformationObjectHolder.value()); this.transformationObjectHolder.setValue(null); - assertNull(this.objectHolder.getValue()); - assertNull(this.transformationObjectHolder.getValue()); + assertNull(this.objectHolder.value()); + assertNull(this.transformationObjectHolder.value()); this.transformationObjectHolder.setValue("baz"); - assertEquals("baz", this.objectHolder.getValue()); - assertEquals("BAZ", this.transformationObjectHolder.getValue()); + assertEquals("baz", this.objectHolder.value()); + assertEquals("BAZ", this.transformationObjectHolder.value()); } public void testLazyListening() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TreeAspectAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TreeAspectAdapterTests.java index dba5ffb985..7a08366cf6 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TreeAspectAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/TreeAspectAdapterTests.java @@ -230,8 +230,8 @@ public class TreeAspectAdapterTests extends TestCase { assertEquals("name 1.3", ((TestNode) path[path.length - 1]).getText()); } - public void testGetValue() { - assertEquals(this.convertToNames(this.subject1.namePaths()), this.convertToNames((Iterator) this.aa1.getValue())); + public void testValue() { + assertEquals(this.convertToNames(this.subject1.namePaths()), this.convertToNames((Iterator) this.aa1.value())); } private Collection convertToNames(Iterator namePaths) { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/prefs/PreferencePropertyValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/prefs/PreferencePropertyValueModelTests.java index 4052895627..c617672e5d 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/prefs/PreferencePropertyValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/prefs/PreferencePropertyValueModelTests.java @@ -67,7 +67,7 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { } public void testSubjectHolder() throws Exception { - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); assertNull(this.event); String ANOTHER_STRING_VALUE = "some other value"; @@ -76,50 +76,50 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { this.nodeHolder.setValue(anotherNode); this.verifyEvent(STRING_VALUE, ANOTHER_STRING_VALUE); - assertEquals(ANOTHER_STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(ANOTHER_STRING_VALUE, this.preferenceAdapter.value()); this.event = null; this.nodeHolder.setValue(null); this.verifyEvent(ANOTHER_STRING_VALUE, null); - assertNull(this.preferenceAdapter.getValue()); + assertNull(this.preferenceAdapter.value()); this.event = null; this.nodeHolder.setValue(this.testNode); this.verifyEvent(null, STRING_VALUE); - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); } public void testPreferenceChange() throws Exception { - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); assertNull(this.event); this.testNode.put(KEY_NAME, STRING_VALUE + STRING_VALUE); this.waitForEventQueueToClear(); this.verifyEvent(STRING_VALUE, STRING_VALUE + STRING_VALUE); - assertEquals(STRING_VALUE + STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE + STRING_VALUE, this.preferenceAdapter.value()); this.event = null; this.testNode.remove(KEY_NAME); this.waitForEventQueueToClear(); this.verifyEvent(STRING_VALUE + STRING_VALUE, null); - assertNull(this.preferenceAdapter.getValue()); + assertNull(this.preferenceAdapter.value()); this.event = null; this.testNode.put(KEY_NAME, STRING_VALUE); this.waitForEventQueueToClear(); this.verifyEvent(null, STRING_VALUE); - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); } - public void testGetValue() throws Exception { + public void testValue() throws Exception { assertEquals(STRING_VALUE, this.testNode.get(KEY_NAME, "")); - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); } public void testSetValue() throws Exception { String ANOTHER_STRING_VALUE = "some other value"; this.preferenceAdapter.setValue(ANOTHER_STRING_VALUE); - assertEquals(ANOTHER_STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(ANOTHER_STRING_VALUE, this.preferenceAdapter.value()); assertEquals(ANOTHER_STRING_VALUE, this.testNode.get(KEY_NAME, "")); } @@ -141,7 +141,7 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { public void testRemoveAndReAddPreference() throws Exception { assertEquals(STRING_VALUE, this.testNode.get(KEY_NAME, null)); - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); assertNull(this.event); // remove the preference entirely... @@ -149,7 +149,7 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { this.waitForEventQueueToClear(); assertNull(this.testNode.get(KEY_NAME, null)); this.verifyEvent(STRING_VALUE, null); - assertNull(this.preferenceAdapter.getValue()); + assertNull(this.preferenceAdapter.value()); // ...then re-add it with the same key this.event = null; @@ -157,7 +157,7 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { this.waitForEventQueueToClear(); assertEquals(STRING_VALUE, this.testNode.get(KEY_NAME, null)); this.verifyEvent(null, STRING_VALUE); - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); } public void testDefaultValue() throws Exception { @@ -168,7 +168,7 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { this.preferenceAdapter.addPropertyChangeListener(ValueModel.VALUE, this.listener); assertEquals(STRING_VALUE, this.testNode.get(KEY_NAME, null)); - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); assertNull(this.event); // remove the preference entirely... @@ -176,7 +176,7 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { this.waitForEventQueueToClear(); assertNull(this.testNode.get(KEY_NAME, null)); this.verifyEvent(STRING_VALUE, DEFAULT_VALUE); - assertEquals(DEFAULT_VALUE, this.preferenceAdapter.getValue()); + assertEquals(DEFAULT_VALUE, this.preferenceAdapter.value()); // ...then re-add it with the same key this.event = null; @@ -184,11 +184,11 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { this.waitForEventQueueToClear(); assertEquals(STRING_VALUE, this.testNode.get(KEY_NAME, null)); this.verifyEvent(DEFAULT_VALUE, STRING_VALUE); - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); } public void testUnsynchronizedValue() throws Exception { - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); assertNull(this.event); // remove the this.listener so the adapter no longer listens to the preference @@ -199,21 +199,21 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { // no this.event should have been fired... assertNull(this.event); // ...and the adapter's value should be null - assertNull(this.preferenceAdapter.getValue()); + assertNull(this.preferenceAdapter.value()); this.testNode.remove(KEY_NAME); this.waitForEventQueueToClear(); assertNull(this.event); - assertNull(this.preferenceAdapter.getValue()); + assertNull(this.preferenceAdapter.value()); this.testNode.put(KEY_NAME, STRING_VALUE); this.waitForEventQueueToClear(); assertNull(this.event); - assertNull(this.preferenceAdapter.getValue()); + assertNull(this.preferenceAdapter.value()); // add the this.listener so the adapter synchs this.preferenceAdapter.addPropertyChangeListener(ValueModel.VALUE, this.listener); - assertEquals(STRING_VALUE, this.preferenceAdapter.getValue()); + assertEquals(STRING_VALUE, this.preferenceAdapter.value()); } public void testIntegerPreference() throws Exception { @@ -222,25 +222,25 @@ public class PreferencePropertyValueModelTests extends PreferencesTestCase { this.testNode.putInt(KEY_NAME, 123); this.preferenceAdapter.setConverter(BidiStringConverter.IntegerConverter.instance()); this.preferenceAdapter.addPropertyChangeListener(ValueModel.VALUE, this.listener); - assertEquals(new Integer(123), this.preferenceAdapter.getValue()); + assertEquals(new Integer(123), this.preferenceAdapter.value()); assertNull(this.event); this.testNode.putInt(KEY_NAME, 246); this.waitForEventQueueToClear(); this.verifyEvent(new Integer(123), new Integer(246)); - assertEquals(new Integer(246), this.preferenceAdapter.getValue()); + assertEquals(new Integer(246), this.preferenceAdapter.value()); this.event = null; this.testNode.remove(KEY_NAME); this.waitForEventQueueToClear(); this.verifyEvent(new Integer(246), null); - assertNull(this.preferenceAdapter.getValue()); + assertNull(this.preferenceAdapter.value()); this.event = null; this.testNode.putInt(KEY_NAME, 123); this.waitForEventQueueToClear(); this.verifyEvent(null, new Integer(123)); - assertEquals(new Integer(123), this.preferenceAdapter.getValue()); + assertEquals(new Integer(123), this.preferenceAdapter.value()); } /** diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/prefs/PreferencesCollectionValueModelTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/prefs/PreferencesCollectionValueModelTests.java index 4d4d9f29c4..89b27635e2 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/prefs/PreferencesCollectionValueModelTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/prefs/PreferencesCollectionValueModelTests.java @@ -120,7 +120,7 @@ public class PreferencesCollectionValueModelTests extends PreferencesTestCase { this.expectedValues.clear(); this.nodeHolder.setValue(null); this.verifyEvent(this.expectedValues); - assertFalse(((Iterator) this.preferencesAdapter.getValue()).hasNext()); + assertFalse(((Iterator) this.preferencesAdapter.value()).hasNext()); this.event = null; this.nodeHolder.setValue(this.testNode); @@ -252,14 +252,14 @@ public class PreferencesCollectionValueModelTests extends PreferencesTestCase { private void verifyAdapter(PreferencesCollectionValueModel cvm) { assertEquals(this.expectedValues.size(), cvm.size()); - this.verifyItems(this.expectedValues, (Iterator) cvm.getValue()); + this.verifyItems(this.expectedValues, (Iterator) cvm.value()); } private void verifyItems(Map expected, Iterator stream) { while (stream.hasNext()) { PreferencePropertyValueModel model = (PreferencePropertyValueModel) stream.next(); model.addPropertyChangeListener(ValueModel.VALUE, this.itemListener); - assertEquals(expected.get(model.getKey()), model.getValue()); + assertEquals(expected.get(model.getKey()), model.value()); model.removePropertyChangeListener(ValueModel.VALUE, this.itemListener); } } diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/CheckBoxModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/CheckBoxModelAdapterTests.java index 78fe762683..ac4eacbea6 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/CheckBoxModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/CheckBoxModelAdapterTests.java @@ -55,7 +55,7 @@ public class CheckBoxModelAdapterTests extends TestCase { }); this.buttonModelAdapter.setSelected(false); assertTrue(this.eventFired); - assertEquals(Boolean.FALSE, this.booleanHolder.getValue()); + assertEquals(Boolean.FALSE, this.booleanHolder.value()); } public void testSetValue() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ComboBoxModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ComboBoxModelAdapterTests.java index d12a5cb4cd..60284db5e4 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ComboBoxModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ComboBoxModelAdapterTests.java @@ -51,7 +51,7 @@ public class ComboBoxModelAdapterTests extends TestCase { public void testHasListeners() throws Exception { SimpleListValueModel listHolder = this.buildListHolder(); assertFalse(listHolder.hasAnyListChangeListeners(ValueModel.VALUE)); - SimplePropertyValueModel selectionHolder = new SimplePropertyValueModel(((ListIterator) listHolder.getValue()).next()); + SimplePropertyValueModel selectionHolder = new SimplePropertyValueModel(((ListIterator) listHolder.value()).next()); assertFalse(selectionHolder.hasAnyPropertyChangeListeners(ValueModel.VALUE)); ComboBoxModel comboBoxModel = new ComboBoxModelAdapter(listHolder, selectionHolder); diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ComboBoxModelAdapterUITest.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ComboBoxModelAdapterUITest.java index 8dec2aecb3..945f9913fd 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ComboBoxModelAdapterUITest.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ComboBoxModelAdapterUITest.java @@ -103,7 +103,7 @@ public class ComboBoxModelAdapterUITest { protected ListValueModel buildColorListHolder() { return new SimpleListValueModel(TestModel.validColors()); // return new AbstractReadOnlyListValueModel() { -// public Object getValue() { +// public Object value() { // return new ArrayListIterator(TestModel.VALID_COLORS); // } // public int size() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/DateSpinnerModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/DateSpinnerModelAdapterTests.java index bdad5b7216..6ddf079479 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/DateSpinnerModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/DateSpinnerModelAdapterTests.java @@ -57,7 +57,7 @@ public class DateSpinnerModelAdapterTests extends TestCase { newDate.setTime(777777); this.spinnerModelAdapter.setValue(newDate); assertTrue(this.eventFired); - assertEquals(777777, ((Date) this.valueHolder.getValue()).getTime()); + assertEquals(777777, ((Date) this.valueHolder.value()).getTime()); } public void testSetValueValueHolder() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/DocumentAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/DocumentAdapterTests.java index da8d87a106..1f4b3a0063 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/DocumentAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/DocumentAdapterTests.java @@ -60,7 +60,7 @@ public class DocumentAdapterTests extends TestCase { }); this.documentAdapter.remove(2, 5); assertTrue(this.eventFired); - assertEquals("01789", this.stringHolder.getValue()); + assertEquals("01789", this.stringHolder.value()); } public void testInsert() throws Exception { @@ -78,7 +78,7 @@ public class DocumentAdapterTests extends TestCase { }); this.documentAdapter.insertString(2, "xxxxx", null); assertTrue(this.eventFired); - assertEquals("01xxxxx23456789", this.stringHolder.getValue()); + assertEquals("01xxxxx23456789", this.stringHolder.value()); } public void testSetValue() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ListModelAdapterUITest.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ListModelAdapterUITest.java index 2c45a4f0ed..40b897156e 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ListModelAdapterUITest.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ListModelAdapterUITest.java @@ -221,7 +221,7 @@ public class ListModelAdapterUITest { } private TaskList taskList() { - return (TaskList) this.taskListHolder.getValue(); + return (TaskList) this.taskListHolder.value(); } void addTask() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ListSpinnerModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ListSpinnerModelAdapterTests.java index 9a715e5516..6fa0e97083 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ListSpinnerModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/ListSpinnerModelAdapterTests.java @@ -53,10 +53,10 @@ public class ListSpinnerModelAdapterTests extends TestCase { ListSpinnerModelAdapterTests.this.eventFired = true; } }); - assertEquals(DEFAULT_VALUE, this.valueHolder.getValue()); + assertEquals(DEFAULT_VALUE, this.valueHolder.value()); this.spinnerModelAdapter.setValue(VALUE_LIST[2]); assertTrue(this.eventFired); - assertEquals(VALUE_LIST[2], this.valueHolder.getValue()); + assertEquals(VALUE_LIST[2], this.valueHolder.value()); } public void testSetValueValueHolder() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/NumberSpinnerModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/NumberSpinnerModelAdapterTests.java index 0077539e86..e8c7bc00ab 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/NumberSpinnerModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/NumberSpinnerModelAdapterTests.java @@ -53,7 +53,7 @@ public class NumberSpinnerModelAdapterTests extends TestCase { }); this.spinnerModelAdapter.setValue(new Integer(5)); assertTrue(this.eventFired); - assertEquals(new Integer(5), this.valueHolder.getValue()); + assertEquals(new Integer(5), this.valueHolder.value()); } public void testSetValueValueHolder() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/RadioButtonModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/RadioButtonModelAdapterTests.java index dc6791e3cc..6a2456ae69 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/RadioButtonModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/RadioButtonModelAdapterTests.java @@ -109,21 +109,21 @@ public class RadioButtonModelAdapterTests extends TestCase { assertFalse(this.redEventFired); assertTrue(this.greenEventFired); assertFalse(this.blueEventFired); - assertEquals(GREEN, this.valueHolder.getValue()); + assertEquals(GREEN, this.valueHolder.value()); this.clearFlags(); this.blueButtonModelAdapter.setSelected(true); assertFalse(this.redEventFired); assertTrue(this.greenEventFired); assertTrue(this.blueEventFired); - assertEquals(BLUE, this.valueHolder.getValue()); + assertEquals(BLUE, this.valueHolder.value()); this.clearFlags(); this.redButtonModelAdapter.setSelected(true); assertTrue(this.redEventFired); assertFalse(this.greenEventFired); assertTrue(this.blueEventFired); - assertEquals(RED, this.valueHolder.getValue()); + assertEquals(RED, this.valueHolder.value()); } public void testSetValue() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/SpinnerModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/SpinnerModelAdapterTests.java index e5dce8d166..2813bfe5c9 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/SpinnerModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/SpinnerModelAdapterTests.java @@ -55,7 +55,7 @@ public class SpinnerModelAdapterTests extends TestCase { }); this.spinnerModelAdapter.setValue(new Integer(5)); assertTrue(this.eventFired); - assertEquals(new Integer(5), this.valueHolder.getValue()); + assertEquals(new Integer(5), this.valueHolder.value()); } public void testSetValueValueHolder() throws Exception { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/SpinnerModelAdapterUITest.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/SpinnerModelAdapterUITest.java index 7f96e3c4f8..15e9f09b4f 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/SpinnerModelAdapterUITest.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/SpinnerModelAdapterUITest.java @@ -111,7 +111,7 @@ public class SpinnerModelAdapterUITest { } private SpinnerModel buildAgeSpinnerModel(PropertyValueModel valueHolder) { - return new NumberSpinnerModelAdapter(valueHolder, ((Integer) valueHolder.getValue()).intValue(), TestModel.MIN_AGE, TestModel.MAX_AGE, 1); + return new NumberSpinnerModelAdapter(valueHolder, ((Integer) valueHolder.value()).intValue(), TestModel.MIN_AGE, TestModel.MAX_AGE, 1); } private PropertyValueModel buildEyeColorHolder(ValueModel vm) { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TableModelAdapterUITest.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TableModelAdapterUITest.java index 3e02eaaefc..37e97bfc14 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TableModelAdapterUITest.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TableModelAdapterUITest.java @@ -443,7 +443,7 @@ public class TableModelAdapterUITest { } if ((eyeColor.length() == 0)) { JOptionPane.showMessageDialog(null, "The eye color is required.", "Invalid Eye Color", JOptionPane.ERROR_MESSAGE); - } else if (CollectionTools.contains((Iterator) this.eyeColorListHolder.getValue(), eyeColor)) { + } else if (CollectionTools.contains((Iterator) this.eyeColorListHolder.value(), eyeColor)) { JOptionPane.showMessageDialog(null, "The eye color already exists.", "Invalid Eye Color", JOptionPane.ERROR_MESSAGE); } else { return eyeColor; @@ -696,7 +696,7 @@ public class TableModelAdapterUITest { // ********** queries ********** private Crowd crowd() { - return (Crowd) this.crowdHolder.getValue(); + return (Crowd) this.crowdHolder.value(); } private Person selectedPerson() { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TreeModelAdapterTests.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TreeModelAdapterTests.java index d70e7a78a3..fb3ab75bb4 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TreeModelAdapterTests.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TreeModelAdapterTests.java @@ -505,7 +505,7 @@ public class TreeModelAdapterTests extends TestCase { // ********** TreeNodeValueModel implementation ********** - public Object getValue() { + public Object value() { return this.testModel; } @@ -564,7 +564,7 @@ public class TreeModelAdapterTests extends TestCase { public void dumpOn(IndentingPrintWriter writer) { writer.println(this); writer.indent(); - for (Iterator stream = (Iterator) this.childrenModel.getValue(); stream.hasNext(); ) { + for (Iterator stream = (Iterator) this.childrenModel.value(); stream.hasNext(); ) { ((TestNode) stream.next()).dumpOn(writer); } writer.undent(); @@ -604,7 +604,7 @@ public class TreeModelAdapterTests extends TestCase { * testing convenience method */ public TestNode childNamed(String name) { - for (Iterator stream = (Iterator) this.childrenModel.getValue(); stream.hasNext(); ) { + for (Iterator stream = (Iterator) this.childrenModel.value(); stream.hasNext(); ) { TestNode childNode = (TestNode) stream.next(); if (childNode.getTestModel().getName().equals(name)) { return childNode; @@ -774,8 +774,8 @@ public class TreeModelAdapterTests extends TestCase { // ********** TreeNodeValueModel implementation ********** - public Object getValue() { - return this.nameAdapter.getValue(); + public Object value() { + return this.nameAdapter.value(); } @Override public void setValue(Object value) { diff --git a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TreeModelAdapterUITest.java b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TreeModelAdapterUITest.java index 330ed6f244..104915edfc 100644 --- a/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TreeModelAdapterUITest.java +++ b/jpa/tests/org.eclipse.jpt.utility.tests/src/org/eclipse/jpt/utility/tests/internal/model/value/swing/TreeModelAdapterUITest.java @@ -71,7 +71,7 @@ public class TreeModelAdapterUITest { private void exec(String[] args) throws Exception { this.rootNodeHolder = this.buildRootNodeHolder(); - this.sorted = this.rootNodeHolder.getValue() instanceof SortedTestNode; + this.sorted = this.rootNodeHolder.value() instanceof SortedTestNode; this.treeModel = this.buildTreeModel(); this.treeSelectionModel = this.buildTreeSelectionModel(); this.nameTextField = new TextField(); @@ -226,7 +226,7 @@ public class TreeModelAdapterUITest { if (this.treeSelectionModel.isSelectionEmpty()) { return null; } - return (TestModel) this.selectedNode().getValue(); + return (TestModel) this.selectedNode().value(); } private TestNode rootNode() { @@ -234,7 +234,7 @@ public class TreeModelAdapterUITest { } private TestModel root() { - return (TestModel) this.rootNode().getValue(); + return (TestModel) this.rootNode().value(); } private Collection expandedPaths() { -- cgit v1.2.3