|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.core.client.util.Util
public class Util
Various utility functions.
| Constructor Summary | |
|---|---|
Util()
|
|
| Method Summary | ||
|---|---|---|
static int |
constrain(int value,
int min,
int max)
Constrains the value by a minimum and max value. |
|
static
|
createList(T... element)
Creates a new list and adds the element(s). |
|
static boolean |
equalWithNull(java.lang.Object obj1,
java.lang.Object obj2)
Does an equals check by first checking identity, then equality. |
|
static
|
fill(java.util.List<T> list,
T[] elements)
Populates a list with an array of elements. |
|
static Element |
getImage(ImageResource ir)
Returns an element for the given image. |
|
static boolean |
isEmptyString(java.lang.String string)
Returns true if the string is null or equals to the empty string. |
|
static boolean |
isInteger(java.lang.String value)
Tests if the value is an integer. |
|
static int |
parseInt(java.lang.String value,
int defaultValue)
Parses a string value and returns an integer. |
|
static Style.Overflow |
parseOverflow(java.lang.String value)
Parses a string value and returns the applicable Style.Overflow object. |
|
static Element[] |
toElementArray(java.util.List<Element> nodes)
Converts a node list to an element array. |
|
static Element[] |
toElementArray(NodeList<Element> nodes)
Converts a node list to an element array. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Util()
| Method Detail |
|---|
public static int constrain(int value,
int min,
int max)
value - the valuemin - the minimummax - the maximum
public static <T> java.util.List<T> createList(T... element)
element - the item to add to the list
public static boolean equalWithNull(java.lang.Object obj1,
java.lang.Object obj2)
obj1 - object 1obj2 - object 2
public static <T> void fill(java.util.List<T> list,
T[] elements)
list - the listelements - the elements to be added to the listpublic static Element getImage(ImageResource ir)
ir - the image resource
public static boolean isEmptyString(java.lang.String string)
string - the string to test
public static boolean isInteger(java.lang.String value)
value - the value to test
public static int parseInt(java.lang.String value,
int defaultValue)
value - the string valuedefaultValue - the default value
public static Style.Overflow parseOverflow(java.lang.String value)
Style.Overflow object.
value - the string value
Style.Overflow objectpublic static Element[] toElementArray(java.util.List<Element> nodes)
nodes - the nodes
public static Element[] toElementArray(NodeList<Element> nodes)
nodes - the nodes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||