Package com.ribs

Class RULists

java.lang.Object
com.ribs.RULists

public class RULists extends 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 <info@reportmill.com>.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List
    add(List aList, Object anObj)
    Add the given object to the given list (creates a list if given list is null and returns it).
    static void
    Adds an object to the given list if identical object is missing.
    static boolean
    containsIdentical(List aList, Object anObj)
    Returns whehter list contains indentical given object (accepts null list).
    static Object
    get(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 Object
    getLast(List aList)
    Returns the last object in the given list.
    static int
    indexOfIdentical(List aList, Object anObj)
    Returns index of identical given object in given list.
    static void
    invokeAll(List targets, String aMethod, Object aValue, Class aClass)
    Invokes a given method on every member of a List
    static void
    remove(List aList, Object anObj)
    Removes the given object from the given list.
    static void
    Removes the last object from the given list.
    static int
    size(List aList)
    Returns the size of a given list (or zero if null).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RULists

      public RULists()
  • Method Details

    • size

      public static int size(List aList)
      Returns the size of a given list (or zero if null).
    • get

      public static Object get(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 Object getLast(List aList)
      Returns the last object in the given list.
    • add

      public static List add(List aList, 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(List aList, Object anObj)
      Removes the given object from the given list.
    • removeLast

      public static void removeLast(List aList)
      Removes the last object from the given list.
    • indexOfIdentical

      public static int indexOfIdentical(List aList, Object anObj)
      Returns index of identical given object in given list.
    • containsIdentical

      public static boolean containsIdentical(List aList, Object anObj)
      Returns whehter list contains indentical given object (accepts null list).
    • addIfAbsentIdentical

      public static void addIfAbsentIdentical(List aList, Object anObj)
      Adds an object to the given list if identical object is missing.
    • invokeAll

      public static void invokeAll(List targets, String aMethod, Object aValue, Class aClass)
      Invokes a given method on every member of a List