Class BlacklistEntry

java.lang.Object
org.deltava.beans.system.BlacklistEntry

public class BlacklistEntry extends Object
A bean to store login/blacklist registration entries.
Since:
9.0
Version:
9.0
Author:
Luke
  • Constructor Details

    • BlacklistEntry

      public BlacklistEntry(String addr, int prefixLength)
      Creates the bean.
      Parameters:
      addr - the base IP address
      prefixLength - the network prefix length in bits
  • Method Details

    • getCIDR

      public CIDRBlock getCIDR()
      Returns the CIDR block for the blacklist entry.
      Returns:
      the CIDRBlock
    • getCreated

      public Instant getCreated()
      Returns the creation date of this entry.
      Returns:
      the creation date/time
    • getComments

      public String getComments()
      Returns any blacklist comments.
      Returns:
      the comments
    • contains

      public boolean contains(String addr)
      Returns whether this blacklist entry contains a particular IP address.
      Parameters:
      addr - the IP address
      Returns:
      TRUE if contained by this blacklist, otherwise FALSE
    • setCreated

      public void setCreated(Instant dt)
      Updates the creation date of this blacklist entry.
      Parameters:
      dt - the creation date/time
    • setComments

      public void setComments(String comments)
      Updates the blacklist entry comments.
      Parameters:
      comments - the comments
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object