org.japura.controller
Class Group

java.lang.Object
  extended by org.japura.controller.Group

public final class Group
extends java.lang.Object

Copyright (C) 2010-2012 Carlos Eduardo Leite de Andrade

This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see www.gnu.org/licenses/

For more information, contact: www.japura.org

Author:
Carlos Eduardo Leite de Andrade

Method Summary
 boolean equals(java.lang.Object obj)
           
 void free()
           
 void freeAll(java.lang.Class<?> clss)
           
<E> E
get(java.lang.Class<E> cls)
          Get the controller of a specific class from this group.
 ControllerModel get(int id)
          Get the controller of a specific identifier from this group.
<E> E
get(int id, java.lang.Class<E> cls)
          Get the controller of a specific class and identifier from this group.
 java.util.List<ControllerModel> getAll()
          Get the all controllers from this group.
<E> java.util.List<E>
getAll(java.lang.Class<E> cls)
          Get the all controllers of a specific class from this group.
 int getId()
           
 int hashCode()
           
 boolean isInstancied(java.lang.Class<?> cls)
          Indicates whether the controller is instantiated in this group.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public int getId()

getAll

public <E> java.util.List<E> getAll(java.lang.Class<E> cls)
Get the all controllers of a specific class from this group.

Parameters:
cls - the controller's class
Returns:
List with the controllers.

getAll

public java.util.List<ControllerModel> getAll()
Get the all controllers from this group.

Returns:
List with the controllers.

get

public <E> E get(java.lang.Class<E> cls)
Get the controller of a specific class from this group.

Parameters:
cls - the controller's class
Returns:
the controller or NULL if its not exist.

get

public <E> E get(int id,
                 java.lang.Class<E> cls)
Get the controller of a specific class and identifier from this group.

Parameters:
id - the controller's identifier
cls - the controller's class
Returns:
the controller or NULL if its not exist.

get

public ControllerModel get(int id)
Get the controller of a specific identifier from this group.

Parameters:
id - the controller's identifier
Returns:
the controller or NULL if its not exist.

freeAll

public void freeAll(java.lang.Class<?> clss)

free

public void free()

isInstancied

public boolean isInstancied(java.lang.Class<?> cls)
Indicates whether the controller is instantiated in this group.

Parameters:
cls - controller's class
Returns:
boolean

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object