1 package au.gov.amsa.ais.message; 2 3 import au.gov.amsa.ais.AisMessage; 4 5 public class AisMessageOther implements AisMessage { 6 7 private final int messageId; 8 private final String source; 9 10 public AisMessageOther(int messageId, int padBits) { 11 this(messageId, null, padBits); 12 } 13 14 public AisMessageOther(int messageId, String source, int padBits) { 15 this.messageId = messageId; 16 this.source = source; 17 } 18 19 @Override 20 public int getMessageId() { 21 return messageId; 22 } 23 24 @Override 25 public String getSource() { 26 return source; 27 } 28 29 @Override 30 public String toString() { 31 StringBuilder builder = new StringBuilder(); 32 builder.append("AisMessageOther [messageId="); 33 builder.append(messageId); 34 builder.append(", source="); 35 builder.append(source); 36 builder.append("]"); 37 return builder.toString(); 38 } 39 40 }