Class Entry

java.lang.Object
net.dzikoysk.cdn.model.Entry
All Implemented Interfaces:
Element<Piece>, NamedElement<Piece>

public class Entry extends Object
Represents key-value relation of String and Piece
  • Field Details

    • description

      protected final List<? extends String> description
    • name

      protected final String name
    • value

      protected Piece value
  • Constructor Details

  • Method Details

    • getRecord

      public String getRecord()
      Get entry as 'key: value' text.
      Returns:
      entry as string
    • getRaw

      public String getRaw()
      Get raw representation of entry
      Returns:
      raw record
    • getPieceValue

      public String getPieceValue()
      Get unit's value using Piece.getValue() method.
      Returns:
      the unit's value
    • toString

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

      public void setValue(Piece value)
    • getDescription

      public List<? extends String> getDescription()
      Specified by:
      getDescription in interface Element<T>
    • getValue

      public Piece getValue()
      Specified by:
      getValue in interface Element<T>
    • getName

      public String getName()
      Description copied from interface: NamedElement
      The name of element
      Specified by:
      getName in interface NamedElement<T>
      Returns:
      element name