public class PacketTypeSet
extends java.lang.Object
Constructor and Description |
---|
PacketTypeSet() |
PacketTypeSet(java.util.Collection<? extends PacketType> values) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(java.lang.Iterable<? extends PacketType> types)
Add the given types to the set of packet types.
|
void |
addType(PacketType type)
Add a particular type to the set.
|
void |
clear() |
boolean |
contains(java.lang.Class<?> packetClass)
Determine if a packet type with the given packet class exists in the set.
|
boolean |
contains(PacketType type)
Determine if the given packet type exists in the set.
|
boolean |
containsPacket(java.lang.Object packet)
Determine if the type of a packet is in the current set.
|
protected java.lang.Class<?> |
getPacketClass(PacketType type)
Retrieve the packet class associated with a particular type.
|
void |
removeAll(java.lang.Iterable<? extends PacketType> types)
Remove the given types from the set.
|
void |
removeType(PacketType type)
Remove a particular type to the set.
|
int |
size()
Retrieve the number of entries in the set.
|
java.util.Set<PacketType> |
values()
Retrieve a view of this packet type set.
|
public PacketTypeSet()
public PacketTypeSet(java.util.Collection<? extends PacketType> values)
public void addType(PacketType type)
type
- - the type to add.public void addAll(java.lang.Iterable<? extends PacketType> types)
types
- - the types to add.public void removeType(PacketType type)
type
- - the type to remove.public void removeAll(java.lang.Iterable<? extends PacketType> types)
type
- - the types to remove.protected java.lang.Class<?> getPacketClass(PacketType type)
type
- - the packet type.public boolean contains(PacketType type)
type
- - the type to find.public boolean contains(java.lang.Class<?> packetClass)
packetClass
- - the class to find.public boolean containsPacket(java.lang.Object packet)
packet
- - the packet.public java.util.Set<PacketType> values()
public int size()
public void clear()