org.ujorm.core
Class PropertyGroup<UJO extends Ujo>

java.lang.Object
  extended by org.ujorm.core.PropertyGroup<UJO>
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<UjoProperty<UJO,?>>

public class PropertyGroup<UJO extends Ujo>
extends java.lang.Object
implements java.lang.Iterable<UjoProperty<UJO,?>>, java.io.Serializable

The Immutable and Serializable UjoProperty collection.

Author:
Pavel Ponec
See Also:
Serialized Form

Constructor Summary
PropertyGroup(java.lang.Class<UJO> baseClass, UjoProperty<UJO,?>... properties)
          Constructor
 
Method Summary
 boolean contains(java.lang.Object property)
          Test collection if it contains a property parameter
 boolean equals(java.lang.Object obj)
           
 UjoProperty<UJO,?> get(int i)
          Get First Properties
 java.lang.Class<UJO> getBaseClass()
          Get Class
 UjoProperty<UJO,?> getFirstProperty()
          Get The First Properties
 UjoProperty<UJO,?> getLastProperty()
          Get The Last Properties
 int hashCode()
           
 java.util.Iterator<UjoProperty<UJO,?>> iterator()
          Create Property Interator
static
<T extends Ujo>
PropertyGroup<T>
newInstance(java.lang.Class<T> baseClass, UjoProperty<T,?>... properties)
          Create new Instance
 int size()
          Size
 UjoProperty[] toArray()
          Convert Properties to an Array
 java.lang.String toString()
          Returns the property names
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyGroup

public PropertyGroup(java.lang.Class<UJO> baseClass,
                     UjoProperty<UJO,?>... properties)
Constructor

Parameters:
baseClass - Not null base class for all properties
properties - Property array
See Also:
#newInstance(java.lang.Class, org.ujorm.UjoProperty[])
Method Detail

getBaseClass

public java.lang.Class<UJO> getBaseClass()
Get Class


getFirstProperty

public UjoProperty<UJO,?> getFirstProperty()
Get The First Properties


getLastProperty

public UjoProperty<UJO,?> getLastProperty()
Get The Last Properties


get

public UjoProperty<UJO,?> get(int i)
Get First Properties


size

public int size()
Size


contains

public boolean contains(java.lang.Object property)
Test collection if it contains a property parameter


iterator

public java.util.Iterator<UjoProperty<UJO,?>> iterator()
Create Property Interator

Specified by:
iterator in interface java.lang.Iterable<UjoProperty<UJO extends Ujo,?>>

toArray

public UjoProperty[] toArray()
Convert Properties to an Array


toString

public java.lang.String toString()
Returns the property names

Overrides:
toString in class java.lang.Object

equals

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

hashCode

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

newInstance

public static <T extends Ujo> PropertyGroup<T> newInstance(java.lang.Class<T> baseClass,
                                                           UjoProperty<T,?>... properties)
Create new Instance



Copyright © 2007-2012 PPonec