XNIO API 3.0.4.GA

org.xnio
Class Property

java.lang.Object
  extended by org.xnio.Property
All Implemented Interfaces:
Serializable

public final class Property
extends Object
implements Serializable

An immutable property represented by a key and value.

Author:
Darran Lofthouse
See Also:
Serialized Form

Method Summary
 boolean equals(Object obj)
          Determine if this Property equals another Property.
 boolean equals(Property other)
          Determine if this Property equals another Property.
 String getKey()
          Get the key of this key/value Property.
 String getValue()
          Get the value of this key/value Property.
 int hashCode()
          Get the hash code for this Property.
static Property of(String key, String value)
          Create a new property for the specified key and value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKey

public String getKey()
Get the key of this key/value Property.

Returns:
the key.

getValue

public String getValue()
Get the value of this key/value Property.

Returns:
the value.

hashCode

public int hashCode()
Get the hash code for this Property.

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

equals

public boolean equals(Object obj)
Determine if this Property equals another Property.

Overrides:
equals in class Object
Parameters:
obj - the other Property to compare.
Returns:
true if the two Properties are equal.

equals

public boolean equals(Property other)
Determine if this Property equals another Property.

Parameters:
other - the other Property to compare.
Returns:
true if the two Properties are equal.

of

public static Property of(String key,
                          String value)
Create a new property for the specified key and value.

Parameters:
key - the key for new Property
value - the value for the new Property
Returns:
the newly created Property

XNIO API 3.0.4.GA

Copyright © 2010 JBoss, a division of Red Hat, Inc.