org.apache.pluto.driver.core
Class PortletWindowIDImpl

java.lang.Object
  extended by org.apache.pluto.driver.core.PortletWindowIDImpl
All Implemented Interfaces:
java.io.Serializable, PortletWindowID

public class PortletWindowIDImpl
extends java.lang.Object
implements PortletWindowID, java.io.Serializable

Wraps around the internal Object IDs. By holding both the string and the integer version of an Object ID this class helps speed up the internal processing.

See Also:
Serialized Form

Method Summary
static PortletWindowIDImpl createFromString(java.lang.String stringId)
          Creates a portlet window ID instance from a string.
 java.lang.String getStringId()
          Returns the unique string ID of the portlet window.
 int hashCode()
          public boolean equals(Object object) { boolean result = false; if (object instanceof PortletWindowIDImpl) { result = (intId == ((PortletWindowIDImpl) object).intId); } else if (object instanceof String) { result = stringId.equals(object); } else if (object instanceof Integer) { result = (intId == ((Integer) object).intValue()); } return (result); }
 int intValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStringId

public java.lang.String getStringId()
Description copied from interface: PortletWindowID
Returns the unique string ID of the portlet window.

Depending on the implementation of toString() is dangerous, because the original implementation in Object is not qualified.

Specified by:
getStringId in interface PortletWindowID
Returns:
the unique string ID of the portlet window.

hashCode

public int hashCode()
public boolean equals(Object object) { boolean result = false; if (object instanceof PortletWindowIDImpl) { result = (intId == ((PortletWindowIDImpl) object).intId); } else if (object instanceof String) { result = stringId.equals(object); } else if (object instanceof Integer) { result = (intId == ((Integer) object).intValue()); } return (result); }

Overrides:
hashCode in class java.lang.Object

intValue

public int intValue()

createFromString

public static PortletWindowIDImpl createFromString(java.lang.String stringId)
Creates a portlet window ID instance from a string.

Parameters:
stringId - the string ID from which the instance is created.
Returns:
a portlet window ID instance created from the string ID.


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.