Class AddeAccount

java.lang.Object
edu.wisc.ssec.mcidasv.servermanager.AddeAccount

public class AddeAccount extends Object
Simplistic representation of ADDE accounting information. This is an immutable class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
    Project number (currently not limited to a numeric value).
    private final String
    Username to hand off to the server.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AddeAccount(String user, String proj)
    Builds a new ADDE account object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determines whether or not a given object is equivalent to this ADDE account.
    Returns a "human-friendly" representation of this accounting object.
    Get the project number associated with this account.
    Get the username associated with this account.
    int
    Computes the hashcode of this ADDE account using the hashcodes of username and project.
    Returns a string representation of this account.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • username

      private final String username
      Username to hand off to the server.
    • project

      private final String project
      Project number (currently not limited to a numeric value).
  • Constructor Details

    • AddeAccount

      public AddeAccount(String user, String proj)
      Builds a new ADDE account object.
      Parameters:
      user - Username to store. Cannot be null.
      proj - Project number to store. Cannot be null.
      Throws:
      NullPointerException - if user or proj is null.
  • Method Details

    • getUsername

      public String getUsername()
      Get the username associated with this account.
      Returns:
      username
    • getProject

      public String getProject()
      Get the project number associated with this account.
      Returns:
      project
    • equals

      public boolean equals(Object obj)
      Determines whether or not a given object is equivalent to this ADDE account. Currently the username and project number are case sensitive, though this is likely to change.
      Overrides:
      equals in class Object
      Parameters:
      obj - Object to test against.
      Returns:
      Whether or not obj is equivalent to this ADDE account.
    • hashCode

      public int hashCode()
      Computes the hashcode of this ADDE account using the hashcodes of username and project.
      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this object.
    • toString

      public String toString()
      Returns a string representation of this account. The formatting of this string is subject to change, but currently looks like [AddeAccount@HASHCODE: username=..., project=...].
      Overrides:
      toString in class Object
      Returns:
      String representation of this ADDE account.
    • friendlyString

      Returns a "human-friendly" representation of this accounting object. Currently looks like USER / PROJ.
      Returns:
      Friendly accounting detail String.