com.prosysopc.ua.server
Class BrowsePath

java.lang.Object
  extended by com.prosysopc.ua.server.BrowsePath
All Implemented Interfaces:
Comparable<BrowsePath>

public final class BrowsePath
extends Object
implements Comparable<BrowsePath>

Immutable BrowsePath with toString, equals, hashCode and compareTo implemented.


Field Summary
static BrowsePath EMPTY
           
 
Method Summary
 BrowsePath append(BrowsePath other)
           
 BrowsePath append(int namespaceIndex, String... nameparts)
          Creates a new BrowsePath by appending one or more QualifiedNames to this BrowsePath.
 BrowsePath append(org.opcfoundation.ua.builtintypes.QualifiedName... appendedBrowseNames)
          Creates a new BrowsePath by appending one or more QualifiedNames to this BrowsePath.
 int compareTo(BrowsePath other)
           
 boolean equals(Object obj)
           
static BrowsePath from(int namespaceIndex, String... nameparts)
          Creates a BrowsePath from namespace index and a set of names.
static BrowsePath from(org.opcfoundation.ua.builtintypes.QualifiedName... browseNames)
          Creates BrowsePath from a set of QualifiedNames.
 org.opcfoundation.ua.builtintypes.QualifiedName getFirst()
          Get first QualifiedName of the path, or QualifiedName.NULL if the path is empty.
 org.opcfoundation.ua.builtintypes.QualifiedName getLast()
          Get the last QualifiedName of the path or QualifiedName.Null if the path is empty.
 int getSize()
           
 int hashCode()
           
 boolean isEmpty()
           
 BrowsePath removeFirst()
          Return a new BrowsePath that has it's first element removed
 BrowsePath removeLast()
           
 org.opcfoundation.ua.builtintypes.QualifiedName[] toArray()
          Returns the BrowsePath parts as an array.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final BrowsePath EMPTY
Method Detail

from

public static BrowsePath from(int namespaceIndex,
                              String... nameparts)
Creates a BrowsePath from namespace index and a set of names.

Parameters:
namespaceIndex - index for the QualifiedNames
nameparts - name parts for the QualifiedNames
Returns:
BrowsePath

from

public static BrowsePath from(org.opcfoundation.ua.builtintypes.QualifiedName... browseNames)
Creates BrowsePath from a set of QualifiedNames.

Parameters:
browseNames - set of QualifiedNames.
Returns:
BrowsePath

append

public BrowsePath append(BrowsePath other)

append

public BrowsePath append(int namespaceIndex,
                         String... nameparts)
Creates a new BrowsePath by appending one or more QualifiedNames to this BrowsePath.

Parameters:
namespaceIndex - index part of the QualifiedNames
nameparts - the name parts of the QualifiedNames
Returns:
new BrowsePath with the parts appended
Throws:
IllegalArgumentException - if nameparts is null or empty

append

public BrowsePath append(org.opcfoundation.ua.builtintypes.QualifiedName... appendedBrowseNames)
Creates a new BrowsePath by appending one or more QualifiedNames to this BrowsePath.

Parameters:
appendedBrowseNames - to append
Returns:
the new BrowsePath

compareTo

public int compareTo(BrowsePath other)
Specified by:
compareTo in interface Comparable<BrowsePath>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getFirst

public org.opcfoundation.ua.builtintypes.QualifiedName getFirst()
Get first QualifiedName of the path, or QualifiedName.NULL if the path is empty.


getLast

public org.opcfoundation.ua.builtintypes.QualifiedName getLast()
Get the last QualifiedName of the path or QualifiedName.Null if the path is empty.


getSize

public int getSize()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isEmpty

public boolean isEmpty()

removeFirst

public BrowsePath removeFirst()
Return a new BrowsePath that has it's first element removed


removeLast

public BrowsePath removeLast()

toArray

public org.opcfoundation.ua.builtintypes.QualifiedName[] toArray()
Returns the BrowsePath parts as an array. An empty array is returned if the path is empty.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018. All rights reserved.