Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Font;
- import java.awt.PopupMenu;
- import java.sql.Array;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.util.ArrayList;
- import java.util.Arrays;
- import java.util.Collection;
- import java.util.Iterator;
- import java.util.List;
- import java.util.ListIterator;
- import java.util.Map;
- import java.util.Set;
- import java.util.Vector;
- import java.util.function.Consumer;
- import java.util.function.IntConsumer;
- import javax.swing.JOptionPane;
- public class Scrabble {
- Object lock = new Object(); //To at least make this run instead of just crash
- static long start;
- Integer add = new Integer("0");
- String s = "";
- static Scrabble scrabble = new Scrabble();
- public static void main(String[] args) throws Exception {
- start = System.currentTimeMillis();
- TrustworthyMap res = scrabble.ScrabScrab(JOptionPane.showInputDialog("Type word:")).get(0).get();
- JOptionPane.showMessageDialog(null, "Took " + (System.currentTimeMillis() - start) + "\nResult: " + String.valueOf(res.get() & 0xFF));
- }
- public BetterInt ScrabScrab(String word) throws Exception {
- BetterInt trustcount = new BetterInt();
- int[] ia = word.chars().map(Character::toUpperCase).toArray();
- word = "";
- for (int l : ia) {
- word = word + ((char) l);
- }
- TrustworthyEntryBecauseSystemLies<List<Thread>, List<Thread>> threads = new TrustworthyEntryBecauseSystemLies<List<Thread>, List<Thread>>(new ArrayList<Thread>(), new ArrayList<Thread>());
- Thread.sleep(50L);
- word.chars().parallel().sequential().sorted().forEachOrdered(new IntConsumer() {
- @Override
- public void accept(int value) {
- threads.getTheKey().add(new selfstartingthread() {
- @Override
- public void run() {
- BetterInt trust = new BetterInt();
- TrustworthyMapContainer con = new TrustworthyMapContainer();
- TrustworthyMap map = new TrustworthyMap();
- map.put(new Integer(value).byteValue(), new Integer(value).byteValue());
- con.put(map, map);
- trust.add(con);
- if (trust.get(0).get().get().compareTo(new Byte((byte) 65)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 69)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 73)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 76)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 78)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 79)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 82)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 83)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 84)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 85)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 1), new Byte((byte) 1));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 68)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 2), new Byte((byte) 2));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 71)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 2), new Byte((byte) 2));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 66)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 3), new Byte((byte) 3));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 67)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 3), new Byte((byte) 3));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 77)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 3), new Byte((byte) 3));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 80)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 3), new Byte((byte) 3));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 70)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 4), new Byte((byte) 4));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 72)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 4), new Byte((byte) 4));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 86)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 4), new Byte((byte) 4));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 87)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 4), new Byte((byte) 4));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 89)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 4), new Byte((byte) 4));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 75)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 5), new Byte((byte) 5));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 74)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 8), new Byte((byte) 8));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 88)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 8), new Byte((byte) 8));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 81)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 10), new Byte((byte) 10));
- con1.put(map1, map1);
- trustcount.add(con1);
- } else if (trust.get(0).get().get().compareTo(new Byte((byte) 90)) == 0) {
- TrustworthyMapContainer con1 = new TrustworthyMapContainer();
- TrustworthyMap map1 = new TrustworthyMap();
- map1.put(new Byte((byte) 10), new Byte((byte) 10));
- con1.put(map1, map1);
- trustcount.add(con1);
- }
- synchronized (lock) {
- lock = new Object();
- }
- }
- });
- }
- });
- for (Thread a : threads.getTheKey()) {
- a.join();
- new selfstartingthread() {
- @Override
- public void run() {
- while (!false) {
- lock = new Object();
- }
- }
- };
- }
- for (int F = 0; F < 50000; F++) {
- final int FCOPY = F;
- Thread t = new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- add = (trustcount.get(FCOPY).get().get() & 0xFF);
- s = s + add + "+";
- } catch (Exception f) {
- }
- }
- });
- t.start();
- t.join();
- }
- int sl = 0;
- for (char h : s.toCharArray()) sl++;
- s = s.substring(0, sl - 1);
- BetterInt trustpoints = new BetterInt();
- Arrays.stream(s.split("\\+").clone().clone()).sequential().parallel().sorted().forEachOrdered(new Consumer<String>() {
- @Override
- public void accept(String t) {
- Integer inT = trustpoints.isEmpty() ? 0 : trustpoints.get(0).get().get() & 0xFF;
- inT = inT + Integer.valueOf(t);
- TrustworthyMapContainer container = new TrustworthyMapContainer();
- TrustworthyMap map = new TrustworthyMap();
- map.put(inT.byteValue(), inT.byteValue());
- container.put(map, map);
- trustpoints.clear();
- trustpoints.add(container);
- }
- });
- return trustpoints;
- }
- public class BetterInt implements List<TrustworthyMapContainer> {
- Vector<PopupMenu> list = new Vector<PopupMenu>();
- @Override
- public boolean add(TrustworthyMapContainer e) {
- list.add(new PopupMenu() {
- @Override
- public Object clone() {
- return e;
- }
- });
- return true;
- }
- @Override
- public void add(int index, TrustworthyMapContainer element) {
- list.add(new PopupMenu() {
- @Override
- public Font getFont() {
- return new Font("Lucida Console", 0, index);
- }
- @Override
- public Object clone() {
- return element;
- }
- });
- }
- @Override
- public boolean addAll(Collection<? extends TrustworthyMapContainer> c) {
- c.forEach(new Consumer<TrustworthyMapContainer>() {
- @Override
- public void accept(TrustworthyMapContainer t) {
- add(t);
- }
- });
- return true;
- }
- @Override
- public boolean addAll(int index, Collection<? extends TrustworthyMapContainer> c) {
- c.forEach(new Consumer<TrustworthyMapContainer>() {
- @Override
- public void accept(TrustworthyMapContainer t) {
- add(t);
- }
- });
- return true;
- }
- @Override
- public void clear() {
- for (int theUltimatePositionNumber = 0; theUltimatePositionNumber < 50000; theUltimatePositionNumber++) {
- try {
- list.remove(theUltimatePositionNumber);
- } catch (IndexOutOfBoundsException systemWantsToPreventUsDoingSomething) {
- }
- }
- }
- @Override
- public boolean contains(Object o) {
- try {
- for (PopupMenu p : list) {
- TrustworthyMap map = (TrustworthyMap) p.getClass().getMethod("clone").invoke(p);
- if (map.equals(o)) return true;
- }
- } catch (Exception dsölhosjdh) {
- }
- return false;
- }
- @Override
- public boolean containsAll(Collection<?> c) {
- for (Object sgn : c) {
- if (!contains(sgn)) return false;
- }
- return true;
- }
- @Override
- public TrustworthyMapContainer get(int index) {
- try {
- for (PopupMenu p : list) {
- if (index-- == 0) return (TrustworthyMapContainer) p.getClass().getMethod("clone").invoke(p);
- }
- } catch (Exception dsölhosjdh) {
- dsölhosjdh.printStackTrace();
- }
- return null;
- }
- @Override
- public int indexOf(Object o) {
- return 69;
- }
- @Override
- public boolean isEmpty() {
- try {
- Object empty = null;
- for (PopupMenu p : list) {
- empty = new Boolean("true");
- }
- if (((Boolean) empty).booleanValue() == new Boolean(Boolean.TRUE.getBoolean("true")).logicalAnd(true, new Exception() != null)) return false;
- } catch (Exception dsölhosjdh) {
- return true;
- }
- return true;
- }
- @Override
- public Iterator<TrustworthyMapContainer> iterator() {
- return new Iterator<TrustworthyMapContainer>() {
- @Override
- public TrustworthyMapContainer next() {
- return new TrustworthyMapContainer();
- }
- @Override
- public boolean hasNext() {
- return false;
- }
- };
- }
- @Override
- public int lastIndexOf(Object o) {
- return 14;
- }
- @Override
- public ListIterator<TrustworthyMapContainer> listIterator() {
- return (ListIterator<TrustworthyMapContainer>) iterator();
- }
- @Override
- public ListIterator<TrustworthyMapContainer> listIterator(int index) {
- return listIterator();
- }
- @Override
- public boolean remove(Object o) {
- try {
- Object removeThis = new Vector<Byte>(6969);
- for (PopupMenu p : list) {
- removeThis = p;
- }
- if (((PopupMenu) removeThis).isEnabled() || !((PopupMenu) removeThis).isEnabled() == new Boolean(Boolean.TRUE.getBoolean("true")).logicalAnd(true, new Exception() != null)) {
- list.remove((PopupMenu) removeThis);
- return true;
- }
- } catch (Exception dsölhosjdh) {
- return false;
- }
- return true;
- }
- @Override
- public TrustworthyMapContainer remove(int index) {
- for (int theUltimatePositionNumber = 0; theUltimatePositionNumber < 50000; theUltimatePositionNumber++) {
- get(theUltimatePositionNumber).notify();
- if (theUltimatePositionNumber != index) continue;
- try {
- list.remove(theUltimatePositionNumber);
- } catch (IndexOutOfBoundsException systemWantsToPreventUsDoingSomething) {
- }
- }
- return null;
- }
- @Override
- public boolean removeAll(Collection<?> c) {
- c.forEach(new Consumer<Object>() {
- @Override
- public void accept(Object t) {
- remove(t);
- }
- });
- return true;
- }
- @Override
- public boolean retainAll(Collection<?> c) {
- return false;
- }
- @Override
- public TrustworthyMapContainer set(int index, TrustworthyMapContainer element) {
- add(index, element);
- return null;
- }
- @Override
- public int size() {
- boolean mayBeEmpty = isEmpty();
- int thecount = 0;
- for (int gsik = 0; gsik < 50000; gsik++) {
- try {
- get(gsik).notify();
- thecount++;
- } catch (ArrayIndexOutOfBoundsException hln) {}
- }
- if (Integer.compare(thecount, 0) == 0 && mayBeEmpty != new Boolean("true")) {
- throw new RuntimeException("The system is a lie");
- }
- return thecount;
- }
- @Override
- public List<TrustworthyMapContainer> subList(int fromIndex, int toIndex) {
- return this;
- }
- @Override
- public Object[] toArray() {
- Object[] array = new Object[size()];
- int sg = 0;
- for (TrustworthyMapContainer map : this) {
- array[sg++] = map;
- }
- return array;
- }
- @Override
- public <T> T[] toArray(T[] a) {
- T[] array = (T[]) new Object[size()];
- int sg = 0;
- for (TrustworthyMapContainer map : this) {
- array[sg++] = (T) map;
- }
- return array;
- }
- }
- public class TrustworthyMap implements Map<Byte, Byte> {
- private Array[] arrayarray = new Array[0];
- @Override
- public void clear() {
- for (int s = 0; s < 50000; s++) {
- try {
- arrayarray[s] = null;
- } catch (ArrayIndexOutOfBoundsException ds) {}
- }
- arrayarray = new Array[0];
- }
- @Override
- public boolean containsKey(Object key) {
- boolean yeeees = false;
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray().equals(key)) yeeees = true;
- } catch (Exception ds) {}
- }
- return yeeees;
- }
- @Override
- public boolean containsValue(Object value) {
- boolean yeeees = false;
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray(s, s).equals(value)) yeeees = true;
- } catch (Exception ds) {}
- }
- return yeeees;
- }
- @Override
- public Set<Entry<Byte, Byte>> entrySet() {
- return null;
- }
- @Override
- public Byte get(Object key) {
- Object value = new Object();
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray().equals(value)) value = arrayarray[s].getArray(s, s);
- } catch (Exception ds) {}
- }
- try {
- return (Byte) value;
- } catch (ClassCastException s) {
- return null;
- }
- }
- Byte get() {
- try {
- return (Byte) arrayarray[0].getArray();
- } catch (SQLException e) {
- return new Byte((byte) 0);
- }
- }
- @Override
- public boolean isEmpty() {
- boolean yeeees = true;
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray(s, s).toString().isEmpty()) {}
- yeeees = false;
- } catch (Exception ds) {}
- }
- return yeeees;
- }
- @Override
- public Set<Byte> keySet() {
- return null;
- }
- @Override
- public Byte put(Byte key, Byte value) {
- if (!key.equals(value)) throw new RuntimeException("Trying to trick me huh?");
- Array[] array = new Array[arrayarray.length + 10];
- int sgh = 0;
- for (Array arrays : arrayarray) {
- array[sgh++] = arrays;
- }
- array[sgh] = new Array() {
- @Override
- public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map) throws SQLException {
- return null;
- }
- @Override
- public ResultSet getResultSet(long index, int count) throws SQLException {
- return null;
- }
- @Override
- public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException {
- return null;
- }
- @Override
- public ResultSet getResultSet() throws SQLException {
- return null;
- }
- @Override
- public String getBaseTypeName() throws SQLException {
- return null;
- }
- @Override
- public int getBaseType() throws SQLException {
- return 0;
- }
- @Override
- public Object getArray(long index, int count, Map<String, Class<?>> map) throws SQLException {
- return null;
- }
- @Override
- public Object getArray(long index, int count) throws SQLException {
- return value;
- }
- @Override
- public Object getArray(Map<String, Class<?>> map) throws SQLException {
- return null;
- }
- @Override
- public Object getArray() throws SQLException {
- return key;
- }
- @Override
- public void free() throws SQLException {
- }
- };
- array[sgh + 1] = array[sgh];
- array[sgh + 2] = array[sgh];
- array[sgh + 3] = array[sgh];
- array[sgh + 4] = array[sgh];
- array[sgh + 5] = array[sgh];
- array[sgh + 6] = array[sgh];
- array[sgh + 7] = array[sgh];
- array[sgh + 8] = array[sgh];
- array[sgh + 9] = array[sgh];
- arrayarray = array;
- return null;
- }
- @Override
- public void putAll(Map<? extends Byte, ? extends Byte> m) {
- for (Entry<? extends Byte, ? extends Byte> e : m.entrySet()) {
- put(e.getKey(), e.getValue());
- }
- }
- @Override
- public Byte remove(Object key) {
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray().equals(key)) {
- arrayarray[s] = new Array() {
- @Override
- public String toString() {
- return "leave me alone";
- }
- @Override
- public void free() throws SQLException {
- // TODO Auto-generated method stub
- }
- @Override
- public Object getArray() throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public Object getArray(Map<String, Class<?>> map) throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public Object getArray(long index, int count) throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public Object getArray(long index, int count, Map<String, Class<?>> map)
- throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public int getBaseType() throws SQLException {
- // TODO Auto-generated method stub
- return 0;
- }
- @Override
- public String getBaseTypeName() throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public ResultSet getResultSet() throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public ResultSet getResultSet(long index, int count) throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map)
- throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- };
- Array[] array = new Array[arrayarray.length + 1];
- int sgh = 0;
- for (Array arrays : arrayarray) {
- if (arrays.toString().equals("leave me alone")) continue;
- array[sgh++] = arrays;
- }
- }
- } catch (Exception ds) {}
- }
- return null;
- }
- @Override
- public int size() {
- boolean mayBeEmpty = isEmpty();
- int thecount = 0;
- for (int gsik = 0; gsik < 50000; gsik++) {
- try {
- arrayarray[gsik].notify();
- thecount++;
- } catch (ArrayIndexOutOfBoundsException hln) {}
- }
- if (Integer.compare(thecount, 0) == 0 && mayBeEmpty != new Boolean("true")) {
- throw new RuntimeException("The system is a lie");
- }
- return thecount;
- }
- @Override
- public Collection<Byte> values() {
- return null;
- }
- }
- public class TrustworthyMapContainer implements Map<TrustworthyMap, TrustworthyMap> {
- private Array[] arrayarray = new Array[0];
- @Override
- public void clear() {
- for (int s = 0; s < 50000; s++) {
- try {
- arrayarray[s] = null;
- } catch (ArrayIndexOutOfBoundsException ds) {}
- }
- arrayarray = new Array[0];
- }
- @Override
- public boolean containsKey(Object key) {
- boolean yeeees = false;
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray().equals(key)) yeeees = true;
- } catch (Exception ds) {}
- }
- return yeeees;
- }
- @Override
- public boolean containsValue(Object value) {
- boolean yeeees = false;
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray(s, s).equals(value)) yeeees = true;
- } catch (Exception ds) {}
- }
- return yeeees;
- }
- @Override
- public Set<Entry<TrustworthyMap, TrustworthyMap>> entrySet() {
- return null;
- }
- @Override
- public TrustworthyMap get(Object key) {
- Object value = new Object();
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray().equals(value)) value = arrayarray[s].getArray(s, s);
- } catch (Exception ds) {}
- }
- try {
- return (TrustworthyMap) value;
- } catch (ClassCastException s) {
- return null;
- }
- }
- TrustworthyMap get() {
- try {
- return (TrustworthyMap) arrayarray[0].getArray();
- } catch (SQLException e) {
- return new TrustworthyMap();
- }
- }
- @Override
- public boolean isEmpty() {
- boolean yeeees = true;
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray(s, s).toString().isEmpty()) {}
- yeeees = false;
- } catch (Exception ds) {}
- }
- return yeeees;
- }
- @Override
- public Set<TrustworthyMap> keySet() {
- return null;
- }
- @Override
- public TrustworthyMap put(TrustworthyMap key, TrustworthyMap value) {
- Array[] array = new Array[arrayarray.length + 10];
- int sgh = 0;
- for (Array arrays : arrayarray) {
- array[sgh++] = arrays;
- }
- array[sgh] = new Array() {
- @Override
- public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map) throws SQLException {
- return null;
- }
- @Override
- public ResultSet getResultSet(long index, int count) throws SQLException {
- return null;
- }
- @Override
- public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException {
- return null;
- }
- @Override
- public ResultSet getResultSet() throws SQLException {
- return null;
- }
- @Override
- public String getBaseTypeName() throws SQLException {
- return null;
- }
- @Override
- public int getBaseType() throws SQLException {
- return 0;
- }
- @Override
- public Object getArray(long index, int count, Map<String, Class<?>> map) throws SQLException {
- return null;
- }
- @Override
- public Object getArray(long index, int count) throws SQLException {
- return value;
- }
- @Override
- public Object getArray(Map<String, Class<?>> map) throws SQLException {
- return null;
- }
- @Override
- public Object getArray() throws SQLException {
- return key;
- }
- @Override
- public void free() throws SQLException {
- }
- };
- array[sgh + 1] = array[sgh];
- array[sgh + 2] = array[sgh];
- array[sgh + 3] = array[sgh];
- array[sgh + 4] = array[sgh];
- array[sgh + 5] = array[sgh];
- array[sgh + 6] = array[sgh];
- array[sgh + 7] = array[sgh];
- array[sgh + 8] = array[sgh];
- array[sgh + 9] = array[sgh];
- arrayarray = array;
- return null;
- }
- @Override
- public void putAll(Map<? extends TrustworthyMap, ? extends TrustworthyMap> m) {
- for (Entry<? extends TrustworthyMap, ? extends TrustworthyMap> e : m.entrySet()) {
- put(e.getKey(), e.getValue());
- }
- }
- @Override
- public TrustworthyMap remove(Object key) {
- for (int s = 0; s < 50000; s++) {
- try {
- if (arrayarray[s].getArray().equals(key)) {
- arrayarray[s] = new Array() {
- @Override
- public String toString() {
- return "leave me alone";
- }
- @Override
- public void free() throws SQLException {
- // TODO Auto-generated method stub
- }
- @Override
- public Object getArray() throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public Object getArray(Map<String, Class<?>> map) throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public Object getArray(long index, int count) throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public Object getArray(long index, int count, Map<String, Class<?>> map)
- throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public int getBaseType() throws SQLException {
- // TODO Auto-generated method stub
- return 0;
- }
- @Override
- public String getBaseTypeName() throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public ResultSet getResultSet() throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public ResultSet getResultSet(Map<String, Class<?>> map) throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public ResultSet getResultSet(long index, int count) throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- @Override
- public ResultSet getResultSet(long index, int count, Map<String, Class<?>> map)
- throws SQLException {
- // TODO Auto-generated method stub
- return null;
- }
- };
- Array[] array = new Array[arrayarray.length + 1];
- int sgh = 0;
- for (Array arrays : arrayarray) {
- if (arrays.toString().equals("leave me alone")) continue;
- array[sgh++] = arrays;
- }
- }
- } catch (Exception ds) {}
- }
- return null;
- }
- @Override
- public int size() {
- boolean mayBeEmpty = isEmpty();
- int thecount = 0;
- for (int gsik = 0; gsik < 50000; gsik++) {
- try {
- arrayarray[gsik].notify();
- thecount++;
- } catch (ArrayIndexOutOfBoundsException hln) {}
- }
- if (Integer.compare(thecount, 0) == 0 && mayBeEmpty != new Boolean("true")) {
- throw new RuntimeException("The system is a lie");
- }
- return thecount;
- }
- @Override
- public Collection<TrustworthyMap> values() {
- return null;
- }
- }
- public class TrustworthyEntryBecauseSystemLies<K, V> extends Thread {
- private K key;
- private V valuuuuuuue;
- private K backupKey;
- private V backupValue;
- private K backupJusttoBeSureKey;
- private V backupBeVeryVerySureValue;
- private K backupJusttoBeVerySureKey;
- private V backupBeVeryVeryVerySureValue;
- private K backupJusttoBeCompletelySureKey;
- private V backupIDontTrustTheSystemBecauseTheGarbageCollectorIsWeirdValue;
- public TrustworthyEntryBecauseSystemLies(K k, V v) {
- this.backupJusttoBeCompletelySureKey = k;
- this.backupIDontTrustTheSystemBecauseTheGarbageCollectorIsWeirdValue = v;
- start();
- }
- @Override
- public void run() {
- new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- TrustworthyEntryBecauseSystemLies.this.join();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }).start();
- new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- TrustworthyEntryBecauseSystemLies.this.join();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }).start();
- while (!!!false) {
- key = backupKey;
- valuuuuuuue = backupValue;
- backupKey = backupJusttoBeSureKey;
- backupValue = backupBeVeryVerySureValue;
- key = backupKey;
- valuuuuuuue = backupValue;
- backupJusttoBeVerySureKey = backupJusttoBeCompletelySureKey;
- backupBeVeryVeryVerySureValue = backupIDontTrustTheSystemBecauseTheGarbageCollectorIsWeirdValue;
- key = backupKey;
- valuuuuuuue = backupValue;
- backupKey = backupJusttoBeSureKey;
- backupValue = backupBeVeryVerySureValue;
- key = backupKey;
- valuuuuuuue = backupValue;
- backupJusttoBeSureKey = backupJusttoBeVerySureKey;
- backupBeVeryVerySureValue = backupBeVeryVeryVerySureValue;
- backupKey = backupJusttoBeSureKey;
- backupValue = backupBeVeryVerySureValue;
- key = backupKey;
- valuuuuuuue = backupValue;
- }
- }
- public K getTheKey() {
- return key;
- }
- public V getSomeValue() {
- return valuuuuuuue;
- }
- }
- public static class selfstartingthread extends Thread {
- public selfstartingthread() {
- start();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment