Record Class QualifiedName
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQualifiedName(int namespaceIndex, @Nullable String name) QualifiedName(UShort namespaceIndex, @Nullable String name) Creates an instance of aQualifiedNamerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.@Nullable StringgetName()final inthashCode()Returns a hash code value for this object.booleanCheck if thisQualifiedNameis not "null".booleanisNull()Check if thisQualifiedNameis "null".@Nullable Stringname()Returns the value of thenamerecord component.Returns the value of thenamespaceIndexrecord component.static QualifiedNameParse aQualifiedNamefrom its parseable string representation.reindex(NamespaceTable namespaceTable, String namespaceUri) Re-index thisQualifiedNamefrom its current namespace index to the index fornamespaceUri.final StringtoString()Returns a string representation of this record class.Return a newQualifiedNamewithname.withNamespaceIndex(UShort namespaceIndex) Return a newQualifiedNamewithnamespaceIndex.
-
Field Details
-
NULL_VALUE
-
-
Constructor Details
-
QualifiedName
Creates an instance of aQualifiedNamerecord class.- Parameters:
namespaceIndex- the value for thenamespaceIndexrecord componentname- the value for thenamerecord component
-
QualifiedName
- 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
- Returns:
- the namespace index of the namespace that qualifies the name.
-
getName
- Returns:
- the name portion of the QualifiedName.
-
isNull
public boolean isNull()Check if thisQualifiedNameis "null".A
QualifiedNameis considered "null" if its name isnullor empty.- Returns:
trueif thisQualifiedNameis "null",falseotherwise.
-
isNotNull
public boolean isNotNull()Check if thisQualifiedNameis not "null".A
QualifiedNameis considered "not null" if its name is notnullor empty.This is the inverse of
isNull().- Returns:
trueif thisQualifiedNameis not "null",falseotherwise.
-
reindex
Re-index thisQualifiedNamefrom its current namespace index to the index fornamespaceUri.If the target namespace URI is not present in the namespace table this
QualifiedNameis returned.- Parameters:
namespaceTable- theNamespaceTable.namespaceUri- the target namespace URI.- Returns:
- a new
QualifiedNamein the namespace index indicated bynamespaceUri.
-
withName
Return a newQualifiedNamewithname.- Parameters:
name- the new name.- Returns:
- a new
QualifiedNamewithname.
-
withNamespaceIndex
Return a newQualifiedNamewithnamespaceIndex.- Parameters:
namespaceIndex- thew new namespace index.- Returns:
- a new
QualifiedNamewithnamespaceIndex.
-
equals
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 withObjects::equals(Object,Object). -
toParseableString
- Returns:
- a parseable string representation of this
QualifiedName.
-
parse
Parse aQualifiedNamefrom its parseable string representation.- Parameters:
s- the string to parse.- Returns:
- the parsed
QualifiedName.
-
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. -
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. -
namespaceIndex
Returns the value of thenamespaceIndexrecord component.- Returns:
- the value of the
namespaceIndexrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-