Android Open Source - prim-ftpd Prefs Bean






From Project

Back to project page prim-ftpd.

License

The source code is released under:

Apache License

If you think the Android project prim-ftpd listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.primftpd;
//www.  ja  v  a 2 s  .c om
import java.io.Serializable;

public class PrefsBean implements Serializable
{
  private static final long serialVersionUID = 1L;

  private final String userName;
  private final String password;
  private final String portStr;
  private final String sslPortStr;
  private final int port;
  private final int sslPort;
  private final boolean announce;

  public PrefsBean(
    String userName,
    String password,
    int port,
    int sslPort,
    boolean announce)
  {
    super();
    this.userName = userName;
    this.password = password;
    this.port = port;
    this.sslPort = sslPort;
    this.portStr = String.valueOf(port);
    this.sslPortStr = String.valueOf(sslPort);
    this.announce = announce;
  }

  public String getUserName() {
    return userName;
  }

  public String getPassword() {
    return password;
  }

  public String getPortStr() {
    return portStr;
  }

  public int getPort() {
    return port;
  }

  public String getSslPortStr() {
    return sslPortStr;
  }

  public int getSslPort()  {
    return sslPort;
  }

  public boolean isAnnounce()
  {
    return announce;
  }

  @Override
  public int hashCode()
  {
    final int prime = 31;
    int result = 1;
    result = prime * result + (announce ? 1231 : 1237);
    result = prime * result
        + ((password == null) ? 0 : password.hashCode());
    result = prime * result + port;
    result = prime * result + ((portStr == null) ? 0 : portStr.hashCode());
    result = prime * result + sslPort;
    result = prime * result
        + ((sslPortStr == null) ? 0 : sslPortStr.hashCode());
    result = prime * result
        + ((userName == null) ? 0 : userName.hashCode());
    return result;
  }

  @Override
  public boolean equals(Object obj)
  {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    PrefsBean other = (PrefsBean) obj;
    if (announce != other.announce)
      return false;
    if (password == null) {
      if (other.password != null)
        return false;
    } else if (!password.equals(other.password))
      return false;
    if (port != other.port)
      return false;
    if (portStr == null) {
      if (other.portStr != null)
        return false;
    } else if (!portStr.equals(other.portStr))
      return false;
    if (sslPort != other.sslPort)
      return false;
    if (sslPortStr == null) {
      if (other.sslPortStr != null)
        return false;
    } else if (!sslPortStr.equals(other.sslPortStr))
      return false;
    if (userName == null) {
      if (other.userName != null)
        return false;
    } else if (!userName.equals(other.userName))
      return false;
    return true;
  }
}




Java Source Code List

org.primftpd.AndroidPrefsUserManager.java
org.primftpd.EncryptingEditTextPreference.java
org.primftpd.FtpPrefsActivity.java
org.primftpd.FtpPrefsFragment.java
org.primftpd.FtpServerService.java
org.primftpd.NotificationUtil.java
org.primftpd.PrefsBean.java
org.primftpd.PrimitiveFtpdActivity.java
org.primftpd.filesystem.AndroidFileSystemFactory.java
org.primftpd.filesystem.AndroidFileSystemView.java
org.primftpd.filesystem.AndroidFtpFile.java
org.primftpd.util.EncryptionUtil.java
org.primftpd.util.KeyStoreUtil.java
org.primftpd.util.StringUtils.java
org.slf4j.ILoggerFactory.java
org.slf4j.IMarkerFactory.java
org.slf4j.LoggerFactory.java
org.slf4j.Logger.java
org.slf4j.MDC.java
org.slf4j.MarkerFactory.java
org.slf4j.Marker.java
org.slf4j.helpers.BasicMDCAdapter.java
org.slf4j.helpers.BasicMarkerFactory.java
org.slf4j.helpers.BasicMarker.java
org.slf4j.helpers.FormattingTuple.java
org.slf4j.helpers.MarkerIgnoringBase.java
org.slf4j.helpers.MessageFormatter.java
org.slf4j.helpers.NOPLoggerFactory.java
org.slf4j.helpers.NOPLogger.java
org.slf4j.helpers.NOPMDCAdapter.java
org.slf4j.helpers.NamedLoggerBase.java
org.slf4j.helpers.SubstituteLoggerFactory.java
org.slf4j.helpers.Util.java
org.slf4j.impl.AndroidLoggerFactory.java
org.slf4j.impl.AndroidLogger.java
org.slf4j.impl.StaticLoggerBinder.java
org.slf4j.impl.StaticMDCBinder.java
org.slf4j.impl.StaticMarkerBinder.java
org.slf4j.spi.LocationAwareLogger.java
org.slf4j.spi.LoggerFactoryBinder.java
org.slf4j.spi.MDCAdapter.java
org.slf4j.spi.MarkerFactoryBinder.java