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

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

public final class PropertyValueComment
     
     
extends Object
implements Serializable

Provides comments for the values of a property.

See Also:
Serialized Form

Constructor Summary
PropertyValueComment(String summary)
          Default constructor.
 
Method Summary
 void addValueComment(Object value, String comment)
          Adds the comment for the given value.
 String getSummary()
          Returns the summary of the type of the values.
 String getValueComment(Object value)
          Returns the comment for the given value.
 List<Serializable> getValues()
          Returns the list of values the instance provides comments for.
 String toString()
          Returns the string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyValueComment

public PropertyValueComment(String summary)
Default constructor.

Parameters:
summary - the summary of the type of the values.
Method Detail

getSummary

public String getSummary()
Returns the summary of the type of the values. May be null.

Returns:
the summary of the type of the values.

addValueComment

public void addValueComment(Object value,
                            String comment)
Adds the comment for the given value.

Parameters:
value - the value whose comment is to be added. If the value is not serializable, the string representation will be stored.
comment - the comment to the value.

getValueComment

public String getValueComment(Object value)
Returns the comment for the given value.

Parameters:
value - the value whose comment is requested.
Returns:
the comment to the value or null if there is no comment for taht value.

getValues

public List<Serializable> getValues()
Returns the list of values the instance provides comments for.

Returns:
the list of values the instance provides comments for.

toString

public String toString()
Returns the string representation of the object.

Overrides:
toString in class Object
Returns:
the string representation of the object.


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