public final class Topic
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Topic.Level
Represents a level in a topic.
|
Modifier and Type | Method and Description |
---|---|
boolean |
conflictsWith(Topic other)
Determines if this topic conflicts with another topic.
|
boolean |
equals(java.lang.Object o) |
java.util.List<Topic.Level> |
getLabels()
Gets all of the label levels in the topic.
|
java.util.List<Topic.Level> |
getLevels()
Gets all of the hierarchical levels of the topic.
|
int |
hashCode() |
boolean |
hasLabel(java.lang.String label)
Returns true if the topic contains the given label string.
|
static Topic |
parse(java.lang.String topic)
Parses an MQTT topic and labels.
|
java.lang.String |
toString() |
public static Topic parse(java.lang.String topic)
topic
- Topic to parse.TopicSyntaxException
- if the topic is malformed.public java.util.List<Topic.Level> getLevels()
public java.util.List<Topic.Level> getLabels()
public boolean hasLabel(java.lang.String label)
label
- Label to check for.public boolean conflictsWith(Topic other)
other
- Topic to check against.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object