Sorry,I forget my password and try it out just now....-_-!!
2005/12/19, Trustin Lee <[EMAIL PROTECTED]>:
> I think it would be great if we can make URI interface as many methods as it
> can so ppl can use it easily. Empty interface is useless IMHO.
>
> And why don't you post your comment in JIRA so we can track the whole
> conversation?
>
> Trustin
>
> 2005/12/19, Donald <[EMAIL PROTECTED]>:
> > My URI inferface is a empty inteface,just for extend for future,it like
> this:
> >
> > public interface URI {
> > }
> >
> > and the implement for ipv4
> >
> > public class SessionURI implements URI {
> >
> > private String ip;
> >
> > private int port;
> >
> > public SessionURI(String ip, int port)
> > {
> > this.ip = ip;
> > this.port = port;
> > }
> >
> > public int getPort()
> > {
> > return port;
> > }
> >
> > public String getIp()
> > {
> > return ip;
> > }
> >
> > public boolean equals(Object o)
> > {
> > if (o == null)
> > return false;
> > if (o == this)
> > return true;
> > if (!(o instanceof SessionURI))
> > return false;
> > SessionURI another = (SessionURI) o;
> > return another.getIp().equals(ip) && another.getPort() ==
> port;
> > }
> >
> > public int hashCode()
> > {
> > int result = 17;
> > result = 37 * result + ip.hashCode();
> > result = 37 * result + port;
> > return result;
> > }
> >
> > public String toString()
> > {
> > return ip + ":" + port;
> > }
> > }
> >
> > I think it's too simple,WDYT?
> >
> > 2005/12/19, Trustin Lee <[EMAIL PROTECTED]>:
> > > Hi Donald,
> > >
> > > You could suggest us an interface for URI class. Please reply as a JIRA
> > > comment.
> > >
> > > Cheers,
> > > Trustin
> > > --
> > > what we call human nature is actually human habit
> > > --
> > > http://gleamynode.net/
> >
> >
> > --
> > Donald
> >
>
>
>
> --
>
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
--
Donald