com.ibm.commons.iloader.node.lookups
Class LookupUtils

java.lang.Object
  extended by com.ibm.commons.iloader.node.lookups.LookupUtils

public class LookupUtils
extends java.lang.Object

Utilities to help find items in a lookup.


Constructor Summary
LookupUtils()
           
 
Method Summary
static boolean containsCode(ILookup lk, java.lang.String code)
          Determines if a particular code exists in the given lookup.
static int findIndex(ILookup lk, java.lang.String value)
          Given a lookup, determine if a particular code exists in the lookup.
static java.lang.String findLabel(ILookup lk, java.lang.String value)
          Given a lookup, determine if a particular label exists in the lookup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupUtils

public LookupUtils()
Method Detail

findIndex

public static int findIndex(ILookup lk,
                            java.lang.String value)
Given a lookup, determine if a particular code exists in the lookup.

Parameters:
lk - the lookup to iterate through
value - the code that is being sought
Returns:
returns the index the item was found at, -1 if the item was not found

findLabel

public static java.lang.String findLabel(ILookup lk,
                                         java.lang.String value)
Given a lookup, determine if a particular label exists in the lookup.

Parameters:
lk - the lookup to iterate through
value - the label that is being sought
Returns:
returns the index the item was found at, -1 if the item was not found

containsCode

public static boolean containsCode(ILookup lk,
                                   java.lang.String code)
Determines if a particular code exists in the given lookup.

Parameters:
lk - the lookup to iterate through
code - the code that is being sought
Returns:
returns the true if the item is found in the lookup, false otherwise