com.sencha.gxt.core.client.dom
Class Elements

java.lang.Object
  extended by com.sencha.gxt.core.client.dom.Elements

public class Elements
extends java.lang.Object

Utility class for identifying elements either as a single element, array of elements, a id, and index.


Nested Class Summary
static class Elements.Type
           
 
Constructor Summary
Elements(Element element)
           
Elements(Element[] elements)
           
Elements(int index)
          Creates a new index element info.
Elements(java.util.List<Element> elements)
          Creates a new instance.
Elements(java.lang.String id)
          Creates a new id element info.
 
Method Summary
 Element getElement()
          Returns the element when Elements.Type.ELEMENT.
 Element[] getElements()
          Returns the array of elements when Elements.Type.ARRAY.
 java.lang.String getId()
          Returns the element id when Elements.Type.ID.
 int getIndex()
          Returns the index when Elements.Type.ARRAY.
 Elements.Type getType()
          Returns the element info type.
 boolean isArray()
          Returns true if the value is an array.
 boolean isElement()
          Returns true if the value is an element.
 boolean isId()
          Returns true if the value is an id.
 boolean isIndex()
          Returns true if the value is an index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Elements

public Elements(Element element)

Elements

public Elements(Element[] elements)

Elements

public Elements(int index)
Creates a new index element info.

Parameters:
index - the index

Elements

public Elements(java.util.List<Element> elements)
Creates a new instance.

Parameters:
elements - the list of elements

Elements

public Elements(java.lang.String id)
Creates a new id element info.

Parameters:
id - the id
Method Detail

getElement

public Element getElement()
Returns the element when Elements.Type.ELEMENT.

Returns:
the element

getElements

public Element[] getElements()
Returns the array of elements when Elements.Type.ARRAY.

Returns:
the element array

getId

public java.lang.String getId()
Returns the element id when Elements.Type.ID.

Returns:
the element id

getIndex

public int getIndex()
Returns the index when Elements.Type.ARRAY.

Returns:
the index

getType

public Elements.Type getType()
Returns the element info type.

Returns:
the type

isArray

public boolean isArray()
Returns true if the value is an array.

Returns:
true if an array

isElement

public boolean isElement()
Returns true if the value is an element.

Returns:
true if an element

isId

public boolean isId()
Returns true if the value is an id.

Returns:
true if an id

isIndex

public boolean isIndex()
Returns true if the value is an index.

Returns:
true if an index


Copyright © 2012. All Rights Reserved.