temp.txt created online with Bitbucket

This commit is contained in:
SWG Source
2018-03-23 16:07:37 -07:00
committed by CekisSWG
parent e8c5b66956
commit f52aebcfb1
82555 changed files with 1 additions and 4633262 deletions
@@ -1,33 +0,0 @@
/*
Title: collections.java
Description: adds functionality similar to the java.util.Collections class
*/
package script;
import java.util.HashMap;
import java.util.Map;
public class collections
{
/**
* Creates a new Map from two parallel arrays. The arrays must be non-null and of the same length.
* The data in the keys array must be non-null, but the values data may be null.
*
* @return the mapping of the keys to the values, or null on error
*/
public static Map newMap(Object[] keys, Object[] values)
{
if ( keys == null || values == null || keys.length != values.length )
return null;
Map map = new HashMap(keys.length);
for ( int i = 0; i < keys.length; ++i )
{
if ( keys[i] == null )
return null;
map.put(keys[i], values[i]);
}
return map;
}
}