Public MustInherit Class Chain
  Protected chn As Chain
  Private hasLink As Boolean
  '-----
  Public Sub New()
    hasLink = False
  End Sub
  '-----
  Public Sub addChain(ByVal c As Chain)
    chn = c
    hasLink = True  'Zaznacz, że istnieje
  End Sub
  '-----
  'Poniższa metoda musi być implementowana przez klasy pochodne    
  Public MustOverride Sub sendToChain(ByVal mesg As String)
  '-----
  Public Function getChain() As Chain
    Return chn
  End Function
  '-----
  Public Function hasChain() As Boolean
    Return hasLink
  End Function
End Class
