001package jmri.jmrix; 002 003/** 004 * Interface for classes that translate @Ref{Message} objects into strings 005 * 006 * @author Paul Bender Copyright (C) 2024 007 */ 008public interface MessageFormatter { 009 010 /** 011 * Determine if this formatter can handle the message 012 * @param m message to check 013 * @return true if this formatter can handle the message 014 */ 015 public boolean handlesMessage(Message m); 016 017 /** 018 * Format the message into a string 019 * @param m message to format 020 * @return formatted string 021 */ 022 public String formatMessage(Message m); 023 024}