Class AttributeImpl

java.lang.Object
io.debezium.relational.AttributeImpl
All Implemented Interfaces:
Attribute

final class AttributeImpl extends Object implements Attribute
Relational model implementation of Attribute.
Author:
Chris Cranford
  • Field Details

    • name

      private final String name
    • value

      private final String value
  • Constructor Details

    • AttributeImpl

      public AttributeImpl(String name, String value)
  • Method Details

    • name

      public String name()
      Description copied from interface: Attribute
      The attribute name.
      Specified by:
      name in interface Attribute
      Returns:
      the name of the attribute, never null
    • value

      public String value()
      Description copied from interface: Attribute
      The attribute value.
      Specified by:
      value in interface Attribute
      Returns:
      the value of the attribute, may be null
    • asString

      public String asString()
      Description copied from interface: Attribute
      Get the attribute value as a string value.
      Specified by:
      asString in interface Attribute
      Returns:
      the attribute value converted to a String, may be null
    • asInteger

      public Integer asInteger()
      Description copied from interface: Attribute
      Get the attribute value as an integer value.
      Specified by:
      asInteger in interface Attribute
      Returns:
      the attribute value converted to an Integer, may be null
    • asLong

      public Long asLong()
      Description copied from interface: Attribute
      Get the attribute value as a long value.
      Specified by:
      asLong in interface Attribute
      Returns:
      the attribute value converted to a Long, may be null
    • asBoolean

      public Boolean asBoolean()
      Description copied from interface: Attribute
      Get the attribute value as a boolean value. This conversion is based on Boolean.parseBoolean(String) semantics.
      Specified by:
      asBoolean in interface Attribute
      Returns:
      the attribute value converted to a Boolean, may be null
    • asBigInteger

      public BigInteger asBigInteger()
      Description copied from interface: Attribute
      Get the attribute value as a big integer value.
      Specified by:
      asBigInteger in interface Attribute
      Returns:
      the attribute value converted to a BigInteger, may be null
    • asBigDecimal

      public BigDecimal asBigDecimal()
      Description copied from interface: Attribute
      Get the attribute value as a big decimal value.
      Specified by:
      asBigDecimal in interface Attribute
      Returns:
      the attribute value converted to a BigDecimal, may be null
    • asFloat

      public Float asFloat()
      Description copied from interface: Attribute
      Get the attribute value as a float value.
      Specified by:
      asFloat in interface Attribute
      Returns:
      the attribute value converted to a Float, may be null
    • asDouble

      public Double asDouble()
      Description copied from interface: Attribute
      Get the attribute value as a double value.
      Specified by:
      asDouble in interface Attribute
      Returns:
      the attribute value converted to a Double, may be null
    • equals

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

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

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

      public AttributeEditor edit()
      Description copied from interface: Attribute
      Obtain an editor that contains the same information as this attribute.
      Specified by:
      edit in interface Attribute
      Returns:
      the editor; never null