hash code and stump of map
This commit is contained in:
1 parent
b6fe264a76
commit
8b7b285503
12 files changed
+125
-5
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package carpet.script.value;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
public class MapValue extends AbstractListValue
|
||||
{
|
||||
private Map<Value, Value> map;
|
||||
public MapValue()
|
||||
{
|
||||
map = new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<Value> iterator()
|
||||
{
|
||||
return map.keySet().iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString()
|
||||
{
|
||||
return Arrays.toString(map.entrySet().toArray());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean()
|
||||
{
|
||||
return !map.isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user