Package com.ribs
Class RULists
- java.lang.Object
-
- com.ribs.RULists
-
public class RULists extends java.lang.Object
This class offers a number of useful List utilities used by ribs classes.Copyright (c) 2004 ReportMill Software, Inc. All Rights Reserved. Contact ReportMill
.
-
-
Constructor Summary
Constructors Constructor Description RULists()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List
add(java.util.List aList, java.lang.Object anObj)
Add the given object to the given list (creates a list if given list is null and returns it).static void
addIfAbsentIdentical(java.util.List aList, java.lang.Object anObj)
Adds an object to the given list if identical object is missing.static boolean
containsIdentical(java.util.List aList, java.lang.Object anObj)
Returns whehter list contains indentical given object (accepts null list).static java.lang.Object
get(java.util.List aList, int anIndex)
Returns the object at the given index in the given list (or null if list is null or index out of bounds.static java.lang.Object
getLast(java.util.List aList)
Returns the last object in the given list.static int
indexOfIdentical(java.util.List aList, java.lang.Object anObj)
Returns index of identical given object in given list.static void
invokeAll(java.util.List targets, java.lang.String aMethod, java.lang.Object aValue, java.lang.Class aClass)
Invokes a given method on every member of a Liststatic void
remove(java.util.List aList, java.lang.Object anObj)
Removes the given object from the given list.static void
removeLast(java.util.List aList)
Removes the last object from the given list.static int
size(java.util.List aList)
Returns the size of a given list (or zero if null).
-
-
-
Method Detail
-
size
public static int size(java.util.List aList)
Returns the size of a given list (or zero if null).
-
get
public static java.lang.Object get(java.util.List aList, int anIndex)
Returns the object at the given index in the given list (or null if list is null or index out of bounds.
-
getLast
public static java.lang.Object getLast(java.util.List aList)
Returns the last object in the given list.
-
add
public static java.util.List add(java.util.List aList, java.lang.Object anObj)
Add the given object to the given list (creates a list if given list is null and returns it).
-
remove
public static void remove(java.util.List aList, java.lang.Object anObj)
Removes the given object from the given list.
-
removeLast
public static void removeLast(java.util.List aList)
Removes the last object from the given list.
-
indexOfIdentical
public static int indexOfIdentical(java.util.List aList, java.lang.Object anObj)
Returns index of identical given object in given list.
-
containsIdentical
public static boolean containsIdentical(java.util.List aList, java.lang.Object anObj)
Returns whehter list contains indentical given object (accepts null list).
-
addIfAbsentIdentical
public static void addIfAbsentIdentical(java.util.List aList, java.lang.Object anObj)
Adds an object to the given list if identical object is missing.
-
invokeAll
public static void invokeAll(java.util.List targets, java.lang.String aMethod, java.lang.Object aValue, java.lang.Class aClass)
Invokes a given method on every member of a List
-
-