lexx.utils
Class Utilities

java.lang.Object
  |
  +--lexx.utils.Utilities

public final class Utilities
extends java.lang.Object

Static Factory class used to perform useful misc. tasks

Copyright (c) 2002-2003

Since:
20/03/2003
Version:
1.0
Author:
Mohammed Imran

Constructor Summary
Utilities()
           
 
Method Summary
static boolean checkURL(java.lang.String address)
           
static boolean contains(java.util.List list, java.lang.Object obj)
          If the object if found in the list
static boolean contains(java.lang.String find, java.lang.String text)
           
static void copyList(java.util.List src, java.util.List dest)
           
static void copyList(java.lang.Object[] src, java.util.List dest)
           
static void copyListRemoveDuplicated(java.lang.Object[] src, java.util.List dest)
           
static java.io.File findFile(java.io.File path, java.lang.String containing)
           
static java.util.List findText(java.lang.String path, java.lang.String containing, java.lang.String extensionFilter)
           
static java.lang.String generateRandomString()
           
static java.lang.String generateRandomString(int SIZE)
           
static java.lang.Object getObject(java.lang.String objectCode)
           
static java.lang.String getObjectCode(java.lang.Object obj)
           
 void insertText(javax.swing.JTextPane textPane, int offset, java.lang.String text)
           
static boolean isTextFile(java.lang.String file)
           
static java.lang.String readFile(java.lang.String fileName)
           
static void removeAlphaDuplicates(java.util.List list)
          Note list must already be sorted
static void removeDuplicates(java.util.List list)
           
static java.lang.String replace(char oldChar, char newChar, java.lang.String data)
           
static void setEnabledComponents(javax.swing.JPanel comp, boolean ans)
           
static void showInFrame(java.awt.Component c)
           
static void sortAlpha(java.util.List list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities

public Utilities()
Method Detail

showInFrame

public static void showInFrame(java.awt.Component c)

readFile

public static java.lang.String readFile(java.lang.String fileName)

contains

public static boolean contains(java.util.List list,
                               java.lang.Object obj)
If the object if found in the list


generateRandomString

public static java.lang.String generateRandomString()

generateRandomString

public static java.lang.String generateRandomString(int SIZE)

setEnabledComponents

public static void setEnabledComponents(javax.swing.JPanel comp,
                                        boolean ans)

checkURL

public static boolean checkURL(java.lang.String address)

sortAlpha

public static void sortAlpha(java.util.List list)

isTextFile

public static boolean isTextFile(java.lang.String file)

findFile

public static java.io.File findFile(java.io.File path,
                                    java.lang.String containing)

replace

public static java.lang.String replace(char oldChar,
                                       char newChar,
                                       java.lang.String data)

findText

public static java.util.List findText(java.lang.String path,
                                      java.lang.String containing,
                                      java.lang.String extensionFilter)
Parameters:
path - - Project path not source path

contains

public static boolean contains(java.lang.String find,
                               java.lang.String text)

insertText

public final void insertText(javax.swing.JTextPane textPane,
                             int offset,
                             java.lang.String text)

removeAlphaDuplicates

public static void removeAlphaDuplicates(java.util.List list)
Note list must already be sorted

Parameters:
list -

removeDuplicates

public static void removeDuplicates(java.util.List list)

copyList

public static void copyList(java.util.List src,
                            java.util.List dest)

copyList

public static void copyList(java.lang.Object[] src,
                            java.util.List dest)

copyListRemoveDuplicated

public static void copyListRemoveDuplicated(java.lang.Object[] src,
                                            java.util.List dest)

getObject

public static java.lang.Object getObject(java.lang.String objectCode)

getObjectCode

public static java.lang.String getObjectCode(java.lang.Object obj)