java.lang.Object
org.eclipse.milo.opcua.stack.core.types.builtin.Matrix

public class Matrix extends Object
Matrix is a container for multidimensional array values.

Allowed value types:

  • any builtin type
  • UaStructuredType
  • UaEnumeratedType
  • OptionSetUInteger subclasses
  • Constructor Details

    • Matrix

      public Matrix(@Nullable Object nestedArray)
    • Matrix

      public Matrix(Object flatArray, int[] dimensions)
    • Matrix

      public Matrix(Object flatArray, int[] dimensions, OpcUaDataType dataType)
  • Method Details

    • getElements

      public @Nullable Object getElements()
      Get the elements of this Matrix in a flattened array.
      Returns:
      the elements of this Matrix in a flattened array.
    • getDimensions

      public int[] getDimensions()
      Get the dimensions of this Matrix.

      The returned array is zero length if this Matrix contains a null value.

      Returns:
      the dimensions of this Matrix.
    • getValueRank

      public int getValueRank()
      Get the value rank (number of dimensions) of this Matrix.

      The returned value is -1 if this Matrix contains a null value.

      Returns:
      the value rank of this Matrix.
    • getDataType

      public Optional<OpcUaDataType> getDataType()
      Get the OpcUaDataType of the elements of this Matrix.

      Empty only if this Matrix contains a null value.

      Returns:
      the OpcUaDataType of the elements of this Matrix.
    • getDataTypeId

      public Optional<ExpandedNodeId> getDataTypeId()
      Get the ExpandedNodeId of the DataType of the elements of this Matrix.

      If this Matrix contains elements of UaEnumeratedType or UaStructuredType then the ExpandedNodeId of the DataType is returned, not its reduction to built-in types Int32 or ExtensionObject.

      Empty only if this Matrix contains a null value.

      Returns:
      the ExpandedNodeId of the DataType of the elements of this Matrix.
    • getElementType

      public Optional<Class<?>> getElementType()
      Get the Java class of the elements of this Matrix.

      Empty only if this Matrix contains a null value.

      Returns:
      the Java class of the elements of this Matrix.
    • isNull

      public boolean isNull()
      Returns:
      true if this Matrix contains a null value.
    • isNotNull

      public boolean isNotNull()
      Returns:
      true if this Matrix contains a non-null value.
    • transform

      public Matrix transform(Function<Object,Object> f)
      Create a new Matrix by applying the transform function f to each of the elements in this Matrix.
      Parameters:
      f - the transform function applied to each element.
      Returns:
      a new Matrix containing transformed elements.
    • nestedArrayValue

      public Object nestedArrayValue()
      Get a copy of nested (un-flattened) multidimensional array value contained by this Matrix.
      Returns:
      a copy of nested (un-flattened) multidimensional array value contained by this Matrix.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • ofNull

      public static Matrix ofNull()
      Create a Matrix containing a null value.
      Returns:
      a Matrix containing a null value.
    • ofBoolean

      public static Matrix ofBoolean(Boolean[][] value)
      Create a Matrix containing a multidimensional Boolean value.
      Parameters:
      value - the multidimensional Boolean value.
      Returns:
      a new Matrix containing value.
    • ofBoolean

      public static Matrix ofBoolean(boolean[][] value)
      Create a Matrix containing a multidimensional Boolean value.
      Parameters:
      value - the multidimensional Boolean value.
      Returns:
      a new Matrix containing value.
    • ofBoolean

      public static Matrix ofBoolean(Boolean[][][] value)
      Create a Matrix containing a multidimensional Boolean value.
      Parameters:
      value - the multidimensional Boolean value.
      Returns:
      a new Matrix containing value.
    • ofBoolean

      public static Matrix ofBoolean(boolean[][][] value)
      Create a Matrix containing a multidimensional Boolean value.
      Parameters:
      value - the multidimensional Boolean value.
      Returns:
      a new Matrix containing value.
    • ofSByte

      public static Matrix ofSByte(Byte[][] value)
      Create a Matrix containing a multidimensional SByte value.
      Parameters:
      value - the multidimensional SByte value.
      Returns:
      a new Matrix containing value.
    • ofSByte

      public static Matrix ofSByte(byte[][] value)
      Create a Matrix containing a multidimensional SByte value.
      Parameters:
      value - the multidimensional SByte value.
      Returns:
      a new Matrix containing value.
    • ofSByte

      public static Matrix ofSByte(Byte[][][] value)
      Create a Matrix containing a multidimensional SByte value.
      Parameters:
      value - the multidimensional SByte value.
      Returns:
      a new Matrix containing value.
    • ofSByte

      public static Matrix ofSByte(byte[][][] value)
      Create a Matrix containing a multidimensional SByte value.
      Parameters:
      value - the multidimensional SByte value.
      Returns:
      a new Matrix containing value.
    • ofByte

      public static Matrix ofByte(UByte[][] value)
      Create a Matrix containing a multidimensional Byte value.
      Parameters:
      value - the multidimensional Byte value.
      Returns:
      a new Matrix containing value.
    • ofByte

      public static Matrix ofByte(UByte[][][] value)
      Create a Matrix containing a multidimensional Byte value.
      Parameters:
      value - the multidimensional Byte value.
      Returns:
      a new Matrix containing value.
    • ofInt16

      public static Matrix ofInt16(Short[][] value)
      Create a Matrix containing a multidimensional Int16 value.
      Parameters:
      value - the multidimensional Int16 value.
      Returns:
      a new Matrix containing value.
    • ofInt16

      public static Matrix ofInt16(short[][] value)
      Create a Matrix containing a multidimensional Int16 value.
      Parameters:
      value - the multidimensional Int16 value.
      Returns:
      a new Matrix containing value.
    • ofInt16

      public static Matrix ofInt16(Short[][][] value)
      Create a Matrix containing a multidimensional Int16 value.
      Parameters:
      value - the multidimensional Int16 value.
      Returns:
      a new Matrix containing value.
    • ofInt16

      public static Matrix ofInt16(short[][][] value)
      Create a Matrix containing a multidimensional Int16 value.
      Parameters:
      value - the multidimensional Int16 value.
      Returns:
      a new Matrix containing value.
    • ofUInt16

      public static Matrix ofUInt16(UShort[][] value)
      Create a Matrix containing a multidimensional UInt16 value.
      Parameters:
      value - the multidimensional UInt16 value.
      Returns:
      a new Matrix containing value.
    • ofUInt16

      public static Matrix ofUInt16(UShort[][][] value)
      Create a Matrix containing a multidimensional UInt16 value.
      Parameters:
      value - the multidimensional UInt16 value.
      Returns:
      a new Matrix containing value.
    • ofInt32

      public static Matrix ofInt32(Integer[][] value)
      Create a Matrix containing a multidimensional Int32 value.
      Parameters:
      value - the multidimensional Int32 value.
      Returns:
      a new Matrix containing value.
    • ofInt32

      public static Matrix ofInt32(int[][] value)
      Create a Matrix containing a multidimensional Int32 value.
      Parameters:
      value - the multidimensional Int32 value.
      Returns:
      a new Matrix containing value.
    • ofInt32

      public static Matrix ofInt32(Integer[][][] value)
      Create a Matrix containing a multidimensional Int32 value.
      Parameters:
      value - the multidimensional Int32 value.
      Returns:
      a new Matrix containing value.
    • ofInt32

      public static Matrix ofInt32(int[][][] value)
      Create a Matrix containing a multidimensional Int32 value.
      Parameters:
      value - the multidimensional Int32 value.
      Returns:
      a new Matrix containing value.
    • ofUInt32

      public static Matrix ofUInt32(UInteger[][] value)
      Create a Matrix containing a multidimensional UInt32 value.
      Parameters:
      value - the multidimensional UInt32 value.
      Returns:
      a new Matrix containing value.
    • ofUInt32

      public static Matrix ofUInt32(UInteger[][][] value)
      Create a Matrix containing a multidimensional UInt32 value.
      Parameters:
      value - the multidimensional UInt32 value.
      Returns:
      a new Matrix containing value.
    • ofInt64

      public static Matrix ofInt64(Long[][] value)
      Create a Matrix containing a multidimensional Int64 value.
      Parameters:
      value - the multidimensional Int64 value.
      Returns:
      a new Matrix containing value.
    • ofInt64

      public static Matrix ofInt64(long[][] value)
      Create a Matrix containing a multidimensional Int64 value.
      Parameters:
      value - the multidimensional Int64 value.
      Returns:
      a new Matrix containing value.
    • ofInt64

      public static Matrix ofInt64(Long[][][] value)
      Create a Matrix containing a multidimensional Int64 value.
      Parameters:
      value - the multidimensional Int64 value.
      Returns:
      a new Matrix containing value.
    • ofInt64

      public static Matrix ofInt64(long[][][] value)
      Create a Matrix containing a multidimensional Int64 value.
      Parameters:
      value - the multidimensional Int64 value.
      Returns:
      a new Matrix containing value.
    • ofUInt64

      public static Matrix ofUInt64(ULong[][] value)
      Create a Matrix containing a multidimensional UInt64 value.
      Parameters:
      value - the multidimensional UInt64 value.
      Returns:
      a new Matrix containing value.
    • ofUInt64

      public static Matrix ofUInt64(ULong[][][] value)
      Create a Matrix containing a multidimensional UInt64 value.
      Parameters:
      value - the multidimensional UInt64 value.
      Returns:
      a new Matrix containing value.
    • ofFloat

      public static Matrix ofFloat(Float[][] value)
      Create a Matrix containing a multidimensional Float value.
      Parameters:
      value - the multidimensional Float value.
      Returns:
      a new Matrix containing value.
    • ofFloat

      public static Matrix ofFloat(float[][] value)
      Create a Matrix containing a multidimensional Float value.
      Parameters:
      value - the multidimensional Float value.
      Returns:
      a new Matrix containing value.
    • ofFloat

      public static Matrix ofFloat(Float[][][] value)
      Create a Matrix containing a multidimensional Float value.
      Parameters:
      value - the multidimensional Float value.
      Returns:
      a new Matrix containing value.
    • ofFloat

      public static Matrix ofFloat(float[][][] value)
      Create a Matrix containing a multidimensional Float value.
      Parameters:
      value - the multidimensional Float value.
      Returns:
      a new Matrix containing value.
    • ofDouble

      public static Matrix ofDouble(Double[][] value)
      Create a Matrix containing a multidimensional Double value.
      Parameters:
      value - the multidimensional Double value.
      Returns:
      a new Matrix containing value.
    • ofDouble

      public static Matrix ofDouble(double[][] value)
      Create a Matrix containing a multidimensional Double value.
      Parameters:
      value - the multidimensional Double value.
      Returns:
      a new Matrix containing value.
    • ofDouble

      public static Matrix ofDouble(Double[][][] value)
      Create a Matrix containing a multidimensional Double value.
      Parameters:
      value - the multidimensional Double value.
      Returns:
      a new Matrix containing value.
    • ofDouble

      public static Matrix ofDouble(double[][][] value)
      Create a Matrix containing a multidimensional Double value.
      Parameters:
      value - the multidimensional Double value.
      Returns:
      a new Matrix containing value.
    • ofString

      public static Matrix ofString(String[][] value)
      Create a Matrix containing a multidimensional String value.
      Parameters:
      value - the multidimensional String value.
      Returns:
      a new Matrix containing value.
    • ofString

      public static Matrix ofString(String[][][] value)
      Create a Matrix containing a multidimensional String value.
      Parameters:
      value - the multidimensional String value.
      Returns:
      a new Matrix containing value.
    • ofDateTime

      public static Matrix ofDateTime(DateTime[][] value)
      Create a Matrix containing a multidimensional DateTime value.
      Parameters:
      value - the multidimensional DateTime value.
      Returns:
      a new Matrix containing value.
    • ofDateTime

      public static Matrix ofDateTime(DateTime[][][] value)
      Create a Matrix containing a multidimensional DateTime value.
      Parameters:
      value - the multidimensional DateTime value.
      Returns:
      a new Matrix containing value.
    • ofGuid

      public static Matrix ofGuid(UUID[][] value)
      Create a Matrix containing a multidimensional Guid value.
      Parameters:
      value - the multidimensional Guid value.
      Returns:
      a new Matrix containing value.
    • ofGuid

      public static Matrix ofGuid(UUID[][][] value)
      Create a Matrix containing a multidimensional Guid value.
      Parameters:
      value - the multidimensional Guid value.
      Returns:
      a new Matrix containing value.
    • ofByteString

      public static Matrix ofByteString(ByteString[][] value)
      Create a Matrix containing a multidimensional ByteString value.
      Parameters:
      value - the multidimensional ByteString value.
      Returns:
      a new Matrix containing value.
    • ofByteString

      public static Matrix ofByteString(ByteString[][][] value)
      Create a Matrix containing a multidimensional ByteString value.
      Parameters:
      value - the multidimensional ByteString value.
      Returns:
      a new Matrix containing value.
    • ofXmlElement

      public static Matrix ofXmlElement(XmlElement[][] value)
      Create a Matrix containing a multidimensional XmlElement value.
      Parameters:
      value - the multidimensional XmlElement value.
      Returns:
      a new Matrix containing value.
    • ofXmlElement

      public static Matrix ofXmlElement(XmlElement[][][] value)
      Create a Matrix containing a multidimensional XmlElement value.
      Parameters:
      value - the multidimensional XmlElement value.
      Returns:
      a new Matrix containing value.
    • ofNodeId

      public static Matrix ofNodeId(NodeId[][] value)
      Create a Matrix containing a multidimensional NodeId value.
      Parameters:
      value - the multidimensional NodeId value.
      Returns:
      a new Matrix containing value.
    • ofNodeId

      public static Matrix ofNodeId(NodeId[][][] value)
      Create a Matrix containing a multidimensional NodeId value.
      Parameters:
      value - the multidimensional NodeId value.
      Returns:
      a new Matrix containing value.
    • ofExpandedNodeId

      public static Matrix ofExpandedNodeId(ExpandedNodeId[][] value)
      Create a Matrix containing a multidimensional ExpandedNodeId value.
      Parameters:
      value - the multidimensional ExpandedNodeId value.
      Returns:
      a new Matrix containing value.
    • ofExpandedNodeId

      public static Matrix ofExpandedNodeId(ExpandedNodeId[][][] value)
      Create a Matrix containing a multidimensional ExpandedNodeId value.
      Parameters:
      value - the multidimensional ExpandedNodeId value.
      Returns:
      a new Matrix containing value.
    • ofStatusCode

      public static Matrix ofStatusCode(StatusCode[][] value)
      Create a Matrix containing a multidimensional StatusCode value.
      Parameters:
      value - the multidimensional StatusCode value.
      Returns:
      a new Matrix containing value.
    • ofStatusCode

      public static Matrix ofStatusCode(StatusCode[][][] value)
      Create a Matrix containing a multidimensional StatusCode value.
      Parameters:
      value - the multidimensional StatusCode value.
      Returns:
      a new Matrix containing value.
    • ofQualifiedName

      public static Matrix ofQualifiedName(QualifiedName[][] value)
      Create a Matrix containing a multidimensional QualifiedName value.
      Parameters:
      value - the multidimensional QualifiedName value.
      Returns:
      a new Matrix containing value.
    • ofQualifiedName

      public static Matrix ofQualifiedName(QualifiedName[][][] value)
      Create a Matrix containing a multidimensional QualifiedName value.
      Parameters:
      value - the multidimensional QualifiedName value.
      Returns:
      a new Matrix containing value.
    • ofLocalizedText

      public static Matrix ofLocalizedText(LocalizedText[][] value)
      Create a Matrix containing a multidimensional LocalizedText value.
      Parameters:
      value - the multidimensional LocalizedText value.
      Returns:
      a new Matrix containing value.
    • ofLocalizedText

      public static Matrix ofLocalizedText(LocalizedText[][][] value)
      Create a Matrix containing a multidimensional LocalizedText value.
      Parameters:
      value - the multidimensional LocalizedText value.
      Returns:
      a new Matrix containing value.
    • ofExtensionObject

      public static Matrix ofExtensionObject(ExtensionObject[][] value)
      Create a Matrix containing a multidimensional ExtensionObject value.
      Parameters:
      value - the multidimensional ExtensionObject value.
      Returns:
      a new Matrix containing value.
    • ofExtensionObject

      public static Matrix ofExtensionObject(ExtensionObject[][][] value)
      Create a Matrix containing a multidimensional ExtensionObject value.
      Parameters:
      value - the multidimensional ExtensionObject value.
      Returns:
      a new Matrix containing value.
    • ofDataValue

      public static Matrix ofDataValue(DataValue[][] value)
      Create a Matrix containing a multidimensional DataValue value.
      Parameters:
      value - the multidimensional DataValue value.
      Returns:
      a new Matrix containing value.
    • ofDataValue

      public static Matrix ofDataValue(DataValue[][][] value)
      Create a Matrix containing a multidimensional DataValue value.
      Parameters:
      value - the multidimensional DataValue value.
      Returns:
      a new Matrix containing value.
    • ofVariant

      public static Matrix ofVariant(Variant[][] value)
      Create a Matrix containing a multidimensional Variant value.
      Parameters:
      value - the multidimensional Variant value.
      Returns:
      a new Matrix containing value.
    • ofVariant

      public static Matrix ofVariant(Variant[][][] value)
      Create a Matrix containing a multidimensional Variant value.
      Parameters:
      value - the multidimensional Variant value.
      Returns:
      a new Matrix containing value.
    • ofDiagnosticInfo

      public static Matrix ofDiagnosticInfo(DiagnosticInfo[][] value)
      Create a Matrix containing a multidimensional DiagnosticInfo value.
      Parameters:
      value - the multidimensional DiagnosticInfo value.
      Returns:
      a new Matrix containing value.
    • ofDiagnosticInfo

      public static Matrix ofDiagnosticInfo(DiagnosticInfo[][][] value)
      Create a Matrix containing a multidimensional DiagnosticInfo value.
      Parameters:
      value - the multidimensional DiagnosticInfo value.
      Returns:
      a new Matrix containing value.
    • ofEnum

      public static Matrix ofEnum(UaEnumeratedType[][] value)
      Create a Matrix containing a multidimensional UaEnumeratedType value.
      Parameters:
      value - the multidimensional UaEnumeratedType value.
      Returns:
      a new Matrix containing value.
    • ofEnum

      public static Matrix ofEnum(UaEnumeratedType[][][] value)
      Create a Matrix containing a multidimensional UaEnumeratedType value.
      Parameters:
      value - the multidimensional UaEnumeratedType value.
      Returns:
      a new Matrix containing value.
    • ofStruct

      public static Matrix ofStruct(UaStructuredType[][] value)
      Create a Matrix containing a multidimensional UaStructuredType value.
      Parameters:
      value - the multidimensional UaStructuredType value.
      Returns:
      a new Matrix containing value.
    • ofStruct

      public static Matrix ofStruct(UaStructuredType[][][] value)
      Create a Matrix containing a multidimensional UaStructuredType value.
      Parameters:
      value - the multidimensional UaStructuredType value.
      Returns:
      a new Matrix containing value.
    • ofOptionSetUI

      public static Matrix ofOptionSetUI(OptionSetUInteger<?>[][] value)
      Create a Matrix containing a multidimensional OptionSetUInteger value.
      Parameters:
      value - the multidimensional OptionSetUInteger value.
      Returns:
      a new Matrix containing value.
    • ofOptionSetUI

      public static Matrix ofOptionSetUI(OptionSetUInteger<?>[][][] value)
      Create a Matrix containing a multidimensional OptionSetUInteger value.
      Parameters:
      value - the multidimensional OptionSetUInteger value.
      Returns:
      a new Matrix containing value.