@Test public void testIsIn(){ Assert.assertTrue(ArthasCheckUtils.isIn(1,1,2,3)); Assert.assertFalse(ArthasCheckUtils.isIn(1,2,3,4)); Assert.assertTrue(ArthasCheckUtils.isIn(null,1,null,2)); Assert.assertFalse(ArthasCheckUtils.isIn(1,null)); Assert.assertTrue(ArthasCheckUtils.isIn(1L,1L,2L,3L)); Assert.assertFalse(ArthasCheckUtils.isIn(1L,2L,3L,4L)); Assert.assertTrue(ArthasCheckUtils.isIn("foo","foo","bar")); Assert.assertFalse(ArthasCheckUtils.isIn("foo","bar","goo")); }
public static <E> boolean isIn(E e, E... s) { if (null != s) { for (E es : s) { if (isEquals(e, es)) { return true; } } } return false; }
ArthasCheckUtils { public static <E> boolean isIn(E e, E... s) { if (null != s) { for (E es : s) { if (isEquals(e, es)) { return true; } } } return false; } }
ArthasCheckUtils { public static <E> boolean isIn(E e, E... s) { if (null != s) { for (E es : s) { if (isEquals(e, es)) { return true; } } } return false; }  }
ArthasCheckUtils { public static <E> boolean isIn(E e, E... s) { if (null != s) { for (E es : s) { if (isEquals(e, es)) { return true; } } } return false; }  static boolean isIn(E e, E... s); static boolean isEquals(E src, E target); }
ArthasCheckUtils { public static <E> boolean isIn(E e, E... s) { if (null != s) { for (E es : s) { if (isEquals(e, es)) { return true; } } } return false; }  static boolean isIn(E e, E... s); static boolean isEquals(E src, E target);  }