f00f.net.irc.martyr.util
Class FullNick

java.lang.Object
  extended by f00f.net.irc.martyr.util.FullNick

public class FullNick
extends java.lang.Object

Parses out a full nick (ex: sork<exclaimation>sork<at>f00f.net) and stores it for use. It also provides a consistent hashing method.


Constructor Summary
FullNick(java.lang.String original)
           
 
Method Summary
 boolean equals(FullNick nick)
           
 boolean equals(java.lang.Object object)
           
 boolean equals(java.lang.String nick)
          Performs case insesitive equals on the nicks only.
 java.lang.String getHost()
           
 java.lang.String getNick()
           
 java.lang.String getSource()
           
 java.lang.String getUser()
           
 int hashCode()
           
static void main(java.lang.String[] args)
          Unit test.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FullNick

public FullNick(java.lang.String original)
Method Detail

getNick

public java.lang.String getNick()

getUser

public java.lang.String getUser()

getHost

public java.lang.String getHost()

getSource

public java.lang.String getSource()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.String nick)
Performs case insesitive equals on the nicks only. Does not strip off any leading @ or +. ({ == [ and ] == } and | == \) It appears that servers are not RFC complient on this, so we will not as well.

Parameters:
nick - Nick to compare this nick with
Returns:
True or false of nick is the same

equals

public boolean equals(FullNick nick)

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
the nick part

main

public static void main(java.lang.String[] args)
Unit test.

Parameters:
args - Args passed to program


Copyright © 2000-2007 Ben Damm, Daniel Henninger, et al.