com.unclouded.android
Class TypeTag

java.lang.Object
  extended by com.unclouded.android.TypeTag
All Implemented Interfaces:
Serializable

public class TypeTag
extends Object
implements Serializable

Identifies services during service publication or subscription. Type tags are used to filter services from the pool of services in the network.

A TypeTag instance provides no extra functionality rather than serving as a classification mechanism for services.

See Also:
Serialized Form

Constructor Summary
TypeTag(String tag)
          Construct a type tag by passing a String as identifier.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is equal to this type tag.
 String getTag()
          Return the String identifier of the type tag.
 int hashCode()
          Returns a hash code value for the type tag.
 String toString()
          Returns a string representation of the type tag.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeTag

public TypeTag(String tag)
Construct a type tag by passing a String as identifier.

Parameters:
tag - a string to identify the type tag.
Method Detail

getTag

public String getTag()
Return the String identifier of the type tag.

Returns:
a string identifier.

toString

public String toString()
Returns a string representation of the type tag.

Overrides:
toString in class Object
Returns:
a string representation of the type tag.

equals

public boolean equals(Object obj)
Indicates whether some other object is equal to this type tag.

Two type tags are equal when their tags are equal.

Overrides:
equals in class Object
Parameters:
obj - the object with which to compare.
Returns:
true if this type tag is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the type tag.

Overrides:
hashCode in class Object
Returns:
a hash code value for this type tag.