Package org.drasyl.event
Class Peer
- java.lang.Object
-
- org.drasyl.event.Peer
-
public class Peer extends Object
Used byEvent
to describe an event related to a Peer (e.g.PeerRelayEvent
,PeerDirectEvent
).This is an immutable object.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CompressedPublicKey
getPublicKey()
Returns the peer's public key.int
hashCode()
static Peer
of(CompressedPublicKey publicKey)
String
toString()
-
-
-
Method Detail
-
getPublicKey
@NonNull public CompressedPublicKey getPublicKey()
Returns the peer's public key.- Returns:
- the peer's public key.
-
of
public static Peer of(CompressedPublicKey publicKey)
- Throws:
NullPointerException
- ifpublicKey
isnull
-
-