Package xnap.plugin.nap.net

Examples of xnap.plugin.nap.net.User


    public Object get(int i, int j)
    {
        if (i >= rows.size())
      return null;

        User u = (User)rows.get(i);

        if (u == null)
      return null;

        switch (j) {
  case NAME:
      return u.getName();
  case SERVER:
      return u.getServer().getHost() + ":" + u.getServer().getPort();
  case FILE_COUNT:
      return new Integer(u.getFileCount());
  case LINK_SPEED:
      return (new LinkSpeed(u.getLinkSpeed())).toString();
  case LEVEL:
      return u.getLevel();
  case STATUS:
      return IUser.STATUS_MSGS[u.getStatus()];
  case DOWNLOAD_COUNT:
      return new Integer(u.getDownloadCount());
  case UPLOAD_COUNT:
      return new Integer(u.getUploadCount());
  case CLIENT_INFO:
      return u.getClientInfo();
  case LAST_SEEN:
      long l = u.getLastSeen();
      return new Long((l > 0) ? l : -1);
  case CONNECT_DURATION:
      return new Integer(u.getConnectDuration());
  default:
      return "";
        }
    }
View Full Code Here


  public boolean equals(Object obj)
  {
      if (obj != null) {
    if (obj instanceof User) {
        User user = (User)obj;
        return (getName().equals(user.getName())
          && getServer().equals(user.getServer()));

    }
      }
     
      return false;
View Full Code Here

TOP

Related Classes of xnap.plugin.nap.net.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.