Class AddressVictim
java.lang.Object
space.arim.libertybans.api.Victim
space.arim.libertybans.api.AddressVictim
An IP address as the victim of a punishment
- Author:
- A248
-
Nested Class Summary
Nested classes/interfaces inherited from class Victim
Victim.VictimType -
Method Summary
Modifier and TypeMethodDescriptionbooleanEvaluates whether this victim is the same as anotherGets the network address of this victimgetType()Gets this victim's type:Victim.VictimType.ADDRESSinthashCode()static AddressVictimof(byte[] address) Gets a victim for the specified address bytes.static AddressVictimof(InetAddress address) Gets a victim for the addressstatic AddressVictimof(NetworkAddress address) Gets a victim for the addresstoString()
-
Method Details
-
of
Gets a victim for the address- Parameters:
address- the network address- Returns:
- an address victim
-
of
Gets a victim for the address- Parameters:
address- the inet address- Returns:
- an address victim
-
of
Gets a victim for the specified address bytes. Shortcut forAddressVictim.of(NetworkAddress.of(address))- Parameters:
address- the raw address bytes- Returns:
- an address victim
- Throws:
IllegalArgumentException- if the address bytes array is of illegal length
-
getType
Gets this victim's type:Victim.VictimType.ADDRESS -
getAddress
Gets the network address of this victim- Returns:
- the network address
-
equals
-
hashCode
-
toString
-