de.smartics.properties.api.core.domain
Class PropertyType

Package class diagram package PropertyType
java.lang.Object
  extended by de.smartics.properties.api.core.domain.PropertyType
All Implemented Interfaces:
Serializable

public final class PropertyType
     
     
extends Object
implements Serializable

Provides information about the type of a property.

See Also:
Serialized Form

Constructor Summary
PropertyType(Class<?> type)
          Convenience constructor for non-collection types.
PropertyType(Class<?> type, Class<?> elementType)
          Default constructor.
 
Method Summary
 boolean equals(Object object)
          Returns true if the given object is semantically equal to the given object, false otherwise.
 Class<?> getElementType()
          Returns the Java type of the elements of the property if the type is a collection type.
 Class<?> getType()
          Returns the Java type of the property.
 int hashCode()
          Returns the hash code of the object.
 String toSimpleString()
          Returns the simple (no package part) name of the type.
 String toString()
          Returns the name of the type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyType

public PropertyType(Class<?> type)
             throws de.smartics.util.lang.NullArgumentException
Convenience constructor for non-collection types.

Parameters:
type - the Java type of the property.
Throws:
de.smartics.util.lang.NullArgumentException - if type is null.

PropertyType

public PropertyType(Class<?> type,
                    Class<?> elementType)
             throws de.smartics.util.lang.NullArgumentException
Default constructor.

Parameters:
type - the Java type of the property.
elementType - the Java type of the elements of the property if the type is a collection type.
Throws:
de.smartics.util.lang.NullArgumentException - if type is null.
Method Detail

getType

public Class<?> getType()
Returns the Java type of the property.

Returns:
the Java type of the property.

getElementType

public Class<?> getElementType()
Returns the Java type of the elements of the property if the type is a collection type. The value is derived from the value specified as PropertyElementType.

Returns:
the Java type of the elements of the property if the type is a collection type.

hashCode

public int hashCode()
Returns the hash code of the object.

Overrides:
hashCode in class Object
Returns:
the hash code.

equals

public boolean equals(Object object)
Returns true if the given object is semantically equal to the given object, false otherwise.

Overrides:
equals in class Object
Parameters:
object - the instance to compare to.
Returns:
true if the given object is semantically equal to the given object, false otherwise.

toSimpleString

public String toSimpleString()
Returns the simple (no package part) name of the type.

Returns:
the simple name of the type.

toString

public String toString()
Returns the name of the type.

Overrides:
toString in class Object
Returns:
the name of the type.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.