ListUtil.containsEqual() -> ListUtil.contains()
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1515 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -119,7 +119,7 @@ public class ListUtil
|
|||||||
* expanded if necessary.
|
* expanded if necessary.
|
||||||
*
|
*
|
||||||
* @param list the list in which to insert the element. Can be null.
|
* @param list the list in which to insert the element. Can be null.
|
||||||
* @param startIdx the index at which to insert the element.
|
* @param index the index at which to insert the element.
|
||||||
* @param element the element to insert.
|
* @param element the element to insert.
|
||||||
*
|
*
|
||||||
* @return a reference to the list with element inserted (might not be
|
* @return a reference to the list with element inserted (might not be
|
||||||
@@ -250,7 +250,7 @@ public class ListUtil
|
|||||||
*
|
*
|
||||||
* @return true if a matching element was found, false otherwise.
|
* @return true if a matching element was found, false otherwise.
|
||||||
*/
|
*/
|
||||||
public static boolean containsEqual (Object[] list, Object element)
|
public static boolean contains (Object[] list, Object element)
|
||||||
{
|
{
|
||||||
return contains(EQUALS_COMP, list, element);
|
return contains(EQUALS_COMP, list, element);
|
||||||
}
|
}
|
||||||
@@ -497,10 +497,10 @@ public class ListUtil
|
|||||||
String newBar = new String("bar"); // prevent java from cleverly
|
String newBar = new String("bar"); // prevent java from cleverly
|
||||||
// referencing the same string
|
// referencing the same string
|
||||||
// from the constant pool
|
// from the constant pool
|
||||||
System.out.println("contains(newBar): " +
|
System.out.println("containsRef(newBar): " +
|
||||||
ListUtil.containsRef(list, newBar));
|
ListUtil.containsRef(list, newBar));
|
||||||
System.out.println("containsEqual(newBar): " +
|
System.out.println("contains(newBar): " +
|
||||||
ListUtil.containsEqual(list, newBar));
|
ListUtil.contains(list, newBar));
|
||||||
|
|
||||||
ListUtil.clearEqual(list, newBar);
|
ListUtil.clearEqual(list, newBar);
|
||||||
System.out.println("clearEqual(newBar): " + StringUtil.toString(list));
|
System.out.println("clearEqual(newBar): " + StringUtil.toString(list));
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ public class RuntimeAdjust
|
|||||||
|
|
||||||
public void setValue (String value)
|
public void setValue (String value)
|
||||||
{
|
{
|
||||||
if (!ListUtil.containsEqual(_values, value)) {
|
if (!ListUtil.contains(_values, value)) {
|
||||||
Log.warning("Refusing invalid adjustment [name=" + _name +
|
Log.warning("Refusing invalid adjustment [name=" + _name +
|
||||||
", values=" + StringUtil.toString(_values) +
|
", values=" + StringUtil.toString(_values) +
|
||||||
", value=" + value + "].");
|
", value=" + value + "].");
|
||||||
|
|||||||
Reference in New Issue
Block a user