flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mih...@apache.org
Subject [3/7] git commit: [flex-sdk] [refs/heads/develop] - FLEX-26808 Renamed getFirstItemValue to getFirstItem.
Date Tue, 22 Mar 2016 13:58:30 GMT
FLEX-26808
Renamed getFirstItemValue to getFirstItem.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/6b868813
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/6b868813
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/6b868813

Branch: refs/heads/develop
Commit: 6b8688135917f69a10b5cb7fb48d684b3afe0b89
Parents: c316cba
Author: Mihai Chira <mihaic@apache.org>
Authored: Tue Mar 22 12:40:30 2016 +0100
Committer: Mihai Chira <mihaic@apache.org>
Committed: Tue Mar 22 12:40:30 2016 +0100

----------------------------------------------------------------------
 .../projects/framework/src/mx/utils/VectorUtil.as     |  2 +-
 .../framework/tests/mx/utils/VectorUtilTests.as       | 14 +++++++-------
 .../projects/spark/src/spark/components/List.as       |  6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6b868813/frameworks/projects/framework/src/mx/utils/VectorUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/utils/VectorUtil.as b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
index 51a3da3..f909a7b 100644
--- a/frameworks/projects/framework/src/mx/utils/VectorUtil.as
+++ b/frameworks/projects/framework/src/mx/utils/VectorUtil.as
@@ -22,7 +22,7 @@ package mx.utils {
          *  Given a Vector, returns the value of the first item,
          *  or -1 if there are no items in the Vector;
          */
-        public static function getFirstItemValue(v:Vector.<int>):int
+        public static function getFirstItem(v:Vector.<int>):int
         {
             return v && v.length ? v[0] : -1;
         }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6b868813/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as b/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
index e42cea5..2ef9ccd 100644
--- a/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
+++ b/frameworks/projects/framework/tests/mx/utils/VectorUtilTests.as
@@ -25,13 +25,13 @@ package mx.utils {
         [Test]
         public function test_empty_vector():void
         {
-            assertEquals(-1, VectorUtil.getFirstItemValue(new Vector.<int>()));
+            assertEquals(-1, VectorUtil.getFirstItem(new Vector.<int>()));
         }
 
         [Test]
         public function test_null_parameter():void
         {
-            assertEquals(-1, VectorUtil.getFirstItemValue(null));
+            assertEquals(-1, VectorUtil.getFirstItem(null));
         }
 
         [Test]
@@ -44,7 +44,7 @@ package mx.utils {
             vector.push(3, 2, 1);
 
             //then
-            assertEquals(3, VectorUtil.getFirstItemValue(vector));
+            assertEquals(3, VectorUtil.getFirstItem(vector));
         }
 
         [Test]
@@ -54,7 +54,7 @@ package mx.utils {
             var vector:Vector.<int> = new <int>[35, 25, 15];
 
             //then
-            assertEquals(35, VectorUtil.getFirstItemValue(vector));
+            assertEquals(35, VectorUtil.getFirstItem(vector));
         }
 
         [Test]
@@ -64,7 +64,7 @@ package mx.utils {
             var vector:Vector.<int> = new <int>[-1, 2, 1];
 
             //then
-            assertEquals(-1, VectorUtil.getFirstItemValue(vector));
+            assertEquals(-1, VectorUtil.getFirstItem(vector));
         }
 
         [Test]
@@ -76,7 +76,7 @@ package mx.utils {
             //then
             assertStrictlyEquals(0, vector[0]);
             assertStrictlyEquals(0, vector[1]);
-            assertEquals(0, VectorUtil.getFirstItemValue(vector));
+            assertEquals(0, VectorUtil.getFirstItem(vector));
         }
 
         [Test]
@@ -91,7 +91,7 @@ package mx.utils {
             //then
             assertStrictlyEquals(3, vector[0]);
             assertStrictlyEquals(2, vector[1]);
-            assertEquals(3, VectorUtil.getFirstItemValue(vector));
+            assertEquals(3, VectorUtil.getFirstItem(vector));
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/6b868813/frameworks/projects/spark/src/spark/components/List.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/List.as b/frameworks/projects/spark/src/spark/components/List.as
index 1e2bcec..8100e78 100644
--- a/frameworks/projects/spark/src/spark/components/List.as
+++ b/frameworks/projects/spark/src/spark/components/List.as
@@ -1242,7 +1242,7 @@ public class List extends ListBase implements IFocusManagerComponent
         }
         // Keep _proposedSelectedIndex in-sync with multiple selection properties. 
         if (!isEmpty(_proposedSelectedIndices))
-            _proposedSelectedIndex = VectorUtil.getFirstItemValue(_proposedSelectedIndices);
+            _proposedSelectedIndex = VectorUtil.getFirstItem(_proposedSelectedIndices);
         
         // need to store changeCaretOnSelection since super.commitSelection() may change
it
         var currentChangeCaretOnSelection:Boolean = changeCaretOnSelection;
@@ -2671,7 +2671,7 @@ public class List extends ListBase implements IFocusManagerComponent
             // an "caretChange" event to update any bindings and update the 
             // caretIndex backing variable. 
             var oldIndex:Number = caretIndex; 
-            _caretIndex = VectorUtil.getFirstItemValue(newInterval);
+            _caretIndex = VectorUtil.getFirstItem(newInterval);
             e = new IndexChangeEvent(IndexChangeEvent.CARET_CHANGE); 
             e.oldIndex = oldIndex; 
             e.newIndex = caretIndex; 
@@ -2693,7 +2693,7 @@ public class List extends ListBase implements IFocusManagerComponent
         
         var oldIndices:Vector.<int> = selectedIndices;  
         _selectedIndices = newInterval;
-        _selectedIndex = VectorUtil.getFirstItemValue(newInterval);
+        _selectedIndex = VectorUtil.getFirstItem(newInterval);
         // If the selection has actually changed, trigger a pass to 
         // commitProperties where a change event will be 
         // fired to update any bindings to selection properties. 


Mime
View raw message