@Test public void keyNotNull() { assertThat(message.getKey(), notNullValue()); }
@Override public MessageKey getKey() { if(super.getKey() == null) { HashMap<String, Object> key = new HashMap<>(); key.put(BUS_KEY, getBusId()); key.put(ID_KEY, getId()); setKey(new MessageKey(key)); } return super.getKey(); }
CanMessage extends KeyedMessage { @Override public MessageKey getKey() { if(super.getKey() == null) { HashMap<String, Object> key = new HashMap<>(); key.put(BUS_KEY, getBusId()); key.put(ID_KEY, getId()); setKey(new MessageKey(key)); } return super.getKey(); } }
CanMessage extends KeyedMessage { @Override public MessageKey getKey() { if(super.getKey() == null) { HashMap<String, Object> key = new HashMap<>(); key.put(BUS_KEY, getBusId()); key.put(ID_KEY, getId()); setKey(new MessageKey(key)); } return super.getKey(); } CanMessage(int canBus, int id, byte[] data); protected  CanMessage(Parcel in); }
CanMessage extends KeyedMessage { @Override public MessageKey getKey() { if(super.getKey() == null) { HashMap<String, Object> key = new HashMap<>(); key.put(BUS_KEY, getBusId()); key.put(ID_KEY, getId()); setKey(new MessageKey(key)); } return super.getKey(); } CanMessage(int canBus, int id, byte[] data); protected  CanMessage(Parcel in); int getBusId(); int getId(); byte[] getData(); @Override MessageKey getKey(); static boolean containsRequiredFields(Set<String> fields); @Override int compareTo(VehicleMessage other); @Override boolean equals(Object obj); @Override String toString(); @Override void writeToParcel(Parcel out, int flags); @Override void readFromParcel(Parcel in); }
CanMessage extends KeyedMessage { @Override public MessageKey getKey() { if(super.getKey() == null) { HashMap<String, Object> key = new HashMap<>(); key.put(BUS_KEY, getBusId()); key.put(ID_KEY, getId()); setKey(new MessageKey(key)); } return super.getKey(); } CanMessage(int canBus, int id, byte[] data); protected  CanMessage(Parcel in); int getBusId(); int getId(); byte[] getData(); @Override MessageKey getKey(); static boolean containsRequiredFields(Set<String> fields); @Override int compareTo(VehicleMessage other); @Override boolean equals(Object obj); @Override String toString(); @Override void writeToParcel(Parcel out, int flags); @Override void readFromParcel(Parcel in);  }