java.lang.Object
java.lang.Record
org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName
Record Components:
namespaceIndex - index of the namespace that qualifies the name. This index is the index of that namespace in the local Server’s NamespaceArray.
name - the name portion of the QualifiedName.

@NullMarked public record QualifiedName(UShort namespaceIndex, @Nullable String name) extends Record
This Built-in DataType contains a qualified name. It is, for example, used as BrowseName.

The name part of the QualifiedName is restricted to 512 characters.

  • Field Details

  • Constructor Details

    • QualifiedName

      public QualifiedName(UShort namespaceIndex, @Nullable String name)
      Creates an instance of a QualifiedName record class.
      Parameters:
      namespaceIndex - the value for the namespaceIndex record component
      name - the value for the name record component
    • QualifiedName

      public QualifiedName(int namespaceIndex, @Nullable String name)
      Parameters:
      namespaceIndex - index of the namespace that qualifies the name. This index is the index of that namespace in the local Server’s NamespaceArray.
      name - the name portion of the QualifiedName.
      See Also:
  • Method Details

    • getNamespaceIndex

      public UShort getNamespaceIndex()
      Returns:
      the namespace index of the namespace that qualifies the name.
    • getName

      public @Nullable String getName()
      Returns:
      the name portion of the QualifiedName.
    • isNull

      public boolean isNull()
      Check if this QualifiedName is "null".

      A QualifiedName is considered "null" if its name is null or empty.

      Returns:
      true if this QualifiedName is "null", false otherwise.
    • isNotNull

      public boolean isNotNull()
      Check if this QualifiedName is not "null".

      A QualifiedName is considered "not null" if its name is not null or empty.

      This is the inverse of isNull().

      Returns:
      true if this QualifiedName is not "null", false otherwise.
    • reindex

      public QualifiedName reindex(NamespaceTable namespaceTable, String namespaceUri)
      Re-index this QualifiedName from its current namespace index to the index for namespaceUri.

      If the target namespace URI is not present in the namespace table this QualifiedName is returned.

      Parameters:
      namespaceTable - the NamespaceTable.
      namespaceUri - the target namespace URI.
      Returns:
      a new QualifiedName in the namespace index indicated by namespaceUri.
    • withName

      public QualifiedName withName(@Nullable String name)
      Return a new QualifiedName with name.
      Parameters:
      name - the new name.
      Returns:
      a new QualifiedName with name.
    • withNamespaceIndex

      public QualifiedName withNamespaceIndex(UShort namespaceIndex)
      Return a new QualifiedName with namespaceIndex.
      Parameters:
      namespaceIndex - thew new namespace index.
      Returns:
      a new QualifiedName with namespaceIndex.
    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • toParseableString

      public String toParseableString()
      Returns:
      a parseable string representation of this QualifiedName.
    • parse

      public static QualifiedName parse(String s)
      Parse a QualifiedName from its parseable string representation.
      Parameters:
      s - the string to parse.
      Returns:
      the parsed QualifiedName.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • namespaceIndex

      public UShort namespaceIndex()
      Returns the value of the namespaceIndex record component.
      Returns:
      the value of the namespaceIndex record component
    • name

      public @Nullable String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component