本文整理了Java中edu.emory.mathcs.backport.java.util.Arrays.equals()
方法的一些代码示例,展示了Arrays.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arrays.equals()
方法的具体详情如下:
包路径:edu.emory.mathcs.backport.java.util.Arrays
类名称:Arrays
方法名:equals
暂无
代码示例来源:origin: backport-util-concurrent/backport-util-concurrent
deepEquals((Object[])e1, (Object[])e2) :
(e1 instanceof byte[] && e2 instanceof byte[]) ?
equals((byte[])e1, (byte[])e2) :
(e1 instanceof short[] && e2 instanceof short[]) ?
equals((short[])e1, (short[])e2) :
(e1 instanceof int[] && e2 instanceof int[]) ?
equals((int[])e1, (int[])e2) :
代码示例来源:origin: edu.emory.mathcs.backport/com.springsource.edu.emory.mathcs.backport
deepEquals((Object[])e1, (Object[])e2) :
(e1 instanceof byte[] && e2 instanceof byte[]) ?
equals((byte[])e1, (byte[])e2) :
(e1 instanceof short[] && e2 instanceof short[]) ?
equals((short[])e1, (short[])e2) :
(e1 instanceof int[] && e2 instanceof int[]) ?
equals((int[])e1, (int[])e2) :
代码示例来源:origin: backport-util-concurrent/backport-util-concurrent-java12
deepEquals((Object[])e1, (Object[])e2) :
(e1 instanceof byte[] && e2 instanceof byte[]) ?
equals((byte[])e1, (byte[])e2) :
(e1 instanceof short[] && e2 instanceof short[]) ?
equals((short[])e1, (short[])e2) :
(e1 instanceof int[] && e2 instanceof int[]) ?
equals((int[])e1, (int[])e2) :
代码示例来源:origin: DirectProject/nhin-d
@Test
public void testGetSetKeysFromByteArray() throws Exception
{
BootstrappedKeyStoreProtectionManager mgr = new BootstrappedKeyStoreProtectionManager();
mgr.setKeyStoreProtectionKey("1234".getBytes());
mgr.setPrivateKeyProtectionKey("5678".getBytes());
assertTrue(Arrays.equals("1234".getBytes(), mgr.getKeyStoreProtectionKey().getEncoded()));
assertTrue(Arrays.equals("5678".getBytes(), mgr.getPrivateKeyProtectionKey().getEncoded()));
}
代码示例来源:origin: DirectProject/nhin-d
@Test
public void testGetAllKeys() throws Exception
{
BootstrappedKeyStoreProtectionManager mgr = new BootstrappedKeyStoreProtectionManager();
mgr.setKeyStoreProtectionKey("1234");
mgr.setPrivateKeyProtectionKey("5678");
final Map<String, Key> keys = mgr.getAllKeys();
assertEquals(2, keys.size());
Iterator<Entry<String, Key>> entryIter = keys.entrySet().iterator();
Key key = entryIter.next().getValue();
assertTrue(Arrays.equals("5678".getBytes(), key.getEncoded()));
key = entryIter.next().getValue();
assertTrue(Arrays.equals("1234".getBytes(), key.getEncoded()));
}
}
代码示例来源:origin: DirectProject/nhin-d
@Test
public void testGetSetKeysFromString() throws Exception
{
BootstrappedKeyStoreProtectionManager mgr = new BootstrappedKeyStoreProtectionManager();
mgr.setKeyStoreProtectionKey("1234");
mgr.setPrivateKeyProtectionKey("5678");
assertTrue(Arrays.equals("1234".getBytes(), mgr.getKeyStoreProtectionKey().getEncoded()));
assertTrue(Arrays.equals("5678".getBytes(), mgr.getPrivateKeyProtectionKey().getEncoded()));
}
内容来源于网络,如有侵权,请联系作者删除!