@Test public void testEquals() { BotID bot0blue = BotID.createBotId(0, ETeamColor.BLUE); BotID bot0blueTigers = BotID.createBotId(0, ETeamColor.BLUE); BotID bot0Yellow = BotID.createBotId(0, ETeamColor.YELLOW); BotID bot1blue = BotID.createBotId(1, ETeamColor.BLUE); BotID bot2blueTigers = BotID.createBotId(2, ETeamColor.BLUE); BotID bot2blueOpponents = BotID.createBotId(2, ETeamColor.BLUE); BotID bot3blueTigers = BotID.createBotId(3, ETeamColor.BLUE); BotID bot3yellowTigers = BotID.createBotId(3, ETeamColor.YELLOW); Assert.assertTrue(bot0blue.equals(bot0blue)); Assert.assertTrue(bot0blueTigers.equals(bot0blueTigers)); Assert.assertTrue(bot0Yellow.equals(bot0Yellow)); Assert.assertTrue(bot1blue.equals(bot1blue)); Assert.assertTrue(bot2blueTigers.equals(bot2blueTigers)); Assert.assertTrue(bot2blueOpponents.equals(bot2blueOpponents)); Assert.assertTrue(bot3blueTigers.equals(bot3blueTigers)); Assert.assertTrue(bot3yellowTigers.equals(bot3yellowTigers)); Assert.assertTrue(bot2blueTigers.equals(bot2blueOpponents)); Assert.assertTrue(bot0blueTigers.equals(bot0blue)); Assert.assertTrue(bot0blue.equals(bot0blueTigers)); Assert.assertFalse(bot0blue.equals(bot0Yellow)); Assert.assertFalse(bot0blue.equals(bot1blue)); Assert.assertFalse(bot0blue.equals(bot2blueTigers)); Assert.assertFalse(bot1blue.equals(bot2blueTigers)); Assert.assertFalse(bot2blueOpponents.equals(bot3blueTigers)); Assert.assertFalse(bot2blueOpponents.equals(bot3yellowTigers)); Assert.assertFalse(bot3blueTigers.equals(bot3yellowTigers)); }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } BotID other = (BotID) obj; return teamColor == other.teamColor; }
BotID extends AObjectID { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } BotID other = (BotID) obj; return teamColor == other.teamColor; } }
BotID extends AObjectID { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } BotID other = (BotID) obj; return teamColor == other.teamColor; } private  BotID(); private  BotID(final int number, final ETeamColor color); }
BotID extends AObjectID { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } BotID other = (BotID) obj; return teamColor == other.teamColor; } private  BotID(); private  BotID(final int number, final ETeamColor color); static BotID noBot(); static BotID createBotId(final int number, final ETeamColor color); static BotID createBotIdFromIdWithColorOffsetBS(final int number); @Override String toString(); @Override String getSaveableString(); int getNumberWithColorOffset(); int getNumberWithColorOffsetBS(); final ETeamColor getTeamColor(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override int compareTo(final AObjectID o); static Comparator<BotID> getComparator(); static Collection<BotID> getAllYellow(); static Collection<BotID> getAllBlue(); static Collection<BotID> getAll(); static Collection<BotID> getAll(final ETeamColor color); }
BotID extends AObjectID { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } BotID other = (BotID) obj; return teamColor == other.teamColor; } private  BotID(); private  BotID(final int number, final ETeamColor color); static BotID noBot(); static BotID createBotId(final int number, final ETeamColor color); static BotID createBotIdFromIdWithColorOffsetBS(final int number); @Override String toString(); @Override String getSaveableString(); int getNumberWithColorOffset(); int getNumberWithColorOffsetBS(); final ETeamColor getTeamColor(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override int compareTo(final AObjectID o); static Comparator<BotID> getComparator(); static Collection<BotID> getAllYellow(); static Collection<BotID> getAllBlue(); static Collection<BotID> getAll(); static Collection<BotID> getAll(final ETeamColor color);  }