# Record Class PolymorphicColumnType

java.lang.Object
java.lang.Record
com.snmp4j.smi.polymorphic.PolymorphicColumnType

Record Components:
  `typeColumnOID` - OID of the column that defines the polymorphic column type.
  `variableColumnOIDToSyntaxMap` - Mapping of variable values of the column type to their corresponding syntaxes for the polymorphic column.

All Implemented Interfaces:
  `Comparable<org.snmp4j.smi.OID>`

public record PolymorphicColumnType(org.snmp4j.smi.OID typeColumnOID, Map<org.snmp4j.smi.Variable, SmiSyntax> variableColumnOIDToSyntaxMap) extends Record implements Comparable<org.snmp4j.smi.OID>
Represents a polymorphic column type to variable format mapping in a polymorphic table.

Since:
  2.0.0
Author:
  Frank Fock

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PolymorphicColumnType(org.snmp4j.smi.OID typeColumnOID, Map<org.snmp4j.smi.Variable, SmiSyntax> variableColumnOIDToSyntaxMap)`
  Creates a new polymorphic column type.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(org.snmp4j.smi.OID o)`
  `boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `int`
  `hashCode()`
  Returns a hash code value for this object.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `org.snmp4j.smi.OID`
  `typeColumnOID()`
  Gets the OID of the column that defines the polymorphic column type.
  `Map<org.snmp4j.smi.Variable, SmiSyntax>`
  `variableColumnOIDToSyntaxMap()`
  Gets the mapping of variable values of the column type to their corresponding syntaxes for the polymorphic column.

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### PolymorphicColumnType

    public PolymorphicColumnType(org.snmp4j.smi.OID typeColumnOID, Map<org.snmp4j.smi.Variable, SmiSyntax> variableColumnOIDToSyntaxMap)
    Creates a new polymorphic column type.
    Parameters:
      `typeColumnOID` - OID of the column that defines the polymorphic column type.
      `variableColumnOIDToSyntaxMap` - Mapping of variable values of the column type to their corresponding syntaxes for the polymorphic column.

- ## Method Details

  - ### typeColumnOID

    public org.snmp4j.smi.OID typeColumnOID()
    Gets the OID of the column that defines the polymorphic column type.
    Returns:
      the OID of the column that defines the polymorphic column type.

  - ### variableColumnOIDToSyntaxMap

    public Map<org.snmp4j.smi.Variable, SmiSyntax> variableColumnOIDToSyntaxMap()
    Gets the mapping of variable values of the column type to their corresponding syntaxes for the polymorphic column.
    Returns:
      a mapping of variable values to syntaxes.

  - ### compareTo

    public int compareTo(org.snmp4j.smi.OID o)
    Specified by:
      `compareTo` in interface `Comparable<org.snmp4j.smi.OID>`

  - ### 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.

  - ### hashCode

    public 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

  - ### 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