Class NameValuePair

java.lang.Object
org.jdesktop.beans.AbstractBean
org.jdesktop.http.NameValuePair
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Cookie, Header, Parameter

public class NameValuePair extends AbstractBean implements Cloneable
Represents a name/value pair. Both the name and value properties are bound (meaning a PropertyChangeEvent will be fired when their values change).
  • Constructor Details

    • NameValuePair

      public NameValuePair()
      Creates a new instance of NameValuePair. Both name and value will be null.
    • NameValuePair

      public NameValuePair(String name, String value)
      Creates a new instance of NameValuePair, using the supplied name and value.
      Parameters:
      name - the name to use. May be null.
      value - the value to use. May be null.
  • Method Details

    • setName

      public void setName(String name)
      Sets the name. A PropertyChangeEvent will be fired if the name is different from the current name value.
      Parameters:
      name - The name to use. May be null.
    • getName

      public final String getName()
      Gets the name.
      Returns:
      the name. May be null.
    • setValue

      public void setValue(String value)
      Sets the value. A PropertyChangeEvent will be fired if the value is different from the current value.
      Parameters:
      value - The value to use. May be null.
    • getValue

      public final String getValue()
      Gets the value.
      Returns:
      the value. May be null.
    • clone

      public NameValuePair clone()
      Overrides:
      clone in class AbstractBean
    • toString

      public String toString()
      Overrides:
      toString in class Object