Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol
Class ServerStoredDetails.GenericDetail

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.ServerStoredDetails.GenericDetail
Direct Known Subclasses:
ServerStoredDetails.BinaryDetail, ServerStoredDetails.BooleanDetail, ServerStoredDetails.CalendarDetail, ServerStoredDetails.LocaleDetail, ServerStoredDetails.NumberDetail, ServerStoredDetails.StringDetail, ServerStoredDetails.TimeZoneDetail, ServerStoredDetails.URLDetail
Enclosing class:
ServerStoredDetails

public static class ServerStoredDetails.GenericDetail
extends Object

A generic detail used as the root of all other server stored details. This class should be extended or instantiated by implementors with the purpose of representing details not defined here.


Field Summary
protected  String detailDisplayName
           
protected  Object value
           
 
Constructor Summary
ServerStoredDetails.GenericDetail(String detailDisplayName, Object value)
          Instantiates this detail setting its value and display name accordingly.
 
Method Summary
 boolean equals(Object obj)
          Compares two GenericDetails according their DetailDisplayName and Value
 String getDetailDisplayName()
          Returns a display name that may be used as a description when visualizing the value of the detail (make sure you don't use this string in internationalized versions).
 Object getDetailValue()
          Returns the value of the detail.
 String toString()
          Returns a String representation of the detail using both its value and display name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected Object value

detailDisplayName

protected String detailDisplayName
Constructor Detail

ServerStoredDetails.GenericDetail

public ServerStoredDetails.GenericDetail(String detailDisplayName,
                                         Object value)
Instantiates this detail setting its value and display name accordingly.

Parameters:
detailDisplayName - a display name that may be used as a description when visualizing the value of the detail
value - the value of the detail.
Method Detail

getDetailValue

public Object getDetailValue()
Returns the value of the detail.

Returns:
the value of the detail.

getDetailDisplayName

public String getDetailDisplayName()
Returns a display name that may be used as a description when visualizing the value of the detail (make sure you don't use this string in internationalized versions).

Returns:
the detail's display (descriptive) name.

toString

public String toString()
Returns a String representation of the detail using both its value and display name.

Overrides:
toString in class Object
Returns:
a String representation of the detail using both its value and display name.

equals

public boolean equals(Object obj)
Compares two GenericDetails according their DetailDisplayName and Value

Overrides:
equals in class Object
Parameters:
obj - Object expected GenericDetail otherwise return false
Returns:
true if this object has the same display name and value as obj and false otherwise

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.