query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns the number of items in queue
public int size() { return qSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCount() {\n return queue.size();\n }", "public int size(){\r\n\t\treturn queue.size();\r\n\t}", "public int size() {\n return queue.size();\n }", "public int size() {\n return _queue.size();\n }", "public int size() {\n return this.queue.size();\n }", "public int size() {\n\t\treturn queue.size();\n\t}", "int getQueueSize();", "public int queueSize() {\n\t\treturn queue.size();\t\n\t}", "public static int size() {\n System.out.println();\n System.out.println(\"The size of the queue is: \" + queue.size());\t \n return queue.size();\n }", "public abstract int getQueueLength();", "public int size() {\n processQueue();\n return weakCache.size();\n }", "public long getQueueSize(){\n return queue.size();\n }", "public int size() \r\n {\r\n if(measurementQueue==null) return 0;\r\n \r\n return measurementQueue.size();\r\n }", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\n }", "public int getNumQueues() {\n return queues.size();\n }", "public int getQueueSize() {\r\n\t\treturn this.queue.size();\r\n\t}", "public int numVehiclesInQueue() {\r\n\t\treturn vehiclesInQueue.size();\r\n\t}", "public int size()\n\t{\n\t\treturn requestQueue != null ? requestQueue.size() : 0;\n\t}", "public int size()\n\t{\n\t\tif(isEmpty())\n\t\t\treturn 0;\n\t\tif(isFull())\n\t\t\treturn queueArray.length;\n\t\t\n\t\tint i=front;\n\t\tint sz=0;\n\t\tif(front<=rear)\n\t\t\twhile(i<=rear)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(i<=queueArray.length-1)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\ti=0;\n\t\t\twhile(i<=rear)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn sz;\n\t}", "public int getRunnableCount() {\n return queue.size();\n }", "public int getQueueSize() {\n return queue.getQueueSize();\n }", "public void incTotalOfQueueEntries() {\n totalOfQueueEntries++;\n }", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public synchronized int getSize() {\r\n\t\treturn queueManagers.size();\r\n\t}", "int getNumBufferedBytes() {\n ChannelBuffer buf;\n int IOQueued;\n for (IOQueued = 0, buf = inQueueHead;\n buf != null; buf = buf.next) {\n IOQueued += buf.nextAdded - buf.nextRemoved;\n }\n return IOQueued;\n }", "public int inputQueueSize() {\n\t\tsynchronized (inputQueue) {\n\t\t\treturn inputQueue.size();\n\t\t}\n\t}", "public int getOutgoingQueueSize();", "public int size() {\n return numItems;\n }", "final int getQueueSize() {\n // suppress momentarily negative values\n return Math.max(0, sp - base);\n }", "long getExcutorTasksInWorkQueueCount();", "public int size()\r\n {\r\n return nItems;\r\n }", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "public int queueSize() {\n return executor.getQueue().size();\n }", "public int size() {\n\t\t//Because we're the only consumer, we know nothing will be removed while\n\t\t//we're computing the size, so we know there are at least (rear - front)\n\t\t//elements already added.\n\t\treturn (int)(rear.get() - front.get());\n\t}", "@Override\n public int queueLength() {\n return this.job_queue.size();\n }", "int getItemsCount();", "int getItemsCount();", "public int size() {\n \treturn numItems;\n }", "public int size() {\n return nItems;\n }", "public int size(){\n return numItems;\n }", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "public int size() {\r\n\t\treturn q.size();\r\n\t}", "public synchronized int size() {\n return count;\n }", "public int size() {\n \t\n \tint i = 0;\n \t\n \twhile(this.front != null) {\n \t\ti = i+1;\n \t\tthis.front = this.front.next; \n \t}\n \t\n \treturn i;\n \t\n }", "public int UnassignedCount() {\n \t\treturn jobqueue.size();\n \t}", "@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}", "int getNumItems();", "public int size()\r\n {\r\n return count;\r\n }", "public int queueArrayLength(){\n\t\treturn queueArray.length;\n\t}", "public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}", "public int size()\n {\n return count;\n }", "public int size() {\n int found = 0;\n Node<T> it = head.get();\n // Do a raw count.\n for (int i = 0; i < capacity; i++) {\n if (!it.free.get()) {\n found += 1;\n }\n it = it.next;\n }\n return found;\n }", "public int size() {\n return items.size();\n }", "public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }", "public int size() {\n return count;\n }", "public int size() {\r\n return items.size();\r\n }", "public int size() {\r\n return items.size();\r\n }", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public final int size()\r\n/* 41: */ {\r\n/* 42:215 */ long after = lvConsumerIndex();\r\n/* 43: */ for (;;)\r\n/* 44: */ {\r\n/* 45:219 */ long before = after;\r\n/* 46:220 */ long currentProducerIndex = lvProducerIndex();\r\n/* 47:221 */ after = lvConsumerIndex();\r\n/* 48:222 */ if (before == after)\r\n/* 49: */ {\r\n/* 50:224 */ long size = currentProducerIndex - after >> 1;\r\n/* 51:225 */ break;\r\n/* 52: */ }\r\n/* 53: */ }\r\n/* 54: */ long size;\r\n/* 55:230 */ if (size > 2147483647L) {\r\n/* 56:232 */ return 2147483647;\r\n/* 57: */ }\r\n/* 58:236 */ return (int)size;\r\n/* 59: */ }", "public int getAvailableCount();", "public int getDequeueCount() {\n\t\treturn m_DequeueCount;\n\t}", "@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}", "int getJobsCount();", "int getJobsCount();", "int getJobsCount();", "@Nonnegative\n public int getSize()\n {\n return items.size();\n }", "@Test\n public void sizeTest() {\n assertThat(4, is(this.queue.size()));\n }", "public static int size(ArrayQueueADT arrayQueue) {\n return arrayQueue.size;\n }", "public int getItemCount() {\n checkWidget();\n return OS.SendMessage(handle, OS.TCM_GETITEMCOUNT, 0, 0);\n }", "public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}", "public final int size()\n {\n return m_count;\n }", "public int size() { return count; }", "public int numIncoming() {\r\n int result = incoming.size();\r\n return result;\r\n }", "public int size() {\n\t\tint count = 0;\n\t\tListNode current = front;\n\t\twhile (current != null) {\n\t\t\tcurrent = current.next;\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "@Override\n public int getSize() {\n return this.numItems;\n }", "public synchronized int getNumberOfItems(){\n int totalItems=0;\n \n for(ShoppingCartItem item : getItems()){\n //we sum the quantity of products for each item\n totalItems += item.getQuantity();\n }\n \n return totalItems;\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int size()\n {\n return tasks.size();\n }", "int getDeliveredCount();", "@Override\n public int getSize() {\n return numItems;\n }", "public int numItemInList() {\n return nextindex - startIndex;\n }", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }", "public int length() {\n return numberOfItems;\n }", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "@Override\r\n\tpublic int size() {\n\t\treturn count;\r\n\t}", "public int getItemsCount() {\n return items_.size();\n }", "public int getItemsCount() {\n return items_.size();\n }", "public int size()\n {\n return N;\n }", "public int size() {\n maintain();\n return collection.size();\n }", "public int getCount() {\n return sync.getCount();\n }", "public int getSize() {\n synchronized (itemsList) {\n return itemsList.size();\n }\n }", "public synchronized int size(){\n return list.size();\n }", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "public int get_size();" ]
[ "0.8584875", "0.8343274", "0.8260372", "0.82265806", "0.8202201", "0.8201931", "0.8118455", "0.8037433", "0.79647887", "0.77504444", "0.7721498", "0.7712807", "0.76354307", "0.76243514", "0.7549107", "0.7539609", "0.7527137", "0.751626", "0.7466559", "0.7457652", "0.7415168", "0.73528373", "0.73225164", "0.73021364", "0.72971517", "0.7283398", "0.72617894", "0.720277", "0.7197537", "0.71953315", "0.71919554", "0.71776706", "0.7176605", "0.7176093", "0.71552795", "0.7151558", "0.7151558", "0.71409", "0.7131739", "0.71028405", "0.70931816", "0.7085013", "0.7072224", "0.70523804", "0.70059294", "0.6959387", "0.69554174", "0.6950315", "0.6945682", "0.69340056", "0.69231665", "0.69053245", "0.6898994", "0.6897966", "0.6880448", "0.68711185", "0.68711185", "0.6868051", "0.6868051", "0.6868051", "0.686394", "0.6851659", "0.68487257", "0.6848079", "0.68336266", "0.68336266", "0.68336266", "0.68267417", "0.68153095", "0.679535", "0.67845094", "0.6782018", "0.67804736", "0.67792416", "0.67752874", "0.6772486", "0.67697585", "0.676938", "0.67631304", "0.6760575", "0.6751122", "0.674911", "0.6727751", "0.6727688", "0.6720691", "0.6718593", "0.6718593", "0.6718593", "0.6718593", "0.6718593", "0.671799", "0.67178667", "0.67178667", "0.670862", "0.6704941", "0.6704416", "0.66967976", "0.6685444", "0.6685212", "0.6684096" ]
0.6705607
94
Adds item in queue
public void enqueue(Item item) { if (item == null) { throw new IllegalArgumentException("Empty item"); } if (queue.length == qSize) { resize(qSize * 2); } queue[qSize] = item; qSize++; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void addToQueue() {\n\t}", "public void add( int item ) \n {\n\t//queue is empty\n\tif ( queue.isEmpty() ) {\n\t queue.add( item );\n\t return;\n\t}\n\t\n\t//queue is not empty\n\telse {\n\t //find spot of insetion\n\t for ( int i = 0; i < queue.size(); i++ ) {\t\t\t \n\t\tif ( (int) queue.get(i) < item ) {\n\t\t queue.add( i, item );\n\t\t return;\n\t\t}\t\t\n\t }\n\t}\n }", "void enqueue(E item);", "public void enqueue(E item) {\n addLast(item);\n }", "void enqueue(T item) {\n contents.addAtTail(item);\n }", "public void addItem(QueueItem item) {\n qItems.add(item);\n\n //long previousItemSize=item.getSize();\n long previousItemSize = ((QueueItem) qItems.lastElement()).getSize();\n long rate = calculateDelay(item.getSize());\n QueueWorkerThread worker = new QueueWorkerThread(getContext(), item);\n\n synchronized (fileGroupToItemMap) {\n fileGroupToItemMap.put(item.getName(), worker);\n }\n\n if (qItems.size() == 1) {\n Debug.log(\n this,\n \"CollabQueue, item: \" + item.getName() + //NoI18n\t\n \" scheduling with nodelay and with rate: \" + rate\n ); //NoI18n\t\t\t\t\n worker.scheduleAtFixedRate(0, rate);\n } else {\n long delay = calculateDelay(previousItemSize);\n Debug.log(\n this,\n \"CollabQueue, item: \" + item.getName() + //NoI18n\n \" scheduling for: \" + delay + \" with rate: \" + rate\n ); //NoI18n\t\t\t\n worker.scheduleAtFixedRate(delay, rate);\n }\n }", "public void enqueue(Item item) \n {\n stack1.push(item);\n }", "public void add(Object element) {\n queue.put( new DelayedElement( element ) );\n }", "public void addIntoQueue(Integer block_id){\n if(this.queue_set){\n if(this.queue.contains(block_id) == false){\n this.queue.add(block_id);\n }\n }\n }", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "public void addQueuedObject(Obstacle obj) {\n\t\tassert inBounds(obj) : \"Object is not in bounds\";\n\t\taddQueue.add(obj);\n\t}", "public void enqueue ()\n {\n count++;\n questionList.add(newQuestion);\n //System.out.println(\"Question #\"+ totNumQ + \" is added to the queue.\");\n }", "public void enqueue(Comparable item);", "public boolean add(T item) {\n // offer(T e) is used here simply to eliminate exceptions. add returns false only\n // if adding the item would have exceeded the capacity of a bounded queue.\n return q.offer(item);\n }", "public void enqueue (E element);", "public void queue(Object newItem){\n if(isFull()){\n System.out.println(\"queue is full\");\n return;\n }\n ArrayQueue[++rear] = newItem;\n if(front == -1)\n front = 0;\n \n }", "private void enqueue(E x) {\n final Object[] items = this.items;\n items[putIndex] = x;\n if (++putIndex == items.length) putIndex = 0;\n count++;\n notEmpty.signal();\n }", "public void add(IEvent event){\r\n\t\tqueue.add(event);\r\n\t}", "public void enqueue (T item) {\n leftStack.push(item);\n }", "public void enqueue(Object value)\n {\n queue.insertLast(value);\n }", "void enqueue(E newEntry);", "public void addToQueue(Unit unit) {\n if (units.size() < maxStock) {\n endTime = System.currentTimeMillis() + unit.getBuildTime();\n units.add(unit);\n }\n }", "void add(int list) {\n\t\t\n\t\t// check if element can be added to the queue\n\t\tif (!canPush)\n\t\t\tthrow new IllegalStateException(\"Queue capacity is excided!\");\n\t\t\n\t\t// add element into the cell push-pointer points to and shift pointer\n\t\tqueue[qPush++] = list;\n\t\t\n\t\t// set poll-flag, cuz there's now at least one element in the queue\n\t\tcanPoll = true;\n\t\t\n\t\t/*\n\t\t * If poll pointer went beyond array bounds - return it to the first position\n\t\t */\n\t\t\n\t\tif (qPush == queue.length)\n\t\t\tqPush = 0;\n\t\t\n\t\t/*\n\t\t * If push pointer now points to the poll pointer - then queue is full\n\t\t * Set flag\n\t\t */\n\t\t\n\t\tif (qPush == qPoll)\n\t\t\tcanPush = false;\n\t}", "@Override\r\n\tpublic void enqueue(Item item) {\r\n\t\tif (item == null)\r\n\t\t\tthrow new NullPointerException(\"You cannot put a 'null' element inside the queue\");\r\n\t\tif (count == arr.length)\r\n\t\t\tresize(arr.length * 2);\r\n\t\tarr[count++] = item;\r\n\t}", "public void enqueue (Item item){\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.next = null;\n if(isEmpty()) {first = last;}\n else oldLast.next = last;\n N++;\n }", "public synchronized void add(Integer item) {\r\n while (true) {\r\n if (buffer.size() == SIZE) {\r\n try {\r\n wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n buffer.add(item);\r\n notifyAll();\r\n return;\r\n }\r\n }", "public void add(Object o) {\n Logger.log(\"DEBUG\", \"Data to add to queue: \" + o.toString());\n while(isLocked()) {\n try {\n Thread.sleep(10);\n }\n catch(InterruptedException ie) {\n // do nothing\n }\n }\n addToTail(o);\n LAST_WRITE_TIME = now();\n }", "public abstract void Enqueue (Type item);", "public void enqueue(T item) {\n\t\tif(rear == capacity)\n\t\t\treSize();\n\t\tarr[rear] = item;\n\t\tSystem.out.println(\"Added: \" + item);\n\t\trear++;\n\t\tsize++;\n\t}", "public void enqueue(T element);", "private void add(Pair<MarketDataRequestAtom,Event> inData)\n {\n getQueue().add(inData);\n }", "@Override\n public void enqueue(T item) {\n if (item != null) {\n heap.add(item);\n } else {\n throw new IllegalArgumentException(\"Cant enqueue null\");\n }\n }", "public void push(final String queueName, final String item);", "private void addToMoveQueue() {\n\t\tSimulation.INSTANCE.getMoveQueue().offer(new Move(prevNode, currentNode));\n\t}", "public void enqueue(T item) {\r\n\r\n\t\t++item_count;\r\n\t\tif(item_count==arr.length)\r\n\t\t\tdoubleArray();\r\n\t\tarr[++back%arr.length]=item;\r\n\t}", "public boolean putQueue(Object obj)\r\n {\r\n boolean returnval = false;\r\n\r\n try\r\n {\r\n returnval = event_q.add(obj);\r\n } catch (Exception ex)\r\n {\r\n return returnval;\r\n }\r\n\r\n return returnval;\r\n }", "public void enqueue(E element) {\n\t\tadd(element);\n\t}", "void enqueue(Object elem);", "public void addToQueue(String path) {\n ArrayList<String> temp = Global.uploadMetaData;\n\n boolean inQueue = checkInQueue(path, temp);\n\n if (!inQueue) {\n temp.add(path);\n }\n\n Global.uploadMetaData = temp;\n }", "private Queue<Integer> addToQueue(Queue<Integer> q, int item, int maxLength){\n q.add(item);\n while(q.size() > maxLength){\n q.remove(); //make sure the queue size isn't larger than its supposed to be\n }\n //System.out.println(\"queue_after_added \" + q);\n return q;\n }", "Queue<IMotion> addToQueue(Queue<IMotion> motionQueue);", "public synchronized void add(T object) throws InterruptedException {\n\t\twhile (store.size() == capacity) {\n\t\t\tLOG.info(\"No more space\");\n\t\t\twait();\n\t\t}\n\t\tstore.add(object);\n\t\tLOG.info(\"Added product\" + store.size());\n\t\tnotify();\n\t}", "public void add(Square s) {\n\t\tqueue.enqueue(s);\n\t}", "private void putOneQueue(BlockingQueue q, List buffer) throws InterruptedException {\n q.put(buffer);\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" done\");\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" first record \" + buffer.get(0));\n }", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "public static void enqueue(Object object) {\n queue.addLast(object);\n }", "@Override\n\tpublic void enqueue(E e) {\n\t\tint index = (pos + size) % queue.length;\n\t\tqueue[index] = e;\n\t\tsize++;\n\t}", "public void enqueue(X item) {\n QueueNode<X> new_last = new QueueNode<X>(item);\n if (last != null)\n last.next = new_last;\n last = new_last;\n if (first == null)\n first = last;\n }", "@Override\n public void add(PaintOrder order) {\n queue.add(order);\n queuedOrders ++;\n }", "private void addFromQueue()\n\t{\n\t\twhile( humanQueue.size()>0 )\n\t\t\thumans.add(humanQueue.remove(0));\n\t\twhile( zombieQueue.size()>0 )\n\t\t\tzombies.add(zombieQueue.remove(0));\n\t}", "public void enqueue(Item item){\n if (item == null){ throw new NullPointerException(\"Cannot add a null item\"); }\n\n // fill the nulls\n if(itemCount < array.length) {\n for(int i=0;i<array.length;i++) {\n if(array[i] == null) {\n array[i] = item;\n break;\n }\n }\n }\n // resize when too big\n if(itemCount == array.length){\n resize(2*itemCount);\n array[itemCount] = item;\n }\n itemCount++; // Item added!!\n }", "@Override\n public void enqueue(E e) {\n array.addLast(e);\n }", "public void enqueue(Object value);", "public void add(E element){\n\t\tArrayQueue<E> temp = new ArrayQueue<E>();\n\t\ttemp.enqueue(element);\n\t\tQ.enqueue(temp);\n\t}", "public void enqueue(Message msg){\n\t\tqueue.add(msg);\n\t}", "public void enqueue(E item) {\n Node<E> oldlast = last;\n last = new Node<E>();\n last.item = item;\n last.next = null;\n if (isEmpty()) first = last;\n else oldlast.next = last;\n n++;\n }", "void enqueue(E el);", "public void enqueue(Cell item) {\n\t\tif (manyItems == data.length) { //if the queue is full increase capacity\n\t\t\tensureCapacity(manyItems * 2 + 1);\n\t\t}\n\n\t\t//if its the first item to be added intialize front and rear to 0\n\t\tif (manyItems == 0) {\n\t\t\tfront = 0;\n\t\t\trear = 0;\n\t\t} else { //otherwise use nextindex to find the index to add it in\n\t\t\trear = nextIndex(rear);\n\t\t}\n\n\t\t//store item in array\n\t\tdata[rear] = item;\n\t\tmanyItems++;\n\t}", "@Override\n public void addObject()\n throws Exception {\n // insert object into the queue\n ftpBlockingQueue.offer(ftpClientFactory.create(), 3, TimeUnit.SECONDS);\n }", "public void enqueue(T item) {\n\t\tNode<T> oldlast = last;\n\t\tlast = new Node<>();\n\t\tlast.item = item;\n\t\tlast.next = null;\n\t\tif (isEmpty()) first = last;\n\t\telse oldlast.next = last;\n\t\tN++;\n\t}", "public synchronized boolean add(T obj) throws InterruptedException {\n\t\t\tnotify();\n\t\t\tif (maxSize == queue.size()) {\n\t\t\t\tSystem.out.println(\"Queue is full, producer is waiting.\");\n\t\t\t\twait();\n\t\t\t}\n\t\t\treturn queue.add(obj);\n\t\t}", "public void enqueue(E e) {\n\t\tsynchronized(mutex){\n\t\t\ttry {\n\t\t\t\tqueue.add(e);\n\t\t\t} catch(NullPointerException ex) {\n\t\t\t\tthrow new NullPointerException(\"enqueued null element\");\n\t\t\t} catch (ClassCastException ex) {\n\t\t\t\tthrow new ClassCastException(\"enqueued element is incompetible type\");\n\t\t\t}\n\t\t\tsem.release();\n\t\t}\n\t}", "void push(Recycler.DefaultHandle<?> item)\r\n/* 519: */ {\r\n/* 520:554 */ Thread currentThread = Thread.currentThread();\r\n/* 521:555 */ if (this.threadRef.get() == currentThread) {\r\n/* 522:557 */ pushNow(item);\r\n/* 523: */ } else {\r\n/* 524:562 */ pushLater(item, currentThread);\r\n/* 525: */ }\r\n/* 526: */ }", "void addToQueue(WebhookMessage msg);", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "void push(Object item);", "public synchronized void add(Object object) {\n\n if (_queue.size() == 0) {\n // no elements then simply add it here\n _queue.addElement(object);\n } else {\n int start = 0;\n int end = _queue.size() - 1;\n\n if (_comparator.compare(object,\n _queue.firstElement()) < 0) {\n // it need to go before the first element\n _queue.insertElementAt(object, 0);\n } else if (_comparator.compare(object,\n _queue.lastElement()) > 0) {\n // add to the end of the queue\n _queue.addElement(object);\n } else {\n // somewhere in the middle\n while (true) {\n int midpoint = start + (end - start) / 2;\n if (((end - start) % 2) != 0) {\n midpoint++;\n }\n\n int result = _comparator.compare(\n object, _queue.elementAt(midpoint));\n\n if (result == 0) {\n _queue.insertElementAt(object, midpoint);\n break;\n } else if ((start + 1) == end) {\n // if the start and end are next to each other then\n // insert after at the end\n _queue.insertElementAt(object, end);\n break;\n } else {\n if (result > 0) {\n // musty be in the upper half\n start = midpoint;\n } else {\n // must be in the lower half\n end = midpoint;\n }\n }\n }\n }\n }\n }", "public void add(E e) throws FileQueueClosedException;", "void enqueue(E e);", "public synchronized void enqueue(Object msg) {\n\t\tqueue.add(msg);\n\n\t\t// if any threads wait on empty queue then wake them up\n\t\tnotifyAll();\n\t}", "public void push(E item);", "public void push(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "private void pushLater(Recycler.DefaultHandle<?> item, Thread thread)\r\n/* 547: */ {\r\n/* 548:589 */ Map<Stack<?>, Recycler.WeakOrderQueue> delayedRecycled = (Map)Recycler.DELAYED_RECYCLED.get();\r\n/* 549:590 */ Recycler.WeakOrderQueue queue = (Recycler.WeakOrderQueue)delayedRecycled.get(this);\r\n/* 550:591 */ if (queue == null)\r\n/* 551: */ {\r\n/* 552:592 */ if (delayedRecycled.size() >= this.maxDelayedQueues)\r\n/* 553: */ {\r\n/* 554:594 */ delayedRecycled.put(this, Recycler.WeakOrderQueue.DUMMY);\r\n/* 555:595 */ return;\r\n/* 556: */ }\r\n/* 557:598 */ if ((queue = Recycler.WeakOrderQueue.allocate(this, thread)) == null) {\r\n/* 558:600 */ return;\r\n/* 559: */ }\r\n/* 560:602 */ delayedRecycled.put(this, queue);\r\n/* 561: */ }\r\n/* 562:603 */ else if (queue == Recycler.WeakOrderQueue.DUMMY)\r\n/* 563: */ {\r\n/* 564:605 */ return;\r\n/* 565: */ }\r\n/* 566:608 */ queue.add(item);\r\n/* 567: */ }", "public void enqueue(Item item)\r\n {\r\n if (item == null) throw new NullPointerException(\"Null item\");\r\n if (n == a.length) resize(2 * a.length); // double the size of array if necessary\r\n a[n++] = item;\r\n }", "public void enqueue(E e) {\n\t\t\tsynchronized (this.pq) {\n\t\t\t\tthis.pq.add(e);\n//\t\t\t\tSystem.out.println(\"insert \" + e);\n\t\t\t}\n\t\t\tthis.sem.release();\n\t}", "public void enqueue(E item) throws IllegalStateException {\n if (size == arrayQueue.length) {\n throw new IllegalStateException(\"Queue is full\");\n }\n int available = (front + size) % arrayQueue.length;\n arrayQueue[available] = item;\n size++;\n }", "public void enqueue(Item item) {\n if (item == null)\n throw new NullPointerException();\n\n // Check if whole array has been filled up, and act accordingly\n if (values.length == elements)\n resize((int) (elements * GROWTH_FACTOR));\n\n // Add element into values array\n values[elements++] = item;\n }", "public void push(E item) {\n addFirst(item);\n }", "public void enqueue(Object o) {\n queue.enqueue(o);\n }", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "public void push(T item);", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n queue.add(x);\n }", "void enqueue(Node n) {\n if (queueSet.contains(n)) {\n return;\n }\n queueSet.add(n);\n queue.addFirst(n);\n }", "public void enqueue(Item item) {\n if (item == null)\n throw new UnsupportedOperationException();\n \n// StdOut.println(\"count:\"+ count);\n// StdOut.println(\"N:\"+ N);\n// StdOut.println(\"randomizedQueue.length:\"+ randomizedQueue.length);\n if (count >= N) { \n resize(N*2); // double size of array if necessary\n N *= 2;\n } \n randomizedQueue[count++] = item; \n //assert\n }", "@Override\n public void enqueue(T value) {\n myQ[myLength] = value;\n myLength++;\n }", "public void enqueue(Object item) {\n\t\t\n\t\tNode node = new Node(item, null);\n\t\t\n\t\t// If queue is empty, assign to head\n\t\t// Else, add to tail.next and re-assign tail to this node\n\t\tif (isEmpty()) {\n\t\t\thead = node;\n\t\t}\n\t\telse {\n\t\t\ttail.next = node;\n\t\t}\n\t\t\n\t\ttail = node;\n\t\t\n\t}", "public void enqueue(Item item) {\n if (item == null) throw new IllegalArgumentException(\"Null argument\");\n\n if (n == a.length) resize(2*a.length);\n a[n++] = item;\n }", "void push(T item) {\n contents.addAtHead(item);\n }", "@Override\r\n\tpublic boolean enqueue(T e) throws QueueOverflowException {\r\n\t\tif (this.isFull()) {\r\n\t\t\tthrow new QueueOverflowException(\"The queue is full\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata.add(data.size(), e);\r\n\t\t}\r\n\t\t// Add element to the end of the Queue\t\t\r\n\t\treturn true;\r\n\t}", "void add(Item item);", "void push(T item);", "void push(T item);", "public void enqueue(T pushed)\n\t{insert(pushed);}", "private void push(GameAction action) {\n this.queue.add(action);\n }", "private void addCommandToQueue(CancellableCommand command) {\n outstandingRequests.add(command);\n while (outstandingRequests.size() > maxOutstandingRequests) {\n outstandingRequests.poll().onCancelled();\n }\n }", "@Override\n\tpublic void push(E item) {\n\t\t\n\t}", "public void enqueue( MyTreeNode<T> treeNode ) {\n\t\tQueueNode newNode = new QueueNode(treeNode);\n\t\t// the queue is empty\n\t\tif ( tail == null ) {\n\t\t\t// the tail and the head point to the same only element in the collection\n\t\t\tthis.tail = newNode;\n\t\t\tthis.head = newNode;\n\t\t// the queue is not empty\n\t\t} else {\n\t\t\t// the second from the end item of the collection keeps track with the tail\n\t\t\tthis.tail.next = newNode;\n\t\t\t// the new element becomes the tail of the collection\n\t\t\tthis.tail = newNode;\n\t\t}\n\t}", "public boolean add(final Object obj) {\n maintain();\n\n SoftObject soft = SoftObject.create(obj, queue);\n \n return collection.add(soft);\n }", "public void enqueue(Item item) {\n\t\tif (item == null)\n\t\t\tthrow new java.lang.NullPointerException();\n\n\t\tif (size == queue.length) {\n\t\t\tItem[] newqueue = null;\n\t\t\tif (queue.length == 0) {\n\t\t\t\tnewqueue = (Item[]) new Object[1];\n\t\t\t} else {\n\t\t\t\tnewqueue = (Item[]) new Object[2 * queue.length];\n\t\t\t}\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tnewqueue[i] = queue[i];\n\t\t\t}\n\t\t\tqueue = newqueue;\n\t\t}\n\t\tqueue[size] = item;\n\t\tsize++;\n\t}" ]
[ "0.7978994", "0.74622303", "0.7447197", "0.7437098", "0.72358114", "0.71773607", "0.71016693", "0.7040796", "0.70292526", "0.7028738", "0.7010007", "0.699905", "0.699765", "0.6996649", "0.6990473", "0.69873637", "0.6961154", "0.69558907", "0.6937794", "0.6921034", "0.69174165", "0.69108737", "0.688183", "0.6881664", "0.686849", "0.68682045", "0.68616813", "0.68474144", "0.6840639", "0.6828517", "0.68013686", "0.6785671", "0.67799276", "0.67767614", "0.67666113", "0.67649674", "0.6763113", "0.6755129", "0.6748357", "0.67381257", "0.67373455", "0.6733493", "0.6731663", "0.67164147", "0.67008984", "0.6700479", "0.6696274", "0.66860855", "0.66860723", "0.66792876", "0.66744345", "0.66695935", "0.66628903", "0.6659455", "0.6657844", "0.6627072", "0.66244644", "0.66187173", "0.6618415", "0.66150343", "0.6614881", "0.66067225", "0.6601608", "0.65993375", "0.6592557", "0.65850663", "0.658454", "0.65826213", "0.65764844", "0.6560514", "0.65564585", "0.6549931", "0.6538284", "0.6533705", "0.6532686", "0.6531045", "0.65266186", "0.65239316", "0.65200126", "0.651971", "0.65156996", "0.65117943", "0.65117943", "0.64979064", "0.6478142", "0.6467215", "0.6467031", "0.6466365", "0.646234", "0.6460352", "0.64533204", "0.6449423", "0.6449423", "0.6447292", "0.6434277", "0.64295113", "0.64277214", "0.6425395", "0.6425245", "0.64248323" ]
0.6659193
54
Removes and returns random item
public Item dequeue() { if (qSize == 0) { throw new java.util.NoSuchElementException("Empty queue"); } int index = StdRandom.uniform(qSize); Item item = queue[index]; if (index == qSize - 1) { queue[index] = null; } else { queue[index] = queue[qSize - 1]; queue[qSize - 1] = null; } qSize--; if (qSize > 0 && qSize == queue.length / 4) { resize(queue.length / 2); } return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T removeRandom();", "public T removeRandom ();", "public String remove(){\n ListIterator<String> iter = bookkeeper.listIterator();\n int random = (int)(Math.random()*bookkeeper.size());\n System.out.println(\"\\n\\n***RANDOM = \" + random);\n String retrieve = bookkeeper.get(random);\n int i = -1; while (i<random){ i++; iter.next(); } iter.remove();\n return retrieve;\n }", "public void clearRandomItems();", "public T getRandomElement() {\n\t\treturn this.itemList.get(this.getRandomIndex());\n\t}", "public Item getRandomItem() {\n int index = 0;\n int i = (int) (Math.random() * getItems().size()) ;\n for (Item item : getItems()) {\n if (index == i) {\n return item;\n }\n index++;\n }\n return null;\n }", "public void remove() {\n if (count == 0) {\n return;\n }\n \n Random rand = new Random();\n int index = rand.nextInt(count);\n for (int i = index; i < count - 1; i++) {\n list[i] = list[i+1];\n }\n count--; \n }", "public Item generateItem()\n {\n Random rand = new Random();\n int item = rand.nextInt(itemList.size());\n return itemList.get(item);\n }", "public void maybeRemove(RemoveRandom r, ObjectContainer container, ClientContext context);", "public CardCollection destroyRandom(int number) ;", "public T remove() {\r\n if (size() == 0) {\r\n return null;\r\n }\r\n int r = new Random().nextInt(size());\r\n \r\n T deleted = elements[r];\r\n elements[r] = elements[size() - 1];\r\n elements[size() - 1] = null;\r\n size--;\r\n \r\n if (size() > 0 && size() < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n \r\n return deleted;\r\n }", "public Item dequeue() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n double rand = Math.random() * N;\n int randIdx = (int) Math.floor(rand);\n Item item = s[randIdx];\n N--;\n s[randIdx] = s[N];\n s[N] = null;\n if (N > 0 && N == s.length / 4) {\n resize(s.length / 2);\n }\n return item;\n }", "public Item sample() {\n\t\t\n\t\tif(isEmpty()) throw new NoSuchElementException();\n\t\t\n\t\tint index = StdRandom.uniform(N);\n\t\t\t\n\t\t\t/*while(items[index] == null) {\n\t\t\t\tindex = StdRandom.uniform(length());\n\t\t\t}*/\n\n\t\treturn items[index];\n\t}", "public ArrayList<RandomItem> getRandomItems();", "@Override\r\n\tpublic Item sample() {\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\treturn item;\r\n\t}", "public Item sample() {\n if (isEmpty())\n throw new NoSuchElementException();\n\n // Get random index [0, elements) and remove from array\n int randomIndex = StdRandom.uniform(0, elements);\n return values[randomIndex];\n }", "public int getRandom() {\n int index = (int) Math.round(Math.random()*(list.size()-1));\n return list.get(index);\n }", "public void addRandomItem(RandomItem item);", "public int getRandom() {\n return _list.get( rand.nextInt(_list.size()) );\n }", "private Item chooseValidItem()\n {\n\n // Sets the intial random value.\n int numberRandom = random.nextInt(items.size());\n\n while (trackItems.contains(items.get(numberRandom).getName())){\n numberRandom = random.nextInt(items.size());\n }\n\n // Loops until a unused value is assigned to numberRandom,\n // within the array list size.\n \n trackItems.push(items.get(numberRandom).getName());\n\n return items.get(numberRandom);\n }", "public int getRandom() {\n int x=rand.nextInt(li.size());\n return li.get(x);\n }", "protected abstract void removeItem();", "public Item dequeue(){\n if(itemCount == 0){ throw new NoSuchElementException(\"Queue is empty\"); }\n\n int rand = StdRandom.uniform(itemCount);\n while(array[rand] == null){ // if it's a null value (only happens after dequeing)\n rand = StdRandom.uniform(array.length); // pick another one\n }\n Item item = array[rand]; // get the item\n array[rand] = null; // D E S T R O Y\n itemCount--; // decrement the item count\n return item; // return the item\n }", "public int getRandom() {\n int i = random.nextInt(list.size());\n return list.get(i);\n }", "private static ItemType random() {\n return ITEM_TYPES.get(RANDOM.nextInt(SIZE));\n }", "public Item dequeue() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the removed number is: \" + index);\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t p.prev.next = p.next;\n \t p.next.prev = p.prev;\n \t size = size - 1;\n \t return p.item;\n }", "public String grab() {\n int index = new Random().nextInt(count);\n\n String element = ___________________\n\n contents[index] = ___________________\n\n count = ___________________\n\n return ___________________\n }\n\n // Removes an instance of 's' from the bag\n // Returns true if 's' was in the bag and was successfully removed\n // Returns false if 's' was not in the bag\n public boolean remove(String s) {\n\n for(int index = 0; ___________________; ___________________){\n\n if(___________________) {\n\n ___________________\n\n ___________________\n\n return ___________________\n }", "public Item sample(){\n if(size == 0){\n throw new NoSuchElementException();\n }\n int ri = StdRandom.uniform(size);\n \n Iterator<Item> it = this.iterator();\n \n for(int i = 0; i < ri; i++){\n it.next();\n }\n \n return it.next();\n }", "public void removeItem(int id);", "public Item sample()\r\n {\r\n if (isEmpty()) throw new NoSuchElementException(\"Empty randomized queue\");\r\n\r\n int randomizedIdx = StdRandom.uniform(n);\r\n\r\n return a[randomizedIdx];\r\n }", "public Item dequeue()\r\n {\r\n if (isEmpty()) throw new NoSuchElementException(\"Empty randomized queue\");\r\n\r\n int randomizedIdx = StdRandom.uniform(n);\r\n Item item;\r\n\r\n item = a[randomizedIdx];\r\n a[randomizedIdx] = a[n - 1]; // move the last item to the empty position\r\n a[--n] = null; // to avoid loitering\r\n // shrink the size of array if necessary\r\n if (n > 0 && n == a.length/4) resize(a.length/2);\r\n return item;\r\n }", "@Override\n public E poll() {\n if (queue.isEmpty()) {\n throw new IllegalArgumentException(\"There's no element to remove in Random Qeuue\");\n }\n\n if (r.nextInt() % 2 == 1) {\n return queue.removeFirst();\n } else {\n return queue.removeLast();\n }\n }", "public T remove() {\r\n \r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n // Randomly selects element to remove and stores in rValue.\r\n int rValue = r.nextInt(size);\r\n // Store removed element in remove\r\n T remove = elements[rValue];\r\n elements[rValue] = null;\r\n \r\n // Move last element to replace \"remove\" if \"remove\" is not last element\r\n if (rValue != (size - 1)) {\r\n elements[rValue] = elements[size - 1];\r\n elements[size - 1] = null;\r\n }\r\n size--;\r\n // If array is less than 25% full, resize to 1/2 of current size.\r\n if (size > 0 && size < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n return remove;\r\n }", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"deque underflow \");\n Item item;\n int randomIndex = StdRandom.uniform(N);\n while(randomizedQueue[randomIndex] == null){\n randomIndex = StdRandom.uniform(N);\n }\n item = randomizedQueue[randomIndex];\n \n return item;\n }", "public Item sample() {\n \t\tif (size == 0) {\n \t\t\tthrow new NoSuchElementException();\n \t\t}\n \t\treturn (Item) items[StdRandom.uniform(size)];\n \t}", "public int getRandom() {\n Random random = new Random();\n int i = random.nextInt(list.size());\n return list.get(i);\n }", "public int getRandom() {\n return lst.get(rand.nextInt(lst.size()));\n }", "public Item dequeue() {\n if (N == 0) throw new NoSuchElementException();\n int idx = StdRandom.uniform(N);\n Item removed = s[first + idx];\n s[first + idx] = null;\n if (idx == 0) first++;\n else if (idx != N-1) {\n shrink(first+idx);\n }\n N--;\n if (N == 0) first = 0;\n return removed;\n }", "public Item takeItem(int index) {\n return items.remove(index);\n }", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n double rand = Math.random() * N;\n int idx = (int) Math.floor(rand);\n Item item = s[idx];\n return item;\n }", "public Item sample() {\n\n if (size == 0) {\n throw new NoSuchElementException();\n }\n\n int r = random.nextInt(size);\n return queue[r];\n }", "public Item dequeue() {\n \t\tif (size == 0) {\n \t\t\tthrow new NoSuchElementException();\n \t\t}\n \t\tint pos = StdRandom.uniform(size);\n \t\tItem item = (Item) items[pos];\n \t\titems[pos] = items[--size];\n \t\tif (size < items.length / 3 && items.length > MIN_COUNT) {\n \t\t\tint newCapacity = items.length >> 1;\n \t\t\tObject[] copy = new Object[newCapacity];\n \t\t\tSystem.arraycopy(items, 0, copy, 0, copy.length);\n \t\t\titems = copy;\n \t\t}\n \t\treturn item;\n \t}", "public int getRandom() {\n if (this.size == 0) throw new IllegalArgumentException();\n Random rand = new Random();\n int randomGetIndex = rand.nextInt(this.size);\n return this.list.get(randomGetIndex);\n }", "static String getReferee()\n {\n int ind=random(referees.length);\n String refree=referees[ind];\n referees=removeTheElement(referees,ind);\n return refree;\n }", "public int getRandom() {\n if(list.size() <= 0) return -1;\n return list.get(new Random().nextInt(list.size()));\n }", "public Item sample() {\n if (N == 0) throw new java.util.NoSuchElementException();\n return collection[rnd.nextInt(N)];\n }", "public int getRandom() {\n Random random = new Random();\n return list.get(random.nextInt(list.size()));\n }", "public Item sample() {\n if (size == 0) throw new java.util.NoSuchElementException(\"Queue is empty!\");\n\n return items[StdRandom.uniform(size)];\n }", "public Item sample() {\n if(isEmpty()) throw new NoSuchElementException();\n int idx = StdRandom.uniform(size);\n return arr[idx];\n }", "public Item dequeue() {\n if (size==0) throw new java.util.NoSuchElementException(\"Queue is empty!\");\n\n if (items.length == size*4) {\n resizeArray(items.length / 2);\n }\n\n int index = StdRandom.uniform(size);\n Item returnItem = items[index];\n items[index] = items[size-1];\n items[--size] = null;\n\n return returnItem;\n }", "@Override\r\n\tpublic Item dequeue() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"You cannot delete anything from the empty queue\");\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\tarr[index] = null;\r\n\t\tarr[index] = arr[--count];\r\n\t\tarr[count] = null;\r\n\t\tif (count > 0 && count == arr.length / 4)\r\n\t\t\tresize(arr.length / 2);\r\n\t\treturn item;\r\n\t}", "public Item sample() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the number is: \" + index);\n int k = 0;\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t return p.item;\n }", "public Item dequeue() {\n if(isEmpty()) throw new NoSuchElementException();\n int idx = StdRandom.uniform(size);\n Item item = arr[idx];\n size--;\n arr[idx] = arr[size];\n arr[size] = null;\n if (size > 0 && size == arr.length / 4){\n resize(arr.length / 2);\n }\n return item;\n }", "@Test\r\n\tpublic void testRemoveItem() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"B\");\r\n\t\tassertEquals(test, vendMachine.removeItem(\"B\"));\r\n\t}", "public DataItem removeItem()\r\n\t{\r\n\t\tDataItem temp=itemArray[numItems-1];\r\n\t\titemArray[numItems-1]=null;\r\n\t\tnumItems--;\r\n\t\treturn temp;\r\n\t}", "public int getRandom() {\n int index = rnd.nextInt(list.size());\n return list.get(index).val;\n }", "public Item dequeue() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tint index = StdRandom.uniform(0,n);\r\n\t\t\tItem toBeRemoved = queue[index];\r\n\t\t\tqueue[index] = queue[n-1];\r\n\t\t\tqueue[n-1] = null;\r\n\t\t\tn--;\r\n\t\t\tif (n > 0 && n == queue.length/4) {\r\n\t\t\t\tItem[] temp = (Item[]) new Object[queue.length/2];\r\n\t\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\t\ttemp[i] = queue[i];\r\n\t\t\t\t}\r\n\t\t\t\tqueue = temp;\r\n\t\t\t}\r\n\t\t\treturn toBeRemoved;\r\n\t\t}\r\n\t}", "public Item sample() {\n if (size == 0) throw new NoSuchElementException();\n return queue[StdRandom.uniform(size)];\n }", "public int getRandom() {\r\n if ((itemSize / nextIndexInCache) < 0.25) {\r\n rebuildCache();\r\n }\r\n while (true) {\r\n int i = random.nextInt(nextIndexInCache);\r\n int v = cache[i];\r\n if (contains(v)) {\r\n return v;\r\n }\r\n }\r\n }", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"\");\n int i = randomNotEmptyIndex();\n return queue[i];\n }", "public Item sample() {\n\t\tif (size == 0)\n\t\t\tthrow new java.util.NoSuchElementException();\n\n\t\tint index = StdRandom.uniform(size);\n\t\treturn queue[index];\n\t}", "public Item dequeue() {\n if (isEmpty())\n throw new NoSuchElementException();\n\n // Get random index [0, elements) and remove from array\n int randomIndex = StdRandom.uniform(0, elements);\n Item removed = values[randomIndex];\n\n // Move last added item to fill the gap\n if (randomIndex != elements - 1)\n values[randomIndex] = values[elements - 1];\n\n values[elements - 1] = null;\n elements--;\n\n // Resize the array if necessary\n if (elements < values.length / 4)\n resize(values.length / 2);\n\n return removed;\n }", "public Item dequeue() {\n\n if (size == 0) {\n throw new NoSuchElementException();\n }\n\n int r = random.nextInt(size);\n Item item = queue[r];\n size--;\n queue[r] = queue[size];\n queue[size] = null;\n\n if (size > 0 && size <= queue.length / 4) {\n resizeQueue(queue.length / 2);\n }\n return item;\n }", "public int getRandom() {\n return elementsList.get(rand.nextInt(elementsList.size()));\n }", "public int getRandom() {\n return sub.get(rand.nextInt(sub.size()));\n }", "public void removeItem(){\n\t\tthis.item = null;\n\t}", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"Empty queue\");\n\n int rdm = StdRandom.uniform(n);\n return a[rdm];\n }", "public Item dequeue() {\n if (N == 0) throw new java.util.NoSuchElementException();\n int rand_num = rnd.nextInt(N);\n Item item = collection[rand_num];\n collection[rand_num] = collection[--N];\n collection[N] = null;\n if (N > 0 && N == collection.length / 4) \n resize(collection.length / 2);\n return item;\n }", "public Item dequeue() {\n\n\t\tif(isEmpty()) throw new NoSuchElementException();\n\n\t\tItem item = items[N-1];\n\t\titems[N-1] = null;\n\t\tN--;\n\t\t\n\t\tif(N > 0 && N == items.length/4) resize(items.length/2);\n\t\t\n\t\t/*int index = StdRandom.uniform(length());\n\t\twhile(items[index] == null) {\n\t\t\tindex = StdRandom.uniform(length());\n\t\t}\n\n\t\tItem item = items[index];\n\t\titems[index] = null;\n\t\tN--;\n\t\t*/\t\n\t\treturn item;\n\t}", "public Item sample(){\n if(itemCount == 0){\n throw new NoSuchElementException(\"Queue is empty\");\n }\n int rand = StdRandom.uniform(array.length);\n while(array[rand] == null){ // if it's a null value\n rand = StdRandom.uniform(array.length); // pick another one\n }\n return array[rand];\n }", "public Item dequeue() {\n if (isEmpty()) throw new NoSuchElementException(\"Empty queue\");\n\n int rdm = StdRandom.uniform(n);\n Item item = a[rdm];\n a[rdm] = a[n-1];\n a[n-1] = null;\n n--;\n\n if (n > 0 && n == a.length/4) resize(a.length/2);\n return item;\n }", "public int getRandom() {\n Random rand = new Random();\n return list.get(rand.nextInt(linklist.size()));\n }", "public Item sample() {\n if (N == 0) throw new NoSuchElementException();\n int idx = StdRandom.uniform(N);\n return s[first + idx];\n }", "public Item dequeue() {\n if (n == 0) throw new NoSuchElementException();\n if (arr.length/4 == n) resize(arr.length/2);\n\n int i = StdRandom.uniform(n);\n Item itemToReturn = arr[i];\n\n if (i < n - 1) {\n arr[i] = arr[n - 1];\n arr[n - 1] = null;\n } else {\n arr[i] = null;\n }\n\n n--;\n return itemToReturn;\n }", "public Item sample() {\n if (this.isEmpty()) {\n throw new NoSuchElementException();\n }\n if (this.size == 1) {\n return this.storage[0];\n }\n else {\n return this.storage[StdRandom.uniform(this.currentIndex)];\n }\n }", "public T sampleWithRemoval(boolean useMostLikely) {\n\t\tT result = sample(useMostLikely);\n\t\tremove(result);\n\t\tnormaliseProbs();\n\t\treturn result;\n\t}", "public Object removeItem (String key);", "public DataItem removeItem()\n\t{\n\t\tDataItem temp = itemArray[numItems-1];\n\t\titemArray[numItems-1] = null;\n\t\tnumItems--;\n\t\treturn temp;\n\t}", "public int getRandom() {\n Random random = new Random();\n int val = list.get( random.nextInt(list.size()));\n return val;\n }", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return a[StdRandom.uniform(N)];\n }", "public Item dequeue() {\n if (size == 0) throw new NoSuchElementException();\n if (size > 0 && size == queue.length / 4) resizeArray(queue.length / 2);\n int randomInt = StdRandom.uniform(size);\n Item item = queue[randomInt];\n queue[randomInt] = queue[--size];\n queue[size] = null;\n return item;\n }", "public int quantityDropped(Random random)\r\n {\r\n return 0;\r\n }", "public Item sample() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn queue[StdRandom.uniform(0,n)];\r\n\t\t}\r\n\t}", "private <T> T getRandomElement(List<T> list) {\n return list.get(randomInt(0, list.size()));\n }", "@Override\n\tpublic Item getItemDropped(int par1, Random par2Random, int par3) {\n\t\treturn Item.getItemFromBlock(this);\n\t}", "public Item dequeue() {\n if (isEmpty()) {\n throw new java.util.NoSuchElementException();\n }\n int removeIndex = StdRandom.uniform(1, size + 1);\n Item item;\n //case 1: remove first item\n if (removeIndex == 1) {\n item = first.item;\n first = first.next;\n }\n //case 2 :remove last item\n else if (removeIndex == size) {\n item = last.item;\n Node temp = first;\n while (temp.next.next != null) {\n temp = temp.next;\n }\n last = temp;\n last.next = null;\n }\n //case 3: general case in between\n else {\n Node temp = first;\n while (removeIndex != 2) {\n temp = temp.next;\n removeIndex--;\n }\n item = temp.next.item;\n Node temp2 =temp.next.next;\n temp.next = temp2;\n }\n size--;\n return item;\n }", "public int generateRandom(Random ran)\n {\n if(nums.size()<=0)\n {\n Log.i(\"test\",\"No Pokemon left\");\n return 0;\n }\n return nums.remove(ran.nextInt(nums.size()));\n }", "public int getRandom() {\r\n var list = new ArrayList<>(set);\r\n return list.get(new Random().nextInt(set.size()));\r\n }", "public void removeRandom() {\n Node[] nodes = getRandomNonterminalNode(false);\n if (nodes == null)\n return;\n \n // Generate random DecisionNode to replace\n DecisionNode replacementNode = DecisionNode.getRandom();\n \n // Update prev reference\n if (nodes[PREV].left == nodes[CURR]){\n nodes[PREV].left = replacementNode;\n } else {\n nodes[PREV].right = replacementNode;\n }\n }", "public Item sample() {\n if (size == 0) throw new NoSuchElementException();\n return array[StdRandom.uniform(size)];\n }", "public int getRandom() {\n int n = l.size();\n Random rand = new Random();\n return l.get(rand.nextInt(n));\n }", "@Override\n public Item removeItem(int itemNum) throws VendingMachinePersistenceException {\n loadItemFile();\n Item itemToRemove = itemMap.remove(itemNum);\n writeItemFile();\n\n return itemToRemove;\n }", "public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}", "@Test\r\n\tpublic void randomTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getRandom(0);\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute search of random items: SQLException\");\r\n\t\t}\r\n\t}", "public Item dequeue(){\n if(isEmpty()){\n throw new NoSuchElementException();\n }\n int ri = StdRandom.uniform(size);\n \n Node<Item> current = this.head;\n \n for(int i = 0; i < ri; i++){\n current = current.next;\n }\n \n Node<Item> removed = current;\n \n if(current.next != null){\n current.next.prev = current.prev;\n } else {\n this.tail = current.prev;\n }\n if(current.prev != null){\n current.prev.next = current.next;\n } else {\n this.head = current.next;\n }\n if(current.next == null && current.prev == null){\n this.head = null;\n this.tail = null;\n }\n size--;\n return removed.data;\n }", "@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }", "public Item sample() {\n\n\t\tif (isEmpty())\n\t\t\tthrow new NoSuchElementException();\n\n\t\tint random = (int)(StdRandom.uniform() * N);\n\t\treturn arr[random];\n\t}", "public String removeItem() {\n userFacade.printUsersCart(user);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n //user.getCart().remove(selectedItem);\n userFacade.removeFromCart(user, selectedItem);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n userFacade.printUsersCart(user);\n return \"\";\n }", "public int getRandom() {\n int idx;\n Random rand;\n \n rand = new Random();\n idx = rand.nextInt(set.size());\n return set.get(idx);\n }", "private Shirt getRandomShirt() {\n String selectQuery = \"SELECT * FROM \" + ShirtEntry.TABLE_NAME + \" ORDER BY RANDOM() LIMIT 1\";\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // Extract shirt details\n if (c.moveToFirst()) {\n int shirtId = c.getInt((c.getColumnIndex(ShirtEntry._ID)));\n String shirtPath = c.getString(c.getColumnIndex(ShirtEntry.IMG_PATH));\n\n c.close();\n return new Shirt(shirtId, shirtPath);\n } else {\n return null;\n }\n }", "public Item sample() {\n if (isEmpty()) {\n throw new java.util.NoSuchElementException();\n }\n int sampleIndex = StdRandom.uniform(1, size + 1);\n Item item;\n //case 1: return first item\n if (sampleIndex == 1) {\n item = first.item;\n }\n //case 2 :return last item\n else if (sampleIndex == size) {\n item = last.item;\n }\n //case 3: general case in between\n else {\n Node temp = first;\n while (sampleIndex != 1) {\n temp = temp.next;\n sampleIndex--;\n }\n item = temp.item;\n }\n return item;\n }" ]
[ "0.78752136", "0.7749351", "0.7658643", "0.75074434", "0.69519717", "0.6937248", "0.68873894", "0.6786662", "0.675549", "0.66103405", "0.65982133", "0.6587726", "0.6519407", "0.6474134", "0.64650726", "0.6447275", "0.6440797", "0.642409", "0.64096725", "0.6407933", "0.6367563", "0.6363824", "0.63452286", "0.6344818", "0.63407654", "0.632939", "0.63185483", "0.6314599", "0.6308909", "0.62935543", "0.62874097", "0.62862796", "0.6273596", "0.6269254", "0.6264206", "0.6258165", "0.6249762", "0.6236936", "0.6236712", "0.6224221", "0.62237996", "0.6220301", "0.6210209", "0.6207496", "0.62061626", "0.6203642", "0.6192964", "0.6188926", "0.61859524", "0.6185179", "0.6181245", "0.6166257", "0.61469334", "0.6145623", "0.61384326", "0.61345977", "0.6129742", "0.612537", "0.61237276", "0.612194", "0.61118203", "0.6109561", "0.6097524", "0.60933435", "0.6086796", "0.6086601", "0.60802877", "0.60676545", "0.6064505", "0.60622555", "0.60537714", "0.6050117", "0.6039932", "0.6034231", "0.6027524", "0.60272956", "0.60235393", "0.60183245", "0.60164595", "0.60093164", "0.60031223", "0.5999418", "0.59945303", "0.59925455", "0.59908384", "0.59625995", "0.5940297", "0.5938531", "0.59371203", "0.59234095", "0.59225935", "0.591764", "0.59144604", "0.5892601", "0.587738", "0.5877044", "0.58766663", "0.5867662", "0.5863071", "0.58608097", "0.58495414" ]
0.0
-1
Returns random item without remove
public Item sample() { if (qSize == 0) { throw new java.util.NoSuchElementException("Empty queue"); } return queue[StdRandom.uniform(qSize)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getRandomElement() {\n\t\treturn this.itemList.get(this.getRandomIndex());\n\t}", "public Item getRandomItem() {\n int index = 0;\n int i = (int) (Math.random() * getItems().size()) ;\n for (Item item : getItems()) {\n if (index == i) {\n return item;\n }\n index++;\n }\n return null;\n }", "public Item generateItem()\n {\n Random rand = new Random();\n int item = rand.nextInt(itemList.size());\n return itemList.get(item);\n }", "public T removeRandom();", "public T removeRandom ();", "public Item sample() {\n\t\t\n\t\tif(isEmpty()) throw new NoSuchElementException();\n\t\t\n\t\tint index = StdRandom.uniform(N);\n\t\t\t\n\t\t\t/*while(items[index] == null) {\n\t\t\t\tindex = StdRandom.uniform(length());\n\t\t\t}*/\n\n\t\treturn items[index];\n\t}", "@Override\r\n\tpublic Item sample() {\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\treturn item;\r\n\t}", "public ArrayList<RandomItem> getRandomItems();", "public int getRandom() {\n return _list.get( rand.nextInt(_list.size()) );\n }", "public int getRandom() {\r\n if ((itemSize / nextIndexInCache) < 0.25) {\r\n rebuildCache();\r\n }\r\n while (true) {\r\n int i = random.nextInt(nextIndexInCache);\r\n int v = cache[i];\r\n if (contains(v)) {\r\n return v;\r\n }\r\n }\r\n }", "public Item sample(){\n if(size == 0){\n throw new NoSuchElementException();\n }\n int ri = StdRandom.uniform(size);\n \n Iterator<Item> it = this.iterator();\n \n for(int i = 0; i < ri; i++){\n it.next();\n }\n \n return it.next();\n }", "private static ItemType random() {\n return ITEM_TYPES.get(RANDOM.nextInt(SIZE));\n }", "public int getRandom() {\n int x=rand.nextInt(li.size());\n return li.get(x);\n }", "public int getRandom() {\n int index = (int) Math.round(Math.random()*(list.size()-1));\n return list.get(index);\n }", "public int getRandom() {\n return lst.get(rand.nextInt(lst.size()));\n }", "public int getRandom() {\n int i = random.nextInt(list.size());\n return list.get(i);\n }", "public Item sample() {\n if (N == 0) throw new java.util.NoSuchElementException();\n return collection[rnd.nextInt(N)];\n }", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n double rand = Math.random() * N;\n int idx = (int) Math.floor(rand);\n Item item = s[idx];\n return item;\n }", "public Item sample() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the number is: \" + index);\n int k = 0;\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t return p.item;\n }", "public Item sample()\r\n {\r\n if (isEmpty()) throw new NoSuchElementException(\"Empty randomized queue\");\r\n\r\n int randomizedIdx = StdRandom.uniform(n);\r\n\r\n return a[randomizedIdx];\r\n }", "public Item sample() {\n \t\tif (size == 0) {\n \t\t\tthrow new NoSuchElementException();\n \t\t}\n \t\treturn (Item) items[StdRandom.uniform(size)];\n \t}", "public int getRandom() {\n Random random = new Random();\n int i = random.nextInt(list.size());\n return list.get(i);\n }", "public String remove(){\n ListIterator<String> iter = bookkeeper.listIterator();\n int random = (int)(Math.random()*bookkeeper.size());\n System.out.println(\"\\n\\n***RANDOM = \" + random);\n String retrieve = bookkeeper.get(random);\n int i = -1; while (i<random){ i++; iter.next(); } iter.remove();\n return retrieve;\n }", "public Item sample() {\n if(isEmpty()) throw new NoSuchElementException();\n int idx = StdRandom.uniform(size);\n return arr[idx];\n }", "private Item chooseValidItem()\n {\n\n // Sets the intial random value.\n int numberRandom = random.nextInt(items.size());\n\n while (trackItems.contains(items.get(numberRandom).getName())){\n numberRandom = random.nextInt(items.size());\n }\n\n // Loops until a unused value is assigned to numberRandom,\n // within the array list size.\n \n trackItems.push(items.get(numberRandom).getName());\n\n return items.get(numberRandom);\n }", "private <T> T getRandomElement(List<T> list) {\n return list.get(randomInt(0, list.size()));\n }", "public int getRandom() {\n Random random = new Random();\n return list.get(random.nextInt(list.size()));\n }", "public int getRandom() {\n if(list.size() <= 0) return -1;\n return list.get(new Random().nextInt(list.size()));\n }", "public int getRandom() {\n int index = rnd.nextInt(list.size());\n return list.get(index).val;\n }", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return a[StdRandom.uniform(N)];\n }", "public int getRandom() {\r\n var list = new ArrayList<>(set);\r\n return list.get(new Random().nextInt(set.size()));\r\n }", "public Item sample() {\n\n if (size == 0) {\n throw new NoSuchElementException();\n }\n\n int r = random.nextInt(size);\n return queue[r];\n }", "public int getRandom() {\n return sub.get(rand.nextInt(sub.size()));\n }", "public Item sample() {\n if (N == 0) throw new NoSuchElementException();\n int idx = StdRandom.uniform(N);\n return s[first + idx];\n }", "public int getRandom() {\n if (this.size == 0) throw new IllegalArgumentException();\n Random rand = new Random();\n int randomGetIndex = rand.nextInt(this.size);\n return this.list.get(randomGetIndex);\n }", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"deque underflow \");\n Item item;\n int randomIndex = StdRandom.uniform(N);\n while(randomizedQueue[randomIndex] == null){\n randomIndex = StdRandom.uniform(N);\n }\n item = randomizedQueue[randomIndex];\n \n return item;\n }", "public Item sample() {\n if (isEmpty())\n throw new NoSuchElementException();\n\n // Get random index [0, elements) and remove from array\n int randomIndex = StdRandom.uniform(0, elements);\n return values[randomIndex];\n }", "public int getRandom() {\n int idx;\n Random rand;\n \n rand = new Random();\n idx = rand.nextInt(set.size());\n return set.get(idx);\n }", "public void addRandomItem(RandomItem item);", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"Empty queue\");\n\n int rdm = StdRandom.uniform(n);\n return a[rdm];\n }", "public Item sample() {\n if (size == 0) throw new NoSuchElementException();\n return queue[StdRandom.uniform(size)];\n }", "public int getRandom() {\n Random random = new Random();\n int val = list.get( random.nextInt(list.size()));\n return val;\n }", "public int getRandom() {\n int n = l.size();\n Random rand = new Random();\n return l.get(rand.nextInt(n));\n }", "public Item sample() {\n if (size == 0) throw new NoSuchElementException();\n return array[StdRandom.uniform(size)];\n }", "public Item sample() {\n\t\tif (size == 0)\n\t\t\tthrow new java.util.NoSuchElementException();\n\n\t\tint index = StdRandom.uniform(size);\n\t\treturn queue[index];\n\t}", "public int getRandom() {\n Random rand = new Random();\n return list.get(rand.nextInt(linklist.size()));\n }", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"\");\n int i = randomNotEmptyIndex();\n return queue[i];\n }", "public int getRandom() {\n return elementsList.get(rand.nextInt(elementsList.size()));\n }", "public void clearRandomItems();", "public T sample() {\r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n int rValue = r.nextInt(size);\r\n return elements[rValue];\r\n }", "public T sample() {\r\n if (size == 0) {\r\n return null;\r\n }\r\n int r = new Random().nextInt(size());\r\n return elements[r];\r\n }", "@Override\n public <T> T getRandomElement(List<T> list) {\n return super.getRandomElement(list);\n }", "public Item sample() {\n if (size == 0) throw new java.util.NoSuchElementException(\"Queue is empty!\");\n\n return items[StdRandom.uniform(size)];\n }", "public Item sample() {\n\n\t\tif (isEmpty())\n\t\t\tthrow new NoSuchElementException();\n\n\t\tint random = (int)(StdRandom.uniform() * N);\n\t\treturn arr[random];\n\t}", "public Item sample() {\r\n\t\tif (isEmpty()) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn queue[StdRandom.uniform(0,n)];\r\n\t\t}\r\n\t}", "private IUnit getRandomListUnit(){\n\t\treturn unitList.get(rnd.nextInt(unitListSize()));\n\t}", "public Item sample() {\n if (this.isEmpty()) {\n throw new NoSuchElementException();\n }\n if (this.size == 1) {\n return this.storage[0];\n }\n else {\n return this.storage[StdRandom.uniform(this.currentIndex)];\n }\n }", "public Item sample(){\n if(itemCount == 0){\n throw new NoSuchElementException(\"Queue is empty\");\n }\n int rand = StdRandom.uniform(array.length);\n while(array[rand] == null){ // if it's a null value\n rand = StdRandom.uniform(array.length); // pick another one\n }\n return array[rand];\n }", "public T getRandom()\n\t{\n\t\tDLLNode<T> newNode = head;\n\t\tint randomNum = (int)(Math.random()*size);\n\t\tfor(int i =0; i<randomNum; i++){\n\t\t\tnewNode= newNode.getNext();\n\t\t}\n\t\treturn newNode.getData();\n\t}", "public Item sample() {\n if (n == 0) throw new NoSuchElementException();\n return arr[StdRandom.uniform(n)];\n }", "private double getRandom() {\n return 2*Math.random() - 1;\n }", "public int getRandom() {\n Iterator<Integer> it = list.iterator();\n int i = (int) (Math.random()*list.size());\n for (int j = 0; j < i; j++) {\n it.next();\n }\n return it.next();\n }", "private Shirt getRandomShirt() {\n String selectQuery = \"SELECT * FROM \" + ShirtEntry.TABLE_NAME + \" ORDER BY RANDOM() LIMIT 1\";\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // Extract shirt details\n if (c.moveToFirst()) {\n int shirtId = c.getInt((c.getColumnIndex(ShirtEntry._ID)));\n String shirtPath = c.getString(c.getColumnIndex(ShirtEntry.IMG_PATH));\n\n c.close();\n return new Shirt(shirtId, shirtPath);\n } else {\n return null;\n }\n }", "@Test\r\n\tpublic void randomTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tItem tempSet[] = item.getRandom(0);\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute search of random items: SQLException\");\r\n\t\t}\r\n\t}", "public int getRandom() {\n Random rand = new Random();\n int idx = rand.nextInt(validLength);\n return set.get(idx);\n }", "Randomizer getRandomizer();", "private IUnit getRandomCacheUnit(){\n\t\tcache = new UnitCache();\n\t\treturn cache.getUnit(rnd.nextInt(cache.getSize()));\n\t}", "public int getRandom() {\n return data.get(random.nextInt(data.size()));\n }", "public Item sample()\n {\n checkNotEmpty();\n\n return items[nextIndex()];\n }", "public int getRandom() {\n ListNode pick = null;\n ListNode p = head;\n int count = 1;\n while (p != null) {\n if (rand.nextInt(count) == 0) {\n pick = p;\n }\n p = p.next;\n count++;\n }\n return pick.val;\n }", "public int getRandom() {\n return A.get(r.nextInt(A.size()));\n }", "public Item sample() {\n if (isEmpty()) {\n throw new java.util.NoSuchElementException();\n }\n int sampleIndex = StdRandom.uniform(1, size + 1);\n Item item;\n //case 1: return first item\n if (sampleIndex == 1) {\n item = first.item;\n }\n //case 2 :return last item\n else if (sampleIndex == size) {\n item = last.item;\n }\n //case 3: general case in between\n else {\n Node temp = first;\n while (sampleIndex != 1) {\n temp = temp.next;\n sampleIndex--;\n }\n item = temp.item;\n }\n return item;\n }", "public int getRandom() {\n int randomIdx = random.nextInt(valueList.size());\n return valueList.get(randomIdx);\n }", "private Trouser getRandomTrouser() {\n String selectQuery = \"SELECT * FROM \" + TrouserEntry.TABLE_NAME + \" ORDER BY RANDOM() LIMIT 1\";\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // Extract shirt details\n if (c.moveToFirst()) {\n int trouserId = c.getInt((c.getColumnIndex(TrouserEntry._ID)));\n String trouserPath = c.getString(c.getColumnIndex(TrouserEntry.IMG_PATH));\n\n c.close();\n return new Trouser(trouserId, trouserPath);\n } else {\n return null;\n }\n }", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public int getRandom() {\n return arr.get(r.nextInt(arr.size()))[0];\n }", "public Random getRandom() {\n\t\treturn (rand);\n\t}", "public Clue getRandomClue()\n {\n HashMap<String, Clue> usableClues = getUseableClues();\n ArrayList<Clue> list = new ArrayList<>(usableClues.values());\n int i = rand.nextInt(usableClues.size());\n return list.get(i);\n }", "public int getRandom() {\n return data.get(random.nextInt(data.size()));\n }", "public static Dog getSomeRandomDog() {\r\n\t\treturn dogsList.get(random.nextInt(dogsList.size()));\r\n\t}", "public <T> T of(List<T> list) {\n return list.get(random.nextInt(list.size() - 1));\n }", "private ArrayList<String> getRandQuestion() \n\t{\t\n\t\tquestionUsed = true;\n\t\t\n\t\tRandom randomizer = new Random();\n\t\tint randIdx = 0;\n\t\t\n\t\tif(questionsUsed.isEmpty())\n\t\t\trandIdx = randomizer.nextInt(allQuestions.size());\n\t\telse\n\t\t{\n\t\t\twhile(questionUsed)\n\t\t\t{\n\t\t\t\trandIdx = randomizer.nextInt(allQuestions.size());\n\t\t\t\tcheckIfQuestionUsed(randIdx);\n\t\t\t}\n\t\t}\n\t\t\n\t\tquestionsUsed.add(randIdx);\n\t\t\n\t\treturn allQuestions.get(randIdx);\n\t}", "public Vector<String> getRandom(){\n\t\t\n\t\tAssert.pre(size()>0, \"data must be initialized\");\n\t\t\n\t\tint n = r.nextInt(size());\n\t\t\n\t\treturn get(n);\n\t}", "public Item sample() {\n if (size == 0) \n throw new NoSuchElementException(\"the RandomizedQueue is empty\");\n return rqArrays[StdRandom.uniform(0, size)];\n }", "protected NNode getRandomNode() {\n\t\tArrayList<NNode> nodearr = new ArrayList<NNode>();\n\t\tnodearr.addAll(nodes.values());\n\t\treturn nodearr.get(Braincraft.randomInteger(nodearr.size()));\n\t}", "public int getRandom() {\n int n = set.size();\n if (n == 0) return 0;\n Object[] res = set.toArray();\n Random rand = new Random();\n int result = rand.nextInt(n);\n return (Integer)res[result];\n }", "private void random() {\n\n\t}", "public Item dequeue() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n double rand = Math.random() * N;\n int randIdx = (int) Math.floor(rand);\n Item item = s[randIdx];\n N--;\n s[randIdx] = s[N];\n s[N] = null;\n if (N > 0 && N == s.length / 4) {\n resize(s.length / 2);\n }\n return item;\n }", "public static int randomGet() { return 0; }", "public static <T> T getRandomElement(List<T> list) {\n \tint index = (int) (Math.random() * list.size());\n \treturn list.get(index);\n }", "private int getRandNumber() {\n int randNum = 0;\n Random generator = new Random();\n randNum = generator.nextInt(LIST.length()-1);\n return randNum;\n }", "public DataSetMember<t> getRandomMember()\n\t{\n\t\tRandom R = new Random();\n\t\tint i = R.nextInt(_data.size());\n\t\treturn _data.get(i);\n\t}", "public int generateRandom(Random ran)\n {\n if(nums.size()<=0)\n {\n Log.i(\"test\",\"No Pokemon left\");\n return 0;\n }\n return nums.remove(ran.nextInt(nums.size()));\n }", "public String getRandom() {\n\t return word.get(new Random().nextInt(word.size()));}", "public int getRandom() {\n Integer ans = null;\n while (ans == null) {\n int r = random.nextInt(size);\n ans = allSet[r];\n if (!realSet.contains(ans)) {\n ans = allSet[r] = null;\n }\n }\n return ans;\n }", "public int getRandom() {\r\n\r\n\t\tListNode temp = this.head;\r\n\t\tListNode random = this.head;\r\n\r\n\t\tint c = 1;\r\n\r\n\t\tfor (; temp != null; temp = temp.next) {\r\n\r\n\t\t\tint r = new Random().nextInt(c) + 1;\r\n\r\n\t\t\tc++;\r\n\t\t\tif (r == 1) {\r\n\t\t\t\trandom = temp;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn random.val;\r\n\r\n\t}", "public int getRandom() {\n ListNode curr = head2;\n int r = rand.nextInt(size);\n for (int i=0; i<r; i++) {\n if (curr!= null){\n curr = curr.next;\n }\n }\n return curr.val;\n }", "public int getRandom() {\n int index = (int) Math.floor(Math.random() * size);\n return nums[index];\n }", "private String randomProductName() {\n\n String productName = this.products.get(intRandom(products.size() - 1));\n return productName;\n }", "public int getRandom() {\r\n\r\n\t\tint rand = (int) (Math.random() * BUCKET_SIZE);\r\n\t\tfor (int i = rand; (i + 1) % BUCKET_SIZE != rand; i = (++i) % BUCKET_SIZE) {\r\n\t\t\tif (bucket[i] == null)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tint rand2 = (int) (Math.random() * bucket[i].size);\r\n\r\n\t\t\tNode p = bucket[i].list;\r\n\t\t\tfor (int j = 0; j < rand2; ++j)\r\n\t\t\t\tp = p.next;\r\n\r\n\t\t\treturn p.val;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}" ]
[ "0.7774701", "0.77620685", "0.7691794", "0.7656986", "0.76101524", "0.74995047", "0.7488308", "0.73904335", "0.7359264", "0.73550206", "0.73290944", "0.7292968", "0.72847664", "0.72554326", "0.72453886", "0.72272253", "0.72239053", "0.72231936", "0.72015893", "0.7197356", "0.71753883", "0.71729743", "0.7162241", "0.7151511", "0.7134326", "0.7116125", "0.7079893", "0.70696825", "0.7057256", "0.70387447", "0.70371425", "0.7031096", "0.7031056", "0.702504", "0.70154965", "0.69998074", "0.6966207", "0.6965873", "0.69646156", "0.69572747", "0.6937287", "0.6933941", "0.69254214", "0.6924282", "0.6921345", "0.69191706", "0.689952", "0.68828946", "0.68828684", "0.6882356", "0.68769735", "0.68614036", "0.6861251", "0.68604255", "0.68345207", "0.68341357", "0.681387", "0.68057716", "0.6794164", "0.6785807", "0.6746406", "0.6746263", "0.6741037", "0.67389625", "0.671414", "0.67024016", "0.66805416", "0.66802156", "0.6669329", "0.6666979", "0.6663215", "0.6655903", "0.66528916", "0.6647329", "0.66433513", "0.66376626", "0.6628016", "0.66245496", "0.66224027", "0.66210955", "0.66088367", "0.65989995", "0.6571431", "0.6560104", "0.65360093", "0.6528447", "0.65247643", "0.6522364", "0.6507767", "0.6488966", "0.6479718", "0.6465781", "0.64584345", "0.64460737", "0.64431095", "0.64393306", "0.6434456", "0.6416584", "0.6397145", "0.6393515" ]
0.6397682
98
Returns iterator in random order
public Iterator<Item> iterator() { return new RandomArrayIterator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterator<Item> iterator() { return new RandomIterator();}", "public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }", "public Iterator<Item> iterator() {\n return new RandomIterator(N, a);\n }", "public Iterator<Item> iterator() {\n return new RandomIterator();\n }", "public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }", "public Iterator<Item> iterator() {\n StdRandom.shuffle(array, head, tail);\n return new RandomizedQueueIterator();\n }", "public Iterator<Item> iterator() {\n return new RandomizedArrayIterator();\n }", "public Iterator<Item> iterator() {\n \t\treturn new RandomizedQueueIterator<Item>();\n \t}", "public Iterator<Item> iterator() {\n Item[] temp = (Item[]) new Object[size];\n System.arraycopy(array, 0, temp, 0, size);\n return (new RandomIterator(temp));\n }", "public Iterator<Item> iterator() {\r\n\t\treturn new RandomizedQueueIterator();\r\n\t\t\r\n\t}", "public interface RandomAccessIterator extends BidirectionalIterator\n {\n /**\n * Return the index of my current position.\n */\n public int index();\n\n /**\n * Return true if I'm before a specified iterator.\n * @param iterator The iterator to compare myself against.\n */\n public boolean less( RandomAccessIterator iterator );\n\n /**\n * Return a clone of myself.\n */\n public Object clone();\n }", "public Iterator<Item> iterator()\n {\n return new RandomizedQueueIterator();\n }", "@Override\r\n\tpublic Iterator<Item> iterator() {\r\n\t\treturn new RandomizedQueueIterator();\r\n\t}", "@Override\n public Iterator<Item> iterator() {\n return new RandomizedQueueIterator();\n }", "public Iterator<Item> iterator() {\n return new RandomizedQueueIterator();\n }", "public Iterator<Item> iterator() {\n return new RandomizedQueueIterator();\n }", "public Iterator<Item> iterator() {\n return new RandomizedQueueIterator();\n }", "public Iterator<Item> iterator() {\n\t\treturn new RandomizedQueueIterator();\n\t}", "private ArrayIterator(){\n itemsRemaining = itemCount;\n temp = (Item[]) new Object[itemCount]; //slightly less than N\n reset();\n StdRandom.shuffle(temp);\n }", "public Item sample(){\n if(size == 0){\n throw new NoSuchElementException();\n }\n int ri = StdRandom.uniform(size);\n \n Iterator<Item> it = this.iterator();\n \n for(int i = 0; i < ri; i++){\n it.next();\n }\n \n return it.next();\n }", "@Test\r\n public void sequentialHasNextInvocationDoesntAffectRetrievalOrder() {\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.hasNext(), is(true));\r\n assertThat(it.next(), is(2));\r\n assertThat(it.next(), is(4));\r\n assertThat(it.next(), is(6));\r\n }", "public boolean less( RandomAccessIterator iterator );", "public Item sample() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the number is: \" + index);\n int k = 0;\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t return p.item;\n }", "public Item sample() {\n if (N == 0) throw new java.util.NoSuchElementException();\n return collection[rnd.nextInt(N)];\n }", "@Override\r\n\tpublic Iterator<T> iterator() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn this.iteratorInOrder();\r\n\t}", "public Iterator<T> iterator() {\r\n return byGenerations();\r\n }", "public T next(final Random random) {\n return elements[selection.applyAsInt(random)];\n }", "public T next() {\r\n if (!hasNext()) {\r\n throw new NoSuchElementException();\r\n }\r\n \r\n Random r = new Random();\r\n int rValue = r.nextInt(length);\r\n T next = items[rValue];\r\n // Switch rValue with last item if it is not last item\r\n if (rValue != (length - 1)) {\r\n items[rValue] = items[length - 1];\r\n items[length - 1] = next;\r\n }\r\n length--;\r\n return next;\r\n }", "public Order generateNext();", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return a[StdRandom.uniform(N)];\n }", "public Item sample() {\n\t\tif (size == 0)\n\t\t\tthrow new java.util.NoSuchElementException();\n\n\t\tint index = StdRandom.uniform(size);\n\t\treturn queue[index];\n\t}", "public Iterator <item_t> iterator () {\n return new itor ();\n }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public ArrayList<RandomItem> getRandomItems();", "public Item sample() {\n\n if (size == 0) {\n throw new NoSuchElementException();\n }\n\n int r = random.nextInt(size);\n return queue[r];\n }", "public int getRandom() {\n Iterator<Integer> it = list.iterator();\n int i = (int) (Math.random()*list.size());\n for (int j = 0; j < i; j++) {\n it.next();\n }\n return it.next();\n }", "public Item sample() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n double rand = Math.random() * N;\n int idx = (int) Math.floor(rand);\n Item item = s[idx];\n return item;\n }", "public Item sample() {\n \t\tif (size == 0) {\n \t\t\tthrow new NoSuchElementException();\n \t\t}\n \t\treturn (Item) items[StdRandom.uniform(size)];\n \t}", "public Item sample() {\n if (N == 0) throw new NoSuchElementException();\n int idx = StdRandom.uniform(N);\n return s[first + idx];\n }", "public int getRandom() {\r\n if ((itemSize / nextIndexInCache) < 0.25) {\r\n rebuildCache();\r\n }\r\n while (true) {\r\n int i = random.nextInt(nextIndexInCache);\r\n int v = cache[i];\r\n if (contains(v)) {\r\n return v;\r\n }\r\n }\r\n }", "public Item sample() {\n\t\t\n\t\tif(isEmpty()) throw new NoSuchElementException();\n\t\t\n\t\tint index = StdRandom.uniform(N);\n\t\t\t\n\t\t\t/*while(items[index] == null) {\n\t\t\t\tindex = StdRandom.uniform(length());\n\t\t\t}*/\n\n\t\treturn items[index];\n\t}", "@Override\n\tpublic Iterator<T> iteratorPreOrder() {\n\t\treturn null;\n\t}", "Iterator<T> iterator();", "public Item sample() {\n if (this.isEmpty()) {\n throw new NoSuchElementException();\n }\n if (this.size == 1) {\n return this.storage[0];\n }\n else {\n return this.storage[StdRandom.uniform(this.currentIndex)];\n }\n }", "public Item sample() {\n if (size == 0) throw new NoSuchElementException();\n return queue[StdRandom.uniform(size)];\n }", "private ArrayList<String> getRandQuestion() \n\t{\t\n\t\tquestionUsed = true;\n\t\t\n\t\tRandom randomizer = new Random();\n\t\tint randIdx = 0;\n\t\t\n\t\tif(questionsUsed.isEmpty())\n\t\t\trandIdx = randomizer.nextInt(allQuestions.size());\n\t\telse\n\t\t{\n\t\t\twhile(questionUsed)\n\t\t\t{\n\t\t\t\trandIdx = randomizer.nextInt(allQuestions.size());\n\t\t\t\tcheckIfQuestionUsed(randIdx);\n\t\t\t}\n\t\t}\n\t\t\n\t\tquestionsUsed.add(randIdx);\n\t\t\n\t\treturn allQuestions.get(randIdx);\n\t}", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"Empty queue\");\n\n int rdm = StdRandom.uniform(n);\n return a[rdm];\n }", "public Item sample()\r\n {\r\n if (isEmpty()) throw new NoSuchElementException(\"Empty randomized queue\");\r\n\r\n int randomizedIdx = StdRandom.uniform(n);\r\n\r\n return a[randomizedIdx];\r\n }", "@Override\n\tpublic Iterator<T> iteratorPostOrder() {\n\t\treturn null;\n\t}", "public int getRandom() {\n return _list.get( rand.nextInt(_list.size()) );\n }", "public abstract Iterator<E> createIterator();", "private int nextIndex() {\n return ThreadLocalRandom.current().nextInt(currentIndex, tracks.size());\n }", "public Iterator<Item> iterator() {\n return new AIterator();\n }", "public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }", "IList<T> getNext();", "@Override\n public Iterator<Integer> iterator() {\n return new IteratorImplementation();\n }", "public Item sample() {\n if(isEmpty()) throw new NoSuchElementException();\n int idx = StdRandom.uniform(size);\n return arr[idx];\n }", "public Item sample() {\n if (n == 0) throw new NoSuchElementException();\n return arr[StdRandom.uniform(n)];\n }", "public int getRandom() {\n int idx;\n Random rand;\n \n rand = new Random();\n idx = rand.nextInt(set.size());\n return set.get(idx);\n }", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"\");\n int i = randomNotEmptyIndex();\n return queue[i];\n }", "public Item sample() {\n if (size == 0) throw new NoSuchElementException();\n return array[StdRandom.uniform(size)];\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "@Override\n public Iterator<T> iterator() {\n return new Itr();\n }", "public int getRandom() {\r\n var list = new ArrayList<>(set);\r\n return list.get(new Random().nextInt(set.size()));\r\n }", "public Iterator<Item> iterator() {\n return new CustomIterator<Item>(head);\n }", "public Item sample() {\n\n\t\tif (isEmpty())\n\t\t\tthrow new NoSuchElementException();\n\n\t\tint random = (int)(StdRandom.uniform() * N);\n\t\treturn arr[random];\n\t}", "@Test\r\n\tpublic void testIterator()\r\n\t{\r\n\t\tInteger[] results =\r\n\t\t{ 5, 7, 3 };\r\n\t\tint i = 0;\r\n\t\tfor (Integer item : threeElementsInOrder)\r\n\t\t{\r\n\t\t\tassertEquals(results[i], item);\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public Stream<T> stream(final Random random) {\n requireNonNull(random, \"random must not be null\");\n return StreamSupport.stream(\n Spliterators.spliteratorUnknownSize(\n new BaseIterator(random),\n IMMUTABLE | ORDERED\n ),\n false\n );\n }", "@Override\n public Iterator<SimilarResult<T>> iterator() {\n lock();\n return Iterators.limit(getResults().iterator(), maxSize);\n }", "RandomnessSource copy();", "public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }", "default Stream<T> reshuffle() {\n return reshuffle(null);\n }", "public T iterator();", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException(\"deque underflow \");\n Item item;\n int randomIndex = StdRandom.uniform(N);\n while(randomizedQueue[randomIndex] == null){\n randomIndex = StdRandom.uniform(N);\n }\n item = randomizedQueue[randomIndex];\n \n return item;\n }", "Iterator<E> iterator();", "Iterator<E> iterator();", "@Override\n public Iterator<Integer> iterator() {\n return new Iterator<>() {\n int i = 0;\n\n @Override\n public boolean hasNext() {\n return i < Set.this.count;\n }\n\n @Override\n public Integer next() {\n return Set.this.arr[i++];\n }\n };\n }", "@Override\n public int[] next() {\n min = rand.nextInt(100);\n max = rand.nextInt(100);\n Thread.yield();\n if (min > max) max = min;\n int[] ia = {min, max};\n return ia;\n }", "OResultSet fetchNext(int n);", "public Iterator<E> iterator(){\r\n return new IteratorHelper();\r\n }", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "public Iterator<T> iterator();", "@Override\r\n public Iterator iterator(){\n return new MyIterator(this);\r\n }", "public Item sample()\n {\n checkNotEmpty();\n\n return items[nextIndex()];\n }", "@Override\n public Iterator<T> iterator() {\n return forwardIterator();\n }", "private int randomIndex() {\n return StdRandom.uniform(head, tail);\n }", "@Override\r\n\tpublic Item sample() {\r\n\t\tint index = StdRandom.uniform(count);\r\n\t\tItem item = arr[index];\r\n\t\treturn item;\r\n\t}", "public static ExtendedRandom getRandomGenerator()\n {\n lastGeneratorUsed = ( lastGeneratorUsed + 1 ) % instances.length;\n return instances[lastGeneratorUsed];\n }", "private DocumentOrderIterator() {}", "public Position sampleRandomUniformPosition();", "public Iterator<BigInteger> iterator() {\n // return new FibIterator();\n return new Iterator<BigInteger>() {\n private BigInteger previous = BigInteger.valueOf(-1);\n private BigInteger current = BigInteger.ONE;\n private int index = 0;\n \n \n @Override\n //if either true will stop, evaluates upper < 0 first (short circuit)\n public boolean hasNext() {\n return upper < 0 || index < upper;\n }\n\n @Override\n //Creating a new value called next\n public BigInteger next() {\n BigInteger next = previous.add(current);\n previous = current;\n current = next;\n index++;\n return current;\n }\n \n };\n }", "@Override\r\n\tpublic Iterator createIterator() {\n\t\treturn bestSongs.values().iterator();\r\n\t}", "@Override\n public Iterator<Object> iterator() {\n return new MyIterator();\n }", "public int getRandom() {\n return elementsList.get(rand.nextInt(elementsList.size()));\n }", "public Item sample() {\n if (size == 0) \n throw new NoSuchElementException(\"the RandomizedQueue is empty\");\n return rqArrays[StdRandom.uniform(0, size)];\n }", "@Test\n public void whenAddElementToTreeThenIteratorReturnsSorted() {\n final List<Integer> resultList = Arrays.asList(4, 3, 6);\n final List<Integer> testList = new LinkedList<>();\n this.tree.add(4);\n this.tree.add(6);\n this.tree.add(3);\n\n Iterator<Integer> iterator = this.tree.iterator();\n testList.add(iterator.next());\n testList.add(iterator.next());\n testList.add(iterator.next());\n\n assertThat(testList, is(resultList));\n }", "public abstract void randomize();" ]
[ "0.80623424", "0.7533047", "0.7378622", "0.736524", "0.7362575", "0.7062736", "0.69566643", "0.6852825", "0.68006146", "0.67527956", "0.6737806", "0.66646874", "0.6664496", "0.66502565", "0.6637409", "0.6637409", "0.6637409", "0.66125065", "0.6489009", "0.6327259", "0.63039947", "0.62529415", "0.6033909", "0.6032666", "0.6009166", "0.5907918", "0.5884752", "0.5865957", "0.58546716", "0.58416855", "0.5827654", "0.5822706", "0.58011645", "0.5790292", "0.5782513", "0.5777639", "0.57710856", "0.57655936", "0.57603544", "0.57466465", "0.5706522", "0.56990206", "0.5647735", "0.56454825", "0.56264305", "0.56139123", "0.56106335", "0.560635", "0.56050646", "0.56010944", "0.557919", "0.55443615", "0.5540124", "0.55335623", "0.5529079", "0.552769", "0.5523225", "0.5518892", "0.55174", "0.5517168", "0.55171365", "0.551401", "0.55099547", "0.55099547", "0.5504356", "0.55028194", "0.5501033", "0.5496224", "0.54922295", "0.5488818", "0.54824984", "0.54821634", "0.54799765", "0.54796207", "0.54709387", "0.54669034", "0.54669034", "0.5463414", "0.54609007", "0.54596823", "0.5458377", "0.5455514", "0.5455514", "0.5455514", "0.5455514", "0.5454833", "0.54501665", "0.5441522", "0.54384214", "0.54355997", "0.542238", "0.5421043", "0.54183465", "0.5415258", "0.54146284", "0.54091716", "0.54085314", "0.54082793", "0.54057825", "0.53980607" ]
0.6867529
7
Some kind of unit testing requirements was to print all methods to StdOutput
public static void main(String[] args) { RandomizedQueue<Integer> rq = new RandomizedQueue<>(); StdOut.println(rq.size()); rq.enqueue(1); rq.enqueue(2); rq.enqueue(3); rq.enqueue(4); for (Integer i : rq) { StdOut.println(i); } StdOut.println(rq.isEmpty()); StdOut.println(rq.sample()); StdOut.println(rq.sample()); StdOut.println(rq.size()); StdOut.println(rq.dequeue()); StdOut.println(rq.size()); for (Integer i : rq) { StdOut.println(i); } StdOut.println(rq.dequeue()); StdOut.println(rq.dequeue()); StdOut.println(rq.dequeue()); StdOut.println(rq.isEmpty()); try { StdOut.println(rq.dequeue()); } catch (java.util.NoSuchElementException exception) { StdOut.println(exception.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void whenExecuteMainThenPrintToConsole() {\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tSystem.setOut(new PrintStream(out));\n\t\tCalculate.main(null);\n\t\tassertThat(out.toString(), is(\"Hello World\\r\\n\"));\n\t}", "@Test\n void printUnit() {\n }", "@Override\n public void tests() {\n System.out.println(\"222222222222222222\"); \n }", "@Test\n public void main() {\n // App.main(null);\n // assertEquals(\"Hello world\", outContent.toString());\n }", "@Test\r\n\tpublic void testPrintHelloWorld() {\r\n \r\n\t\tAssert.assertEquals(App.getHelloWorld(), \"Hello World\");\r\n \r\n\t}", "static void mainTest(PrintWriter out) throws Exception {\n\t}", "@Override\n public void runTest() {\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}", "public void test( ){\n\t\t\tSystem.out.println(\"test method\"); //no input, no output\n\t\t}", "@Test public void testPrintList() throws Exception {\n YeyLinkedList classUnderTest = new YeyLinkedList();\n\n // Populate list\n classUnderTest.store(\"Flamingo\");\n classUnderTest.store(\"Swallow\");\n\n // Direct System.out outputs to PrintStream\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n System.setOut(new PrintStream(bo));\n\n // Call function under test\n classUnderTest.printList();\n\n // Flush content off ByteArrayOutputStream\n bo.flush();\n\n // Extract content from ByteArrayOutputStream\n String outputLines = new String(bo.toByteArray());\n\n // Start asserting\n assertTrue(outputLines.contains(\"Flamingo\"));\n assertTrue(outputLines.contains(\"Swallow\"));\n }", "protected void starting(Description description) {\n logger.info(\"=== Test [\" + description.getMethodName() + \"] =========\");\n System.out.println(\"=== Test [\" + description.getMethodName() + \"] =========\");\n }", "@Test\n public void testPrintPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }", "void test()\n {\n System.out.println(\"ok\");\n }", "@Override\n public void test() {\n \n }", "public void test(){//no input no output\n System.out.println(\"test method\");\n\n }", "@Test\n\tpublic static void m() {\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Sample 3 added in eclipse\");\n\t\tSystem.out.println(\"to test upstream\");\n\t\tSystem.out.println(\"Sample 3 added in eclipse new line in system locally\");\n\t}", "@Test\n\tpublic void testDisplay1() {\n\t\t\n\t\t\n\t\tSystem.setOut(new PrintStream(Actualout));\n\t\t\n\t\tcircularlist.display();\n\t\t\n\t\tassertEquals(\"List : Empty List.\\r\\n\", Actualout.toString());\n\t}", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Test\r\n public void printTests(){\n\r\n BinaryTree<Integer> tree = new BinaryTree<>();\r\n tree.add(50);\r\n tree.add(25);\r\n tree.add(75);\r\n tree.add(12);\r\n tree.add(37);\r\n tree.add(67);\r\n tree.add(87);\r\n\r\n // redirect stdout to ByteArrayOutputStream for junit\r\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n PrintStream printStream = new PrintStream(byteArrayOutputStream);\r\n PrintStream oldPrintStream = System.out;\r\n System.setOut(printStream);\r\n\r\n // inorder should print 12 25 37 50 67 75 87\r\n tree.print();\r\n printStream.flush();\r\n assertEquals(\"12 25 37 50 67 75 87 \", byteArrayOutputStream.toString());\r\n\r\n byteArrayOutputStream.reset();\r\n\r\n // preorder should print 50 25 12 37 75 67 87\r\n tree.print(BinaryTree.PrintOrder.PREORDER);\r\n printStream.flush();\r\n assertEquals(\"50 25 12 37 75 67 87 \", byteArrayOutputStream.toString());\r\n\r\n byteArrayOutputStream.reset();\r\n\r\n // postorder should print 12 37 25 67 87 75 50\r\n tree.print(BinaryTree.PrintOrder.POSTORDER);\r\n printStream.flush();\r\n assertEquals(\"12 37 25 67 87 75 50 \", byteArrayOutputStream.toString());\r\n\r\n // restore stdout\r\n System.setOut(oldPrintStream);\r\n }", "@Test\n public void testPrintRoster() {\n System.out.println(\"Roster.printRoster\");\n System.setOut(new PrintStream(outContent));\n allStudents.printRoster();\n String expectedResult = \"\" +\n \"Alice A Anderson is majoring in Anthropology with a GPA of 3.0\\n\" +\n \"Bob Black is majoring in Biology with a GPA of 3.2\\n\" +\n \"Charles Chuck Chamberlain is majoring in Computer Science with a GPA of 3.5\\n\" +\n \"Dave Deer is majoring in Dance with a GPA of 2.5\\n\" +\n \"Eve Edelstein is majoring in Environmental Studies with a GPA of 2.5\\n\" +\n \"Fred F Flinstone is majoring in French with a GPA of 3.2\\n\" +\n \"George Giannopulos is majoring in German with a GPA of 2.0\\n\" +\n \"Hillary Humble is majoring in History with a GPA of 2.8\\n\" +\n \"Ivan Iverson is majoring in Information Technology with a GPA of 3.3\\n\" +\n \"Juan is majoring in Journalism with a GPA of 3.5\\n\";\n assertEquals(expectedResult, outContent.toString());\n System.setOut(System.out);\n }", "@Test\n public void systemOut()\n {\n String message = \"Testing 1, 2, 3\";\n System.out.print(message);\n assertTrue(SYSTEM_OUT_REDIRECT.toString().contains(message));\n }", "public void test() {\n\t\t\tSystem.out.println(\"I am non static test method\");\n\t\t}", "private void printResults() {\n\t\tfor (Test test : tests) {\n\t\t\ttest.printResults();\n\t\t}\n\t}", "@Test\n public void testMain() throws Exception {\n //main function cannot be tested as it is dependant on user input\n System.out.println(\"main\");\n }", "@Before\n public void setup(){\n output = new TestingOutputInterface();\n mLogic = new Logic(output);\n \n System.err.flush();\n System.out.flush();\n myOut = new ByteArrayOutputStream();\n myErr = new ByteArrayOutputStream();\n System.setOut(new PrintStream(myOut));\n System.setErr(new PrintStream(myErr));\n }", "void test() {\r\n\t\tSystem.out.println(\"test - DemoTest\");\r\n\t}", "@Test\n public void printAllWords() {\n // TODO\n }", "@Test\n public void testToString2() {\n System.out.println(\"Animal.toString2\");\n ByteArrayOutputStream outContent = new ByteArrayOutputStream();\n System.setOut(new PrintStream(outContent));\n System.out.print(animal1);\n assertEquals(\"Abstract Axe (17 yo Aardvark) resides in cage #202\", outContent.toString());\n System.out.print(animal2);\n assertEquals(\"Brave Beard (3 yo Beaver) resides in cage #112\", animal2.toString());\n System.setOut(System.out);\n }", "public static void UnitTests() {\n System.out.println(\"---\");\n\n int input = 0;\n boolean running = true;\n\n while(running) {\n System.out.println(\"1. Test Layer Class\\n2. Test NeuralNetwork Class\\n3. Go Back\\n\");\n input = getInput();\n switch (input) {\n case 1:\n UnitTests.testLayers();\n break;\n case 2:\n UnitTests.testNeuralNetwork();\n break;\n case 3:\n running = false;\n break;\n default:\n System.out.println(\"That's not an option.\");\n }\n }\n\n System.out.println(\"---\\n\");\n }", "@Test\n\tpublic void testApp()\n\t{\n\t\tPrintStream outBkp = System.out;\n\t\tByteArrayOutputStream outBuf = new ByteArrayOutputStream ();\n\t\tSystem.setOut ( new PrintStream ( outBuf ) );\n\t\t\n\t\tApp.main ( \"a\", \"b\", \"c\" );\n\n\t\tSystem.setOut ( outBkp ); // restore the original output\n\t\t\n\t\tlog.debug ( \"CLI output:\\n{}\", outBuf.toString () );\n\t\tAssert.assertTrue ( \"Can't find CLI output!\", outBuf.toString ().contains ( \"a\\tb\\tc\" ) );\n\t\tassertEquals ( \"Bad exit code!\", 0, App.getExitCode () );\n\t}", "public void test() {\n\t\tSystem.out.println(\"Test\");\r\n\t}", "@Test\t\n\tpublic void testMain() {\n\n\t\tSystem.out.println(\"hello\");\n\t}", "protected MethodCallPrinter()\n {\n }", "@Test\n\tpublic void addTaskOutput(){\n\t}", "@Test\n public void testPrintErrPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }", "@Test\n public void testImprimirStatistics()\n {\n //this.linealRegressionCalculator.printStatistics();\n }", "private void test() {\n\n\t}", "public void summary (java.io.PrintStream out) { throw new RuntimeException(); }", "@Test\n public void testGetAnalyzedData() {\n System.out.println(\"getAnalyzedData\");\n \n }", "@After\n public void tearDown() {\n System.out.flush();\n }", "@Test\n public void testGetMagic() {\n assertEquals(hero.getMagic(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n \n }", "@Test\r\n\t public void tc001() \r\n\t {\r\n\t\t System.out.println(\"MQ\");\r\n\t }", "@Test\n public void testBuild() {\n writeBanner(getMethodName());\n }", "@Test\n void one() {\n System.out.println(\"Executing Test 1.\");\n }", "@Test\n public void testPrintField() {\n System.out.println(\"printField\"); \n instance.printField();\n \n }", "static void testCaculator(){\n }", "@Test\r\n public void d_method() \r\n {\r\n\t System.out.println(\"My name is Shramana Roy\");\r\n\t \r\n }", "public void test() {\n\t}", "@Test\r\n public void testRentOut() {\r\n }", "@After\n public void tearDown(){\n final String standardOutput = myOut.toString();\n final String standardError = myErr.toString();\n assertEquals(\"You used 'System.out' in your assignment, This is not allowed.\",true, standardOutput.length() == 0);\n assertEquals(\"You used 'System.err' in your assignment, This is not allowed.\",true, standardError.length() == 0);\n System.err.flush();\n System.out.flush();\n System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out)));\n System.setErr(new PrintStream(new FileOutputStream(FileDescriptor.err)));\n }", "@Test\n public void printAStringTest(){\n Strings strings = new Strings();\n assertEquals(\"Try making the string being printed, as below\",\"Hello World!\", strings.printAString());\n }", "private static void printFunctionCalls() {\n dvm.printFunctionCalls();\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void testLogMethodEntrance() throws Exception {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n Constructor privateCtor = BasicLog.class.getDeclaredConstructor(String.class, PrintStream.class);\n privateCtor.setAccessible(true);\n Log log = (Log) privateCtor.newInstance(\"name\", new PrintStream(byteStream));\n Helper.logMethodEntrance(\"method\", log, new Date());\n String out = byteStream.toString();\n assertTrue(\"Should contain 'Entering method: '.\", out.indexOf(\"Entering method: \") != -1);\n }", "@VisibleForTesting\n void print();", "@Test\n public void testGetLastAttackTitle() {\n \n assertEquals(hero.getLastAttackTitle(), \"The starting battle specs are:\");\n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "public void testDumbJUnit() {\n }", "@Test\n public void testGetPower() {\n assertEquals(hero.getPower(), 100);\n System.out.println(testName.getMethodName() + \" PASSED.\");\n \n }", "public void TestMain(){\n SampleStatements();\n TestMyPow();\n }", "public void test() {\n\t\tSystem.out.println(\"test\");\n\t}", "@Test\n\tpublic void testMain() {\n\t}", "private void sysout() {\nSystem.out.println(\"pandiya\");\n}", "public static void dummyTest(){}", "public static void dummyTest(){}", "public static void test() {\n System.out.println(\"This test works! \");\n }", "public void printFailure() {\n //\n }", "public void test() {\n }", "public void test() {\n }", "@Test\n\tpublic void bmainTestOne() {\n\t\tAssert.assertEquals(\"Test1\", \"Test1\");\n\t\tSystem.out.println(\"This is main Test 2\");\n\t}", "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "@Test\n public void shouldLogMessage() {\n ILogger logger = new SysoutLogger();\n logger.log(\"hello\");\n assertThat(outContent.toString(), is(\"hello\" + System.getProperty(\"line.separator\")));\n }", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Testing Calculator\");\r\n\t\ttestConstructors();\r\n\t\ttestSetters();\r\n\t\ttestGetters();\r\n\t\ttestToString();\r\n\t}", "void printCheck();", "static void print (){\n \t\tSystem.out.println();\r\n \t}", "public void testToString() {\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "private test5() {\r\n\t\r\n\t}", "public void printExpectedVisitors() {\n System.out.println(expectedVisitors);\n }", "public void test(){\n }", "public abstract void debug(PrintStream console);", "@Test\n public void testSetText() {\n writeBanner(getMethodName());\n }", "public void flush() {\n\t\t\n\t\tif (Verbose.DEFAULT.equals(VERBOSE_LEVEL)) {\n\t\t\treturn;\t//no output\n\t\t}\n\t\t\n\t\t/* Verbose.VERBOSE | Verbose.ALL */\n\t\t\t\t\n\t\t/* Each constructor/ method to be crashed = non-private, non-abstract */\n\t\tStringBuffer sb = new StringBuffer(\"*** Methods and constructors under testclasses:\");\n\t\tfor (ClassUnderTest cPlan: plans.values()) {\n\t\t\tsb.append(LS+LS+cPlan.getWrappedClass().getCanonicalName()); //qualified class name\n\t\t\t\n\t\t\tfor (PlanSpaceNode pNode: cPlan.getChildren()) {\n\t\t\t\tFunctionNode fNode = (FunctionNode) pNode;\n\t\t\t\tsb.append(LS+\"\\t\"+fNode.toString());\t//method or constructor under testclasses\n\t\t\t}\t\t\t\t\n \t}\n \t\t\n\t\t\n\t /*\n\t * 2. Each value and public, non-abstract constructing function \n\t * of each needed instance and all of their children.\n\t */\n sb.append(LS+LS+LS+\"*** Rules to create needed values:\");\n\t\tsb.append(flushRules(true));\t\t\n\t\t\n \tif (Verbose.ALL.equals(VERBOSE_LEVEL)) {\n sb.append(LS+LS+LS+\"*** Rules that were not needed:\");\n \t\tsb.append(flushRules(false));\n \t}\n\n sb.append(LS+LS);\n System.out.println(sb);\n\t}", "public void testSpock(){\n }", "@Test\n public void simpleUse(){\n }", "@AfterClass\n public static void finalise()\n {\n System.setOut(SYSTEM_OUT_ORIGINAL);\n }", "@Test\n\tpublic void test1() {\n\t\tSystem.out.println(\"I am Test 1\");\n\t}", "void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }", "public void testDummy()\n {\n }", "public void testDummy() {\n }", "private static void consoleOutput() {\n\n Output airportFlightCounter = new AirportFlightCounter(airports);\n Output flightInventory = new FlightInventory(flights);\n Output flightPassengerCounter = new FlightPassengerCounter(flights);\n Output mileageCounter = new MileageCounter(flights, airports);\n\n airportFlightCounter.toConsole();\n flightInventory.toConsole();\n flightPassengerCounter.toConsole();\n mileageCounter.toConsole();\n }", "@Test(timeout = 4000)\n public void test090() throws Throwable {\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"oc[MnZM[~MHOK iO\", \"Fj)3/|(;sZXz$\", \"oc[MnZM[~MHOK iO\", (String[]) null, false, false);\n Object object0 = new Object();\n classWriter0.version = 168;\n MethodWriter methodWriter1 = methodWriter0.next;\n methodWriter0.visitFrame((-2450), 1, (Object[]) null, 178, (Object[]) null);\n classWriter0.newUTF8(\"oc[MnZM[~MHOK iO\");\n methodWriter0.visitFieldInsn((-239), \"KY0B/+MuB[P.E(8)u)\", \"oc[MnZM[~MHOK iO\", \"Fj)3/|(;sZXz$\");\n ByteVector byteVector0 = new ByteVector();\n methodWriter0.put(byteVector0);\n methodWriter0.visitFieldInsn(1, \"oc[MnZM[~MHOK iO\", \"RuntimeInvisibleParameterAnnotations\", \"KY0B/+MuB[P.E(8)u)\");\n methodWriter0.visitMethodInsn(86, \"RuntimeInvisibleParameterAnnotations\", \"RuntimeInvisibleParameterAnnotations\", \"9 X.GqegEH=q+{d+y\");\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void testLogMethodExit() throws Exception {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n Constructor privateCtor = BasicLog.class.getDeclaredConstructor(String.class, PrintStream.class);\n privateCtor.setAccessible(true);\n Log log = (Log) privateCtor.newInstance(\"name\", new PrintStream(byteStream));\n Helper.logMethodExit(\"m\", log, new Date());\n String out = byteStream.toString();\n assertTrue(\"Should contain 'Exiting method: '.\", out.indexOf(\"Exiting method: \") != -1);\n }", "@Override\n protected void starting(Description description) {\n LOG.info(\"STARTING TEST: \" + description.getMethodName());\n }", "@Before\n\tpublic void loadOutput() {\n\t\tSystem.setOut(new PrintStream(this.out));\n\t}", "public static void printInfo(){\n }", "@Test(timeout = TIMEOUT)\n public void testPublicMethods() {\n Class sortingClass = Sorting.class;\n Method[] methods = sortingClass.getMethods();\n String[] methodStrings = new String[methods.length];\n for (int i = 0; i < methods.length; i++) {\n methodStrings[i] = methods[i].toString();\n }\n String[] validMethodStrings = {\n \"public static void Sorting.insertionSort(java.lang.Object[],java.util.Comparator)\",\n \"public static void Sorting.cocktailSort(java.lang.Object[],java.util.Comparator)\",\n \"public static void Sorting.lsdRadixSort(int[])\",\n \"public static void Sorting.quickSort(java.lang.Object[],java.util.Comparator,java.util.Random)\",\n \"public static void Sorting.mergeSort(java.lang.Object[],java.util.Comparator)\",\n \"public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException\",\n \"public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException\",\n \"public final void java.lang.Object.wait() throws java.lang.InterruptedException\",\n \"public boolean java.lang.Object.equals(java.lang.Object)\",\n \"public java.lang.String java.lang.Object.toString()\",\n \"public native int java.lang.Object.hashCode()\",\n \"public final native java.lang.Class java.lang.Object.getClass()\",\n \"public final native void java.lang.Object.notify()\",\n \"public final native void java.lang.Object.notifyAll()\"\n };\n Arrays.sort(methodStrings);\n Arrays.sort(validMethodStrings);\n assertArrayEquals(methodStrings, validMethodStrings);\n }", "public void test01() {\n\t\tSystem.out.println(\"I am in test01() method\");\n\t}", "@Test\n public void testAttack() {\n enemy.attack(1, enemy);\n assertEquals(enemy.getHealth(), 90);\n \n hero.attack(2, hero);\n assertEquals(hero.getHealth(), 85);\n \n \n System.out.println(testName.getMethodName() + \" PASSED.\");\n }", "@Test\n public void sayHiTest() {\n \tHelloWorldImpl hello=new HelloWorldImpl();\n \tString arg0=\"satish\";\n\t\tString arg1=\"namdeo\";\n\t\tString arg2=\"impetus\";\n\t\tString arg3=\"indore\";\n \tString actualResult=hello.sayHi(arg0,arg1, arg2, arg3);\n \t//check for result is not empty.\n \tassertNotNull(\"Result is not null\",actualResult);\n \tString expectedResult=\"Hello \"+arg0+\" \"+arg1+\" ,\"+arg2+\" ,\"+arg3;\n \t//check for equality\n \tassertThat(actualResult).isEqualTo(expectedResult);\n \t//System.out.println(\"sayHiTest result : \"+result);\n }", "public void test() {\n\n }", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }" ]
[ "0.70814097", "0.7042857", "0.7002319", "0.6836115", "0.67651206", "0.671582", "0.66755456", "0.66394275", "0.663558", "0.66328734", "0.66266835", "0.66201967", "0.6544643", "0.64512736", "0.64485604", "0.64370877", "0.64355344", "0.6427801", "0.640936", "0.63971937", "0.6395837", "0.6343785", "0.63395715", "0.6330972", "0.63221717", "0.6306593", "0.6305672", "0.6301698", "0.62990075", "0.6284719", "0.62754774", "0.62709486", "0.62684053", "0.6260023", "0.62420803", "0.6241835", "0.6239588", "0.6232822", "0.62191325", "0.62176543", "0.6212645", "0.62075925", "0.6200718", "0.61914647", "0.6186865", "0.6175171", "0.616004", "0.61543995", "0.6153878", "0.61524904", "0.6152037", "0.6138266", "0.61349297", "0.6127595", "0.6125394", "0.61248106", "0.6123526", "0.61224097", "0.6111359", "0.61040777", "0.6095177", "0.6093472", "0.608761", "0.608761", "0.6083353", "0.60741955", "0.605797", "0.605797", "0.60470873", "0.6046321", "0.60378444", "0.6016072", "0.60119736", "0.60073066", "0.6006159", "0.60000134", "0.59909153", "0.5981287", "0.59784704", "0.59768325", "0.59766144", "0.59760815", "0.59645975", "0.59585327", "0.59579843", "0.5956269", "0.595208", "0.59459853", "0.5944842", "0.59438425", "0.59414995", "0.5940857", "0.59363574", "0.593404", "0.5927866", "0.5927858", "0.5925801", "0.59194523", "0.5918639", "0.5918162", "0.5907358" ]
0.0
-1
/ Outros No artigo de apoio que o Barreto passou xtimes
private int xtimes(int x){ x = x << 1; if(x >= 0x100) x = x ^ 0x14d; return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void avvio_gioco(){\n\n punti = 3;\n //Posizione iniziale della x\n for (short i = 0; i < punti; i++) {\n x[i] = 150 - i*10;\n y[i] = 150;\n }\n posiziona_bersaglio();\n\n //Attivazione del timer\n timer = new Timer(RITARDO, this);\n timer.start();\n }", "private void dibujarArregloCamionetas() {\n\n timerCrearEnemigo += Gdx.graphics.getDeltaTime();\n if (timerCrearEnemigo>=TIEMPO_CREA_ENEMIGO) {\n timerCrearEnemigo = 0;\n TIEMPO_CREA_ENEMIGO = tiempoBase + MathUtils.random()*2;\n if (tiempoBase>0) {\n tiempoBase -= 0.01f;\n }\n\n camioneta= new Camioneta(texturaCamioneta,ANCHO,60f);\n arrEnemigosCamioneta.add(camioneta);\n\n\n }\n\n //Si el vehiculo se paso de la pantalla, lo borra\n for (int i = arrEnemigosCamioneta.size-1; i >= 0; i--) {\n Camioneta camioneta1 = arrEnemigosCamioneta.get(i);\n if (camioneta1.sprite.getX() < 0- camioneta1.sprite.getWidth()) {\n arrEnemigosCamioneta.removeIndex(i);\n\n }\n }\n }", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "public void CambiarCartasCastillo() {\r\n\r\n\t\tint aux;\r\n\t\t// Asignamos el escudo del rey;\r\n\t\taux = (int) (Math.random() * 12) + 1;\r\n\t\tescudoRey = new Escudo(aux, Escudo.GrupoEscudo.rey);\r\n\t\t// Asignamos el escudo de la nobleza\r\n\t\taux = (int) (Math.random() * 12) + 1;\r\n\t\tescudoNobleza = new Escudo(aux, Escudo.GrupoEscudo.nobleza);\r\n\t\t// Asignamos el escudo del pueblo\r\n\t\taux = (int) (Math.random() * 6) + 1;\r\n\t\tescudoPueblo = new Escudo(aux, Escudo.GrupoEscudo.pueblo);\r\n\r\n\t}", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "@Override\n public void disegna(Graphics g){\n \n //Disegna solo se l'oggetto è attivo\n if(attivo){\n \n //Scelgo il font\n g.setFont(new Font(\"German\", Font.BOLD, 50));\n //Disegno una cornice con triplo rettangolo\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 10, this.punto.y - 44, larghezza_countdown, altezza_countdown);\n g.setColor(Color.black);\n g.drawRect(this.punto.x - 11, this.punto.y - 45, larghezza_countdown+2, altezza_countdown+2);\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 12, this.punto.y - 46, larghezza_countdown+4, altezza_countdown+4);\n \n //Setto il testo nel formato \"timer\"\n setTesto();\n \n //Disegno il testo\n g.drawString(this.testo, this.punto.x, this.punto.y);\n \n //Scelgo il font\n g.setFont(new Font(\"German\", Font.BOLD, 50));\n //Disegno una cornice con triplo rettangolo\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 10 + 450, this.punto.y - 44, larghezza_countdown + 98, altezza_countdown);\n g.setColor(Color.black);\n g.drawRect(this.punto.x - 11 + 450, this.punto.y - 45, larghezza_countdown+2 + 98, altezza_countdown+2);\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 12 + 450, this.punto.y - 46, larghezza_countdown+4 + 98, altezza_countdown+4);\n \n //Disegno il testo\n g.drawString(this.livello, this.punto.x + 450, this.punto.y);\n \n }\n \n }", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "@Override\n\tpublic void preparar(IngredienteX X, ArrayList<IngredienteComun> comuns) {\n\t\tprocesos();\n\t\tingredienteEspecial=X;\n\t\totros.addAll(otros);\n\t\tEscribirProduccion.escribir(\"creado Bebida\"+this.getClass()+\"ingredientes:\"+this+\"tardo: 25min\");\n\t\t\n\t\t\n\t}", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "private void posicionInicial(int ancho){\r\n posicionX = ancho;\r\n Random aleatroio = new Random();\r\n int desplazamiento = aleatroio.nextInt(150)+100;\r\n \r\n \r\n cazaTie = new Rectangle2D.Double(posicionX, desplazamiento, anchoEnemigo, alturaEnemigo);\r\n }", "public void Caracteristicas(){\n System.out.println(\"La resbaladilla tiene las siguientes caracteristicas: \");\r\n if (escaleras==true) {\r\n System.out.println(\"Tiene escaleras\");\r\n }else System.out.println(\"No tiene escaleras\");\r\n System.out.println(\"Esta hecho de \"+material);\r\n System.out.println(\"Tiene una altura de \"+altura);\r\n }", "public static void tienda(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int opcionCompra; //variables locales a utilizar\n Scanner scannerDos=new Scanner(System.in);\n //mostrando en pantalla las opciones de la tienda\n System.out.println(\"Bienvenido a la tienda, que deceas adquirir:\\n\");\n\tSystem.out.println(\"PRODUCTO \\tPRECIO \\tBENEFICIO\");\n\tSystem.out.println(\"1.Potion \\t50 oro \\tcura 25 HP\");\n\tSystem.out.println(\"2.Hi-Potion\\t100 oro \\tcura 75 HP\");\n\tSystem.out.println(\"3.M-Potion \\t75 oro \\trecupera 10 MP\");\n //ingresando numero de opcion\n System.out.println(\"\\n\\nIngrese numero de opcion:\");\n opcionCompra=scannerDos.nextInt();\n //comparando la opcion de compra\n switch(opcionCompra){\n case 1:{//condicion de oro necesario para el articulo1 \n\t\t\tif(oro>=50){\n articulo1=articulo1+1;\n System.out.println(\"compra exitosa\");\n }else {\n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t\tcase 2:{//condicion de oro necesario para el articulo2\n if(oro>=100){\n articulo2=articulo2+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t default:{//condicion de oro necesario para el articulo3\n if(oro>=75){\n articulo3=articulo3+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\"); //poner while para ,ejora\n \t\t}\n break;\n }\n }\n }", "public Torretta1(int danno, int x, int y, ArrayList<Proiettile> proiettili) {\r\n super();\r\n velocitàAttacco = 5000;\r\n attacco = danno;\r\n this.proiettili = proiettili;\r\n this.x = x * 40;\r\n this.y = y * 40 - 40;\r\n range = new Ellipse2D.Double();\r\n range.setFrame(this.x - 40, this.y - 40, 119, 119);\r\n temposparo = 200;\r\n finestrasparo = 0;\r\n costoAcquisto = 10;\r\n tipo='a';\r\n }", "private void ActualizaPosicionesFondos() {\n xFondo-=10; //Es el cursor de la posición\n xFondoBase-=10; //Aqui se puede implementar metodo de modificacion de velocidad de fondo.\n xFondoApoyo-=10;\n if (xFondo == -texturaFondoBase.getWidth()){\n xFondoBase = xFondoApoyo+texturaFondoApoyo.getWidth();\n cambiosFondo++;\n }\n if (xFondo == -(texturaFondoApoyo.getWidth()+texturaFondoBase.getWidth())) {\n xFondoApoyo = xFondoBase+texturaFondoBase.getWidth();\n cambiosFondo++;\n }\n }", "private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "@Override\n\tpublic void acelerar() {\n\t\t// TODO Auto-generated method stub\n\t\t\t\tvelocidadActual += 40;\n\t\t\t\tif(velocidadActual>250) {\n\t\t\t\t\tvelocidadActual = 250;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdepositoActual -= 10;\n\t\t\t\tSystem.out.println(\"Velocidad del ferrari: \"+velocidadActual);\n\t}", "public void primerPunto() {\n\t\tp = new PuntoAltaPrecision(this.xCoord, this.yCoord);\n\t\t// Indicamos la trayectoria por la que va la pelota\n\t\tt = new TrayectoriaRecta(1.7f, p, false);\n\t}", "public void atacar() {\n texture = new Texture(Gdx.files.internal(\"recursos/ataques.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "public void posiziona_bersaglio() {\n do{\n int r = (int) (Math.random() * POSIZIONI_RANDOM);\n bersaglio_x = ((r * DIMENSIONE_PUNTO));\n }while(bersaglio_x<102 || bersaglio_x>LARGHEZZA);\n do{\n int r = (int) (Math.random() * POSIZIONI_RANDOM);\n bersaglio_y = ((r * DIMENSIONE_PUNTO));\n }while(bersaglio_y<102 || bersaglio_y>ALTEZZA);\n //System.out.println (\"x : \"+bersaglio_x+\" y : \"+bersaglio_y);\n }", "public logicaEnemigos(){\n\t\t//le damos una velocidad inicial al enemigo\n\t\tsuVelocidad = 50;\n\t\tsuDireccionActual = 0.0;\n\t\tposX = 500 ;\n\t\tposY = 10;\n\t}", "public void aapne() {\n trykketPaa = true;\n setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n if (bombe) {\n setText(\"x\");\n Color moerkeregroenn = Color.rgb(86, 130, 3, 0.5);\n setBackground(new Background(new BackgroundFill(moerkeregroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n } else if (bombeNaboer == 0) {\n setText(\" \");\n } else {\n setText(bombeNaboer + \"\");\n if (bombeNaboer == 1) {\n setTextFill(Color.BLUE);\n } else if (bombeNaboer == 2) {\n setTextFill(Color.GREEN);\n } else if (bombeNaboer == 3) {\n setTextFill(Color.RED);\n } else if (bombeNaboer == 4) {\n setTextFill(Color.DARKBLUE);\n } else if (bombeNaboer == 5) {\n setTextFill(Color.BROWN);\n } else if (bombeNaboer == 6) {\n setTextFill(Color.DARKCYAN);\n }\n }\n }", "private void verificarColisiones() {\n if(inmunidadRamiro){\n tiempoInmunidadRamiro += Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidadRamiro>=6f){//despues de 0.6 seg, vuelve a ser vulnerable\n inmunidadRamiro=false;\n tiempoInmunidadRamiro=0f;\n ramiro.setEstadoItem(Ramiro.EstadoItem.NORMAL);\n musicaRayo.stop();\n if(music){\n musicaFondo.play();\n }\n\n }\n\n if (inmunidad){//Para evitar bugs, Ramiro puede tomar damage cada cierto tiempo...\n //Se activa cada vez que toma damage\n tiempoInmunidad+=Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidad>=0.6f){//despues de 0.6 seg, vuelve a ser vulnerable\n inmunidad=false;\n tiempoInmunidad=0f;\n }\n if (inmunidadItem){\n tiempoInmunidadItem+=Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidadItem>=0.6f){\n inmunidadItem=false;\n tiempoInmunidadItem=0f;\n\n }\n //Verificar colisiones de Item Corazon.\n for (int i=arrCorazonesItem.size-1; i>=0; i--) {\n Corazon cora = arrCorazonesItem.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(cora.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n\n arrCorazonesItem.removeIndex(i);\n agregarCorazon();\n inmunidadItem=true;\n }\n\n }\n\n }\n //Verifica colisiones Rayo emprendedor\n for (int i=arrRayoEmprendedor.size-1; i>=0; i--) {\n RayoEmprendedor rayo= arrRayoEmprendedor.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(rayo.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n\n arrRayoEmprendedor.removeIndex(i);\n inmunidadRamiro();\n\n }\n\n }\n\n }\n //coalisiones de las tareas\n for (int i=arrTarea.size-1; i>=0; i--) {\n Tarea tarea = arrTarea.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(tarea.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n agregarPuntos();\n arrTarea.removeIndex(i);\n inmunidadItem=true;\n }\n\n }\n\n }\n\n\n //Verifica colisiones de camioneta\n if(estadoMapa==EstadoMapa.RURAL || estadoMapa==EstadoMapa.RURALURBANO){\n for (int i=arrEnemigosCamioneta.size-1; i>=0; i--) {\n Camioneta camioneta = arrEnemigosCamioneta.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(camioneta.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n\n for (int i=arrEnemigoAve.size-1; i>=0; i--) {\n Ave ave = arrEnemigoAve.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(ave.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de carro de Lujo\n if(estadoMapa==EstadoMapa.URBANO || estadoMapa == EstadoMapa.URBANOUNIVERSIDAD){\n for (int i=arrEnemigosAuto.size-1; i>=0; i--) {\n Auto cocheLujo = arrEnemigosAuto.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(cocheLujo.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n\n for (int i=arrEnemigoAve.size-1; i>=0; i--) {\n Ave ave = arrEnemigoAve.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(ave.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de carrito de golf\n if(estadoMapa==EstadoMapa.UNIVERSIDAD){\n for (int i=arrEnemigosCarritoGolf.size-1; i>=0; i--) {\n AutoGolf carritoGolf = arrEnemigosCarritoGolf.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(carritoGolf.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de las lamparas\n if(estadoMapa==EstadoMapa.SALONES){\n for (int i=arrEnemigoLampara.size-1; i>=0; i--) {\n Lampara lampara = arrEnemigoLampara.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(lampara.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n //Verifica colisiones de las sillas\n for (int i=arrEnemigoSilla.size-1; i>=0; i--) {\n Silla silla = arrEnemigoSilla.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(silla.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n\n\n\n }", "public void jugarMaquinaSola(int turno) {\n if (suspenderJuego) {\n return;\n }\n CuadroPieza cuadroActual;\n CuadroPieza cuadroDestino;\n CuadroPieza MovDestino = null;\n CuadroPieza MovActual = null;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n cuadroActual = tablero[x][y];\n if (cuadroActual.getPieza() != null) {\n if (cuadroActual.getPieza().getColor() == turno) {\n for (int x1 = 0; x1 < 8; x1++) {\n for (int y1 = 0; y1 < 8; y1++) {\n cuadroDestino = tablero[x1][y1];\n if (cuadroDestino.getPieza() != null) {\n if (cuadroActual.getPieza().validarMovimiento(cuadroDestino, this)) {\n if (MovDestino == null) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n } else {\n if (cuadroDestino.getPieza().getPeso() > MovDestino.getPieza().getPeso()) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n if (cuadroDestino.getPieza().getPeso() == MovDestino.getPieza().getPeso()) {\n //Si es el mismo, elijo al azar si moverlo o no\n if (((int) (Math.random() * 3) == 1)) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n }\n }\n }\n\n }\n }\n }\n }\n }\n }\n }\n if (MovActual == null) {\n boolean b = true;\n do {//Si no hay mov recomendado, entonces genero uno al azar\n int x = (int) (Math.random() * 8);\n int y = (int) (Math.random() * 8);\n tablero[x][y].getPieza();\n int x1 = (int) (Math.random() * 8);\n int y1 = (int) (Math.random() * 8);\n\n MovActual = tablero[x][y];\n MovDestino = tablero[x1][y1];\n if (MovActual.getPieza() != null) {\n if (MovActual.getPieza().getColor() == turno) {\n b = !MovActual.getPieza().validarMovimiento(MovDestino, this);\n //Si mueve la pieza, sale del while.\n }\n }\n } while (b);\n }\n if (MovActual.getPieza().MoverPieza(MovDestino, this)) {\n this.setTurno(this.getTurno() * -1);\n if (getRey(this.getTurno()).isInJacke(this)) {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Hacke Mate!!! - te lo dije xD\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n } else {\n JOptionPane.showMessageDialog(null, \"Rey en Hacke - ya t kgste\");\n }\n } else {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Empate!!!\\nComputadora: Solo por que te ahogaste...!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n if (Pieza.getCantMovimientosSinCambios() >= 50) {\n JOptionPane.showMessageDialog(null, \"Empate!!! \\nComputadora: Vaya, han pasado 50 turnos sin comernos jeje!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Otra Partida Amistosa¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n }\n }\n if (this.getTurno() == turnoComputadora) {\n jugarMaquinaSola(this.getTurno());\n }\n }", "@Override\n public void paint(Graphics g){\n GraficasEstatus cantidad=new GraficasEstatus();\n super.paint(g);\n if(bandera==true){\n \n int nuevoingreso=cantidad.nuevoIngreso();\n int noreparado=cantidad.noReparado();\n int enrevision=cantidad.enRevision();\n int reparado=cantidad.reparado();\n int entregado=cantidad.entregado();\n int otro=cantidad.otro();\n \n int valormayor=mayorValor(nuevoingreso, noreparado, enrevision, reparado, entregado, otro);\n \n int ningreso=nuevoingreso*400/valormayor;\n int nreparados=noreparado*400/valormayor;\n int erevision=enrevision*400/valormayor;\n int reparados=reparado*400/valormayor;\n int entregados=entregado*400/valormayor;\n int otros=otro*400/valormayor;\n \n g.setColor(new Color(255,170,0));\n g.fillRect(100, 100, ningreso, 40);\n g.drawString(\"Nuevo ingreso\", 10, 118);\n g.drawString(\"Cantida \"+nuevoingreso, 10, 133);\n \n g.setColor(new Color(255,0,0));\n g.fillRect(100, 150, nreparados, 40);\n g.drawString(\"No reparados\", 10, 168);\n g.drawString(\"Cantida \"+noreparado, 10, 180);\n \n g.setColor(new Color(0,0,255));\n g.fillRect(100, 200, erevision, 40);\n g.drawString(\"En revision\", 10, 218);\n g.drawString(\"Cantida \"+enrevision, 10, 233);\n \n g.setColor(new Color(0,150,255));\n g.fillRect(100, 250, reparados, 40);\n g.drawString(\"Reparados\", 10, 268);\n g.drawString(\"Cantida \"+reparado, 10, 280);\n \n g.setColor(new Color(0,130,0));\n g.fillRect(100, 300, entregados, 40);\n g.drawString(\"Entregados\", 10, 318);\n g.drawString(\"Cantida \"+entregado, 10, 333);\n \n g.setColor(new Color(150,100,100));\n g.fillRect(100, 350, otros, 40);\n g.drawString(\"Otro\", 10, 368);\n g.drawString(\"Cantida \"+otro, 10, 380);\n \n }\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "private void quitarCorazones(){\n if(ramiro.estadoItem== Ramiro.EstadoItem.NORMAL){\n efectoDamage.play();\n vidas--;\n }\n }", "public double Baricentro() {\n if (puntos.size() <= 2) {\n return 0;\n } else {\n // Inicializacion de las areas\n double areaPonderada = 0;\n double areaTotal = 0;\n double areaLocal;\n // Recorrer la lista conservando 2 puntos\n Punto2D antiguoPt = null;\n for (Punto2D pt : puntos) {\n if (antiguoPt != null) {\n // Cálculo deñ baricentro local\n if (antiguoPt.y == pt.y) {\n // Es un rectángulo, el baricentro esta en\n // centro\n areaLocal = pt.y * (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n } else {\n // Es un trapecio, que podemos descomponer en\n // un reactangulo con un triangulo\n // rectangulo adicional\n // Separamos ambas formas\n // Primer tiempo: rectangulo\n areaLocal = Math.min(pt.y, antiguoPt.y) + (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n //Segundo tiempo: triangulo rectangulo\n areaLocal = (pt.x - antiguoPt.x) * Math.abs(pt.y - antiguoPt.y) / 2.0;\n areaTotal += areaLocal;\n if (pt.y > antiguoPt.y) {\n // Baricentro a 1/3 del lado pt\n areaPonderada += areaLocal * (2.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n } else {\n // Baricentro a 1/3 dek lado antiguoPt\n areaPonderada += areaLocal * (1.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n }\n }\n }\n antiguoPt = pt;\n }\n // Devolvemos las coordenadas del baricentro\n return areaPonderada / areaTotal;\n }\n }", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "public EnemigoGenerico[] cargaBichos()\n {\n \n //Crear la bicheria (hardCoded)\n CoordCasilla[] origen={new CoordCasilla(1,1), new CoordCasilla(18,1), new CoordCasilla(14,8), new CoordCasilla(17,17), new CoordCasilla(13,5)};\n CoordCasilla[] destino={new CoordCasilla(6,18) , new CoordCasilla(1,1), new CoordCasilla(1,8), new CoordCasilla(18,1) , new CoordCasilla(13,18) };\n \n \n DefBicho pelota=this.atlasBicheria.get(\"Pelota Maligna\");\n EnemigoGenerico bichos[]=new EnemigoGenerico[origen.length];\n \n for(int x=0;x<origen.length;x++)\n {\n List<CoordCasilla> camino = this.getCamino(origen[x], destino[x]);\n Gdx.app.log(\"CAMINO:\", \"DESDE (\"+origen[x].x+\",\"+origen[x].y+\") HASTA ( \"+destino[x].x+\",\"+destino[x].y+\")\");\n for (CoordCasilla cc : camino)\n Gdx.app.log(\"CASILLA.\", String.format(\"(%2d ,%2d )\", cc.x, cc.y));\n \n \n bichos[x] = new EnemigoGenerico(pelota, this.mapaAnimaciones.get(pelota.archivoAnim), pelota.pv, pelota.tasaRegen, pelota.velocidad, camino, pelota.distanciaPercepcion, pelota.ataques);\n }\n \n return bichos;\n }", "private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }", "private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }", "public void mostrarJet(){\r\n \r\n System.out.println(\"clase hija jet de vehiculo con motor \");\r\n System.out.println(\"LA CANTIDAD DE MOTORES ES : \" + this.cantidaddeMotores);\r\n\r\n\r\n System.out.println(\"***************************************************\");\r\n System.out.println(\"*************H**E**R**E**D**A**********************\");\r\n System.out.println(\"|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|\");\r\n }", "public void barajar(){\n Random ale = new Random();\n if(CARTAS_BARAJA == getNumCartas()){\n for(int i = 0; i < 777; i ++){\n int valor = ale.nextInt(40);\n Carta carta = cartasBaraja.get(valor);\n cartasBaraja.set(valor, cartasBaraja.get(0));\n cartasBaraja.set(0, carta);\n }\n }\n }", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "public void pintaFecha(){\n \tImage image;\r\n \ttry {\r\n\t \r\n \t\tString imageUrl = PropiedadesJLet.getInstance().getProperty(\"path.img.logoinvoice\") + \"FondoLeppardPico1.png\";\r\n\t\r\n\t\t\timage = Image.getInstance(imageUrl);\r\n\t\t image.setAbsolutePosition(inmargde-10, 725);\r\n\t\t image.scaleAbsolute(50,20);\r\n\t\t image.setAlignment(Image.LEFT | Image.TEXTWRAP);//Code 2\r\n\t\t\tdocumento.add(image);\r\n \r\n\t\t\tFRAparen.absTextBoldColor(writer,\"Fecha \",inmargde,730,10,new BaseColor(255,255,255));\r\n\t\t\tFRAparen.absText(writer,FRAparen.fechaNormal(fhfactur),inmargde + 45,730,10);\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(imageUrl);\r\n\t\t image.setAbsolutePosition(inmargde-10, 700);\r\n\t\t image.scaleAbsolute(100,20);\r\n\t\t image.setAlignment(Image.LEFT | Image.TEXTWRAP);//Code 2\r\n\t\t\tdocumento.add(image);\r\n\t\t\t\r\n\t\t\tif (cabecNFC.equals(\"COND\") || cabecNFC.equals(\"R\")){\r\n\t\t\t\tFRAparen.absTextBoldColor(writer,cabecNFC +\" \"+ numerNFC +\" \",inmargde,705,10,new BaseColor(255,255,255));\r\n\t\t\t} else {\r\n\t\t\t\tFRAparen.absTextBoldColor(writer,\"NFC \"+ cabecNFC +\" \"+ numerNFC +\" \",inmargde,705,10,new BaseColor(255,255,255));\r\n\t\t\t}\r\n\t\t\t\r\n \t} catch (Exception e) {\r\n \t\tSystem.err.println(this.getClass().getName() +\" ERROR pintaFecha() - \"+ e.getMessage());\r\n \t}\r\n \t\r\n }", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "public static void horoscopo() {\n\n ArrayList<String> frases = new ArrayList<>();\n\n frases.add(\"Todo lo que seas capaz de creer, eres capaz de conseguir.\");\n frases.add(\"Serás más poderoso cuando tengas control total sobre ti mismo.\");\n frases.add(\"La sabiduría y la casualidad no van unidas de la mano.\");\n frases.add(\"Lo que hay en el ayer o en el mañana no es nada comparado con lo que hay en nuestro interior.\");\n frases.add(\"Cáete siete veces y levántate ocho.\");\n frases.add(\"Nunca es tarde para comenzar un nuevo proyecto, para ser quien siempre has deseado ser.\");\n frases.add(\"Con pensamientos positivos y perseverancia, solo es cuestión de tiempo que superes las adversidades y te propongas nuevos retos.\");\n frases.add(\"La vida es un 10% lo que nos ocurre, y un 90% cómo reaccionamos a ello.\");\n frases.add(\"No es más rico quien más tiene, sino quien menos necesita.\");\n frases.add(\"Intenta y falla, pero nunca falles en intentarlo.\");\n frases.add(\"Solo los hombres más sabios son capaces de saborear los momentos más simples.\");\n frases.add(\"cada segundo que goces, será segundo aprovechado.\");\n\n double numero = Math.round(Math.random() * 11);\n int numeroAleatorio = (int) numero;\n\n //Random r = new Random(); \n // int randomNumber = r.nextInt(frases.size());\n System.out.println(\"Frase horóscopo: \" + frases.get(numeroAleatorio));\n\n }", "public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}", "public void mostrarVideojuegosNumeradosPorOrdenDeRegistro()\n {\n int posicActual = 0;\n while (posicActual < listaDeVideojuegos.size()) {\n System.out.println((posicActual+1) + \". \" + listaDeVideojuegos.get(posicActual).getDatosVideojuego());\n posicActual++;\n }\n }", "public Camion(int peso,Marcas marca,int kilometraje,int antiguedad) {\n super(peso,marca,kilometraje,antiguedad);\n if (super.getMarca().equals(\"FORD\")|| super.getMarca().equals(\"FIAT\"))\n {\n super.setArticulado();\n }\n if(super.getArticulado() && getPeso()<3000)\n {\n super.setCumpleNormativa();\n }\n if(!super.getArticulado() && getPeso()<2000)\n {\n super.setCumpleNormativa();\n }\n\n }", "public Elya() {\n\n estado=PersonajeEstado.quieto;\n cargarText(\"Personajes/ElyaQuieta.png\",1,0);\n cargarText(\"Personajes/ElyaRunning2.png\", 24, 1);\n cargarText(\"Personajes/ElyaAtack2.png\", 24, 2);\n cargarText(\"Personajes/ElyaDead.png\", 1, 3);\n\n }", "private void _jogaEstado_mesa(Player playerMain, Player playerInimigo) {\n Carta cartaP1;\n CartaMonstro cartaMon;\n CartaMagica cartaMag;\n\n boolean cartasQueAtacaram[] = new boolean[playerMain.mesa.MESA_SIZE];\n int cartaIndex;\n\n Arrays.fill(cartasQueAtacaram, false);\n\n /* o jogador ainda quiser atacar (se possivel) ou mudar a carta para modo defesa-ataque */\n while (true) {\n System.out.println(\"Jogador \" + playerMain.nickName + \", Escolha uma carta da sua mesa que deseja usar ( -1 para finalizar o turno )\");\n for (int i = 0; i < Mesa.MESA_SIZE; i++) {\n cartaMon = playerMain.mesa.cartasMonstros[i];\n\n if (cartaMon != null) {\n System.out.print(\" \" + i + \". \" + cartaMon.getNome() + \" \" + cartaMon.getATK() + \"/\" + cartaMon.getDEF());\n if (cartaMon.getModoCarta().isAtaqueBaixo() || cartaMon.getModoCarta().isAtaqueCima()) {\n System.out.print(\" - A\");\n } else {\n System.out.print(\" - D\");\n }\n if (cartasQueAtacaram[i]) {\n System.out.print(\" - X\");\n }\n\n System.out.println(\"\");\n } else {\n System.out.println(\" \" + i + \". ...\");\n }\n }\n for (int i = 0; i < Mesa.MESA_SIZE; i++) {\n cartaMag = playerMain.mesa.cartasMagicas[i];\n if (cartaMag != null) {\n System.out.println(\" \" + (i + Mesa.MESA_SIZE) + \". \" + cartaMag.getNome() + \" \" + cartaMag.getTipoEfeitoMagico());\n } else {\n System.out.println(\" \" + (i + Mesa.MESA_SIZE) + \" . ...\");\n }\n }\n\n cartaIndex = scanner.nextInt();\n if (cartaIndex == -1) {\n break;\n }\n\n //usando as cartas magicas\n if (cartaIndex >= Mesa.MESA_SIZE) {\n cartaIndex -= Mesa.MESA_SIZE;\n cartaMag = playerMain.mesa.cartasMagicas[cartaIndex];\n if (cartaMag.getTipoEfeitoMagico() == CartaMagica.TipoEfeitoMagico.CAMPO) {\n cartaMag.aplicarEfeito(this, playerMain, -1);\n playerMain.mesa.removeMagica(cartaIndex);\n } else {\n System.out.println(\"Essa carta Magica não é ativavel manualmente!\");\n }\n continue;\n }\n\n if (cartasQueAtacaram[cartaIndex] == false) {\n cartaMon = playerMain.mesa.cartasMonstros[cartaIndex];\n System.out.println(\"Digite 1 para usa-la para atacar e 0 para mudar seu modo defesa-ataque\");\n if (scanner.nextInt() == 1) {\n if (cartaMon.getModoCarta().isAtaqueBaixo() || cartaMon.getModoCarta().isAtaqueCima()) {\n _jogaEstado_atacaMesaInimiga(playerMain, playerInimigo, cartaIndex);\n cartasQueAtacaram[cartaIndex] = true;\n if (playerMain.perdeu() || playerInimigo.perdeu()) {\n break;\n }\n } else {\n System.out.println(\"A carta deve estar em modo de ataque para atacar!\");\n }\n } else {\n giraCarta(cartaMon);\n }\n } else {\n System.out.println(\"Carta já atacou! escolha outra ou finalize o turno.\");\n }\n\n }\n\n }", "public void primerTicketDisponibleEncontrado() {\n\t\tprimerTicketDisponible();\n\t\tint f; int c;\n\t\tString ticket = primerTicketDisponible();\n\t\tString[] dividir = ticket.split(\" \");\n\t\tString fila = dividir[0];\n\t\tString columna = dividir[1];\n\t\tSystem.out.println(fila);\n\t\tSystem.out.println(columna);\n\t\tf = Integer.parseInt(fila);\n\t\tc = Integer.parseInt(columna);\n\t\tactualizarPlazas(f, c);\n\t}", "private void BajarPiezaRapido() {\n if (!Mover(piezaActual, posicionX, posicionY - 1)) {\r\n BajarPieza1posicion();\r\n }\r\n }", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "public void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }", "private void renderObjetos()\n {\n for (int i=0;i<NCONSUMIBLES;i++)\n {\n //EDIT:Ruta de Inventario\n Consumible consumible=(Consumible)VenganzaBelial.atributoGestion.getInv().getItems().get(i);\n if(eleccionJugador==i)\n {\n opcionesJugadorTTF.drawString(10,i*20+400,consumible.getNombre()+\" \"+consumible.getNumero()+\"/10\");\n }\n else{\n opcionesJugadorTTF.drawString(10, i * 20 + 400, consumible.getNombre()+\" \"+consumible.getNumero()+\"/10\", notChosen);\n }\n }\n }", "public void agregarBombaLogica(){\n int numbomba = tam * tam;\n numbomba*=0.10;\n System.out.println(numbomba);\n for(int i=0;i<numbomba;i++){\n int x= (int)(Math.random()*tam);\n int y= (int)(Math.random()*tam);\n if(matriz[y][x]!=2 && matriz[y][x]!=1){\n matriz[y][x]=3;\n }\n \n }\n }", "public void montarTela(){\n ControllerListener listener = new BaseControllerListener(){\n @Override\n public void onFinalImageSet(String id, Object imageInfo, Animatable animatable) {\n super.onFinalImageSet(id, imageInfo, animatable);\n }\n\n @Override\n public void onFailure(String id, Throwable throwable) {\n super.onFailure(id, throwable);\n }\n\n @Override\n public void onIntermediateImageFailed(String id, Throwable throwable) {\n super.onIntermediateImageFailed(id, throwable);\n }\n\n @Override\n public void onIntermediateImageSet(String id, Object imageInfo) {\n super.onIntermediateImageSet(id, imageInfo);\n }\n\n @Override\n public void onRelease(String id) {\n super.onRelease(id);\n }\n\n @Override\n public void onSubmit(String id, Object callerContext) {\n super.onSubmit(id, callerContext);\n }\n };\n\n String urlImagem = DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\");\n\n Uri uri = null;\n DraweeController dc = null;\n\n if(urlImagem.contains(\"https\")){\n uri = Uri.parse(DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\"));\n dc = Fresco.newDraweeControllerBuilder()\n .setUri(uri)\n .setControllerListener(listener)\n .setOldController(ivFotoPerfil.getController())\n .build();\n } else {\n uri = Uri.parse(\"https://tocaredev.azurewebsites.net\"+DetalhesPaciente.paciente.getFoto().replace(\" \", \"%20\"));\n dc = Fresco.newDraweeControllerBuilder()\n .setUri(uri)\n .setControllerListener(listener)\n .setOldController(ivFotoPerfil.getController())\n .build();\n }\n ivFotoPerfil.setController(dc);\n\n tvUsername.setText(DetalhesPaciente.paciente.getNome() + \" \" + DetalhesPaciente.paciente.getSobrenome());\n\n int idade = Util.retornaIdade(DetalhesPaciente.paciente.getDataNascimento());\n\n tvDataNascimento.setText(DetalhesPaciente.paciente.getDataNascimento() + \" (\" + idade + \")\");\n \n etAnamnese.setText(DetalhesPaciente.paciente.getProntuario().getAnamnese());\n etExameFisico.setText(DetalhesPaciente.paciente.getProntuario().getExameFisico());\n etPlanoTerapeutico.setText(DetalhesPaciente.paciente.getProntuario().getPlanoTerapeutico());\n etHipoteseDiagnostica.setText(DetalhesPaciente.paciente.getProntuario().getHipoteseDiagnostica());\n \n }", "public void CobaHitung()\n {\n\n\n PrayTimeCounter prayers = new PrayTimeCounter();\n\n prayers.setTimeFormat(prayers.getTime24());\n prayers.setCalcMethod(prayers.getMWL());\n prayers.setAsrJuristic(prayers.getShafii());\n prayers.setAdjustHighLats(prayers.getAngleBased());\n int[] offsets = {0, 0, 0, 0, 0, 0, 0}; // {Fajr,Sunrise,Dhuhr,Asr,Sunset,Maghrib,Isha}\n prayers.tune(offsets);\n\n Date now = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(now);\n\n ArrayList<String> prayerTimes = prayers.getPrayerTimes(cal,\n Anshitu.getApp().getLatitude(), Anshitu.getApp().getLongitude(), Anshitu.getApp().getTimezone());\n subuh.setText(prayerTimes.get(0));\n terbit.setText(prayerTimes.get(1));\n duhur.setText(prayerTimes.get(2));\n ashar.setText(prayerTimes.get(3));\n maghrib.setText(prayerTimes.get(4));\n isya.setText(prayerTimes.get(prayerTimes.size()-1));\n /*ArrayList<String> prayerNames = prayers.getTimeNames();\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerNames);\n jeda.setAdapter(adapter);\n ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,prayerTimes);\n durasi.setAdapter(adapter1);*/\n }", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "private void verificarMuerte() {\n if(vidas==0){\n if(estadoJuego==EstadoJuego.JUGANDO){\n estadoJuego=EstadoJuego.PIERDE;\n //Crear escena Pausa\n if(escenaMuerte==null){\n escenaMuerte=new EscenaMuerte(vistaHUD,batch);\n }\n Gdx.input.setInputProcessor(escenaMuerte);\n efectoGameOver.play();\n if(music){\n musicaFondo.pause();\n }\n }\n guardarPuntos();\n }\n }", "void establecerPuntoAM(int pos){\n this.emisoraAMActual = pos;\n }", "public void prepareObjetivos(){\n\t\tfor( int x= 0 ; x < game.getAmountObjetivos();x++){\n\t\t\tObjetivo o = game.getObjetivo(x);\n\t\t\timage = o.getImage();\n\t\t\ttemporal = image.getImage().getScaledInstance(o.getAncho(), o.getAlto(), Image.SCALE_SMOOTH);\n\t\t\to.setImage(new ImageIcon(temporal));\n\t\t}\n\t\t\n\t}", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public void generarCuestionario() {\n setLayout(null);\n \n setTitle(\"Cuestionario de Fin de Curso\"); \n \n //Con el modelo construido debemos representar uestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n \n Opcion op1 = new Opcion();\n op1.setTitulo(\"Londres\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"Roma\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Paris\");\n op3.setCorrecta(true);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Oslo\");\n op4.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Cual es la capital de Francia\");\n p1.setOpciones(opciones);\n \n //Opiciones de la pregumta Numero 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Atlantico\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Indico\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Artico\");\n op23.setCorrecta(false);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Pacifico\");\n op24.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Cual es el oceano más grande del mundo?\");\n p2.setOpciones(opciones2);\n \n //Opiciones de la pregumta Numero 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"Cristobal Colon\");\n op31.setCorrecta(true);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Cristobal Nodal\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Cuahutemoc blanco\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Cuahutemoc\");\n op34.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien descubrio América?\");\n p3.setOpciones(opciones3);\n \n //Opiciones de la pregumta Numero 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"Fernanflo\");\n op41.setCorrecta(false);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Polinesios\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"Eh vegeta\");\n op43.setCorrecta(true);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Willyrex\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Quien es el mejor youtuber?\");\n p4.setOpciones(opciones4);\n \n //Opiciones de la pregumta Numero 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Amarillo patito\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Verde Sherec\");\n op52.setCorrecta(false);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Rojo me faltas tú\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Azul\");\n op54.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5 = {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿De que color es el cielo?\");\n p5.setOpciones(opciones5);\n \n //Opiciones de la pregumta Numero 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"200\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"100\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"45\");\n op63.setCorrecta(true);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"13\");\n op64.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿De cuantas localidades se compone una memoria de 8x5?\");\n p6.setOpciones(opciones6);\n \n //Opiciones de la pregumta Numero 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Try - Catch\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"IF\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Switch - Case\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"For anidado\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que estructura condicional se recomienda usar menos en una interfaz de usuario?\");\n p7.setOpciones(opciones7);\n \n //Opiciones de la pregumta Numero 8\n Opcion op81 = new Opcion();\n op81.setTitulo(\"Access\");\n op81.setCorrecta(false);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Oracle\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"MySQL\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Mongo DB\");\n op84.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Es una base de datos no relacional de uso moderno?\");\n p8.setOpciones(opciones8);\n \n //Opiciones de la pregumta Numero 9\n Opcion op91 = new Opcion();\n op91.setTitulo(\"GitHub\");\n op91.setCorrecta(true);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"MIcrosoft teams\");\n op22.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Zoom\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"Collaborate\");\n op94.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿Es una plataforma para trabajo en línea?\");\n p9.setOpciones(opciones9);\n\n //Opiciones de la pregumta Numero 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Prog. a nivel maquina\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Prog. orientada a objetos\");\n op102.setCorrecta(true);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"MySQL\");\n op103.setCorrecta(false);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"C++\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que aprendi en este curso?\");\n p10.setOpciones(opciones10);\n\n\n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n\n //Se agrega a este list la unica prgunta que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n c.setPreguntas(preguntas);\n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la preunta\n mostrarPregunta(preguntaActual);\n \n Salir.setVisible(false);\n siguiente.setEnabled(false);\n \n }", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "public void actualiza() {\n //Determina el tiempo que ha transcurrido desde que el Applet inicio su ejecución\n long tiempoTranscurrido = System.currentTimeMillis() - tiempoActual;\n \n //Guarda el tiempo actual\n \t tiempoActual += tiempoTranscurrido;\n \n //Actualiza la animación con base en el tiempo transcurrido\n if (direccion != 0) {\n barril.actualiza(tiempoTranscurrido);\n }\n \n \n //Actualiza la animación con base en el tiempo transcurrido para cada malo\n if (click) {\n banana.actualiza(tiempoTranscurrido);\n }\n \n \n \n \n //Actualiza la posición de cada malo con base en su velocidad\n //banana.setPosY(banana.getPosY() + banana.getVel());\n \n \n \n if (banana.getPosX() != 50 || banana.getPosY() != getHeight() - 100) {\n semueve = false;\n }\n \n if (click) { // si click es true hara movimiento parabolico\n banana.setPosX(banana.getPosX() + banana.getVelX());\n banana.setPosY(banana.getPosY() - banana.getVelY());\n banana.setVelY(banana.getVelY() - gravity);\n }\n \n if (direccion == 1) { // velocidad de las barrils entre menos vidas menor el movimiento\n barril.setPosX(barril.getPosX() - vidas - 2);\n }\n \n else if (direccion == 2) {\n barril.setPosX(barril.getPosX() + vidas + 2);\n }\n }", "public static void MostrarPerroSegunEstadia(Perro BaseDeDatosPerros[], int codPerro){\n String razaDeceada, razaPerro;\r\n int diasDeEstadia; \r\n razaDeceada=IngresarRazaCorrecta();\r\n \r\n for (int i = 0; i < codPerro; i++) {\r\n razaPerro=BaseDeDatosPerros[i].getRaza();\r\n diasDeEstadia=BaseDeDatosPerros[i].getCantDias();\r\n if (razaDeceada.equalsIgnoreCase(razaPerro)&&(diasDeEstadia>20)) {\r\n System.out.println(\"____________________________________________\");\r\n System.out.println(BaseDeDatosPerros[i].toString());\r\n System.out.println(\"____________________________________________\");\r\n \r\n }\r\n }\r\n \r\n }", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "public void billeBarre() { \t\t\t\t\t\t\t\t\t\t\t\n\t\tint contact = 0;\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\t// Étude des contacts avec les 8 points de la bille\n\t\t// Contact GaucheHaut de la bille\n\n\t\t// Contact haut de la bille\n\t\tint[] p = billeEnCours.MH();\n\t\tif (p[1] <= barreEnCours.bas() && p[1] >= barreEnCours.haut() && p[0] <= barreEnCours.droite() && p[0] >= barreEnCours.gauche()) {\n\t\t\tcontact = 3;\n\t\t}\n\n\t\t// Contact bas de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.MB();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 7;\n\t\t\t}\n\t\t}\n\n\t\t// Contact droite de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.DM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact gauche de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.GM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 1;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 2;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 4;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 8;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 6;\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse \n\n\t\t// Rencontre d'un coin\n\t\tif ((((contact == 2) || (contact == 4))) || ((contact == 8) || (contact == 6))) {\n\t\t\tbilleEnCours.demiTour();\n\t\t}\n\n\t\t// Contact Classique\n\t\t// Gauche - Droite\n\t\tif ((contact == 1) || (contact == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\t// Haut - Bas : Déviation de la balle\n\t\tif ((contact == 3) || (contact == 7)) {\n\t\t\tint[] nv = new int[] {1,1};\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4 && billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] - 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] + 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\t\t\t\n\n\n\t}", "public void controlla_bersaglio() {\n\n if ((x[0] == bersaglio_x) && (y[0] == bersaglio_y)) {\n punti++;\n posiziona_bersaglio();\n }\n }", "public void barajarCartas()\n {\n for (int posicionActual = 0; posicionActual < mazo.size(); posicionActual++) {\n Carta carta1 = mazo.get(0);\n Random aleatorio = new Random();\n int posicionAleatoria = aleatorio.nextInt(mazo.size());\n mazo.set(posicionActual, mazo.get(posicionAleatoria));\n mazo.set(posicionAleatoria, carta1);\n }\n }", "public void gastarDinero(double cantidad){\r\n\t\t\r\n\t}", "public static void curar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int curador;\n //condicion de puntos de mana para ejecutar la curacion del jugador\n if(puntosDeMana>=1){\n //acciones de la funcion curar en el jugador\n aleatorio = (numeroAleatorio.nextInt(25-15+1)+15);\n curador= ((nivel+1)*5)+aleatorio;\n puntosDeVida= puntosDeVida+curador;\n puntosDeMana=puntosDeMana-1;\n }\n else{//imprimiendo el mensaje de curacion fallada\n System.out.println(\"no cuentas con Puntos De mana (MP) para curarte\");\n }\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }", "private void prepare()\n {\n addObject(new TempoLimite(), 432, 207);\n addObject(new NumeroVidas(), 395, 278);\n\n Cliqueparajogar clique = new Cliqueparajogar();\n addObject(clique, getWidth()/2, getHeight()/2);\n\n Som som = new Som();\n addObject(som, getWidth() - 37, getHeight()-57);\n \n umMin ummin = new umMin();\n addObject(ummin,630,206);\n\n doisMin doismin = new doisMin();\n addObject(doismin,670,206);\n \n tresMin tresmin = new tresMin();\n addObject(tresmin,710,206);\n \n quatroMin quatromin = new quatroMin();\n addObject(quatromin,750,206);\n \n cincoMin cincomin = new cincoMin();\n addObject(cincomin,790,206);\n \n umaVida umavida = new umaVida();\n addObject(umavida,630,280);\n \n duasVidas duasvidas = new duasVidas();\n addObject(duasvidas,670,280);\n \n tresVidas tresvidas = new tresVidas();\n addObject(tresvidas,710,280);\n \n quatroVidas quatrovidas = new quatroVidas();\n addObject(quatrovidas,750,280);\n \n cincoVidas cincovidas = new cincoVidas();\n addObject(cincovidas,790,280);\n \n voltaratras voltar = new voltaratras();\n addObject(voltar, getWidth() -37, 428);\n }", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "public void liquidarEmpleado(Fecha fechaLiquidacion) {\n //COMPLETE\n double prima=0; \n boolean antiguo=false;\n double aniosEnServicio=fechaLiquidacion.getAnio()-this.fechaIngreso.getAnio();\n if(aniosEnServicio>0&&\n fechaLiquidacion.getMes()>this.fechaIngreso.getMes())\n aniosEnServicio--; \n \n //System.out.println(\"A:\"+aniosEnServicio+\":\"+esEmpleadoLiquidable(fechaLiquidacion));\n if(esEmpleadoLiquidable(fechaLiquidacion)){\n this.descuentoSalud=salarioBase*0.04;\n this.descuentoPension=salarioBase*0.04;\n this.provisionCesantias=salarioBase/12;\n if(fechaLiquidacion.getMes()==12||fechaLiquidacion.getMes()==6)\n prima+=this.salarioBase*0.5; \n if(aniosEnServicio<6&&\n fechaLiquidacion.getMes()==this.fechaIngreso.getMes())prima+=((aniosEnServicio*5)/100)*this.salarioBase;\n if(aniosEnServicio>=6&&fechaLiquidacion.getMes()==this.fechaIngreso.getMes()) prima+=this.salarioBase*0.3;\n\n this.prima=prima;\n this.setIngresos(this.salarioBase+prima);\n \n this.setDescuentos(this.descuentoSalud+this.descuentoPension);\n this.setTotalAPagar(this.getIngresos()-this.getDescuentos());\n }\n\n }", "public void testOctaedre() {\n\t\t\t\n\t\t\tSolide i = Octaedre.octaedre();\n\t\t\t\n\t\t\t/* creation de points qui ont les memes coordonnees que ceux qui \n\t\t\t * constituent notre solide (car octaedre() n'a pas de parametres)\n\t\t\t */\n\t\t\t\n\t\t\tPoint p1 = new Point(-25, 0,-25);\n\t\t\tPoint p2 = new Point(-25, 0,25);\n\t\t\tPoint p3 = new Point(25, 0,-25);\n\t\t\tPoint p4 = new Point(25,0,25);\n\t\t\tfloat hauteur = (float) (50/Math.sqrt(2));\n\t\t\t// on se sert de la hauteur pour donnee les coordonees des sommets manquant\n\t\t\tPoint p5 = new Point(0, hauteur,0);\n\t\t\tPoint p6 = new Point(0,-hauteur,0);\n\t\t\t\n\t\t\t//On teste si les points de l'octaedre i sont bien les memes que ceux créés\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getAbscisse()==(p1.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(1).getAbscisse()==(p2.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(5).getAbscisse()==(p3.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(3).getAbscisse()==(p4.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(2).getAbscisse()==(p5.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(0).getAbscisse()==(p6.getAbscisse()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getOrdonnee()==(p1.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(1).getOrdonnee()==(p2.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(5).getOrdonnee()==(p3.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(3).getOrdonnee()==(p4.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(2).getOrdonnee()==(p5.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(0).getOrdonnee()==(p6.getOrdonnee()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getProfondeur()==(p1.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(1).getProfondeur()==(p2.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(5).getProfondeur()==(p3.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(3).getProfondeur()==(p4.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(2).getProfondeur()==(p5.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(0).getProfondeur()==(p6.getProfondeur()));\n\t\t\t\n\t\t\t//On teste si les faces de l'octaedre contiennent bien les points créés\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(0).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(1).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(2).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(3).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p6));\n\t\t\n\t\t\tassertTrue(i.getFaces().get(4).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(5).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(6).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(7).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p6));\n\t\t\t\n\t\t\t\n\t\t\t\n\t}", "public void prepareSorpresas(){\n\t\tfor( int x= 0 ; x < game.getAmountSorpresas();x++){\n\t\t\tSorpresa s = game.getSorpresa(x);\n\t\t\timage = s.getImage();\n\t\t\ttemporal = image.getImage().getScaledInstance(s.getAncho(), s.getAlto(), Image.SCALE_SMOOTH);\n\t\t\ts.setImage(new ImageIcon(temporal));\n\t\t}\n\t}", "public Mazzo(int numcarte) {\n this.numcarte = numcarte;\n\n //creo e dimensiono l'array \"mazzo\" dichiarato in precedenza\n mazzo = new Carta[numcarte];\n\n //qui dovrò creare tot carte ed inserirle nel mazzo\n String semicarta[] = {\"\", \"Picche\", \"Fiori\", \"Quadri\", \"Cuori\"};\n int valore = 1;\n int seme = 1;\n\n for (int i = 1; i <= numcarte; i++) {\n\n String nomicarta = valore + \" di \" + semicarta[seme];\n Carta carta = new Carta(valore, seme, nomicarta);\n mazzo[i - 1] = carta;\n valore++;\n\n //valore e semi correnti\n //se l'elemento corrente (i) è sulla decina (10, 20, 30, etc) resetto i valori e cambio il seme\n //ad esempio quando sono a 10 rimetto il valore ad 1 ed aumento di 1 il seme\n if (i % (numcarte / 4) == 0) {\n seme++;\n valore = 1;\n }\n\n }\n }", "public void somaVezes(){\n qtVezes++;\n }", "public void cambiarABarreraTotal() {\n mRect = new Rect(0, y, centroPantallaX * 2, y + ALTO_PALA);\n }", "public void mixMazzo() {\n for (int i = 0; i < 2000; i++) {\n\n \n //pesco due numeri a caso da 0 a 39 e \n //scambio le due carte corrispondenti\n\n //scambio carte a caso\n //int caso1 = 22;\n //int caso2 = 34;\n int caso1 = (int) Math.floor(Math.random() * numcarte);\n int caso2 = (int) Math.floor(Math.random() * numcarte);\n\n //la 22 con la 34\n //prendo la 22 in mano e sposto la 34 al posto della 22\n //prendo la carta 22\n Carta cartainmano = mazzo[caso1];\n\n //metto la carta 34 al posto della 22\n mazzo[caso1] = mazzo[caso2];\n\n //metto la carta che ho in mano (22) al posto della 34\n mazzo[caso2] = cartainmano;\n\n //fine spostamento\n }\n\n}", "@Test\n\tpublic void testRicercaArticolo1() {\n\t\tString ricerca = \"No\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve essere vuota\", trovati.isEmpty());\n\t}", "@Override\n public void onTick(long millisUntilFinished) {\n\n odliczanie2--;\n Animation animationprzyciski= AnimationUtils.loadAnimation(getApplicationContext(),R.anim.mixed_anim);\n odliczanie.startAnimation(animationprzyciski);\n odliczanie.setText(odliczanie2+\"\");\n\n }", "@Override\n\tprotected void trazOutroATona() {\n\t\t\n\t}", "public Girasol(int x,int y){\n super(x,y);\n this.setComportamiento(\"Crea 20 soles cada 2 turnos\");\n this.setVidas(1);\n this.impresion=\"G(\"+this.getVidas()+\")\";\n this.setDaño(0);\n this.setFrecuencia(2);\n }", "public void incrementarArreglo() {\n int tamanio_actual = top + 1; // variable tamaño actual le asignamos el valor de la cima + 1\r\n int[] new_array = new int[tamanio_actual * 2]; // al nuevo arreglo le asignamos el tamaño actual multiplicado por 2\r\n for(int i=0; i<tamanio_actual; i++){ \r\n new_array[i] = array[i]; // ciclo para ir asignando los valores existentes al nuevo arreglo\r\n }\r\n array = new_array; //referenciamos al nuevo arreglo\r\n capacidad = new_array.length; // variable capacidad le damos el valor de la longitud del nuevo arreglo\r\n }", "public void SiguienteCancion(View view){\n //Verificamos si nuestro indice esta en la posicion 0\n if(posicion < vector_mp.length -1){//-1 evita el desbordamiento de memoria\n // Si nuestro indice es menor al ancho de nuestro vector, permite que nuestro indice siga recorriendo el vector\n //Verifica que nuestro vector en tal posicion este reprodcuiendo una cancion\n if(vector_mp[posicion].isPlaying()){\n //Detiene la pista que se esta reproduciendo para poder reproducir la siguiente\n vector_mp[posicion].stop();\n //Ayudamos a nuestro indice a recorrer el vector\n posicion++;\n //La siguiente posicion/cancion debe empezar a reproducirse\n vector_mp[posicion].start();\n\n //cambio de portada\n if(posicion == 0){\n iv.setImageResource(R.drawable.portada1);;\n } else if(posicion == 1){\n iv.setImageResource(R.drawable.portada2);\n } else if(posicion == 2){\n iv.setImageResource(R.drawable.portada3);\n }\n\n } else {\n //Solo incrementa la posicion ya que al no estar reproduciendo no tiene caso detener\n posicion++;\n\n //cambio de portada\n if(posicion == 0){\n iv.setImageResource(R.drawable.portada1);;\n } else if(posicion == 1){\n iv.setImageResource(R.drawable.portada2);\n } else if(posicion == 2){\n iv.setImageResource(R.drawable.portada3);\n }\n\n }\n\n } else{\n //Si nuestro inidice posicion ya recorrio el vector indicara que no hay mas canciones y asi evitar un desbordamiento de memoria\n Toast.makeText(this, \"No hay mas canciones\", Toast.LENGTH_SHORT).show();\n }\n }", "public void eisagwgiGiatrou() {\n\t\t// Elegxw o arithmos twn iatrwn na mhn ypervei ton megisto dynato\n\t\tif(numOfDoctors < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tdoctor[numOfDoctors] = new Iatros();\n\t\t\tdoctor[numOfDoctors].setFname(sir.readString(\"DWSTE TO ONOMA TOU GIATROU: \")); // Pairnei apo ton xristi to onoma tou giatrou\n\t\t\tdoctor[numOfDoctors].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \")); // Pairnei apo ton xristi to epitheto tou giatrou\n\t\t\tdoctor[numOfDoctors].setAM(rnd.nextInt(1000000)); // To sistima dinei automata ton am tou giatrou\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t// Elegxos monadikotitas tou am tou giatrou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tif(doctor[i].getAM() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfDoctors++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS GIATROUS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "@Override\n\tpublic void aumentar(int cantidad) {\n\t\t\n\t}", "public void dibujarse(Entorno entorno) \n\t{\n\t\t\n\t\t\t\tswitch(this.dibujo)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\tcase 1: entorno.dibujarImagen(mario, x, y, 0, 0.7); \n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 2:entorno.dibujarImagen(this.mariocorreder, x, y, 0, 0.7);\n\t\t\t\t\t break;\n\t\t\t\tcase 3:entorno.dibujarImagen(this.mariocorreizq, x, y, 0, 0.7);\n\t\t\t\t break; \n\t\t\t\tcase 4:entorno.dibujarImagen(this.mariosalta, x, y, 0, 0.7);\n\t\t\t\t break;\n\t\t\t\tcase 5: entorno.dibujarImagen(this.mariosalta, x, y, 0, 0.7);\n\t\t\t\t break;\n\t\t\t\tcase 6:entorno.dibujarImagen(this.mariosub, x, y, 0, 0.7);\n\t\t break; \n\t\t\t\tcase 8:entorno.dibujarImagen(this.mariocae, x, y, 0, 0.7);\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 9:entorno.dibujarImagen(this.mariosub, x, y,0, 0.7);\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 10:entorno.dibujarImagen(this.mariosub, x, y,0, 0.7);\n\t\t\t\t\t\tbreak;\n\t\t\t\tdefault:entorno.dibujarImagen(mario, x, y, 0, 0.7); \n\t\t\n\t\t\t\t}\n\t}", "public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }", "@Override\n public void jornadaTrabalho(int x) {\n DateTimeFormatter formatoData = DateTimeFormatter.ofPattern(\"HH:mm\");\n \n if (x == 40) {\n // Jornada de Trabalho PADRÃO 40h\n entrada1 = LocalTime.of(8, 0);\n saida1 = LocalTime.of(12, 0);\n entrada2 = LocalTime.of(14, 0);\n saida2 = LocalTime.of(18, 0);\n cbxJornada.setSelectedIndex(1);\n jornada = 40;\n } else if (x == 44) {\n // Jornada de Trabalho PADRÃO 44h\n entrada1 = LocalTime.of(7, 0, 0);\n saida1 = LocalTime.of(12, 0, 0);\n entrada2 = LocalTime.of(14, 0, 0);\n saida2 = LocalTime.of(18, 0, 0);\n cbxJornada.setSelectedIndex(2);\n jornada = 44;\n }\n //Popula os campos de horas\n txtEntrada1.setText(entrada1.format(formatoData));\n txtSaida1.setText(saida1.format(formatoData));\n txtEntrada2.setText(entrada2.format(formatoData));\n txtSaida2.setText(saida2.format(formatoData));\n }", "private void aumentarPilha() {\n this.pilhaMovimentos++;\n }", "@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }", "public Inventario(int s, int S, float c, float r, int x, float h){\n this.s=s;\n this.S=S;\n this.c=c;\n this.r=r;\n this.x=x; //partimos con un stock inicial de x unidades del producto\n this.h=h;\n \n this.C=0;\n this.H=0;\n this.R=0;\n \n this.t0=0;\n this.t1=0;\n \n T=100;\n \n }", "private String insertarCartaLightning() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 2,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 0,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 0,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n true,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n false,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n false,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n String nombre = \"\";\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }", "public void MostrarDatos(){\n // En este caso, estamos mostrando la informacion necesaria del objeto\n // podemos acceder a la informacion de la persona y de su arreglo de Carros por medio de un recorrido\n System.out.println(\"Hola, me llamo \" + nombre);\n System.out.println(\"Tengo \" + contador + \" carros.\");\n for (int i = 0; i < contador; i++) {\n System.out.println(\"Tengo un carro marca: \" + carros[i].getMarca());\n System.out.println(\"El numero de placa es: \" + carros[i].getPlaca()); \n System.out.println(\"----------------------------------------------\");\n }\n }", "public void art() {\n arJ();\n }", "private void giveScords(){\n \t//bingo 題數, seconds花費秒數\n \tint totalSec = (int)seconds;\n \t\n \tif(correct){\n \t\tif(totalSec<=5){\n \t\t\tuserPoints = userPoints + 150;\n \t\t}else if(totalSec<=10){\n \t\t\tuserPoints = userPoints + 125;\n \t\t}else if(totalSec<=15){\n \t\t\tuserPoints = userPoints + 100;\n \t\t}else if(totalSec<=20){\n \t\t\tuserPoints = userPoints + 80;\n \t\t}\n \t}\n }", "public void enemigosCatacumba(){\n esq81 = new Esqueleto(1, 8, 400, 160, 30);\n esq82 = new Esqueleto(2, 8, 400, 160, 30);\n esq111 = new Esqueleto(1, 11, 800, 255, 50);\n esq112 = new Esqueleto(2, 11, 800, 255, 50);\n esq141 = new Esqueleto(1, 14, 1000, 265, 60);\n esq142 = new Esqueleto(2, 14, 1000, 265, 60);\n //\n zom81 = new Zombie(1, 8, 1000, 170, 40);\n zom82 = new Zombie(2, 8, 1000, 170, 40);\n zom111 = new Zombie(1, 11, 1300, 250, 50);\n zom112 = new Zombie(2, 11, 1300, 250, 50);\n zom141 = new Zombie(1, 14, 1700, 260, 60);\n zom142 = new Zombie(2, 14, 1700, 260, 60);\n //\n fana81 = new Fanatico(1, 8, 400, 190, 40);\n fana82 = new Fanatico(2, 8, 400, 190, 40);\n fana111 = new Fanatico(1, 11, 700, 250, 50);\n fana112 = new Fanatico(2, 11, 700, 250, 50);\n fana141 = new Fanatico(1, 14, 900, 260, 60);\n fana142 = new Fanatico(2, 14, 900, 260, 60);\n //\n mi81 = new Mimico(1, 8, 3, 1, 3000);\n mi111 = new Mimico(1, 11, 4, 1, 3000);\n mi141 = new Mimico(1, 14, 5, 1, 3200);\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}" ]
[ "0.6372245", "0.59982836", "0.5948155", "0.5907161", "0.5873089", "0.5849075", "0.57386076", "0.5737515", "0.57270545", "0.5713041", "0.5700407", "0.5697221", "0.5680842", "0.5648469", "0.5648404", "0.56384397", "0.5638221", "0.5634141", "0.5619862", "0.561617", "0.56030184", "0.5598644", "0.55890495", "0.5585868", "0.5584057", "0.55582315", "0.55523956", "0.55515826", "0.55441993", "0.554154", "0.55382675", "0.55345666", "0.5526525", "0.5523453", "0.55229104", "0.55139804", "0.5499888", "0.5488165", "0.5480648", "0.5473565", "0.5473263", "0.5470912", "0.54671293", "0.5456553", "0.545001", "0.5435139", "0.5432116", "0.54254186", "0.54212487", "0.54200655", "0.5414493", "0.54139996", "0.5405008", "0.54016364", "0.5400631", "0.53968036", "0.5394294", "0.5393867", "0.539377", "0.53931314", "0.5392535", "0.5391991", "0.5390636", "0.5387841", "0.53823054", "0.5373288", "0.5371787", "0.5371615", "0.5370923", "0.5367974", "0.5367525", "0.5362618", "0.5356985", "0.5354139", "0.53498626", "0.5348882", "0.5348167", "0.53479695", "0.5341793", "0.5340374", "0.5335917", "0.53347594", "0.5326413", "0.5322955", "0.53147626", "0.53119755", "0.530869", "0.53085154", "0.53079265", "0.53071237", "0.5306902", "0.5304885", "0.52978104", "0.5292678", "0.528632", "0.52837056", "0.5282439", "0.5282178", "0.52786964", "0.52780944", "0.5272848" ]
0.0
-1
Created by kamil on 10.04.2017.
public interface CartDao { Cart create(Cart cart); Cart read(String cartId); void update ( String cartId, Cart cart); void delete (String cartId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void init() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo4359a() {\n }", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "private void strin() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private void kk12() {\n\n\t}", "private void m50366E() {\n }", "Petunia() {\r\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo6081a() {\n }", "private void init() {\n\n\n\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public void initialize() { \n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}" ]
[ "0.58104634", "0.5757947", "0.5610227", "0.5561754", "0.5539552", "0.5539552", "0.55245733", "0.55226076", "0.55107325", "0.5474928", "0.5450007", "0.54481053", "0.5409128", "0.53968096", "0.5394349", "0.5386148", "0.537619", "0.5354411", "0.5338037", "0.5325808", "0.5325798", "0.532245", "0.5317346", "0.53152555", "0.5311314", "0.531058", "0.531058", "0.531058", "0.531058", "0.531058", "0.5310024", "0.5309147", "0.5293146", "0.5286264", "0.52849513", "0.5275512", "0.5271028", "0.52620834", "0.52620834", "0.52620834", "0.52620834", "0.52620834", "0.52620834", "0.5241405", "0.52367723", "0.52367723", "0.5223674", "0.5223674", "0.5223135", "0.5223135", "0.5223135", "0.5222073", "0.52152693", "0.5212689", "0.520718", "0.5203345", "0.52025217", "0.52025217", "0.52025217", "0.52018785", "0.5201678", "0.51967776", "0.5174216", "0.5174081", "0.5174081", "0.5172064", "0.51668745", "0.5166471", "0.5166225", "0.5159098", "0.5159098", "0.5159098", "0.5159098", "0.5159098", "0.5159098", "0.5159098", "0.51511514", "0.51511514", "0.51511514", "0.5150147", "0.51441175", "0.51363796", "0.5132056", "0.51288915", "0.51240677", "0.51214904", "0.51183355", "0.5116629", "0.5115827", "0.51154417", "0.5109633", "0.50975025", "0.50867546", "0.50714344", "0.5066511", "0.5065093", "0.50630206", "0.5061926", "0.5059288", "0.50522023", "0.5044775" ]
0.0
-1
Sets the rumble on the driver controller
public void rumbleDriverController(double power, double time) { rumbleController(driverController, power, time); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rumbleInYourPants() {\n double accel_z = RobotMap.helmsman.getAcceleromoterZ();\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick2().setRumble(RumbleType.kLeftRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick2().setRumble(RumbleType.kRightRumble, (float) Math.abs(accel_z - 1));\n }", "private void rumble(boolean on) {\n // Set the time point, so we know when to start or stop rumbling\n timePoint = Timer.getFPGATimestamp();\n\n // Set the state\n state = on ? RUMBLE : BREAK;\n\n // If rumble is on, full power. Otherwise, no power.\n double rumbleIntensity = (on ? intensity : 0.0);\n\n // Rumble the appropriate joysticks\n if (controllerToRumble == JoystickSelection.DRIVER_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n driver.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n driver.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n\n if (controllerToRumble == JoystickSelection.OPERATOR_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n operator.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n operator.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n }", "public Rumbler() {\n // Just a default rumble of 1 second 1 time on both joysticks.\n this(1.0, 0, 1, JoystickSelection.BOTH_JOYSTICKS, 1);\n }", "public void setRightRumble(float intensity) {\n\t\tjoystick.setRumble(RumbleType.kRightRumble, intensity);\n\t}", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "private void controlLift()\n {\n if (gamepad1.dpad_up) {\n liftMotor.setPower(-0.5);\n } else if (gamepad1.dpad_down) {\n liftMotor.setPower(0.5);\n } else {++backInc;\n liftMotor.setPower(0);\n }\n }", "public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }", "public void rumbleOperatorController(double power, double time) {\n // rumbleController(operatorController, power, time);\n }", "protected void execute() {\n\t\t_xboxControllerToRumble.setRumble(_rumbleType, _rumbleValue);\n\t\t_timesRumbled++;\n\t\tSystem.out.println(\"Rumbling \" + _timesRumbled);\n\t}", "public void grab() {\n\t\tif (climbMode == false) {\n\t\t\tif (bumperL) {\n\t\t\t\tmotorGL.set(-1);\n\t\t\t\tmotorGR.set(1);\n\t\t\t} \n\t\t\telse if (bumperR) {\n\t\t\t\tmotorGL.set(1);\n\t\t\t\tmotorGR.set(-1);\n\t\t\t}\t\n\t\t\telse {\n\t\t\t\tmotorGL.set(0);\n\t\t\t\tmotorGR.set(0);\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void end()\n {\n Robot.oi.mechJoystick.setRumble(RumbleType.kLeftRumble, 0);\n Robot.oi.mechJoystick.setRumble(RumbleType.kRightRumble, 0);\n }", "public void vibrate(RumbleType type,float value){\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n if (type == RumbleType.left || type == RumbleType.combined)\n \tlRumble = (short)(value*65535);\n if(type == RumbleType.right || type == RumbleType.combined)\n \trRumble = (short)(value*65535);\n FRCNetworkCommunicationsLibrary.HALSetJoystickOutputs((byte)port, 0, lRumble, rRumble);\n }", "public void liftSet(Gamepad gamepad1) {\n\n levelPlus = gamepad1.dpad_up;\n levelMinus = gamepad1.dpad_down;\n\n if(!pressP){\n if (levelPlus) {\n if (level < 8){\n level++;\n liftPress=true;\n }\n pressP = true;\n }\n }\n else{\n if (!levelPlus){\n pressP = false;\n }\n }\n\n if(!pressM){\n if (levelMinus) {\n if(level > 0){\n level--;\n liftPress=true;\n }\n pressM = true;\n }\n }\n else{\n if (!levelMinus){\n pressM = false;\n }\n }\n\n if(liftPress) {\n switch (level) {\n case 0:\n if(distanceLift.getDistance(DistanceUnit.CM) > 1) { //3\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0);\n liftPress = false;\n }\n break;\n case 1:\n if (distanceLift.getDistance(DistanceUnit.CM) < 10) { //10.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 11) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 2:\n if (distanceLift.getDistance(DistanceUnit.CM) < 20) { //20.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 21) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 3:\n if (distanceLift.getDistance(DistanceUnit.CM) < 30) { //30.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 31) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 4:\n if (distanceLift.getDistance(DistanceUnit.CM) < 40) { //40.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 41) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 5:\n if (distanceLift.getDistance(DistanceUnit.CM) < 55) { //54\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 56) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 6:\n if (distanceLift.getDistance(DistanceUnit.CM) < 63) { //62\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 64) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 7:\n if (distanceLift.getDistance(DistanceUnit.CM) < 73) { //72\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 74) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 8:\n if (distanceLift.getDistance(DistanceUnit.CM) < 82) { //81\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 83) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n }\n }\n }", "public void setLeftRumble(float intensity) {\n\t\tjoystick.setRumble(RumbleType.kLeftRumble, intensity);\n\t}", "public double setRightRumble(double speed) {\n\t\tsetRumble(GenericHID.RumbleType.kRightRumble, speed);\n\t\treturn speed;\n\t}", "public void winch(/* controller and other parameters */) {\n winch.set(.5);\n\n }", "public Rumbler(double timeOn, double timeOff, int repeatCount, JoystickSelection controllerToRumble,\n double intensity) {\n this.timeOn = timeOn;\n this.timeOff = timeOff;\n this.repeatCount = repeatCount;\n this.intensity = intensity;\n\n driver = Robot.oi.getDriverJoystick();\n operator = Robot.oi.getOperatorJoystick();\n\n this.controllerToRumble = controllerToRumble;\n\n // Add this command to the scheduler.\n start();\n }", "@Override\r\n\tpublic void setRobot(Robot r) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\trobot = (BasicRobot) r;\r\n\t\t//robot.setMaze(this.mC);\r\n\t\t\r\n\t}", "@Override\n public void loop() {\n\n\n if (gamepad1.right_bumper) {\n leftDrive.setDirection(DcMotor.Direction.FORWARD);\n leftDrive.setPower(3);\n } else if (gamepad1.left_bumper) {\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n leftDrive.setPower(3);\n\n }\n\n }", "public void loop() {\n\n double driveMult = gamepad1.left_bumper ? 0.5 : (gamepad1.right_bumper ? 0.2 : 1.0);\n\n double x = gamepad1.left_stick_x;\n double y = gamepad1.left_stick_y;\n\n switch (state) {\n case DRIVE:\n left.setPower(driveMult * (y - x));\n right.setPower(driveMult * (y + x));\n break;\n case REVERSE:\n left.setPower(driveMult * -(y + x));\n right.setPower(driveMult * -(y - x));\n break;\n case TANK:\n left.setPower(driveMult * gamepad1.left_stick_y);\n right.setPower(driveMult * gamepad1.right_stick_y);\n break;\n }\n\n if (gamepad1.dpad_up) {\n state = State.DRIVE;\n } else if (gamepad1.dpad_down) {\n state = State.REVERSE;\n } else if (gamepad1.dpad_left) {\n state = State.TANK;\n }\n\n // AUX CONTROLS\n\n double auxMult = gamepad2.left_bumper ? 0.5 : (gamepad2.right_bumper ? 0.2 : 1.0);\n\n rack.setPower(auxMult * ((gamepad2.dpad_up ? 1 : 0) + (gamepad2.dpad_down ? -1 : 0)));\n\n // extend.setPower(auxMult * gamepad2.left_stick_y);\n slurp.setPower(auxMult * gamepad2.right_stick_y);\n\n\n// if (gamepad2.a) {\n// rack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// rack.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// }\n\n // TELEMETRY\n\n telemetry.addData(\"Drive Mode: \", state);\n telemetry.addData(\"Rack Encoder: \", rack.getCurrentPosition());\n telemetry.addData(\"G2 RS Y: \", gamepad2.right_stick_y);\n }", "public void victorTest(){\n\n victorTestController.set(0.5);\n }", "public Rumbler(double timeOn, double timeOff, int repeatCount, JoystickSelection controllerToRumble) {\n this(timeOn, timeOff, repeatCount, controllerToRumble, 1);\n }", "public void changeRobot(int numR) \r\n\t{\r\n\t\t//\tgame.addRobot(4);\r\n\r\n\t\tedge_data e=new EdgeData();\r\n\t\tint numans=0;\r\n\t\tint i=0;\r\n\t\tdouble x=0;\r\n\t\tdouble y=Double.MAX_VALUE;\r\n\r\n\t\twhile(i<numR) {\r\n\r\n\t\t\tdouble c=0; \r\n\t\t\tfor(Fruit f: fru) {\r\n\t\t\t\te=f.e;\r\n\t\t\t\tx=f.value/e.getWeight();\r\n\t\t\t\tif(x>c && x<y) {\r\n\r\n\t\t\t\t\tc=x; \r\n\t\t\t\t\tnumans=e.getSrc();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ty=c;\r\n\t\t\tgame.addRobot(numans);\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void rdrive(double speed){\n right1.set(ControlMode.PercentOutput, -speedRamp(speed));\n right2.set(ControlMode.PercentOutput, -speedRamp(speed));\n }", "void setPWMRate(double rate);", "public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }", "public void loop()\n {\n double rightPower, leftPower;\n double gearRatio = gamepad1.right_bumper ? 0.7 : 0.2;\n // If right_bumper is down, the gearRatio is 0.7. Otherwise, the gearRatio is 0.3\n \n rightPower = gearRatio * gamepad1.left_stick_y;\n leftPower = gearRatio * gamepad1.right_stick_y;\n \n leftpower = Range.clip(leftpower, -1, 1); //gamepad controllers have a value of 1 when you push it to its maximum foward\n rightpower = Range.clip(rightpower, -1, 1); //limiting the range of each power, min first then max\n \n motorR.setPower(rightPower);\n motroL.setPower(leftPower);\n \n telemetry.addData(\"Gear Ratio \", gearRatio);\n telemetry.addData(\"Right Power \", rightPower);\n telemetry.addData(\"Left Power \", leftPower);\n \n \n }", "public static void setRightPower(double rightPower) {\n\t\tSystem.out.println(\"Right: \" + rightPower);\n\t\tShooter.rightPower = rightPower;\n\t}", "public final void setFuelUpgrade(int fuelUp){fuelUpgrade = fuelUp;}", "public static void hookMotor() {\n\t\thookMotor.rotate(45);\n\t}", "public synchronized void setRampRate(Double rampRate)\n {\n this.rampRate = rampRate;\n }", "void setSpeed(RobotSpeedValue newSpeed);", "public void setRan(int R)\t\n\t{\t//start of setRan method\n\t\trandomNum = R;\n\t}", "public void setR(boolean r) {\n\tthis.r = r;\n }", "public void setTurned(){\n\tIS_TURNED = true;\n\tvimage = turnedVimImage;\n }", "public void setR(Double r);", "@Override\n public void loop() { //Starts this loop after you press the START Button\n /**\n * Functional control of up down lift with no limit switches Meet 0 ready\n */\n double liftposition = robot.liftUpDown.getCurrentPosition();\n double liftrotposition = robot.liftRotate.getCurrentPosition();\n telemetry.addData(\"Lift Position\",\"%5.2f\",liftposition);\n telemetry.addData(\"LiftRot Position\", \"%5.2f\", liftrotposition);\n // telemetry.addData(\"Block Stack\", BlockStack);\n telemetry.update();\n\n/**Main drive controls\n * Driver 1\n */\n\n/**\n * Drag servos\n */\n if (gamepad1.a){ //release\n robot.drag1.setPosition(0);\n robot.drag2.setPosition(1);\n } else if (gamepad1.b){//grab\n robot.drag1.setPosition(1);\n robot.drag2.setPosition(0);\n }\n\n/**Mast and Lift controls\n *\n *\n * Driver Two\n *\n *\n*/\n\n/**\n * Need controls to\n * Maybe predetermined locations based on number of pushes of a button.\n */\n\n /**\n * Functional arm rotation with limit switches and encoder limits. Meet 2 ready\n */\n\n //Twists lift up after verifying that rotate up limit switch is not engaged and that step count is less than 5400\n if ( gamepad2.dpad_up && robot.rotateup.getState() == true){\n robot.liftRotate.setPower(1.0);\n }\n else if (gamepad2.dpad_down && robot.rotatedown.getState() == true){ //Twists lift down\n robot.liftRotate.setPower(-1.0);\n }\n //required or lift rotate motor continues to run in last direction (breaks the motor shaft)\n else robot.liftRotate.setPower(0);\n\n /**\n * claw controls a= open b= close\n * FUNCTIONAL Meet 2 ready\n */\n if (gamepad2.a){\n robot.claw1.setPosition(0);\n robot.claw2.setPosition(1);\n } else if (gamepad2.b){\n robot.claw1.setPosition(1);\n robot.claw2.setPosition(0);\n }\n\n /**\n * Lift controls with limit switches and encoder position Meet 2 ready\n * right_trigger = lift\n * left_trigger = down\n */\n\n if ( gamepad2.right_trigger>= 0.2 && robot.liftup.getState()) {\n triggerpress=true;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftUpDown.setPower(.9);\n robot.liftRotate.setPower(.15);\n }\n if (gamepad2.left_trigger>=0.2){\n triggerpress=true;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftUpDown.setPower(-0.9);\n robot.liftRotate.setPower(-0.15);\n }\n if (gamepad2.left_trigger<.2 && gamepad2.right_trigger<.2 && triggerpress ){\n robot.liftUpDown.setPower(0);\n robot.liftRotate.setPower(0);\n triggerpress=false;\n }\n\n int x;\n int y;\n double motorDelayTime;\n //Necessary Debounce to keep bumper from being seen as multiple touches\n/* motorDelayTime=.1;\n if (robot.liftUpDown.getCurrentPosition()<50){\n BlockStack =0;\n }\n //skips servos unless runtime is greater than 20 ms.\n if( runtime.time() > motorDelayTime ) {\n //Need to move 5.5 inches on position 2, subsequent blocks will only need to move up 4 inches.\n x = robot.liftUpDown.getCurrentPosition();\n y= robot.liftRotate.getCurrentPosition();\n if (gamepad2.right_bumper ) {\n\n BlockStack= BlockStack + 1;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftUpDown.setTargetPosition(x + robot.floorheight);\n robot.liftUpDown.setPower(.9);\n robot.liftRotate.setTargetPosition(y + robot.floorheightrotate);\n robot.liftRotate.setPower(.1);\n bumperpress=true;\n\n //don't want to drive the cable too far loose checks that we can move a full block down\n } else if (gamepad2.left_bumper && x >= robot.floorheight ) {\n BlockStack= BlockStack - 1;\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftUpDown.setTargetPosition(x - robot.floorheight);\n robot.liftUpDown.setPower(-.5);\n}\n\n runtime.reset();\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }*/\n\n /**\n * Limit switch tests that reset the encoders Meet 1 ready\n * * liftdown also allows the X button to work\n * * rotatedown also allows the Y button to work\n */\n\n if (robot.rotatedown.getState() == false) {\n robot.liftRotate.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "public void setgearClawLights(){\n \tgearClawLights.set(true);\n }", "public void open(){\n \ttriggerTimer.reset();\n \tisClosed = false;\n \tClawAct.set(false);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }", "public double setLeftRumble(double speed) {\n\t\tsetRumble(GenericHID.RumbleType.kLeftRumble, speed);\n\t\treturn speed;\n\t}", "public Lift (SpeedController liftMotor) {\n m_liftMotor = liftMotor;\n }", "public void setCrust(){\n this.crust = \"Thin\";\n }", "public void toggleGrab(){\n \tif (isClosed == true){\n \t\ttriggerTimer.reset();\n \t\tisClosed = false;\n \t\tClawAct.set(false);\n \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\n \t} else {\n \t\tisClosed = true;\n \t\tClawAct.set(true);\n \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\n \t}\n }", "public void driveRaw (double speed) {\n leftBackMotor.set(speed);\n leftMiddleMotor.set(speed);\n leftFrontMotor.set(speed);\n rightBackMotor.set(speed);\n rightMiddleMotor.set(speed);\n rightFrontMotor.set(speed);\n }", "public void manualControl(double power){\n leftMotor.set(power);\n rightMotor.set(power);\n }", "public void liftUp(){\n set(m_defaultLiftSpeedUp);\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "public static void driverControls() {\n\t\tif (driverJoy.getYButton()) {\n\t\t\tif (!yPrevious) {\n\t\t\t\tyEnable = !yEnable;\n\t\t\t\tif (yEnable) {\n\t\t\t\t\tClimber.frontExtend();\n\t\t\t\t} else {\n\t\t\t\t\tClimber.frontRetract();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tyPrevious = driverJoy.getYButton();\n\n\t\t// Toggle switch for the front climbing pneumatics\n\t\tif (driverJoy.getBButton()) {\n\t\t\tif (!bPrevious) {\n\t\t\t\tbEnable = !bEnable;\n\t\t\t\tif (bEnable) {\n\t\t\t\t\tClimber.backExtend();\n\t\t\t\t} else {\n\t\t\t\t\tClimber.backRetract();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbPrevious = driverJoy.getBButton();\n\n\t\t// Toggles for extending and retracting the hatch\n\t\tif (driverJoy.getAButton()) {\n\t\t\tSystem.out.println((Arm.getSetPosition() == Constants.HATCH_ONE) + \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\");\n\t\t\tif (!aPrevious) {\n\t\t\t\taEnable = !aEnable;\n\t\t\t\tif (aEnable) {\n\t\t\t\t\tif (Arm.getSetPosition() == Constants.HATCH_ONE && Arm.isWithinDeadband())// && Arm.isWithinDeadband()) //TODO add this in\n\t\t\t\t\t\tHatchIntake.extend();\n\t\t\t\t} else\n\t\t\t\t\tHatchIntake.retract();\n\t\t\t}\n\t\t}\n\t\taPrevious = driverJoy.getAButton();\n\n\t\t// Start to open servo, back to close\n\t\tif (driverJoy.getStartButton()) {\n\t\t\tHatchIntake.openServo();\n\t\t}\n\t\tif (driverJoy.getBackButton()) {\n\t\t\tHatchIntake.closeServo();\n\t\t}\n\n\t\t// Toggles for extending and retracting the crab\n\t\tif (driverJoy.getXButton()) {\n\t\t\tif (!xPrevious) {\n\t\t\t\txEnable = !xEnable;\n\t\t\t\tif (xEnable) {\n\t\t\t\t\tCrab.extend();\n\t\t\t\t} else {\n\t\t\t\t\tCrab.retract();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\txPrevious = driverJoy.getXButton();\n\n\t\t// Make crab move left or right\n\t\tif (driverJoy.getBumper(Hand.kLeft)) {\n\t\t\tCrab.driveLeft();\n\t\t} else if (driverJoy.getBumper(Hand.kRight)) {\n\t\t\tCrab.driveRight();\n\t\t} else {\n\t\t\tCrab.driveStop();\n\t\t}\n\n\t\t// Intake controls\n\t\tif (driverJoy.getTriggerAxis(Hand.kRight) > .1) {\n\t\t\tIntake.runIntake();\n\t\t} else if (driverJoy.getTriggerAxis(Hand.kLeft) > .1) {\n\t\t\tIntake.runOuttake();\n\t\t} else {\n\t\t\tIntake.stopIntake();\n\t\t}\n\n\t\t// Drive controls front back\n\t\tif (Math.abs(driverJoy.getY(Hand.kLeft)) > .12) {\n\t\t\tspeedStraight = driverJoy.getY(Hand.kLeft);\n\t\t} else {\n\t\t\tspeedStraight = 0;\n\t\t}\n\t\t// Drive controls left right\n\t\tif (Math.abs(driverJoy.getX(Hand.kRight)) > .12) {\n\t\t\tturn = driverJoy.getX(Hand.kRight);\n\t\t} else {\n\t\t\tturn = 0;\n\t\t}\n\t\tDriveTrain.drive(speedStraight, turn);\n\t}", "public void disabledInit() {\n oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, 0);\n oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, 0);\n oi.getXBoxJoystick2().setRumble(RumbleType.kLeftRumble, 0);\n oi.getXBoxJoystick2().setRumble(RumbleType.kRightRumble, 0);\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }", "public PlasmaRifle(Controller controller, World world)\r\n\t{\r\n\t\tsuper(controller, world);\r\n\t\tname = \"Plasma Rifle\";\r\n\t\t\r\n\t\tshotDelay = 0.25;\r\n\t\tshotX = .8; shotY = .05; shotZ = -.05;\r\n\t\tcharge = 0;\r\n\t\tenergyUse = 2;\r\n\t}", "private void setTurn() {\n if (turn == black) {\n turn = white;\n } else {\n turn = black;\n }\n }", "public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }", "public LoopController()\r\n\t{\r\n\t\tregulate = true;\r\n\t\tsmooth = true;\r\n\t\tresolution = 10000;\r\n\t\tfps = 60;\r\n\t\tlastCall = Sys.getTime();\r\n\t\tduration = 0;\r\n\t}", "protected void initialize() {\n \tRobot.hand.setWrist(moveValue);\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "public void arm_up() {\n arm_analog(RobotMap.Arm.arm_speed);\n }", "public void setRandom(Random r) {\n this.r = r;\n }", "@Override\n public void initialize() {\n // Robot.Climber.setLimits();\n SmartDashboard.putBoolean(\"Climb:\", true);\n \n }", "public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }", "public void setIntakeLights(){\n \tintakeLights.set(true);\n }", "public void shootIntoRocket(){\n shoot.set(ROCKET_SHOOT);\n }", "@Override\n public void loop() {\n // Setup a variable for each drive wheel to save power level for telemetry\n double leftDrivePower;\n double rightDrivePower;\n double driveMultiplier;\n double slowMultiplier;\n double fastMultiplier;\n double BASE_DRIVE_SPEED = 0.6;\n double elevPower;\n double armPower;\n boolean lowerLimitPressed;\n boolean upperLimitPressed;\n\n\n\n\n // Tank Mode uses one stick to control each wheel.\n // - This requires no math, but it is hard to drive forward slowly and keep straight.\n armPower = -gamepad2.right_stick_x * 0.3;\n\n lowerLimitPressed = !lowerLimit.getState();\n upperLimitPressed = !upperLimit.getState();\n\n if((lowerLimitPressed && -gamepad2.left_stick_y < 0) || (upperLimitPressed && -gamepad2.left_stick_y > 0)){\n elevPower = 0;\n }\n else {\n elevPower = -gamepad2.left_stick_y * 1;\n }\n\n if (gamepad2.left_bumper){\n hookPosDeg = HOOK_UP;\n }\n else if (gamepad2.left_trigger > 0){\n hookPosDeg = HOOK_DOWN;\n }\n\n if (gamepad2.right_bumper){\n clawPosDeg = CLAW_OPEN;\n }\n else if (gamepad2.right_trigger > 0){\n clawPosDeg = CLAW_CLOSED;\n }\n\n if (gamepad1.left_trigger > 0){\n slowMultiplier = 0.10;\n }\n else\n slowMultiplier = 0;\n\n if (gamepad1.right_trigger > 0){\n fastMultiplier = 0.30;\n }\n else\n fastMultiplier = 0;\n\n driveMultiplier = BASE_DRIVE_SPEED + slowMultiplier + fastMultiplier;\n leftDrivePower = -gamepad1.left_stick_y * driveMultiplier;\n rightDrivePower = -gamepad1.right_stick_y * driveMultiplier;\n\n // Send power to actuators\n leftDrive.setPower(leftDrivePower);\n rightDrive.setPower(rightDrivePower);\n elev.setPower(elevPower);\n// arm.setTargetPosition(armTarget);\n// arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n arm.setPower(armPower);\n hookPos = map(hookPosDeg, HOOK_MIN_POS_DEG, HOOK_MAX_POS_DEG, HOOK_MIN_POS, HOOK_MAX_POS);\n clawPos = map(clawPosDeg, CLAW_MIN_POS_DEG, CLAW_MAX_POS_DEG, CLAW_MIN_POS, CLAW_MAX_POS);\n hook.setPosition(hookPos);\n claw.setPosition(clawPos);\n\n // Show the elapsed game time and wheel power.\n telemetry.addData(\"Status\", \"Run Time: \" + runtime.toString());\n telemetry.addData(\"Drive\", \"left (%.2f), right (%.2f)\", leftDrivePower, rightDrivePower);\n telemetry.addData( \"Elev\", \"power (%.2f)\", elevPower);\n telemetry.addData(\"Limit\", \"lower (%b), upper (%b)\", lowerLimitPressed, upperLimitPressed);\n telemetry.addData(\"Arm Enc\", arm.getCurrentPosition());\n\n }", "@Override\n protected void initialize() {\n ramper.reset();\n Robot.toteLifterSubsystem.setGateState(GateState.OPEN);\n }", "public void setMotors(double rate) {\n\t\tclimberMotor1.set(rate);\n\t}", "public void driveRaw (double left, double right) {\n leftBackMotor.set(left);\n leftMiddleMotor.set(left);\n leftFrontMotor.set(left);\n rightBackMotor.set(right);\n rightMiddleMotor.set(right);\n rightFrontMotor.set(right);\n }", "public void runOpMode(){\n JAWLDrive3796 drive = new JAWLDrive3796(hardwareMap.dcMotor.get(\"left_drive\"), hardwareMap.dcMotor.get(\"right_drive\"));\n //Set the drive motors to run without encoders\n drive.setEncoders(false);\n //Create Grabber object\n JAWLGrabber3796 grabber = new JAWLGrabber3796(hardwareMap.servo.get(\"left_arm\"), hardwareMap.servo.get(\"right_arm\"));\n //Create Lift object\n JAWLLift3796 lift = new JAWLLift3796(hardwareMap.dcMotor.get(\"lift_motor\"));\n //Create color arm object\n JAWLColorArm3796 colorArm = new JAWLColorArm3796(hardwareMap.servo.get(\"color_arm\"));\n //Creates color sensor name\n ColorSensor colorSensorTemp = hardwareMap.get(ColorSensor.class, \"color_distance\");\n //Creates distance sensor name\n DistanceSensor distanceSensorTemp = hardwareMap.get(DistanceSensor.class, \"color_distance\");\n //Creates the color-distance sensor object\n JAWLColorSensor3796 colorDistanceSensor = new JAWLColorSensor3796(colorSensorTemp, distanceSensorTemp);\n //Creates the variable that will hold the color of the jewel\n String colorOfBall;\n //Creates relic arm objects\n //TTTTRelicArm3796 relicArm = new TTTTRelicArm3796(hardwareMap.dcMotor.get(\"relic_up_down\"), hardwareMap.dcMotor.get(\"relic_out_in\"), hardwareMap.dcMotor.get(\"relic_grab\"));\n //We never ended up having a relic arm!\n //The lift helper will set the idle power of the motor to a small double, keeping the lift from idly falling down\n boolean liftHelper = false;\n int i = 0;\n\n waitForStart();\n\n colorArm.armUp();\n\n while (opModeIsActive()) {\n //Here is where we define how the controllers should work\n //In theory, no logic retaining to controlling the components should be in here\n\n /*\n * Drive\n */\n\n //The left drive wheel is controlled by the opposite value of the left stick's y value on the first gamepad\n //The right drive is the same way except with the right drive wheel\n drive.leftDrive(-gamepad1.left_stick_y);\n drive.rightDrive(-gamepad1.right_stick_y);\n\n /*\n * Lift\n */\n telemetry.addData(\"Gamepad2 Right Stick Y\", -gamepad2.right_stick_y);\n\n if (-gamepad2.right_stick_y > 0) {\n //First checks to see if the right stick's negative y value is greater then zero.\n lift.moveMotor(-gamepad2.right_stick_y);\n //If it is, it sets the power for the motor to 1, and adds telemetry\n telemetry.addData(\"Lift Power\", 1);\n } else if (-gamepad2.right_stick_y < 0) {\n //Checks if the negative value of the right right stick's y position is less than zero\n lift.moveMotor(-0.1);\n //Sets the power for the motor to -0.1, and adds telemetry\n telemetry.addData(\"Lift Power\", -0.1);\n } else {\n //We check to see if the liftHelper is enabled\n if(liftHelper) {\n lift.moveMotor(0.1466 );\n } else {\n lift.moveMotor(0);\n }\n }\n\n\n\n /*\n * Lift helper control\n */\n\n if(gamepad2.a) {\n if(i == 0) {\n liftHelper = !liftHelper;\n }\n i = 5;\n }\n\n if(i != 0) {\n i--;\n }\n\n telemetry.addData(\"Lift Helper Enabled\", liftHelper);\n\n\n\n /*\n * Grabbers\n */\n if (gamepad2.left_trigger > 0) {\n //Closes the left arm, then displays the position in telemetry\n grabber.leftArmClose();\n double a = grabber.leftPosition();\n //Adds telemetry to display positions of grabbers, mostly for testing, but can be useful later on\n telemetry.addData(\"Left\", a);\n }\n\n if (gamepad2.left_bumper) {\n //Opens the left arm, then displays the position in telemetry\n grabber.leftArmOpen();\n double b = grabber.leftPosition();\n //We made the variables different as to avoid any and all possible errors\n telemetry.addData(\"Left\", b);\n }\n\n if (gamepad2.right_trigger > 0) {\n //Opens the right arm, then displays the position in telemetry\n grabber.rightArmClose();\n double c = grabber.rightPosition();\n telemetry.addData(\"Right\", c);\n }\n\n if (gamepad2.right_bumper) {\n //Closes the right arm, then displays the position in telemetry\n grabber.rightArmOpen();\n double d = grabber.rightPosition();\n telemetry.addData(\"Right\", d);\n }\n\n if (gamepad2.dpad_left){\n //Closes the left arm to a shorter distance\n grabber.leftArmShort();\n }\n\n if(gamepad2.dpad_right){\n //Closes the right arm to a shorter distance\n grabber.rightArmShort();\n\n }\n\n //Update all of our telemetries at once so we can see all of it at the same time\n telemetry.update();\n }\n }", "public RagdollController() {\n\t\tsuper(DEFAULT_WIDTH,DEFAULT_HEIGHT,WATER_GRAVITY);\n\t\tsetDebug(false);\n\t\tsetComplete(false);\n\t\tsetFailure(false);\n\t\tsoundCounter = 0;\n\t}", "public void setLevel(int newlevel)\n {\n level = newlevel; \n }", "public void setJumble(boolean j) {\n\t\tjumble = j;\n\t\twords.clear();\n\t\tupdate();\n\t}", "public Microwave()\n {\n this.powerLevel = 1;\n this.timeToCook = 0;\n this.startTime = 0;\n }", "void setTurn(int turn);", "@Override\n public void disabledInit()\n {\n driver.setRumble(RumbleType.kLeftRumble, 0);\n driver.setRumble(RumbleType.kRightRumble, 0);\n driveTrain.zeroSensors();\n pigeonInitializing = false;\n }", "public RobotControl(Robot r) {\n\t\tthis.r = r;\n\t}", "public void update(){\n\t\t//Arm up (spool out cable from winch while going up)\n\t\tif(Robot.stick.getRawButton(4)){\n\t\t\ttalonArm.set(SmartDashboard.getNumber(\"Climber Arm Speed: \", 0.5));\n\t\t\twinchGroup.set(-SmartDashboard.getNumber(\"Climber Winch Speed: \", 0.25));\n\t\t}\n\t\t//Arm down\n\t\telse if(Robot.stick.getRawButton(2)){\n\t\t\ttalonArm.set(-SmartDashboard.getNumber(\"Climber Arm Speed: \", 0.5));\n\t\t}\n\t\t//Stop moving\n\t\telse{\n\t\t\ttalonArm.set(0);\n\t\t\twinchGroup.set(0);\n\t\t}\n\t\t//Climb with winch\n\t\tif(Robot.stick.getRawButton(1)){\n\t\t\twinchGroup.set(SmartDashboard.getNumber(\"Climber Winch Speed: \", 0.25));\n\t\t}\n\t}", "public void implement(){\n this.rb.moveForward(1);\n \n \n if(this.rb.canPickThing()){\n this.rb.pickThing();\n }\n\n //turn the rb 90 degree to the south\n this.rb.turnLeft();\n\n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n\n //turn the navigator 90 degree to the east\n this.rb.turnRight();\n\n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n\n //turn the navigator 90 degree to the north\n this.rb.turnLeft();\n\n //move the navigator\n this.rb.moveForward(2);\n\n //turn Right the robot\n this.rb.turnRight();\n\n //stop at the starting position per move()\n this.rb.moveForward(1); \n \n this.rb.putThing();\n \n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n \n //turn the navigator 90 degree to the west\n this.rb.turnRight();\n \n this.rb.moveForward(1);\n \n this.rb.turnLeft();\n \n this.rb.moveForward(1);\n \n this.rb.turnRight();\n \n this.rb.moveForward(2);\n \n this.rb.turnLeft();\n }", "public void setLEDs(double r, double g, double b){\n\t\tcanifier.setLEDOutput(r, LEDChannel.LEDChannelB);\n\t\tcanifier.setLEDOutput(g, LEDChannel.LEDChannelA);\n\t\tcanifier.setLEDOutput(b, LEDChannel.LEDChannelC);\n }", "public void autoGrab(){\n \tif (getTrigger() == true){\n\t \tif(triggerTimer.get() >= TRIGGER_LOCKOUT){\n\t\t \tClawAct.set(true);\n\t\t \tisClosed = true;\n\t \t\tRobot.oi.armRumble(RUMBLE_DURATION);\n\t \t}\n \t}\n\n }", "@Override\r\n\tpublic void setComputerValue() {\n\t\trps.setCom((int) (Math.random() * 3 + 1));\r\n\t}", "public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }", "@Override\n public void loop() {\n\n //double armRot = robot.Pivot.getPosition();\n\n double deadzone = 0.2;\n\n double trnSpdMod = 0.5;\n\n float xValueRight = gamepad1.right_stick_x;\n float yValueLeft = -gamepad1.left_stick_y;\n\n xValueRight = Range.clip(xValueRight, -1, 1);\n yValueLeft = Range.clip(yValueLeft, -1, 1);\n\n // Pressing \"A\" opens and closes the claw\n if (gamepad1.a) {\n\n if (robot.Claw.getPosition() < 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(1);}\n else if (robot.Claw.getPosition() > 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(0.4);}\n else\n while(gamepad1.a)\n robot.Claw.setPosition(1);\n }\n\n // Pressing \"B\" changes the wrist position\n if (gamepad1.b) {\n\n if (robot.Wrist.getPosition() == 1)\n while(gamepad1.b)\n robot.Wrist.setPosition(0.5);\n else if (robot.Wrist.getPosition() == 0.5)\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n else\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n }\n\n // Turn left/right, overrides forward/back\n if (Math.abs(xValueRight) > deadzone) {\n\n robot.FL.setPower(xValueRight * trnSpdMod);\n robot.FR.setPower(-xValueRight * trnSpdMod);\n robot.BL.setPower(xValueRight * trnSpdMod);\n robot.BR.setPower(-xValueRight * trnSpdMod);\n\n\n } else {//Forward/Back On Solely Left Stick\n if (Math.abs(yValueLeft) > deadzone) {\n robot.FL.setPower(yValueLeft);\n robot.FR.setPower(yValueLeft);\n robot.BL.setPower(yValueLeft);\n robot.BR.setPower(yValueLeft);\n }\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n\n telemetry.addData(\"Drive Encoder Ticks\", robot.FL.getCurrentPosition());\n telemetry.addData(\"Winch Encoder Ticks\", robot.Winch.getCurrentPosition());\n telemetry.addData(\"ColorArm Position\", robot.ColorArm.getPosition());\n telemetry.addData(\"Wrist Position\", robot.Wrist.getPosition());\n telemetry.addData(\"Claw Position\", robot.Claw.getPosition());\n telemetry.addData(\"Grip Position\", robot.Grip.getPosition());\n telemetry.addData(\"Color Sensor Data Red\", robot.Color.red());\n telemetry.addData(\"Color Sensor Data Blue\", robot.Color.blue());\n\n /*\n\n // This is used for an Omniwheel base\n\n // Group a is Front Left and Rear Right, Group b is Front Right and Rear Left\n float a;\n float b;\n float turnPower;\n if(!gamepad1.x) {\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n\n a = Range.clip(yValueLeft + xValueLeft, -1, 1);\n b = Range.clip(yValueLeft - xValueLeft, -1, 1);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n } else {\n\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n a = Range.clip(yValueLeft + xValueLeft, -0.6f, 0.6f);\n b = Range.clip(yValueLeft - xValueLeft, -0.6f, 0.6f);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n }\n\n\n if (gamepad1.dpad_up) {\n\n robot.Swing.setPower(.6);\n\n } else if (gamepad1.dpad_down) {\n\n robot.Swing.setPower(-.6);\n\n } else {\n\n robot.Swing.setPower(0);\n }\n\n if(gamepad1.a){\n\n robot.Claw.setPosition(.4);\n\n } else if(gamepad1.b){\n\n robot.Claw.setPosition(0);\n }\n\n if(gamepad1.left_bumper) {\n\n robot.Pivot.setPosition(armRot+0.0005);\n\n } else if(gamepad1.right_bumper) {\n\n robot.Pivot.setPosition(armRot-0.0005);\n\n } else{\n\n robot.Pivot.setPosition(armRot);\n }\n\n telemetry.addData(\"position\", position);\n\n */\n\n /*\n * Code to run ONCE after the driver hits STOP\n */\n }", "@Override\n protected void initialize() {\n //Robot.limelight.setLiveStream(0);\n Robot.limelight.setLEDMode(3);\n }", "public void tankDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set(joystickRYAxis);\n\t\t\tmotorRF.set(joystickRYAxis);\n\t\t\tmotorLB.set(-joystickLYAxis);\n\t\t\tmotorLF.set(-joystickLYAxis);\n\n\t\t} else {\n\t\t\tmotorRB.set(joystickRYAxis/2);\n\t\t\tmotorRF.set(joystickRYAxis/2);\n\t\t\tmotorLB.set(-joystickLYAxis/2);\n\t\t\tmotorLF.set(-joystickLYAxis/2);\n\t\t\t//System.out.println(strongBad.motorMultiplier);\n\t\t\t//SmartDashboard.putNumber(\"MM2\", strongBad.motorMultiplier);\n\n\t\t}\n\t}", "public void setGame() {\n }", "private void setCurrentRadius(double r){\n\t\t\n\t\t_currentRadius = r;\n\t\t\n\t}", "@Override\n public void loop() {\n double left;\n double right;\n\n // // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n left = -gamepad1.left_stick_y;\n right = -gamepad1.right_stick_y;\n \n // double Target = 0;\n // robot.rightBack.setTargetPosition((int)Target);\n // robot.rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n rightFront.setPower(left);\n rightBack.setPower(right);\n // robot.rightDrive.setPower(right);\n\n // // Use gamepad left & right Bumpers to open and close the claw\n // if (gamepad1.right_bumper)\n // clawOffset += CLAW_SPEED;\n // else if (gamepad1.left_bumper)\n // clawOffset -= CLAW_SPEED;\n\n // // Move both servos to new position. Assume servos are mirror image of each other.\n // clawOffset = Range.clip(clawOffset, -0.5, 0.5);\n // robot.leftClaw.setPosition(robot.MID_SERVO + clawOffset);\n // robot.rightClaw.setPosition(robot.MID_SERVO - clawOffset);\n\n // Use gamepad buttons to move the arm up (Y) and down (A)\n // if (gamepad1.y)\n // armPosition += ARM_SPEED;\n \n // if (gamepad1.a)\n // armPosition -= ARM_SPEED;\n \n // armPosition = Range.clip(armPosition, robot.ARM_MIN_RANGE, robot.ARM_MAX_RANGE); \n \n\n // // Send telemetry message to signify robot running;\n // telemetry.addData(\"arm\", \"%.2f\", armPosition);\n // telemetry.addData(\"left\", \"%.2f\", left);\n // telemetry.addData(\"right\", \"%.2f\", right);\n }", "public void setArmPower(double power) {\n armMotor.setPower(power);\n }", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "void drive(double x_stick, double y_stick, double x_right_stick, double multiplier) {\n if (Math.abs(x_stick) >= (2 * Math.abs(y_stick)) + .1) {\n flMotor.setPower(x_stick * multiplier);\n frMotor.setPower(-x_stick * multiplier);\n blMotor.setPower(-x_stick * multiplier);\n brMotor.setPower(x_stick * multiplier);\n } else {\n flMotor.setPower((y_stick + x_right_stick) * multiplier);\n frMotor.setPower((y_stick - x_right_stick) * multiplier);\n blMotor.setPower((y_stick + x_right_stick) * multiplier);\n brMotor.setPower((y_stick - x_right_stick) * multiplier);\n }\n }", "@Override\n protected void initialize() {\n Robot.SCISSOR.extendLift(speed);\n }", "public void setVibrationOn() {\n\n }", "public void move(Joystick joystick)\n {\n double joystickY = joystick.getRawAxis(OIConstants.ELEVATOR_JOYSTICK_Y);\n\n if (Math.abs(joystickY) > OIConstants.ELEVATOR_JOYSTICK_DEADZONE)\n {\n Robot.elevator.setTarget((int)(Robot.elevator.getTarget() + joystickY * Constants.ELEVATOR_SPEED_NORMAL));\n }\n else\n {\n Robot.elevator.setTarget(Robot.elevator.getTarget());\n }\n\n // if the limit switch for level 1 is hit then rumble the controller\n if (!Robot.elevator.isLevel1LimitClosed())\n {\n Robot.oi.mechJoystick.setRumble(RumbleType.kLeftRumble, 0.5);\n Robot.oi.mechJoystick.setRumble(RumbleType.kRightRumble, 0.5);\n }\n else\n {\n Robot.oi.mechJoystick.setRumble(RumbleType.kLeftRumble, 0);\n Robot.oi.mechJoystick.setRumble(RumbleType.kRightRumble, 0);\n }\n }", "private RockGameController() {\n points = 0; opponentPoints = 0;\n update1 = false; update2 = false; update3 = false; update4 = false; update5 = false;\n rockBodyOne = new RockGameBody(RockGameModel.getInstance().getRockOne());\n rockBodyTwo = new RockGameBody(RockGameModel.getInstance().getRockTwo());\n rockBodyThree = new RockGameBody(RockGameModel.getInstance().getRockThree());\n rockBodyFour = new RockGameBody(RockGameModel.getInstance().getRockFour());\n rockBodyFive = new RockGameBody(RockGameModel.getInstance().getRockFive());\n rocks = new ArrayList<RockGameBody>() {{add(rockBodyOne); add(rockBodyTwo); add(rockBodyThree); add(rockBodyFour); add(rockBodyFive);}};\n }", "public void R1Pressed() {\n\t\tSoundPlayer.playSound(SoundMap.MENU_SWITCH_CHARACTER);\n\t\tMainMenu.getMainMenu().initDeckPage(++characterIndex, activeDeck, currentDeck);\n\t}", "private void setRoller(Roller w) {\n if (currentRoller == null) {\n currentRoller = w;\n world.addStepListener(currentRoller);\n }\n }", "public void setRecruiter(Recruiter recruiter)\n {\n this.recruiter = recruiter;\n }", "public void setPlayboard(Playboard playboard);", "public void init() {\n robot.init(hardwareMap);\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.liftUpDown.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.blinkinLedDriver.setPattern(RevBlinkinLedDriver.BlinkinPattern.GREEN);\n\n }", "protected void ratCrewInit() {\n\n // Init motor state machine.\n motorTurnType = \"none\";\n motorTurnDestination = 0.0f;\n motorTurnAngleToGo = 0.0f;\n motorTurnAngleAdjustedToGo = 0.0f;\n isDriving = false;\n driveLeftStart = 0;\n driveRightStart = 0;\n driveLeftTarget = 0;\n driveRightTarget = 0;\n driveRightSpeed = 0.0f;\n driveLeftSpeed = 0.0f;\n driveAngleOffset = 0.0f;\n driveAngleCorrection = 0.0f;\n\n // TODO: push into initMotor function\n if (doMotors) {\n // Initialize Motors, finding them through the hardware map.\n leftDrive = hardwareMap.get(DcMotor.class, \"motorLeft\");\n rightDrive = hardwareMap.get(DcMotor.class, \"motorRight\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // initialize the encoder\n leftDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n // Set all motors to zero power.\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n\n gate = hardwareMap.get(Servo.class, \"Gate\");\n gate.setPosition(1.0);\n }\n initGyroscope();\n\n if (doVuforia){\n initVuforia();\n initTfod();\n\n if (tfod != null) {\n tfod.activate();\n\n // The TensorFlow software will scale the input images from the camera to a lower resolution.\n // This can result in lower detection accuracy at longer distances (> 55cm or 22\").\n // If your target is at distance greater than 50 cm (20\") you can adjust the magnification value\n // to artificially zoom in to the center of image. For best results, the \"aspectRatio\" argument\n // should be set to the value of the images used to create the TensorFlow Object Detection model\n // (typically 1.78 or 16/9).\n\n // Uncomment the following line if you want to adjust the magnification and/or the aspect ratio of the input images.\n tfod.setZoom(2.5, 1.78);\n }\n }\n\n // Init run state.\n madeTheRun = false;\n startTime = 0;\n telemetry.addData(\"Init\", \"motors=%b, gyro=%b, vuforia=%b\", doMotors, doGyro, doVuforia);\n telemetry.update();\n }", "public RacePanelOneTurn() {\n initComponents();\n addCinderTrack(jSlider1, \"config/images/cars/ferrari.png\");\n }" ]
[ "0.7345032", "0.7057584", "0.67195886", "0.62678176", "0.6223996", "0.61994123", "0.61672264", "0.61582536", "0.6003312", "0.5954568", "0.59378284", "0.58981496", "0.586025", "0.58447105", "0.58373666", "0.58118105", "0.5807856", "0.57807267", "0.57439077", "0.57236", "0.5721891", "0.5718619", "0.57146347", "0.5692046", "0.56765944", "0.56763005", "0.56720704", "0.5663104", "0.5643234", "0.5633729", "0.56329674", "0.5613706", "0.5610837", "0.56025815", "0.5576618", "0.556209", "0.5556134", "0.55438167", "0.5541302", "0.5536867", "0.5532887", "0.55230975", "0.548676", "0.54801613", "0.5471782", "0.5470013", "0.54641235", "0.5462488", "0.54558563", "0.5452583", "0.54416233", "0.54343396", "0.54339623", "0.54315555", "0.5429138", "0.5415932", "0.54155546", "0.5386054", "0.53824276", "0.5381584", "0.53761095", "0.5368004", "0.5365872", "0.5364695", "0.53616095", "0.53575045", "0.5355487", "0.5354833", "0.53535485", "0.5352498", "0.5350907", "0.53411925", "0.5339355", "0.53358495", "0.5335127", "0.5333773", "0.5332786", "0.5332019", "0.53315485", "0.532983", "0.53266835", "0.5326119", "0.5321699", "0.5319245", "0.53187215", "0.5318102", "0.5313223", "0.53130275", "0.53110456", "0.5310451", "0.5305763", "0.53056955", "0.53027797", "0.5302013", "0.52980304", "0.5295657", "0.5295357", "0.5294928", "0.52917486", "0.528845" ]
0.65755475
3
Sets the rumble on the operator controller
public void rumbleOperatorController(double power, double time) { // rumbleController(operatorController, power, time); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rumbleInYourPants() {\n double accel_z = RobotMap.helmsman.getAcceleromoterZ();\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick2().setRumble(RumbleType.kLeftRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick2().setRumble(RumbleType.kRightRumble, (float) Math.abs(accel_z - 1));\n }", "private void rumble(boolean on) {\n // Set the time point, so we know when to start or stop rumbling\n timePoint = Timer.getFPGATimestamp();\n\n // Set the state\n state = on ? RUMBLE : BREAK;\n\n // If rumble is on, full power. Otherwise, no power.\n double rumbleIntensity = (on ? intensity : 0.0);\n\n // Rumble the appropriate joysticks\n if (controllerToRumble == JoystickSelection.DRIVER_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n driver.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n driver.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n\n if (controllerToRumble == JoystickSelection.OPERATOR_JOYSTICK || controllerToRumble == JoystickSelection.BOTH_JOYSTICKS) {\n operator.setRumble(RumbleType.kRightRumble, rumbleIntensity);\n operator.setRumble(RumbleType.kLeftRumble, rumbleIntensity);\n }\n }", "public Rumbler() {\n // Just a default rumble of 1 second 1 time on both joysticks.\n this(1.0, 0, 1, JoystickSelection.BOTH_JOYSTICKS, 1);\n }", "public void rumbleDriverController(double power, double time) {\n rumbleController(driverController, power, time);\n }", "public void setRightRumble(float intensity) {\n\t\tjoystick.setRumble(RumbleType.kRightRumble, intensity);\n\t}", "private void controlLift()\n {\n if (gamepad1.dpad_up) {\n liftMotor.setPower(-0.5);\n } else if (gamepad1.dpad_down) {\n liftMotor.setPower(0.5);\n } else {++backInc;\n liftMotor.setPower(0);\n }\n }", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }", "protected void execute() {\n\t\t_xboxControllerToRumble.setRumble(_rumbleType, _rumbleValue);\n\t\t_timesRumbled++;\n\t\tSystem.out.println(\"Rumbling \" + _timesRumbled);\n\t}", "public void vibrate(RumbleType type,float value){\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n if (type == RumbleType.left || type == RumbleType.combined)\n \tlRumble = (short)(value*65535);\n if(type == RumbleType.right || type == RumbleType.combined)\n \trRumble = (short)(value*65535);\n FRCNetworkCommunicationsLibrary.HALSetJoystickOutputs((byte)port, 0, lRumble, rRumble);\n }", "public Rumbler(double timeOn, double timeOff, int repeatCount, JoystickSelection controllerToRumble) {\n this(timeOn, timeOff, repeatCount, controllerToRumble, 1);\n }", "public Rumbler(double timeOn, double timeOff, int repeatCount, JoystickSelection controllerToRumble,\n double intensity) {\n this.timeOn = timeOn;\n this.timeOff = timeOff;\n this.repeatCount = repeatCount;\n this.intensity = intensity;\n\n driver = Robot.oi.getDriverJoystick();\n operator = Robot.oi.getOperatorJoystick();\n\n this.controllerToRumble = controllerToRumble;\n\n // Add this command to the scheduler.\n start();\n }", "public void setLeftRumble(float intensity) {\n\t\tjoystick.setRumble(RumbleType.kLeftRumble, intensity);\n\t}", "public void operatorControl() {\n \tmyRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tdouble x = stick2.getRawAxis(0);\n \tdouble y = stick2.getRawAxis(1);\n \tdouble rot = stick.getRawAxis(0);\n \tSmartDashboard.putNumber(\"x1\", x);\n SmartDashboard.putNumber(\"y1\", y);\n SmartDashboard.putNumber(\"rot1\", rot);\n \tif(Math.abs(x) < .2)\n \t\tx = 0;\n \tif(Math.abs(y) < .2)\n \t\ty = 0;\n \tif(Math.abs(rot) < .2)\n \t\trot = 0;\n \tmyRobot.mecanumDrive_Cartesian(x*-1, y*-1,rot*-1, gyro.getAngle());\n double current1 = pdp.getCurrent(0);\n double current2 = pdp.getCurrent(13);\n double current3 = pdp.getCurrent(15);\n double current4 = pdp.getCurrent(12);\n SmartDashboard.putNumber(\"Front Left current\", current1);\n SmartDashboard.putNumber(\"back Left current\", current2);\n SmartDashboard.putNumber(\"Front right current\", current3);\n SmartDashboard.putNumber(\"back right current\", current4);\n SmartDashboard.putNumber(\"x\", x);\n SmartDashboard.putNumber(\"y\", y);\n SmartDashboard.putNumber(\"rot\", rot);\n SmartDashboard.putNumber(\"Gyro\", gyro.getAngle());\n \tTimer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "public double setRightRumble(double speed) {\n\t\tsetRumble(GenericHID.RumbleType.kRightRumble, speed);\n\t\treturn speed;\n\t}", "void setPWMRate(double rate);", "public void operatorControl() {\n myRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tmyRobot.tankDrive(controller, 2, controller, 5);\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "public void liftSet(Gamepad gamepad1) {\n\n levelPlus = gamepad1.dpad_up;\n levelMinus = gamepad1.dpad_down;\n\n if(!pressP){\n if (levelPlus) {\n if (level < 8){\n level++;\n liftPress=true;\n }\n pressP = true;\n }\n }\n else{\n if (!levelPlus){\n pressP = false;\n }\n }\n\n if(!pressM){\n if (levelMinus) {\n if(level > 0){\n level--;\n liftPress=true;\n }\n pressM = true;\n }\n }\n else{\n if (!levelMinus){\n pressM = false;\n }\n }\n\n if(liftPress) {\n switch (level) {\n case 0:\n if(distanceLift.getDistance(DistanceUnit.CM) > 1) { //3\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0);\n liftPress = false;\n }\n break;\n case 1:\n if (distanceLift.getDistance(DistanceUnit.CM) < 10) { //10.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 11) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 2:\n if (distanceLift.getDistance(DistanceUnit.CM) < 20) { //20.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 21) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 3:\n if (distanceLift.getDistance(DistanceUnit.CM) < 30) { //30.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 31) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 4:\n if (distanceLift.getDistance(DistanceUnit.CM) < 40) { //40.5\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 41) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 5:\n if (distanceLift.getDistance(DistanceUnit.CM) < 55) { //54\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 56) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 6:\n if (distanceLift.getDistance(DistanceUnit.CM) < 63) { //62\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 64) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 7:\n if (distanceLift.getDistance(DistanceUnit.CM) < 73) { //72\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 74) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n case 8:\n if (distanceLift.getDistance(DistanceUnit.CM) < 82) { //81\n lift.setPower(0.8);\n }\n else if(distanceLift.getDistance(DistanceUnit.CM) > 83) {\n lift.setPower(-0.4);\n }\n else{\n lift.setPower(0.1);\n liftPress = false;\n }\n break;\n }\n }\n }", "public void manualControl(double power){\n leftMotor.set(power);\n rightMotor.set(power);\n }", "@Override\n protected void end()\n {\n Robot.oi.mechJoystick.setRumble(RumbleType.kLeftRumble, 0);\n Robot.oi.mechJoystick.setRumble(RumbleType.kRightRumble, 0);\n }", "public void setR(boolean r) {\n\tthis.r = r;\n }", "public void operatorControl() {\n \tdouble ctrlThresh = .2; \n \tdouble minPower = .05; \n \tdouble maxPower = .75; \n \tdouble recip = (1 - ctrlThresh); \n \tdouble mult = (maxPower - minPower); \n \tdouble right; \n \tdouble strafe; \n \tdouble rotate; \n \tdouble rightAxis; \n \tdouble strafeAxis; \n \tdouble rotateAxis; \n \t// \tboolean leftLeft; \n \t// \tboolean leftRight; \n \tdouble rightDir; \n \tdouble strafeDir; \n \tdouble rotateDir; \n \tdouble rightPower; \n \tdouble rotatePower; \n \tdouble strafePower; \n \t\n \tint winchCount;\n \tboolean winchDirection;\n \n \t// \tdouble frontLeftPower; \n \t// \tdouble frontRightPower; \n \t// \tdouble backLeftPower; \n \t// \tdouble backRightPower; \n \n \t//myRobot.setSafetyEnabled(true); \n \t\n \tAccelerometer test = new BuiltInAccelerometer();\n \t\n \twhile (isOperatorControl() && isEnabled()) { \n \t\t// ACCEL TEST CODE\n// \t\tSystem.out.println(test.getX() + \", \" + test.getY() + \", \" + test.getZ());\n \t\t// END ACCEL TEST CODE\n \n \t\t// ********** BEGIN DRIVING CODE ********** \n \t\t// Code for driving using omniwheels and two wheels for strafing \n \t\t// Diagram for the wheels of the robot below. \n \n \t\t// L S R \n \t\t// /--------------------------\\ \n \t\t//\t ||------------------------|| \n \t\t// || [][] || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || || \n \t\t// || [] [] || \n \t\t// || [] [] || \n \t\t// || [][] || \n \t\t// ||------------------------|| \n \t\t// \\--------------------------/ \n \t\t// \n \t\t// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ \n \n \t\tctrlThresh = .2; // the point at which we want to sense joystick action \n \t\trecip = 1-ctrlThresh; \t\t // = 0.8 \n \n \t\trightAxis = rightStick.getRawAxis(1);\t\t\t\t// right joystick, y (up/down) axis\n \t\t\n \t\t//System.out.println(\"\"+rightAxis);\n \t\tstrafeAxis = rightStick.getRawAxis(0);\t\t\t\t// right joystick, x (left/right) axis; this is \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// arbitrary and could have been the left stick\n \t\trotateAxis = rightStick.getRawAxis(4);\t\t\t\t\t// left joystick, y axis\n \n \t\trightDir = rightAxis/Math.abs(rightAxis);\t\t\t// forward or backward (+1 or -1)\n \t\tstrafeDir = strafeAxis/Math.abs(strafeAxis); \t// \t\t\t'' \n \t\trotateDir = rotateAxis/Math.abs(rotateAxis); // \t\t\t'' \n \n \t\tright = 0; // right input formatted for range of detected values [0.2,1] \n \t\trotate = 0; // left input formatted \n \t\tstrafe = 0; // strafe input formatted \n \n \t\tif(Math.abs(rightAxis) > ctrlThresh) \t// user moved stick beyond threshold \n \t\t{right = (rightAxis-ctrlThresh*rightDir)/recip;} // format right: scale back, set direction, proportion it \n \t\tif(Math.abs(strafeAxis) > ctrlThresh) \n \t\t{strafe = (strafeAxis-ctrlThresh*strafeDir)/recip;} // format left... \n \t\tif(Math.abs(rotateAxis) > ctrlThresh) \n \t\t{rotate = (rotateAxis-ctrlThresh*rotateDir)/recip;}\t\t// format strafe... \n \n \n \t\trightDir = right/Math.abs(right); \n \t\trightPower = (Math.abs(right*mult) + minPower) * rightDir; \t\t// re-proportion for power's range, strip direction,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/// and then add back threshold and direction. \n \t\trotateDir = rotate/Math.abs(rotate); \n \t\trotatePower = (Math.abs(rotate*mult) + minPower) * rotateDir;\t\t\t// \t\t'' \n \n \t\tstrafeDir = strafe/Math.abs(strafe); \n \t\tstrafePower = (Math.abs(strafe*mult) + minPower) * strafeDir;\t// \t\t'' \n \n \t\tif(Math.abs(rightPower)>0.2){\n \t\t\tfrontRight.set(rightPower);\t\t\t\t\t\t// set all the motors with the powers we \n \t\t\tbackRight.set(rightPower);\t\t\t\t\t\t/// calculated above : drive! \n \t\t\tfrontLeft.set(-1*rightPower); \n \t\t\tbackLeft.set(-1*rightPower);\n \t\t}\n \t\telse{\n \t\t\tfrontRight.set(rotatePower);\n \t\t\tbackRight.set(rotatePower);\n \t\t\tfrontLeft.set(rotatePower);\n \t\t\tbackLeft.set(rotatePower);\n \t\t}\n \t\t\n// \t\tfrontStrafe.set(strafePower); \n// \t\tbackStrafe.set(-1*strafePower); \n \n// \t\tmyRobot.tankDrive(leftStick, rightStick); \n \t\t \n \t\t// ********** END OF DRIVING CODE ********** \n \t\t//======================================================================= \n \t\t// ************ BEGIN WINCH CODE *********** \n \t\t// We need to code the winch to help raise and lower the elevator \n \t\t// This is just one option between the winch and the lead screw. \n \t\t \n \t\t\n \t\t//second winch test\n \t\t/*\n \t\twinchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n \t \tSystem.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n \t \tif(winchCount<240){\n \t \t\t\n \t \t\twinchCim1.set(.1);\n \t \t\twinchCim2.set(.1);\n \t \t}\n \t \telse{\n \t \t\twinchCim1.set(0);\n \t \t\twinchCim2.set(0);\n \t \t\t\n \t \t}\n \t if(rightStick.getRawButton(5)) \n { \n\t\t\t winchEncoder.reset();// reset the pulse count\n\t\t\t winchCount = 0;\n\t\t\t winchCim1.set(0);\n\t\t\t winchCim2.set(0);\n\t\t\t \n } */ //end of second winch test \n \t \t\n \t\t\n \t\t if(rightStick.getRawButton(5)) \n { \n \t\t\t //winchEncoder.reset();// reset the pulse count\n \tSystem.out.println(\"A\");\n \t winchCim1.set(.5); \t// set winchCim1 to 0.5 power (upwards) \n \t winchCim2.set(.5); \t\t\t\t\t\t\t// set winchCim2 to 0.5 power\n \t\t\t \n } \n \t\telse if(rightStick.getRawButton(4))\n \t\t{\n \t\t\tSystem.out.println(\"B\");\n \t\t\t//winchEncoder.reset();\t\t\t\t\t\t\t// reset the pulse count\n \t \twinchCim1.set(-.3); // set winchCim1 to -0.5 power (downwards) \n \t \twinchCim2.set(-.3);\t \t\t\t\t\t\t\t// set winchCim2 to -0.5 power\n \t\t}\n \n \t \telse// if(rightStick.getRawButton(2)) \n { \n \t winchCim1.set(0); \t\t\t\t\t\t\t// set winchCim1 to 0 power (off/stop) \n \t winchCim2.set(0);\t\t\t\t\t\t\t\t// set winchCim2 to 0 pwoer (off/stop)\n// \t winchCount = winchEncoder.get();\t\t\t\t// get the pulse count from the encoder\n// \t System.out.println(\"Count: \"+ winchCount);\t\t// print the pulse count \n } \n \n \t\t// ********** END OF WINCH CODE ********** \n \t\t//======================================================================= \n \t\t \n \t\t \n \t\tTimer.delay(0.005);\t\t// wait for a motor update time \n } \n }", "public void setJumble(boolean j) {\n\t\tjumble = j;\n\t\twords.clear();\n\t\tupdate();\n\t}", "public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}", "public void winch(/* controller and other parameters */) {\n winch.set(.5);\n\n }", "public void power()\r\n {\r\n powerOn = true;\r\n }", "public PlasmaRifle(Controller controller, World world)\r\n\t{\r\n\t\tsuper(controller, world);\r\n\t\tname = \"Plasma Rifle\";\r\n\t\t\r\n\t\tshotDelay = 0.25;\r\n\t\tshotX = .8; shotY = .05; shotZ = -.05;\r\n\t\tcharge = 0;\r\n\t\tenergyUse = 2;\r\n\t}", "public void setR(Double r);", "public void open(){\n \ttriggerTimer.reset();\n \tisClosed = false;\n \tClawAct.set(false);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }", "public void setControls() {\r\n System.out.println(\"wire data is \" + this.controllerWire.getData());\r\n String operation = this.controlMemory.get(this.controllerWire.getData());\r\n System.out.println(\"Setting the controls for \" + operation);\r\n if (operation.equalsIgnoreCase(\"add\")) {\r\n //alu.setControl(1);\r\n this.ALUControl.setData(1);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n //aluMUX.setSelect(0);\r\n //regMUX.setSelect(0);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"addi\")) {\r\n //alu.setControl(1);\r\n this.ALUControl.setData(1);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sub\")) {\r\n //alu.setControl(2);\r\n this.ALUControl.setData(2);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"lw\")) {\r\n// alu.setControl(8); // TODO \r\n this.ALUControl.setData(8);\r\n this.REG_MUXControl.setData(1);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.readWire.setData(1);\r\n memory.setReadWire(this.readWire);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sw\")) {\r\n //alu.setControl(9); // TODO\r\n this.ALUControl.setData(9);\r\n //regMUX.setSelect(1);\r\n this.writeWire.setData(1);\r\n memory.setWriteWire(writeWire);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sll\")) {\r\n //alu.setControl(6);\r\n this.ALUControl.setData(6);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"srl\")) {\r\n //alu.setControl(5);\r\n this.ALUControl.setData(5);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"and\")) {\r\n //alu.setControl(4);\r\n this.ALUControl.setData(4);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"andi\")) {\r\n //alu.setControl(4);\r\n this.ALUControl.setData(4);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"or\")) {\r\n //alu.setControl(3);\r\n this.ALUControl.setData(3);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"ori\")) {\r\n //alu.setControl(3);\r\n this.ALUControl.setData(3);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"nor\")) {\r\n //alu.setControl(7);\r\n this.ALUControl.setData(7);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"beq\")) {\r\n this.PC_MUXControl.setData(0);\r\n this.ALUControl.setData(10);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"bne\")) {\r\n this.PC_MUXControl.setData(0);\r\n this.ALUControl.setData(11);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"jr\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(12);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"j\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(12);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"jal\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(16);\r\n this.PC_MUXControl.setData(1);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.REG_MUXControl.setData(0);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"slt\")) {\r\n this.ALUControl.setData(13);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"slti\")) {\r\n this.ALUControl.setData(13);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n this.PC_MUXControl.setData(0);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"sltu\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"sltui\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(1);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"beq\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(1);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n }\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"ALU CONTROL: \" + this.ALUControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"ALU MUX CONTROL: \" + this.ALU_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"PC MUX CONTROL: \" + this.PC_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"REG MUX CONTROL: \" + this.REG_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"MEMORY READ: \" + this.readWire.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"MEMORY WRITE: \" + this.writeWire.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"REGISTER WRITE: \" + this.registerWrite.toString());\r\n this.setRegisterWriteControl();\r\n }", "public Microwave()\n {\n this.powerLevel = 1;\n this.timeToCook = 0;\n this.startTime = 0;\n }", "private RockGameController() {\n points = 0; opponentPoints = 0;\n update1 = false; update2 = false; update3 = false; update4 = false; update5 = false;\n rockBodyOne = new RockGameBody(RockGameModel.getInstance().getRockOne());\n rockBodyTwo = new RockGameBody(RockGameModel.getInstance().getRockTwo());\n rockBodyThree = new RockGameBody(RockGameModel.getInstance().getRockThree());\n rockBodyFour = new RockGameBody(RockGameModel.getInstance().getRockFour());\n rockBodyFive = new RockGameBody(RockGameModel.getInstance().getRockFive());\n rocks = new ArrayList<RockGameBody>() {{add(rockBodyOne); add(rockBodyTwo); add(rockBodyThree); add(rockBodyFour); add(rockBodyFive);}};\n }", "public static void setRightPower(double rightPower) {\n\t\tSystem.out.println(\"Right: \" + rightPower);\n\t\tShooter.rightPower = rightPower;\n\t}", "public void setCrust(){\n this.crust = \"Thin\";\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n leftFront = hardwareMap.get(DcMotor.class, \"left_front\");\n rightFront = hardwareMap.get(DcMotor.class, \"right_front\");\n leftBack = hardwareMap.get(DcMotor.class, \"left_back\");\n rightBack = hardwareMap.get(DcMotor.class, \"right_back\");\n\n\n leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n right = hardwareMap.get(Servo.class, \"right\");\n left = hardwareMap.get(Servo.class, \"left\");\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftFront.setDirection(DcMotor.Direction.REVERSE);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n leftBack.setDirection(DcMotor.Direction.REVERSE);\n rightBack.setDirection(DcMotor.Direction.FORWARD);\n\n leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n digitalTouch = hardwareMap.get(DigitalChannel.class, \"sensor_digital\");\n digitalTouch.setMode(DigitalChannel.Mode.INPUT);\n\n right.setDirection(Servo.Direction.REVERSE);\n\n right.scaleRange(0, 0.25);\n left.scaleRange(0.7, 1);\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n\n servo(0);\n runtime.reset();\n encoderSideways(0.25, -5, -5, 5);\n // drive until touch sensor pressed\n // activate servos to grab platform\n // drive backwards for a while\n // release servos\n // sideways part\n // remember to do red autonomous for repackage org.firstinspires.ftc.teamcode;\n }", "public void setMotors(double leftSpeed, double rightSpeed, double multiplier){\n double z = 0.1;\n if(multiplier<0){\n z = (1-Math.abs(multiplier))*0.5+0.25;\n }\n else{\n z = multiplier*0.25+0.75;\n }\n m_leftMotor.set(leftSpeed*z); \n m_rightMotor.set(rightSpeed*z);\n}", "public synchronized void setRampRate(Double rampRate)\n {\n this.rampRate = rampRate;\n }", "public void victorTest(){\n\n victorTestController.set(0.5);\n }", "public double setLeftRumble(double speed) {\n\t\tsetRumble(GenericHID.RumbleType.kLeftRumble, speed);\n\t\treturn speed;\n\t}", "void setRocketTarget(Vector2 target);", "public RagdollController() {\n\t\tsuper(DEFAULT_WIDTH,DEFAULT_HEIGHT,WATER_GRAVITY);\n\t\tsetDebug(false);\n\t\tsetComplete(false);\n\t\tsetFailure(false);\n\t\tsoundCounter = 0;\n\t}", "public RobotControl(Robot r) {\n\t\tthis.r = r;\n\t}", "public Lift (SpeedController liftMotor) {\n m_liftMotor = liftMotor;\n }", "public static void hookMotor() {\n\t\thookMotor.rotate(45);\n\t}", "public void setCurAttack(int modifier) {\n\t\tcurAttack = curAttack + modifier;\n\t}", "public void rdrive(double speed){\n right1.set(ControlMode.PercentOutput, -speedRamp(speed));\n right2.set(ControlMode.PercentOutput, -speedRamp(speed));\n }", "public void changeRobot(int numR) \r\n\t{\r\n\t\t//\tgame.addRobot(4);\r\n\r\n\t\tedge_data e=new EdgeData();\r\n\t\tint numans=0;\r\n\t\tint i=0;\r\n\t\tdouble x=0;\r\n\t\tdouble y=Double.MAX_VALUE;\r\n\r\n\t\twhile(i<numR) {\r\n\r\n\t\t\tdouble c=0; \r\n\t\t\tfor(Fruit f: fru) {\r\n\t\t\t\te=f.e;\r\n\t\t\t\tx=f.value/e.getWeight();\r\n\t\t\t\tif(x>c && x<y) {\r\n\r\n\t\t\t\t\tc=x; \r\n\t\t\t\t\tnumans=e.getSrc();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ty=c;\r\n\t\t\tgame.addRobot(numans);\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void setRan(int R)\t\n\t{\t//start of setRan method\n\t\trandomNum = R;\n\t}", "public void liftUp(){\n set(m_defaultLiftSpeedUp);\n }", "void setSpeed(RobotSpeedValue newSpeed);", "void setGodPower(boolean b);", "public void grab() {\n\t\tif (climbMode == false) {\n\t\t\tif (bumperL) {\n\t\t\t\tmotorGL.set(-1);\n\t\t\t\tmotorGR.set(1);\n\t\t\t} \n\t\t\telse if (bumperR) {\n\t\t\t\tmotorGL.set(1);\n\t\t\t\tmotorGR.set(-1);\n\t\t\t}\t\n\t\t\telse {\n\t\t\t\tmotorGL.set(0);\n\t\t\t\tmotorGR.set(0);\n\t\t\t}\n\t\t}\n\t}", "public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }", "public void TeleopCode() {\n\t\tMLeft.set(-Controls.joy2.getRawAxis(5)+ 0.06); //(Controls.joy2.getRawAxis5 + 0.06);\n\t}", "public void setArmPower(double power) {\n armMotor.setPower(power);\n }", "protected void chngr(int r, int value) {\n checkRegister(r);\n register[r] = value;\n }", "public void runOpMode(){\n JAWLDrive3796 drive = new JAWLDrive3796(hardwareMap.dcMotor.get(\"left_drive\"), hardwareMap.dcMotor.get(\"right_drive\"));\n //Set the drive motors to run without encoders\n drive.setEncoders(false);\n //Create Grabber object\n JAWLGrabber3796 grabber = new JAWLGrabber3796(hardwareMap.servo.get(\"left_arm\"), hardwareMap.servo.get(\"right_arm\"));\n //Create Lift object\n JAWLLift3796 lift = new JAWLLift3796(hardwareMap.dcMotor.get(\"lift_motor\"));\n //Create color arm object\n JAWLColorArm3796 colorArm = new JAWLColorArm3796(hardwareMap.servo.get(\"color_arm\"));\n //Creates color sensor name\n ColorSensor colorSensorTemp = hardwareMap.get(ColorSensor.class, \"color_distance\");\n //Creates distance sensor name\n DistanceSensor distanceSensorTemp = hardwareMap.get(DistanceSensor.class, \"color_distance\");\n //Creates the color-distance sensor object\n JAWLColorSensor3796 colorDistanceSensor = new JAWLColorSensor3796(colorSensorTemp, distanceSensorTemp);\n //Creates the variable that will hold the color of the jewel\n String colorOfBall;\n //Creates relic arm objects\n //TTTTRelicArm3796 relicArm = new TTTTRelicArm3796(hardwareMap.dcMotor.get(\"relic_up_down\"), hardwareMap.dcMotor.get(\"relic_out_in\"), hardwareMap.dcMotor.get(\"relic_grab\"));\n //We never ended up having a relic arm!\n //The lift helper will set the idle power of the motor to a small double, keeping the lift from idly falling down\n boolean liftHelper = false;\n int i = 0;\n\n waitForStart();\n\n colorArm.armUp();\n\n while (opModeIsActive()) {\n //Here is where we define how the controllers should work\n //In theory, no logic retaining to controlling the components should be in here\n\n /*\n * Drive\n */\n\n //The left drive wheel is controlled by the opposite value of the left stick's y value on the first gamepad\n //The right drive is the same way except with the right drive wheel\n drive.leftDrive(-gamepad1.left_stick_y);\n drive.rightDrive(-gamepad1.right_stick_y);\n\n /*\n * Lift\n */\n telemetry.addData(\"Gamepad2 Right Stick Y\", -gamepad2.right_stick_y);\n\n if (-gamepad2.right_stick_y > 0) {\n //First checks to see if the right stick's negative y value is greater then zero.\n lift.moveMotor(-gamepad2.right_stick_y);\n //If it is, it sets the power for the motor to 1, and adds telemetry\n telemetry.addData(\"Lift Power\", 1);\n } else if (-gamepad2.right_stick_y < 0) {\n //Checks if the negative value of the right right stick's y position is less than zero\n lift.moveMotor(-0.1);\n //Sets the power for the motor to -0.1, and adds telemetry\n telemetry.addData(\"Lift Power\", -0.1);\n } else {\n //We check to see if the liftHelper is enabled\n if(liftHelper) {\n lift.moveMotor(0.1466 );\n } else {\n lift.moveMotor(0);\n }\n }\n\n\n\n /*\n * Lift helper control\n */\n\n if(gamepad2.a) {\n if(i == 0) {\n liftHelper = !liftHelper;\n }\n i = 5;\n }\n\n if(i != 0) {\n i--;\n }\n\n telemetry.addData(\"Lift Helper Enabled\", liftHelper);\n\n\n\n /*\n * Grabbers\n */\n if (gamepad2.left_trigger > 0) {\n //Closes the left arm, then displays the position in telemetry\n grabber.leftArmClose();\n double a = grabber.leftPosition();\n //Adds telemetry to display positions of grabbers, mostly for testing, but can be useful later on\n telemetry.addData(\"Left\", a);\n }\n\n if (gamepad2.left_bumper) {\n //Opens the left arm, then displays the position in telemetry\n grabber.leftArmOpen();\n double b = grabber.leftPosition();\n //We made the variables different as to avoid any and all possible errors\n telemetry.addData(\"Left\", b);\n }\n\n if (gamepad2.right_trigger > 0) {\n //Opens the right arm, then displays the position in telemetry\n grabber.rightArmClose();\n double c = grabber.rightPosition();\n telemetry.addData(\"Right\", c);\n }\n\n if (gamepad2.right_bumper) {\n //Closes the right arm, then displays the position in telemetry\n grabber.rightArmOpen();\n double d = grabber.rightPosition();\n telemetry.addData(\"Right\", d);\n }\n\n if (gamepad2.dpad_left){\n //Closes the left arm to a shorter distance\n grabber.leftArmShort();\n }\n\n if(gamepad2.dpad_right){\n //Closes the right arm to a shorter distance\n grabber.rightArmShort();\n\n }\n\n //Update all of our telemetries at once so we can see all of it at the same time\n telemetry.update();\n }\n }", "public void rawTurret(double power) {\n double encoderAngle = turretEncoder.getDistance();\n // Prevent the turret from turning past hard stops\n if (encoderAngle >= MAX_ENCODER_VALUE && power > 0 || encoderAngle < MIN_ENCODER_VALUE && power < 0) {\n power = 0;\n }\n turretMotor.set(power);\n }", "@Override\r\n\tpublic void setRobot(Robot r) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\trobot = (BasicRobot) r;\r\n\t\t//robot.setMaze(this.mC);\r\n\t\t\r\n\t}", "public void updateRate(double r){\r\n rate *= r;\r\n }", "public Builder setRightMonster(int value) {\n \n rightMonster_ = value;\n onChanged();\n return this;\n }", "public void COPower(){\r\n COP = true;\r\n }", "public void towerIndexing()\n {\n m_towerMotor.set(ControlMode.PercentOutput, 0.5);\n m_intakeHopperMotor.set(ControlMode.PercentOutput, HopperConstants.HOPPER_MOTOR_POWER);\n }", "public void reset() {\nsuper.reset();\nsetIncrease_( \"no\" );\nsetSwap_( \"tbr\" );\nsetMultrees_( \"no\" );\nsetRatchetreps_(\"200\");\nsetRatchetprop_(\"0.2\");\nsetRatchetseed_(\"0\");\n}", "@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}", "void setValue(R value);", "public void onWrite(int value) {\n \t\t\tboolean newLatch = (value & 1) != 0;\n \t\t\tif (newLatch != joyLatch) {\n \t\t\t\tcurButton = 0;\n \t\t\t}\n \t\t\tjoyLatch = newLatch;\n \t\t}", "@Override\r\n\tpublic void setComputerValue() {\n\t\trps.setCom((int) (Math.random() * 3 + 1));\r\n\t}", "public void setOperator(int opr) {\n this.operator = opr;\n }", "public LoopController()\r\n\t{\r\n\t\tregulate = true;\r\n\t\tsmooth = true;\r\n\t\tresolution = 10000;\r\n\t\tfps = 60;\r\n\t\tlastCall = Sys.getTime();\r\n\t\tduration = 0;\r\n\t}", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public void runOpMode() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n robot.leftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n idle();\n\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Send telemetry message to indicate successful Encoder reset\n telemetry.addData(\"Path0\", \"Starting at %7d :%7d\",\n robot.leftMotor.getCurrentPosition(),\n robot.rightMotor.getCurrentPosition());\n telemetry.addData(\"Gyro Heading:\", \"%.4f\", getHeading());\n telemetry.update();\n\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n\n parameters.vuforiaLicenseKey = \"Adiq0Gb/////AAAAme76+E2WhUFamptVVqcYOs8rfAWw8b48caeMVM89dEw04s+/mRV9TqcNvLkSArWax6t5dAy9ISStJNcnGfxwxfoHQIRwFTqw9i8eNoRrlu+8X2oPIAh5RKOZZnGNM6zNOveXjb2bu8yJTQ1cMCdiydnQ/Vh1mSlku+cAsNlmfcL0b69Mt2K4AsBiBppIesOQ3JDcS3g60JeaW9p+VepTG1pLPazmeBTBBGVx471G7sYfkTO0c/W6hyw61qmR+y7GJwn/ECMmXZhhHkNJCmJQy3tgAeJMdKHp62RJqYg5ZLW0FsIh7cOPRkNjpC0GmMCMn8AbtfadVZDwn+MPiF02ZbthQN1N+NEUtURP0BWB1CmA\";\n\n\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n this.vuforia = ClassFactory.createVuforiaLocalizer(parameters);\n\n VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset(\"RelicVuMark\");\n VuforiaTrackable relicTemplate = relicTrackables.get(0);\n relicTemplate.setName(\"relicVuMarkTemplate\"); // can help in debugging; otherwise not necessary\n\n telemetry.addData(\">\", \"Press Play to start\");\n telemetry.update();\n\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n relicTrackables.activate();\n\n //while (opModeIsActive()) {\n\n /**\n * See if any of the instances of {@link relicTemplate} are currently visible.\n * {@link RelicRecoveryVuMark} is an enum which can have the following values:\n * UNKNOWN, LEFT, CENTER, and RIGHT. When a VuMark is visible, something other than\n * UNKNOWN will be returned by {@link RelicRecoveryVuMark#from(VuforiaTrackable)}.\n */\n RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.from(relicTemplate);\n while (vuMark == RelicRecoveryVuMark.UNKNOWN) {\n vuMark = RelicRecoveryVuMark.from(relicTemplate);\n /* Found an instance of the template. In the actual game, you will probably\n * loop until this condition occurs, then move on to act accordingly depending\n * on which VuMark was visible. */\n }\n telemetry.addData(\"VuMark\", \"%s visible\", vuMark);\n telemetry.update();\n sleep(550);\n\n //switch (vuMark) {\n // case LEFT: //RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.LEFT;\n // coLumn = 2;\n // case CENTER:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.CENTER;\n // coLumn = 1;\n // case RIGHT:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.RIGHT;\n // coLumn = 0;\n //}\n if ( vuMark == RelicRecoveryVuMark.LEFT) {\n coLumn = 2;\n }\n else if(vuMark == RelicRecoveryVuMark.RIGHT){\n coLumn = 0;\n }\n else if(vuMark == RelicRecoveryVuMark.CENTER){\n coLumn = 1;\n }\n\n\n telemetry.addData(\"coLumn\", \"%s visible\", coLumn);\n telemetry.update();\n sleep(550);\n\n\n\n//if jewej is red 1 if jewel is blue 2\n\n // if(jewel == 1) {\n // gyroturn(-10, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //gyroturn(-2, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n //else if(jewel == 2){\n // gyroturn(10, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n // gyroturn(-2, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[0][coLumn], disandTurn[0][coLumn], 5.0); // S1: Forward 24 Inches with 5 Sec timeout shoot ball\n\n gyroturn(disandTurn[1][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[0], -turndistance[0], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[2][coLumn], disandTurn[2][coLumn], 5.0); // S3: Forward 43.3 iNCHES\n\n gyroturn(disandTurn[3][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[4][coLumn], disandTurn[4][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n gyroturn(disandTurn[5][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[6][coLumn], disandTurn[6][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n\n Outake();\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[7][coLumn], disandTurn[7][coLumn], 5.0);// S6: Forward 48 inches with 4 Sec timeout\n }", "@Override\n public void runOpMode() {\n motorFL = hardwareMap.get(DcMotor.class, \"motorFL\");\n motorBL = hardwareMap.get(DcMotor.class, \"motorBL\");\n motorFR = hardwareMap.get(DcMotor.class, \"motorFR\");\n motorBR = hardwareMap.get(DcMotor.class, \"motorBR\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser.setDirection(DcMotor.Direction.FORWARD);\n landerRiser.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n markerDrop = hardwareMap.get(Servo.class, \"marker\");\n markerDrop.setDirection(Servo.Direction.FORWARD);\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //Landing & unlatching\n landerRiser.setPower(-1);\n telemetry.addData(\"Status\", \"Descending\");\n telemetry.update();\n sleep(5550);\n landerRiser.setPower(0);\n telemetry.addData(\"Status\",\"Unhooking\");\n telemetry.update();\n move(-0.5, 600, true);\n strafe(-0.4,0.6, 3600, true);\n move(0.5,600,true);\n markerDrop.setPosition(0);\n sleep(1000);\n markerDrop.setPosition(0.5);\n sleep(700);\n markerDrop.setPosition(0);\n strafe(0, -0.5,500,true);\n strafe(0.5, -0.25, 8500, true);\n\n }", "public void shootIntoRocket(){\n shoot.set(ROCKET_SHOOT);\n }", "public void wave() {\n leanRight = !leanRight;\n }", "protected void enableActionSetMute()\n {\n Action action = new Action(\"SetMute\");\n action.addInputParameter(new ParameterRelated(\"Value\", iPropertyMute));\n iDelegateSetMute = new DoSetMute();\n enableAction(action, iDelegateSetMute);\n }", "@Override\n public void setRegisterValue(Registers r, int value) {\n debugView.updateRegisterValue(r, value);\n }", "private void setCurrentRadius(double r){\n\t\t\n\t\t_currentRadius = r;\n\t\t\n\t}", "public void setPower(int power) {\n\t\t\r\n\t}", "private void setRoller(Roller w) {\n if (currentRoller == null) {\n currentRoller = w;\n world.addStepListener(currentRoller);\n }\n }", "public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}", "public void setRate();", "@Override\n public void setPower(double power) {\n\n }", "@Override \n public void runOpMode() \n {\n leftMotors = hardwareMap.get(DcMotor.class, \"left_Motors\");\n rightMotors = hardwareMap.get(DcMotor.class, \"right_Motors\");\n vLiftMotor = hardwareMap.get(DcMotor.class, \"vLift_Motor\"); \n \n leftMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotors.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotors.setDirection(DcMotor.Direction.REVERSE);\n rightMotors.setDirection(DcMotor.Direction.FORWARD);\n vLiftMotor.setDirection(DcMotor.Direction.REVERSE);\n vLiftMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n waitForStart(); //press play button, actives opMode\n intakePivotServo.setPosition(intakePivotServoPos);\n while (opModeIsActive()) \n { \n drive();\n pivotIntake();\n pivotLift();\n \n }//opModeIsActive \n \n }", "public void SetR(byte num) {\r\n\t\tm_numR = num;\r\n\t}", "public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }", "public void setCarry() {\n\t\tset((byte) (get() | (1 << 4)));\n\t}", "public void lift(){\n\t\twhile(Math.abs(robot.lift1.getCurrentPosition()-robot.startingHeight)<3900&&opModeIsActive()){\n\t\t\trobot.lift1.setPower(1);\n\t\t\trobot.lift2.setPower(1);\n\t\t}\n\t\tlift(\"stop\");\n\t}", "public void loop() {\n\n double driveMult = gamepad1.left_bumper ? 0.5 : (gamepad1.right_bumper ? 0.2 : 1.0);\n\n double x = gamepad1.left_stick_x;\n double y = gamepad1.left_stick_y;\n\n switch (state) {\n case DRIVE:\n left.setPower(driveMult * (y - x));\n right.setPower(driveMult * (y + x));\n break;\n case REVERSE:\n left.setPower(driveMult * -(y + x));\n right.setPower(driveMult * -(y - x));\n break;\n case TANK:\n left.setPower(driveMult * gamepad1.left_stick_y);\n right.setPower(driveMult * gamepad1.right_stick_y);\n break;\n }\n\n if (gamepad1.dpad_up) {\n state = State.DRIVE;\n } else if (gamepad1.dpad_down) {\n state = State.REVERSE;\n } else if (gamepad1.dpad_left) {\n state = State.TANK;\n }\n\n // AUX CONTROLS\n\n double auxMult = gamepad2.left_bumper ? 0.5 : (gamepad2.right_bumper ? 0.2 : 1.0);\n\n rack.setPower(auxMult * ((gamepad2.dpad_up ? 1 : 0) + (gamepad2.dpad_down ? -1 : 0)));\n\n // extend.setPower(auxMult * gamepad2.left_stick_y);\n slurp.setPower(auxMult * gamepad2.right_stick_y);\n\n\n// if (gamepad2.a) {\n// rack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// rack.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// }\n\n // TELEMETRY\n\n telemetry.addData(\"Drive Mode: \", state);\n telemetry.addData(\"Rack Encoder: \", rack.getCurrentPosition());\n telemetry.addData(\"G2 RS Y: \", gamepad2.right_stick_y);\n }", "public void setPitch(int pitch);", "public void setLevel(int newlevel)\n {\n level = newlevel; \n }", "@Override\n public void runOpMode() {\n\n robot.init(hardwareMap);\n robot.MotorRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.MotorLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.MotorRightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.MotorLeftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n /** Wait for the game to begin */\n while (!isStarted()) {\n telemetry.addData(\"angle\", \"0\");\n telemetry.update();\n }\n\n\n }", "@Override\n public void setMotorPower(double power)\n {\n final String funcName = \"setMotorPower\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", power);\n }\n\n if (power != currPower)\n {\n motor.set(power);\n currPower = power;\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", power);\n }\n }", "public void setLoRoSurroundMixLevel(Double loRoSurroundMixLevel) {\n this.loRoSurroundMixLevel = loRoSurroundMixLevel;\n }", "static public void setInterpPower(int pwr) {\n //Currently must be invoked from P5 as PTriangle.setInterpPower(...)\n TEX_INTERP_POWER = pwr;\n }", "public void turnRight() { turn(\"RIGHT\"); }", "public void setRecommand(RequestParameter rp) {\n\t\tdao.boardSetRecommand(rp);\n\t}", "public void setMicGainDb(float level);", "public void disabledInit() {\n oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, 0);\n oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, 0);\n oi.getXBoxJoystick2().setRumble(RumbleType.kLeftRumble, 0);\n oi.getXBoxJoystick2().setRumble(RumbleType.kRightRumble, 0);\n }" ]
[ "0.71457326", "0.68920326", "0.6574437", "0.623442", "0.6038388", "0.59864444", "0.59424263", "0.59091777", "0.58098674", "0.5752929", "0.56648874", "0.5612384", "0.5593613", "0.5571874", "0.55526286", "0.55301553", "0.5511056", "0.5482756", "0.5424539", "0.54183245", "0.53966284", "0.5380749", "0.5378749", "0.53675824", "0.53548115", "0.5293718", "0.5292326", "0.5285395", "0.5284399", "0.52795726", "0.5276164", "0.5270438", "0.5265755", "0.5265702", "0.5263971", "0.5255773", "0.52190924", "0.52181035", "0.52017707", "0.51965034", "0.51952785", "0.51946545", "0.51816946", "0.5175065", "0.51731706", "0.5162995", "0.51617175", "0.51497275", "0.5149258", "0.5142612", "0.5131691", "0.51264817", "0.5124654", "0.5123531", "0.5123416", "0.5123402", "0.51217884", "0.5112331", "0.5111011", "0.5104251", "0.5096718", "0.50955606", "0.5089518", "0.508902", "0.50873744", "0.5085575", "0.5073108", "0.5069238", "0.5068458", "0.50673467", "0.5066464", "0.5062227", "0.50558656", "0.50497633", "0.5047252", "0.5038251", "0.5035587", "0.5033227", "0.50311303", "0.5030877", "0.50275946", "0.5017659", "0.5016439", "0.50129503", "0.50129306", "0.5008805", "0.5007798", "0.50067896", "0.49948084", "0.49935168", "0.49904606", "0.4990201", "0.49863338", "0.49839535", "0.49823815", "0.4974387", "0.49726772", "0.497075", "0.49654165", "0.49579704" ]
0.72250843
0
Creates new form MainView
public MainView() { initComponents(); addWindowListener(new AreYouSure()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MainView() {\n initComponents();\n \n }", "public MainView() {\r\n\t\tinitialize();\r\n\t}", "@Override\n public void Create() {\n\n initView();\n }", "public MainView() {\n initComponents();\n }", "public MainView() {\n initComponents();\n }", "void createMainContent() {\n appContent = new DashboardMain(this);\n }", "public VentaMainView() {\n initComponents();\n controlador = new VentaController();\n this.setLocationRelativeTo(null);\n cargarCategorias();\n cargarArticulos();\n }", "public ViewMain()\n\t{\n\t\tview = new View();\n\t\t\n\t\tcolors = new Color[20][10];\n\t\tfor(int i=0; i < 20; ++i)\n\t\t\tfor(int j=0; j < 10; ++j)\n\t\t\t\tcolors[i][j] = Color.DARK_GRAY;\n\t\t\n\t\tpanel = new BoardGamePanel(colors);\n\t\tpanel.setVisible(true);\n\t\t\n\t\tgameInfo = new GameInfo();\n\t\t\n\t\tactionListenner();\n\t\t\n\t}", "public myView() {\n initComponents();\n CreatMenu();\n }", "View createView();", "@Override\n public void Create() {\n initView();\n initData();\n }", "public void createNewButtonClicked(){\n loadNewScene(apptStackPane, \"Create_New_Appointment.fxml\");\n }", "private void init() {\n mainll = new LinearLayout(getContext());\n mainll.setId(View.generateViewId());\n mainll.setLayoutParams(new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT));\n mainll.setOrientation(LinearLayout.VERTICAL);\n\n map = new HashMap<>();\n\n RelativeLayout mainrl = new RelativeLayout(getContext());\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT,\n ActionBar.LayoutParams.WRAP_CONTENT);\n\n params.addRule(RelativeLayout.BELOW, mainll.getId());\n\n save = new Button(getContext());\n\n save.setLayoutParams(params);\n save.setText(\"save\");\n\n mainrl.addView(mainll);\n mainrl.addView(save);\n addView(mainrl);\n }", "public MainView() {\r\n LoginOverlay login = new LoginOverlay();\r\n login.setOpened(true);\r\n LoginI18n i18n = LoginI18n.createDefault();\r\n i18n.setHeader(new LoginI18n.Header());\r\n i18n.getHeader().setTitle(\"Webvision\");\r\n i18n.getHeader().setDescription(\"Please login, if you don't have an account you will be redirected to finish registration.\");\r\n i18n.getForm().setUsername(\"Email\");\r\n i18n.getForm().setPassword(\"Password\");\r\n login.setI18n(i18n);\r\n login.addLoginListener(event -> {\r\n String email = event.getUsername();\r\n User user = userService.findByEmail(email);\r\n if (user == null) {\r\n login.close();\r\n UI.getCurrent().navigate(RegistrationView.ROUTE);\r\n } else {\r\n String password = event.getPassword();\r\n boolean isAuthenticated = password.equals(user.getPassword());\r\n if (isAuthenticated) {\r\n CurrentUser.setCurrentUser(user);\r\n login.close();\r\n UI.getCurrent().navigate(HomeView.ROUTE);\r\n }\r\n login.setError(true);\r\n }\r\n });\r\n add(login);\r\n }", "public void createOnClick(MainViewModel model){\n this.mainViewModel = model;\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n\t{\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\t\tmainView = new MainView(this);\n\t\t((LinearLayout)findViewById(R.id.mainLinearLayout1)).addView(mainView);\n\t\tfindViewById(R.id.btn_list).setOnClickListener(this);\n\t\tfindViewById(R.id.btn_stime).setOnClickListener(this);\n }", "public MenuView(MainFrame main) {\n initComponents();\n \n this.mainFrame = main;\n }", "public mainLayoutController() {\n\t }", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public MainPage() {\n initComponents();\n \n initPage();\n }", "@Override\n\tpublic View onMainCreateView(Activity activity) {\n\t\tlayout = new FrameLayout(activity);\n\t\treturn layout;\n\t}", "public FrmMainVIEW() {\n initComponents();\n }", "public ClientMainView() {\n initComponents();\n setLocationRelativeTo(null);\n }", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "@SuppressLint(\"ResourceType\")\n @Override\n public void onClick(View view) {\n\n FrameLayout fragmentLayout = new FrameLayout(context);\n fragmentLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));\n fragmentLayout.setId(3);\n main.setContentView(fragmentLayout);\n main.getSupportFragmentManager()\n .beginTransaction().addToBackStack(null)\n .add(3, new DetailFragment(dataset.get(position).getNumber(),\n dataset.get(position).getName(), dataset.get(position).getHeight()))\n .commit();\n }", "@Override\n public void onClick(View arg0)\n {\n\n ExtendedNewController extendedNewController = new ExtendedNewController();\n startNewControllerActivity(extendedNewController, 0, 0);\n }", "public void loadNewGameView()\n\t{\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Neues Spiel\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/NewGame.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tNewGameViewController viewController = (NewGameViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract void createContents(Panel mainPanel);", "private View createMainLayerView(Context context) {\n if (this.mLibraryView == null) {\n AnytimeTabletLibraryViewV2Binding inflate = AnytimeTabletLibraryViewV2Binding.inflate(LayoutInflater.from(context));\n this.mLibraryView = (LibraryView) inflate.getRoot();\n this.mLibraryView.initialize((AnytimeUIPanelAppBase) this, (ViewDataBinding) inflate);\n this.mLibraryView.onShow(\"\");\n return this.mLibraryView;\n }\n throw new UnsupportedOperationException(\"Trying to recreate main layer!\");\n }", "public MainForm() {\n initComponents();\n \n }", "protected void createMainPanel() {\n\t\tthis.mainPanel = new VerticalPanel(); \n\t\tthis.mainPanel.setSpacing(5);\n\t\tthis.mainPanel.setScrollMode(getScrollMode());\n\t}", "@FXML\r\n private void handleButtonCreateTicket() {\r\n MobileApplication.getInstance().addViewFactory(NEWTICKET_VIEW, () -> new NewTicketView(NEWTICKET_VIEW).getView());\r\n MobileApplication.getInstance().switchView(NEWTICKET_VIEW);\r\n\r\n }", "public NomineeAddActivity() {\r\n\t\tsetContentView(R.layout.activity_nominee_add);\r\n\t}", "public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_main, container, false);\n\n\t\t// instantiate the graphical components\n\t\tedtMessage = (EditText) view.findViewById(R.id.edtMessage);\n\t\tbtnAdd = (Button) view.findViewById(R.id.btnAdd);\n\t\t// Instantiate the listView\n\t\tlsvResult = (ListView) view.findViewById(R.id.lsvResult);\n\t\thumans = new ArrayList<Human>();\n\t\t// Human tempH;\n\t\t// for (int i = 0; i < 800; i++) {\n\t\t// tempH = new Human(\"toto \" + i, \"No message, noFuture\", i);\n\t\t// humans.add(tempH);\n\t\t// }\n\t\t\n\t\treturn view;\n\t}", "public AdminMainView() {\n initComponents();\n setComponent(new SearchEmployeeView(), mainPanel);\n }", "@Override\n\tpublic void createContents(Panel mainPanel) {\n\t\tmainPanel.setLayout(new ColumnLayout(5));\n\t\tnew Label(mainPanel).setText(\"El jugador\");\n\t\tnew Label(mainPanel).setText(this.getModel().nombre);\n\t\tnew Label(mainPanel).setText(\"se retira con \");\n\t\tnew Label(mainPanel).bindValueToProperty(Jugador.FICHAS);\n\t\tnew Label(mainPanel).setText(\"$\");\n\t Button boton = new Button(mainPanel).setCaption(\"OK\");\n\t boton.onClick(new MessageSend(this,\"cerrar\"));\n\t \n\t \n\t \n\t}", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tBinder.init(getApplication());\n\t\tView view = Binder.bindView(this, \n Binder.inflateView(this, R.layout.main, null, false), new MainViewModel());\n\t\t\n\t\tsetContentView(view);\n\t}", "private void buildMainFragment() {\n\t\tfinal List<Fragment> fragments = getFragments();\n\t\t//pageAdapter = new PageAdapter(getSupportFragmentManager(), fragments);\n\t\tfinal ViewPager pager = (ViewPager) findViewById(R.id.viewpager_program);\n\t\tpager.setAdapter(pageAdapter);\n\n\t\t// Set up ActionBar\n\t\tactionBar = getActionBar();\n\t\tactionBar.show();\n\t\tactionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);\n\t\t\n\t\tTab tab = actionBar\n\t\t\t\t.newTab()\n\t\t\t\t.setText(getIntent().getExtras().getString(\"pgr_name\"))\n\t\t\t\t.setTabListener(\n\t\t\t\t\t\tnew TabListener<ProgramExercisesFragment>(this,\n\t\t\t\t\t\t\t\tgetIntent().getExtras().getString(\"pgr_name\"),\n\t\t\t\t\t\t\t\tProgramExercisesFragment.class));\n\t\tactionBar.addTab(tab);\n\n\t\ttab = actionBar\n\t\t\t\t.newTab()\n\t\t\t\t.setText(\"Exercises\")\n\t\t\t\t.setTabListener(\n\t\t\t\t\t\tnew TabListener<ProgramAddExercisesFragment>(this, \"Exercises_Program\",\n\t\t\t\t\t\t\t\tProgramAddExercisesFragment.class));\n\t\tactionBar.addTab(tab);\n\t\t\n\t\t\n\t}", "public void showCreateActivtiy(View v){\n Intent intent = new Intent(this, CreateActivity.class);\n startActivity(intent);\n }", "MainPresenter(MainContract.View view) {\n this.view = view;\n model = new AmicableModel();\n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) \n {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.main); \n createLayout();\n }", "@FXML\n public void newMedico() {\n new MedicoPaneCadastroController().abrirJanela(\"./View/MedicoPaneCadastro.fxml\", \"Novo Médico\", null);\n populaTabela();\n\n }", "protected Scene createView() {\n\t\treturn null;\n\t}", "private void createNameSubScene() {\n\t\tnameSubScene = new ViewSubScene();\n\t\tthis.mainPane.getChildren().add(nameSubScene);\n\t\tInfoLabel enterName = new InfoLabel(\"ENTER YOU NAME\");\n\t\tenterName.setLayoutX(20);\n\t\tenterName.setLayoutY(40);\n\t\t\n\t\tinputName = new TextField();\n\t\tinputName.setLayoutX(120);\n\t\tinputName.setLayoutY(150);\n\t\t\n\t\tnameSubScene.getPane().getChildren().add(enterName);\n\t\tnameSubScene.getPane().getChildren().add(inputName);\n\t\tnameSubScene.getPane().getChildren().add(createLinkButton());\n\t}", "@FXML\r\n private void addPane(ActionEvent e) throws IOException {\r\n\r\n eventDialog(\"New\");\r\n eventLabel.setText(\"Are you want to take a new window?\");\r\n\r\n noButton.setOnAction(event -> {\r\n firstLabel.setVisible(false);\r\n lastLabel.setVisible(false);\r\n lineFirstNodeTF.setVisible(false);\r\n lineLastNodeTF.setVisible(false);\r\n setNodeButton.setVisible(false);\r\n resetNodeButton.setVisible(false);\r\n\r\n graphNodeTextArea.setEditable(true);\r\n graphNodeTextArea.setText(\"\");\r\n eventStage.close();\r\n });\r\n\r\n yesButton.setOnAction(event -> {\r\n Parent root = null;\r\n try {\r\n root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource(\"GUI.fxml\")));\r\n } catch (IOException ioException) {\r\n ioException.printStackTrace();\r\n }\r\n Scene scene = new Scene(root);\r\n\r\n Stage primaryStage = new Stage();\r\n primaryStage.setScene(scene);\r\n primaryStage.setTitle(\"Object Oriented Programming Project - Team 1B\");\r\n primaryStage.show();\r\n eventStage.close();\r\n });\r\n\r\n }", "public LoginPresenter(MainView mainView)\n {\n this.mainView = mainView;\n }", "public void btn_newEntry() throws IOException, SQLException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewEntry.fxml\"));\n Parent parent = fxmlLoader.load();\n NewEntryController newEntryController = fxmlLoader.<NewEntryController>getController();\n newEntryController.setPresenter(presenter);\n newEntryController.fillComboBox();\n this.stageNewEntry = new Stage();\n stageNewEntry.setTitle(bundle.getString(\"entryNew.title\"));\n stageNewEntry.setScene(new Scene(parent, 400, 400));\n stageNewEntry.setAlwaysOnTop(true);\n stageNewEntry.setResizable(false);\n stageNewEntry.initModality(Modality.APPLICATION_MODAL);\n stageNewEntry.getIcons().add(new Image(String.valueOf(this.getClass().getResource(\"images/logo.png\"))));\n stageNewEntry.show();\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}", "public abstract ArchECoreView newView(ArchECoreArchitecture architecture) throws ArchEException;", "public createNew(){\n\t\tsuper(\"Create\"); // title for the frame\n\t\t//layout as null\n\t\tgetContentPane().setLayout(null);\n\t\t//get the background image\n\t\ttry {\n\t\t\tbackground =\n\t\t\t\t\tnew ImageIcon (ImageIO.read(getClass().getResource(\"Wallpaper.jpg\")));\n\t\t}//Catch for file error\n\t\tcatch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t}\n\t\t//Initialize all of the compenents \n\t\tlblBackground = new JLabel (background);\n\t\tlblTitle = new JLabel (\"Create Menu\");\n\t\tlblTitle.setFont(new Font(\"ARIAL\",Font.ITALIC, 30));\n\t\tlblName = new JLabel(\"Please Enter Your First Name.\");\n\t\tlblLastName= new JLabel (\"Please Enter Your Last Name.\");\n\t\tlblPhoneNumber = new JLabel (\"Please Enter Your Phone Number.\");\n\t\tlblAddress = new JLabel (\"Please Enter Your Address.\");\n\t\tlblMiddle = new JLabel (\"Please Enter Your Middle Name (Optional).\");\n\t\tbtnCreate = new JButton (\"Create\");\n\t\tbtnBack = new JButton (\"Back\");\n\t\t//set the font\n\t\tlblName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblLastName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblPhoneNumber.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblAddress.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblMiddle.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\n\t\t//add action listener\n\t\tbtnCreate.addActionListener(this);\n\t\tbtnBack.addActionListener(this);\n\t\t//set bounds for all the components\n\t\tbtnCreate.setBounds(393, 594, 220, 36);\n\t\ttxtMiddle.setBounds(333, 249, 342, 36);\n\t\ttxtName.setBounds(333, 158, 342, 36);\n\t\ttxtLastName.setBounds(333, 339, 342, 36);\n\t\ttxtPhoneNumber.setBounds(333, 429, 342, 36);\n\t\ttxtAddress.setBounds(333, 511, 342, 36);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblMiddle.setBounds(333, 201, 342, 36);\n\t\tlblName.setBounds(387, 110, 239, 36);\n\t\tlblLastName.setBounds(387, 297, 239, 36);\n\t\tlblPhoneNumber.setBounds(369, 387, 269, 36);\n\t\tlblAddress.setBounds(393, 477, 215, 30);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblBackground.setBounds(0, 0, 1000, 1000);\n\t\t//add components to frame\n\t\tgetContentPane().add(btnCreate);\n\t\tgetContentPane().add(txtMiddle);\n\t\tgetContentPane().add(txtLastName);\n\t\tgetContentPane().add(txtAddress);\n\t\tgetContentPane().add(txtPhoneNumber);\n\t\tgetContentPane().add(txtName);\n\t\tgetContentPane().add(lblMiddle);\n\t\tgetContentPane().add(lblLastName);\n\t\tgetContentPane().add(lblAddress);\n\t\tgetContentPane().add(lblPhoneNumber);\n\t\tgetContentPane().add(lblName);\n\t\tgetContentPane().add(btnBack);\n\t\tgetContentPane().add(lblTitle);\n\t\tgetContentPane().add(lblBackground);\n\t\t//set size, visible and action for close\n\t\tsetSize(1000,1000);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "public void factoryMainScreen()\n\t{\n\t\t\n\t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\treturn inflater.inflate(R.layout.activity_main, container, false);\n }", "@AutoGenerated\n\tprivate void buildMainLayout() {\n\t\tmainLayout = new FormLayout();\n\t\t\n\t\tmainLayout.setMargin(true);\n\t\t\n\t\tusername = new TextField(\"Username\");\n\t\tpassword = new TextField(\"Password\");\n\t\tmainLayout.addComponent(username);\n\t\tmainLayout.addComponent(password);\n\n\t\tlogin = new Button(\"Login\");\n\t\tregister = new Button(\"Register\");\n\n\t\tmainLayout.addComponent(login);\n\t\tmainLayout.addComponent(register);\n\t\t\n\t\tlogin.addClickListener(this);\n\t\tregister.addClickListener(this);\n\t\t\n\t}", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public void SetUpNewView(ArrayList<QuestionModel> questionBank ,QuestionModel questionModel) throws IOException {\n questionModel.setQuestionType(\"Fill in The Blank\");\n questionBank.add(questionModel);\n DBObject.getInstance().setQuestionBank(questionBank);\n\n FXMLLoader parentLoader = new FXMLLoader(getClass().getResource(\"/question/views/first.fxml\"));\n Parent nextSceneParent = parentLoader.load();\n Scene nextScene = new Scene(nextSceneParent);\n\n QuestionController test = parentLoader.getController();\n test.populateInterface(currStage);\n test.setUpTable();\n\n currStage.setScene(nextScene);\n currStage.show();\n }", "public void onCreateClick(){\r\n\t\tmyView.advanceToCreate();\r\n\t}", "public MainView() {\n initComponents();\n setTitle(\"Gerador de provas aleatórias\");\n sair_menu.addActionListener((ActionEvent e) -> {\n this.dispose();\n });\n\n try {\n InputStream imgStream = getClass()\n .getResourceAsStream(\"/gerador/de/provas/aleatorias/view/imgs/Elegant_circle-icons-78.png\");\n setIconImage(ImageIO.read(imgStream));\n } catch (IOException ex) {\n Logger.getLogger(MainView.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public void buttonNew(View view) {\n Intent intent = new Intent(this, ProductNewActivity.class);\n startActivity(intent);\n }", "public MainMenuView() {\r\n super(\"\\n\" +\r\n \"**************************\\n\" +\r\n \"* CIT 360 - Technologies *\\n\" +\r\n \"**************************\\n\" +\r\n \" 1 - Java Collections\\n\" +\r\n \" 2 - Threads, Executors and Runnables\\n\" +\r\n \" 3 - Application Controller Pattern\\n\" +\r\n \" 4 - MVC\\n\" + \r\n \" 5 - Hibernate\\n\" +\r\n \" 6 - JSON\\n\" +\r\n \" 7 - HttpURLConnection\\n\" +\r\n \" 8 - Quit\\n\", \r\n 8);\r\n }", "public void launchMainScreen(View view) {\n startActivity(new Intent(view.getContext(), SearchCreateDeleteActivity.class));\n finish();\n }", "private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\r\n\t\tmainLayout.setImmediate(false);\r\n\t\tmainLayout.setWidth(\"100%\");\r\n\t\tmainLayout.setHeight(\"100%\");\r\n\t\tmainLayout.setMargin(false);\r\n\t\t\r\n\t\t// top-level component properties\r\n\t\tmainLayout.setWidth(\"100.0%\");\r\n\t\tmainLayout.setHeight(\"100.0%\");\r\n\t\t\r\n\t\t// label\r\n\t\tlabel = new Label();\r\n\t\tlabel.setImmediate(false);\r\n\t\tlabel.setWidth(\"-1px\");\r\n\t\tlabel.setHeight(\"-1px\");\r\n\t\tlabel.setValue(\"Stellvertreter ernennen\");\r\n\t\tlabel.setStyleName(Runo.LABEL_H1);\r\n\t\tmainLayout.addComponent(label, \"top:25.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// benutzer\r\n\t\tbenutzer = new ListSelect();\r\n\t\tbenutzer.setImmediate(false);\r\n\t\tbenutzer.setWidth(\"46.0%\");\r\n\t\tbenutzer.setHeight(\"70.0%\");\r\n\t\tmainLayout.addComponent(benutzer, \"top:35.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// ok\r\n\t\tok = new Button();\r\n\t\tok.setCaption(\"Stellvertreter ernennen\");\r\n\t\tok.setImmediate(false);\r\n\t\tok.setWidth(\"25%\");\r\n\t\tok.setHeight(\"-1px\");\r\n\t\tok.addListener(this);\r\n\t\tmainLayout.addComponent(ok, \"top:83.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// delete\r\n\t\tdelete = new Button();\r\n\t\tdelete.setCaption(\"Stellvertreter löschen\");\r\n\t\tdelete.setImmediate(false);\r\n\t\tdelete.setWidth(\"25%\");\r\n\t\tdelete.setHeight(\"-1px\");\r\n\t\tdelete.addListener(this);\r\n\t\tmainLayout.addComponent(delete, \"top:88.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// logout\r\n\t\tlogout = new Button();\r\n\t\tlogout.setCaption(\"logout\");\r\n\t\tlogout.setImmediate(false);\r\n\t\tlogout.setWidth(\"-1px\");\r\n\t\tlogout.setHeight(\"-1px\");\r\n\t\tlogout.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tlogout.addListener(this);\r\n\t\tmainLayout.addComponent(logout, \"top:97.0%;left:35.0%;\");\r\n\t\t\r\n\t\t// back\r\n\t\tback = new Button();\r\n\t\tback.setCaption(\"Startseite\");\r\n\t\tback.setImmediate(true);\r\n\t\tback.setWidth(\"-1px\");\r\n\t\tback.setHeight(\"-1px\");\r\n\t\tback.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\tback.addListener(this);\r\n\t\tmainLayout.addComponent(back, \"top:94.0%;left:35.0%;\");\r\n\t\t\r\n\t\treturn mainLayout;\r\n\t}", "public void onClickAddNewItem(View v) {\n Intent intent = new Intent(EditFoodItemActivity.this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n\tpublic void startCreateNewGame() \n\t{\t\n\t\tgetNewGameView().setTitle(\"\");\n\t\tgetNewGameView().setRandomlyPlaceHexes(false);\n\t\tgetNewGameView().setRandomlyPlaceNumbers(false);\n\t\tgetNewGameView().setUseRandomPorts(false);\n\t\tif(!getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().showModal();\n\t\t}\n\t}", "public View() {\n initComponents();\n this.setTitle(\"Pet Registration\");\n this.setLocationRelativeTo(null);\n this.getRootPane().setDefaultButton(submitButton);\n this.setVisible(true);\n }", "public void newTrip(View v) {\n\t\tIntent intent = new Intent(RootMenuActivity.this, NewTripActivity.class);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\tstartActivity(intent);\n\t}", "public void onShowMain(ActionEvent event) {\n try {\n Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n Parent scene = FXMLLoader.load(getClass().getResource(\"/App/View/MainScreenView.fxml\"));\n stage.setTitle(\"Customer Schedule\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n catch (Exception e){\n System.out.println(e.getMessage());\n }\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public void create_new_package(View V) {\n make_request();\r\n progressDialog.show();\r\n }", "public menuPrincipalView() {\n initComponents();\n }", "public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public void newProject(View V){\n Intent i = new Intent(this, NewProject.class);\n i.putExtra(\"course title\",courseTitle);\n startActivity(i);\n }", "public void goToCreate(View view) {\n Intent intent = new Intent(this, CreateAccountActivity.class);\n startActivity(intent);\n }", "private void createContent(final Container container) {\n this.mainPanel = new MainPanel();\n this.mainPanel.setName(\"mainPanel\"); // Fest\n\n if (container != null) {\n // adds the main panel\n container.add(this.mainPanel, BorderLayout.CENTER);\n\n // Handle status bar\n container.add(StatusBar.getInstance(), BorderLayout.SOUTH);\n }\n }", "private void challengeStartNew() {\n FragmentManager fm = getSupportFragmentManager();\n FragmentNewChallenge newChallenge = FragmentNewChallenge.newInstance(\"Titel\");\n newChallenge.show(fm, \"fragment_start_new_challenge\");\n }", "public AddUserView() {\n initComponents();\n }", "public void createItem(View view) {\n \t\n String[] temp = getCurrentItemTypes();\n \n Intent intent = new Intent(this, CreateItem.class);\n intent.putExtra(EDIT, \"no\");\n intent.putExtra(TYPES, temp);\n startActivityForResult(intent, 1);\n }", "@FXML\n private void goToCreateProgram(ActionEvent event) throws IOException {\n\n CreateProgramController createProgramController = new CreateProgramController();\n Program programEntity = createProgramController.openView(event);\n createProgram.setSelected(false);\n if (programEntity != null && programListController != null)\n {\n if (programListController.listOfPrograms != null)\n {\n programListController.listOfPrograms.add(programEntity);\n programListController.updateProgramList();\n UsermanagementUtilities.setFeedback(event,\"The program was created\",true);\n }\n } else {\n UsermanagementUtilities.setFeedback(event,\"The program was not created\",false);\n }\n }", "@RequestMapping(\"/newRecipe\")\r\n\tpublic ModelAndView newRecipe() {\r\n\t\tModelAndView mav = new ModelAndView();\r\n\r\n\t\tmav.addObject(\"recipe\", new Recipe());\r\n\t\tmav.addObject(\"newFlag\", true);\r\n\t\tmav.setViewName(\"recipe/editRecipe.jsp\");\r\n\r\n\t\treturn mav;\r\n\t}", "public void createContents()\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"TTS - Task Tracker System\");\n\t\t\n\t\tbtnLogIn = new Button(shell, SWT.NONE);\n\t\tbtnLogIn.setBounds(349, 84, 75, 25);\n\t\tbtnLogIn.setText(\"Log In\");\n\t\tbtnLogIn.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tif (cboxUserDropDown.getText() != \"\"\n\t\t\t\t\t\t&& cboxUserDropDown.getSelectionIndex() >= 0)\n\t\t\t\t{\n\t\t\t\t\tString selectedUserName = cboxUserDropDown.getText();\n\t\t\t\t\tusers.setLoggedInUser(selectedUserName);\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\tnew TaskMainViewWindow(AccessUsers.getLoggedInUser());\n\t\t\t\t\tdisplay.wake();\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tshell.forceFocus();\n\t\t\t\t\tshell.setActive();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnQuit = new Button(shell, SWT.CENTER);\n\t\tbtnQuit.setBounds(349, 227, 75, 25);\n\t\tbtnQuit.setText(\"Quit\");\n\t\tbtnQuit.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcboxUserDropDown = new Combo(shell, SWT.READ_ONLY);\n\t\tcboxUserDropDown.setBounds(146, 86, 195, 23);\n\t\t\n\t\tinitUserDropDown();\n\t\t\n\t\tlblNewLabel = new Label(shell, SWT.CENTER);\n\t\tlblNewLabel.setBounds(197, 21, 183, 25);\n\t\tlblNewLabel.setFont(new Font(display, \"Times\", 14, SWT.BOLD));\n\t\tlblNewLabel.setForeground(new Color(display, 200, 0, 0));\n\t\tlblNewLabel.setText(\"Task Tracker System\");\n\t\t\n\t\ticon = new Label(shell, SWT.BORDER);\n\t\ticon.setLocation(0, 0);\n\t\ticon.setSize(140, 111);\n\t\ticon.setImage(new Image(null, \"images/task.png\"));\n\t\t\n\t\tbtnCreateUser = new Button(shell, SWT.NONE);\n\t\tbtnCreateUser.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tshell.setEnabled(false);\n\t\t\t\tnew CreateUserWindow(users);\n\t\t\t\tshell.setEnabled(true);\n\t\t\t\tinitUserDropDown();\n\t\t\t\tshell.forceFocus();\n\t\t\t\tshell.setActive();\n\t\t\t}\n\t\t});\n\t\tbtnCreateUser.setBounds(349, 115, 75, 25);\n\t\tbtnCreateUser.setText(\"Create User\");\n\t\t\n\t}", "@RequestMapping(\"/newProjectAppMajor\")\n\tpublic ModelAndView newProjectAppMajor() {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"projectappmajor\", new ProjectAppMajor());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"projectappmajor/editProjectAppMajor.jsp\");\n\n\t\treturn mav;\n\t}", "public MainView() {\n initComponents();\n setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);\n }", "public ViewSinFaltante() {\n initComponents();\n }", "public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }", "public RunMVC() {\n\n\t\t//cria o Modelo e a Visao\n\t\tModel myModel \t= new Model();\n\t\tView myView \t= new View();\n\t\t//View outraView \t= new View();\n\t\tOutraView outraView \t= new OutraView();\n\n\t\t//avisa o modelo que a visao existe \n\t\tmyModel.addPropertyChangeListener(myView);\n\t\tmyModel.addPropertyChangeListener(outraView);\n\n\t\tController myController = new Controller();\n\t\tmyController.addModel(myModel);\n\t\t//myController.addView(myView);\n\t\t//myController.addView(outraView);\n\t\tmyController.initModel(start_value);\n\n\t\t//tell View about Controller \n\t\tmyView.addController(myController);\n\t\toutraView.addController(myController);\n\t\t\n\n\t}", "@Override\r\n\tpublic void onCreate(Data data) {\n\t\tSystem.out.println(\"onCreate window \"+data);\r\n\t\tsetWindowLayout(\"layout_main.xml\");\r\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tmParent = inflater.inflate(R.layout.layout_main, null);\n\t\tloading = (ProgressBar) mParent.findViewById(R.id.loading);\n\t\tlvListNew = (ListView) mParent.findViewById(R.id.lvListNews);\n\t\tlvListNew.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tItemNewFeed item = (ItemNewFeed) parent\n\t\t\t\t\t\t.getItemAtPosition(position);\n\t\t\t\tIntent intent = new Intent(getActivity(), DetailActivity.class);\n\t\t\t\tintent.putExtra(\"LINK\", item.getLink());\n\t\t\t\tintent.putExtra(\"TITLE\", item.getName());\n\t\t\t\tintent.putExtra(\"IMAGE\", item.getImage());\n\t\t\t\tintent.putExtra(\"DES\", item.getMessage());\n\t\t\t\tintent.putExtra(\"TITME\", item.getTime());\n\t\t\t\tintent.putExtra(\"POST_ID\", item.getPost_id());\n\t\t\t\tintent.putExtra(\"POS\", 2);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\treturn mParent;\n\t}", "public MainScreen() {\n initComponents();\n \n }", "public static void showMainView() throws IOException {\n //Load the MainView.\n Main.FxmlLoader(MAIN_VIEW_PATH);\n //Display the view to the user.\n primaryStage.show();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_info, container, false);\n //Initialise UI elements\n saveButton = view.findViewById(R.id.save_button);\n saveButton.setOnClickListener(this);\n EditText titleEdit = view.findViewById(R.id.maze_title_edit);\n loadingScreen = view.findViewById(R.id.loading_screen);\n titleEdit.addTextChangedListener(createMazeTextWatcher);\n publicToggle = view.findViewById(R.id.public_switch);\n initPublicToggle();\n return view;\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}" ]
[ "0.70271724", "0.69791716", "0.69347966", "0.68721944", "0.68721944", "0.6856781", "0.6580709", "0.6535334", "0.6517715", "0.6472099", "0.64625853", "0.63000906", "0.62850356", "0.6255951", "0.6254966", "0.62370384", "0.6236967", "0.6207785", "0.6196538", "0.614882", "0.61374503", "0.6110611", "0.60627925", "0.6052557", "0.6051145", "0.6031433", "0.6022518", "0.6005458", "0.6002678", "0.60003334", "0.59967136", "0.5985338", "0.59663326", "0.5963132", "0.5938861", "0.59303826", "0.5929646", "0.59274703", "0.59250957", "0.5912935", "0.5907225", "0.5907002", "0.5894096", "0.5890722", "0.58835787", "0.58799994", "0.58775675", "0.5866562", "0.584875", "0.58452344", "0.58351374", "0.5834201", "0.58313835", "0.5822323", "0.5816578", "0.5815515", "0.5812702", "0.58074784", "0.58036536", "0.5794766", "0.5792033", "0.5789937", "0.5783057", "0.57807475", "0.5779562", "0.57769173", "0.57729954", "0.577237", "0.57718897", "0.5757773", "0.5754575", "0.57462555", "0.57419556", "0.5739847", "0.57396835", "0.5738331", "0.5737072", "0.5736891", "0.5736679", "0.57351214", "0.57350194", "0.57328975", "0.5731536", "0.57306", "0.5728074", "0.5722803", "0.57214266", "0.57187873", "0.57177335", "0.57096857", "0.5707348", "0.57000434", "0.5693895", "0.56920576", "0.56885844", "0.5687614", "0.56874025", "0.5681871", "0.56817627", "0.5679615" ]
0.6024321
26
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); lblMessage = new javax.swing.JLabel(); panelPrincipal = new javax.swing.JPanel(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); miExit = new javax.swing.JMenuItem(); miTools = new javax.swing.JMenu(); miARTTool = new javax.swing.JMenuItem(); miGBSTool = new javax.swing.JMenuItem(); miHelp = new javax.swing.JMenu(); miAbout = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); jToolBar1.setFloatable(false); jToolBar1.add(lblMessage); panelPrincipal.setLayout(new java.awt.GridLayout(0, 1)); jMenu1.setText("File"); miExit.setText("Exit"); miExit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { miExitActionPerformed(evt); } }); jMenu1.add(miExit); jMenuBar1.add(jMenu1); miTools.setText("Tools"); miARTTool.setText("ART Tool"); miARTTool.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { miARTToolActionPerformed(evt); } }); miTools.add(miARTTool); miGBSTool.setText("GBS Tool"); miGBSTool.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { miGBSToolActionPerformed(evt); } }); miTools.add(miGBSTool); jMenuBar1.add(miTools); miHelp.setText("Help"); miAbout.setText("About"); miHelp.add(miAbout); jMenuBar1.add(miHelp); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 948, Short.MAX_VALUE) .addComponent(panelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(panelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 505, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7321233", "0.72922724", "0.72922724", "0.72922724", "0.7287021", "0.7250113", "0.7214902", "0.7209478", "0.71973455", "0.71915394", "0.71855843", "0.71602577", "0.7149222", "0.70949143", "0.70813066", "0.70579875", "0.6988272", "0.6978623", "0.6956488", "0.6954857", "0.69464177", "0.6943629", "0.69367987", "0.6933018", "0.6929331", "0.69254756", "0.6925112", "0.6913102", "0.69126385", "0.6894097", "0.6893964", "0.68917936", "0.6891495", "0.68895847", "0.68845505", "0.688321", "0.6882532", "0.6878455", "0.68770224", "0.68752515", "0.6872487", "0.6861657", "0.6857395", "0.68569964", "0.6856607", "0.68555", "0.6854448", "0.6854003", "0.6854003", "0.68440473", "0.6838224", "0.6837637", "0.6829588", "0.6829244", "0.68277496", "0.68251204", "0.68236995", "0.68180907", "0.6817601", "0.681135", "0.680981", "0.680977", "0.68097097", "0.6807759", "0.6803703", "0.6795666", "0.67947936", "0.6793619", "0.6790796", "0.67902565", "0.67899716", "0.67888206", "0.67829174", "0.67670804", "0.6766693", "0.67661726", "0.6757112", "0.67564726", "0.67534983", "0.6751943", "0.67434925", "0.6739915", "0.6737868", "0.6737343", "0.673493", "0.6728943", "0.67285377", "0.672136", "0.6716568", "0.671613", "0.67153496", "0.67092025", "0.67079633", "0.6704689", "0.67022705", "0.6701755", "0.6700168", "0.66992295", "0.669491", "0.6692837", "0.6690047" ]
0.0
-1
FIXME: use ImmutabmeMap and static initialization
private static void initializeMap() { addressTypeToSerializerMap = new HashMap<>(); addressTypeToSerializerMap.put(NoAddressAfi.VALUE, NoAddressSerializer.getInstance()); addressTypeToSerializerMap.put(Ipv4Afi.VALUE, Ipv4Serializer.getInstance()); addressTypeToSerializerMap.put(Ipv4BinaryAfi.VALUE, Ipv4BinarySerializer.getInstance()); addressTypeToSerializerMap.put(Ipv4PrefixAfi.VALUE, Ipv4PrefixSerializer.getInstance()); addressTypeToSerializerMap.put(Ipv4PrefixBinaryAfi.VALUE, Ipv4PrefixBinarySerializer.getInstance()); addressTypeToSerializerMap.put(Ipv6Afi.VALUE, Ipv6Serializer.getInstance()); addressTypeToSerializerMap.put(Ipv6BinaryAfi.VALUE, Ipv6BinarySerializer.getInstance()); addressTypeToSerializerMap.put(Ipv6PrefixAfi.VALUE, Ipv6PrefixSerializer.getInstance()); addressTypeToSerializerMap.put(Ipv6PrefixBinaryAfi.VALUE, Ipv6PrefixBinarySerializer.getInstance()); addressTypeToSerializerMap.put(MacAfi.VALUE, MacSerializer.getInstance()); addressTypeToSerializerMap.put(DistinguishedNameAfi.VALUE, DistinguishedNameSerializer.getInstance()); addressTypeToSerializerMap.put(Lcaf.VALUE, LcafSerializer.getInstance()); addressTypeToSerializerMap.put(AfiListLcaf.VALUE, AfiListSerializer.getInstance()); addressTypeToSerializerMap.put(InstanceIdLcaf.VALUE, InstanceIdSerializer.getInstance()); addressTypeToSerializerMap.put(ApplicationDataLcaf.VALUE, ApplicationDataSerializer.getInstance()); addressTypeToSerializerMap.put(ExplicitLocatorPathLcaf.VALUE, ExplicitLocatorPathSerializer.getInstance()); addressTypeToSerializerMap.put(SourceDestKeyLcaf.VALUE, SourceDestKeySerializer.getInstance()); addressTypeToSerializerMap.put(KeyValueAddressLcaf.VALUE, KeyValueAddressSerializer.getInstance()); addressTypeToSerializerMap.put(ServicePathLcaf.VALUE, ServicePathSerializer.getInstance()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }", "protected WumpusMap() {\n\t\t\n\t}", "MAP createMAP();", "protected Map method_1552() {\n return super.method_1552();\n }", "private <T extends Reference> void buildMap(Map<String, T> map, List<T> objects) {\n for (T candidateObject : objects) {\n String rid = candidateObject.getId();\n log.debug(\"...... caching RID: {}\", rid);\n map.put(rid, candidateObject);\n }\n }", "public static void main(String[] args){\n\n\n\n Map<Integer,StringBuilder> map=new HashMap<Integer,StringBuilder>();\n map.put(1,new StringBuilder(\"c1\"));\n map.put(2,new StringBuilder(\"c2\"));\n map.put(3,new StringBuilder(\"c3\"));\n\n Map<Integer,StringBuilder> unmodifiableMap= Collections.unmodifiableMap(map);\n //这时候如果再往unmodifiableMap中添加元素,会发生错误\n //unmodifiableMap.put(4,new StringBuilder(\"c4\"));\n System.out.println(\" unmodifiableMap before : \" + unmodifiableMap.get(3));\n System.out.println(\" map before : \" + map.get(3));\n unmodifiableMap.get(3).append(\"new\");\n System.out.println(\" map after : \" + map.get(3));\n System.out.println(\" unmodifiableMap after : \" + unmodifiableMap.get(3));\n\n }", "public Map() {\n\t\t//intially empty\n\t}", "protected MapImpl() {\n }", "public Map instantiateBackingMap(String sName);", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "protected ForwardingMapEntry() {}", "protected void initBoatMap() {}", "@Test\n public void testQuickMap() {\n Demo demo = DemoData.random();\n Demo demo2 = BeanUtil.quickMap(demo, Demo.class);\n }", "protected abstract Set method_1559();", "public HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}", "private Map<Field, ValueRef> createFieldValueRefMap() {\n Map<Field, ValueRef> map = new IdentityHashMap<>(fields.size() + 1);\n map.put(NormalField.MISSING, new ValueRef(0, 0));\n return map;\n }", "public InternalWorkingOfHashSet() {\r\n map = new HashMap<>();\r\n }", "public OwnMap() {\n super();\n keySet = new OwnSet();\n }", "protected SortedMap getSortedMap() {\n/* 65 */ return (SortedMap)this.map;\n/* */ }", "private void checkMutability()\n\t{\n\t\tif (immutable)\n\t\t{\n\t\t\tthrow new UnsupportedOperationException(\"Map is immutable\");\n\t\t}\n\t}", "@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}", "private static void fillupmap(Map<String, Object> m) {\n\t\tRectangle r =new Rectangle(\"A\",2,3);\r\n\t\tm.put(r.getRname(), r);\r\n\t\tr =new Rectangle(\"B\",4,1);\r\n\t\tm.put(r.getRname(), r);\r\n\t\tCircle c =new Circle(\"C\",3);\r\n\t\tm.put(c.getCname(),c);\r\n\t\tc =new Circle(\"D\",4);\r\n\t\tm.put(c.getCname(),c);\r\n\t\t\r\n\t}", "public EnumMap<?, SerializableString> internalMap()\n/* */ {\n/* 100 */ EnumMap<?, SerializableString> result = this._asMap;\n/* 101 */ if (result == null)\n/* */ {\n/* 103 */ Map<Enum<?>, SerializableString> map = new LinkedHashMap();\n/* 104 */ for (Enum<?> en : this._values) {\n/* 105 */ map.put(en, this._textual[en.ordinal()]);\n/* */ }\n/* 107 */ result = new EnumMap(map);\n/* */ }\n/* 109 */ return result;\n/* */ }", "@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }", "public Map<EntityPlayer, Vec3> b()\r\n/* 204: */ {\r\n/* 205:217 */ return this.k;\r\n/* 206: */ }", "public abstract Map<K, V> a();", "private void init() {\n UNIGRAM = new HashMap<>();\n }", "private MapTransformer(Map map) {\n super();\n iMap = map;\n }", "private static <N extends Node> SortedMap<ImmutableContextSet, SortedSet<N>> createMap() {\n return new ConcurrentSkipListMap<>(ContextSetComparator.reverse());\n }", "@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }", "IcedHM() { _m = new NonBlockingHashMap<>(); }", "private LookupUtil(){}", "public Map() {\n\n\t\t}", "public static void main(String[] args) {\n Map<String, Set<Integer>> ms = new HashMap<>(); \n Set<Integer> s1 = new HashSet<>(Arrays.asList(1,2,3));\n Set<Integer> s2 = new HashSet<>(Arrays.asList(4,5,6));\n Set<Integer> s3 = new HashSet<>(Arrays.asList(7,8,9));\n ms.put(\"one\", s1);\n ms.put(\"two\", s2);\n ms.put(\"three\", s3);\n System.out.println(ms); \n // ch07.collections.Ch0706InterfacesVsConcrete$1\n // {one=[1, 2, 3], two=[4, 5, 6], three=[7, 8, 9]}\n\n // this is how LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>>\n // can be initially initialized\n LinkedHashMap<Integer,Tuple2<String,LinkedHashMap<Double,String>>> toc =\n new LinkedHashMap<>();\n System.out.println(toc); // just using toc to get rid of eclipse warning about not using it\n \n \n\n\n\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public Map<T, V> populateMap() {\n Map<T, V> map = new HashMap<>();\n for (int i = 0; i < entryNumber; i++) {\n cacheKeys[i] = (T) Integer.toString(random.nextInt(1000000000));\n String key = cacheKeys[i].toString();\n map.put((T) key, (V) Integer.toString(random.nextInt(1000000000)));\n }\n return map;\n }", "Map<String, String> mo14888a();", "public abstract AnnotationMap mo30683d();", "private Map<Integer, MessageEncoder> initialiseMap() {\n Map<Integer, MessageEncoder> composerMap = new HashMap<>();\n composerMap.put(AC35MessageType.BOAT_ACTION.getCode(), new BoatActionEncoder());\n composerMap.put(AC35MessageType.REQUEST.getCode(), new RequestEncoder());\n composerMap.put(AC35MessageType.COLOUR.getCode(), new ColourEncoder());\n\n return Collections.unmodifiableMap(composerMap);\n }", "@Test\n public void test2 ()\n {\n MyMap m = new MyMap();\n m.put(\"a\", \"1\");\n m.put(\"b\", \"2\");\n m.put(\"a\", \"3\");\n assertEquals(2, m.size());\n assertEquals(\"3\", m.get(\"a\"));\n assertEquals(\"2\", m.get(\"b\"));\n assertNull(m.get(\"c\"));\n }", "protected Map<String, Object> assertMap() {\n if (type == Type.LIST) {\n throw new FlexDataWrongTypeRuntimeException(type, Type.OBJECT); \n }\n if (entryCollectionMap == null) {\n entryCollectionMap = new LinkedHashMap<String, Object>();\n type = Type.OBJECT;\n }\n return entryCollectionMap;\n }", "public void setUp()\n {\n map = new Map(5, 5, null);\n }", "@Test\n public void test12() {\n cashRegister.addPennies(99);\n cashRegister.addDimes(2);\n cashRegister.addDimes(3);\n cashRegister.addFives(10);\n cashRegister.addNickels(4);\n cashRegister.addOnes(1);\n cashRegister.addQuarters(1);\n cashRegister.addTens(5);\n Map<Integer, Integer> map = new TreeMap<Integer, Integer>();\n map.put(1000,5);\n map.put(500,10);\n map.put(100,1);\n map.put(25,1);\n map.put(10,5);\n map.put(5,4);\n map.put(1,99);\n\n assertEquals(map,cashRegister.getContents());\n Map<Integer, Integer> map1 = new TreeMap<Integer, Integer>();\n map1 = cashRegister.getContents();\n map1.put(0,1);\n assertEquals(map,cashRegister.getContents());\n }", "RegularImmutableBiMap(Map.Entry<?, ?>[] entriesToAdd) {\n/* 104 */ int n = entriesToAdd.length;\n/* 105 */ int tableSize = Hashing.closedTableSize(n, 1.2D);\n/* 106 */ this.mask = tableSize - 1;\n/* 107 */ ImmutableMapEntry[] arrayOfImmutableMapEntry1 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 108 */ ImmutableMapEntry[] arrayOfImmutableMapEntry2 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 109 */ ImmutableMapEntry[] arrayOfImmutableMapEntry3 = (ImmutableMapEntry[])createEntryArray(n);\n/* 110 */ int hashCode = 0;\n/* */ \n/* 112 */ for (int i = 0; i < n; i++) {\n/* */ \n/* 114 */ Map.Entry<?, ?> entry = entriesToAdd[i];\n/* 115 */ K key = (K)entry.getKey();\n/* 116 */ V value = (V)entry.getValue();\n/* 117 */ CollectPreconditions.checkEntryNotNull(key, value);\n/* 118 */ int keyHash = key.hashCode();\n/* 119 */ int valueHash = value.hashCode();\n/* 120 */ int keyBucket = Hashing.smear(keyHash) & this.mask;\n/* 121 */ int valueBucket = Hashing.smear(valueHash) & this.mask;\n/* */ \n/* 123 */ ImmutableMapEntry<K, V> nextInKeyBucket = arrayOfImmutableMapEntry1[keyBucket];\n/* 124 */ for (ImmutableMapEntry<K, V> keyEntry = nextInKeyBucket; keyEntry != null; \n/* 125 */ keyEntry = keyEntry.getNextInKeyBucket()) {\n/* 126 */ checkNoConflict(!key.equals(keyEntry.getKey()), \"key\", entry, keyEntry);\n/* */ }\n/* 128 */ ImmutableMapEntry<K, V> nextInValueBucket = arrayOfImmutableMapEntry2[valueBucket];\n/* 129 */ for (ImmutableMapEntry<K, V> valueEntry = nextInValueBucket; valueEntry != null; \n/* 130 */ valueEntry = valueEntry.getNextInValueBucket()) {\n/* 131 */ checkNoConflict(!value.equals(valueEntry.getValue()), \"value\", entry, valueEntry);\n/* */ }\n/* 133 */ ImmutableMapEntry<K, V> newEntry = (nextInKeyBucket == null && nextInValueBucket == null) ? new ImmutableMapEntry.TerminalEntry<K, V>(key, value) : new NonTerminalBiMapEntry<K, V>(key, value, nextInKeyBucket, nextInValueBucket);\n/* */ \n/* */ \n/* */ \n/* 137 */ arrayOfImmutableMapEntry1[keyBucket] = newEntry;\n/* 138 */ arrayOfImmutableMapEntry2[valueBucket] = newEntry;\n/* 139 */ arrayOfImmutableMapEntry3[i] = newEntry;\n/* 140 */ hashCode += keyHash ^ valueHash;\n/* */ } \n/* */ \n/* 143 */ this.keyTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry1;\n/* 144 */ this.valueTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry2;\n/* 145 */ this.entries = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry3;\n/* 146 */ this.hashCode = hashCode;\n/* */ }", "public MapSum() {\n map = new HashMap<>();\n }", "public ImageFileNameMap()\r\n {\r\n prevMap = null;\r\n }", "@Test\n public void test4 ()\n {\n MyMap m = new MyMap();\n int SIZE = 10000;\n \n // Add SIZE mappings\n for (int i = 0; i < SIZE; i++)\n {\n m.put(i+\"\", (i*17)+\"\");\n }\n \n // Add some of the keys again with new values.\n for (int i = 0; i < SIZE; i+=2)\n {\n m.put(i+\"\", (i*18)+\"\");\n }\n \n // Remove every third element.\n for (int i = 0; i < SIZE; i += 3)\n {\n m.remove(i+\"\");\n }\n \n // Remove some of them again. This should make no difference.\n for (int i = 0; i < SIZE; i += 6)\n {\n m.remove(i+\"\");\n }\n \n // Assert that the size is as expected\n assertEquals(SIZE - (int) Math.ceil(SIZE / 3.0), m.size());\n \n // Assert that membership is as expected\n for (int i = 0; i < SIZE; i++)\n {\n if (i%3 == 0)\n {\n assertNull(m.get(i+\"\"));\n }\n else if (i%2 == 0)\n {\n assertEquals((i*18)+\"\", m.get(i+\"\"));\n }\n else\n {\n \tassertEquals((i*17)+\"\", m.get(i+\"\"));\n }\n }\n }", "private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}", "public CjtMap(){\r\n cjtMap = new TreeMap();\r\n sequence = new Sequence(1, 0, 1, false);\r\n }", "protected void warmupImpl(M newValue) {\n\n }", "public abstract String[] map() throws TooFewNocNodesException;", "public Object transform(Object input) {\n return iMap.get(input);\n }", "public static void loadCache() {\n\t\t // it is the temporary replacement to database. We should use DB instead\n\t Circle circle = new Circle();\n\t circle.setId(\"1\");\n\t shapeMap.put(circle.getId(),circle);\n\n\t Square square = new Square();\n\t square.setId(\"2\");\n\t shapeMap.put(square.getId(),square);\n\n\t Rectangle rectangle = new Rectangle();\n\t rectangle.setId(\"3\");\n\t \n\t Circle circle2 = new Circle();\n\t circle2.setId(\"4\");\n\t circle2.setType(\"Big Circle\");\n\t shapeMap.put(circle2.getId(),circle2);\n\t shapeMap.put(rectangle.getId(), rectangle);\n\t }", "public abstract void createMap();", "public void generateRandomMap() {\n\n\t}", "public MapToken() {\n\t\tmData = new FastMap<String, Object>();\n\t}", "private static void createTypeMap() {\n\n }", "private void mapValues() {\n\t\tmap.put(1, \"I\");\r\n\t\tmap.put(5, \"V\");\r\n\t\tmap.put(10, \"X\");\r\n\t\tmap.put(50, \"L\");\r\n\t\tmap.put(100, \"C\");\r\n\t\tmap.put(500, \"D\");\r\n\t\tmap.put(1000, \"M\");\r\n\t}", "InfiniteMap<K,V> build();", "public void init() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tfor(BusinessCategoryList categoryList : BusinessCategoryList.values()) {\n\t\t\tString[] names = categoryList.getValues().split(\",\");\n\t\t\tfor(String name : names) {\n\t\t\t\tget(name);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlog.debug(\"Dirty hack completed in {} ms.\", System.currentTimeMillis() - startTime);\n\t}", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public void testMapGet() {\r\n }", "public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}", "private void initMaps()\r\n\t{\r\n\t\tenergiesForCurrentKOppParity = new LinkedHashMap<Integer, Double>();\r\n\t\tinputBranchWithJ = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedR = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedP = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularP = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularR = new LinkedHashMap<Integer, Double>();\r\n\t\tupperEnergyValuesWithJ = new LinkedHashMap<Integer, Double>();\r\n\t}", "protected ForwardingMap() {}", "public TransientMap<K, V> asTransient() {\n IEditableCollection asEditable = (IEditableCollection) delegate;\n ITransientCollection asTransient = asEditable.asTransient();\n return new TransientMap<>((ITransientMap) asTransient);\n }", "public void method_6436() {\r\n super();\r\n this.field_6225 = new ArrayList();\r\n this.field_6226 = new HashMap();\r\n }", "private static ICacheValet getCacheValetJavaConcurrentMapImpl() {\n\n\t\t// Obtenemos la única instancia de esta implementación.\n\t\tICacheValet result = ACacheValet.getInstance();\n\n\t\t// Si es nula, la creamos.\n\t\tif (result == null) {\n\n\t\t\tresult = new ConcurrentMapCacheValet();\n\t\t\tif (result != null) {\n\t\t\t\tACacheValet.setInstance(result);\n\t\t\t}\n\n\t\t}\n\n\t\t// La devolvemos.\n\t\treturn result;\n\n\t}", "private void init() {\n\t\tmap = new LinkedHashMap<String, HeaderData>();\r\n\t\tList<HeaderData> list = config.getColumns();\r\n\t\tfor(HeaderData info: list){\r\n\t\t\tString id = info.getId();\r\n\t\t\tif(id == null) throw new IllegalArgumentException(\"Null id found for \"+info.getClass().getName());\r\n\t\t\t// Map the id to info\r\n\t\t\tmap.put(info.getId(), info);\r\n\t\t}\r\n\t}", "RegularImmutableBiMap(int n, ImmutableMapEntry.TerminalEntry<?, ?>[] entriesToAdd) {\n/* 56 */ int tableSize = Hashing.closedTableSize(n, 1.2D);\n/* 57 */ this.mask = tableSize - 1;\n/* 58 */ ImmutableMapEntry[] arrayOfImmutableMapEntry1 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 59 */ ImmutableMapEntry[] arrayOfImmutableMapEntry2 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 60 */ ImmutableMapEntry[] arrayOfImmutableMapEntry3 = (ImmutableMapEntry[])createEntryArray(n);\n/* 61 */ int hashCode = 0;\n/* */ \n/* 63 */ for (int i = 0; i < n; i++) {\n/* */ \n/* 65 */ ImmutableMapEntry.TerminalEntry<?, ?> terminalEntry = entriesToAdd[i];\n/* 66 */ K key = (K)terminalEntry.getKey();\n/* 67 */ V value = (V)terminalEntry.getValue();\n/* */ \n/* 69 */ int keyHash = key.hashCode();\n/* 70 */ int valueHash = value.hashCode();\n/* 71 */ int keyBucket = Hashing.smear(keyHash) & this.mask;\n/* 72 */ int valueBucket = Hashing.smear(valueHash) & this.mask;\n/* */ \n/* 74 */ ImmutableMapEntry<K, V> nextInKeyBucket = arrayOfImmutableMapEntry1[keyBucket];\n/* 75 */ for (ImmutableMapEntry<K, V> keyEntry = nextInKeyBucket; keyEntry != null; \n/* 76 */ keyEntry = keyEntry.getNextInKeyBucket()) {\n/* 77 */ checkNoConflict(!key.equals(keyEntry.getKey()), \"key\", terminalEntry, keyEntry);\n/* */ }\n/* 79 */ ImmutableMapEntry<K, V> nextInValueBucket = arrayOfImmutableMapEntry2[valueBucket];\n/* 80 */ for (ImmutableMapEntry<K, V> valueEntry = nextInValueBucket; valueEntry != null; \n/* 81 */ valueEntry = valueEntry.getNextInValueBucket()) {\n/* 82 */ checkNoConflict(!value.equals(valueEntry.getValue()), \"value\", terminalEntry, valueEntry);\n/* */ }\n/* 84 */ ImmutableMapEntry<K, V> newEntry = (nextInKeyBucket == null && nextInValueBucket == null) ? (ImmutableMapEntry)terminalEntry : new NonTerminalBiMapEntry<K, V>((ImmutableMapEntry)terminalEntry, nextInKeyBucket, nextInValueBucket);\n/* */ \n/* */ \n/* */ \n/* 88 */ arrayOfImmutableMapEntry1[keyBucket] = newEntry;\n/* 89 */ arrayOfImmutableMapEntry2[valueBucket] = newEntry;\n/* 90 */ arrayOfImmutableMapEntry3[i] = newEntry;\n/* 91 */ hashCode += keyHash ^ valueHash;\n/* */ } \n/* */ \n/* 94 */ this.keyTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry1;\n/* 95 */ this.valueTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry2;\n/* 96 */ this.entries = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry3;\n/* 97 */ this.hashCode = hashCode;\n/* */ }", "private OwBootstrapToIdMapping()\r\n {\r\n\r\n }", "protected abstract Map<String, Serializable> getEventKeyAndIdMap();", "public RBTMap() {\n RBT = new TreeMap<K,V>();\n \n }", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "@Test\n public void test3 ()\n {\n MyMap m = new MyMap();\n m.put(\"a\", \"7\");\n m.put(\"b\", \"14\");\n m.put(\"a\", \"21\");\n m.put(\"c\", \"28\");\n assertEquals(3, m.size());\n assertEquals(\"21\", m.get(\"a\"));\n assertEquals(\"14\", m.get(\"b\"));\n assertEquals(\"28\", m.get(\"c\"));\n \n m.remove(\"a\");\n assertEquals(2, m.size());\n assertNull(m.get(\"a\"));\n assertEquals(\"14\", m.get(\"b\"));\n assertEquals(\"28\", m.get(\"c\"));\n }", "private static void testMap(final OurMap<Integer, String> map) {\n System.out.printf(\"%n%s%n\", map.getClass());\n assert map.size() == 0;\n assert !map.containsKey(117);\n assert !map.containsKey(-2);\n assert map.get(117) == null;\n assert map.put(117, \"A\") == null;\n assert map.containsKey(117);\n assert map.get(117).equals(\"A\");\n assert map.put(17, \"B\") == null;\n assert map.size() == 2;\n assert map.containsKey(17);\n assert map.get(117).equals(\"A\");\n assert map.get(17).equals(\"B\");\n assert map.put(117, \"C\").equals(\"A\");\n assert map.containsKey(117);\n assert map.get(117).equals(\"C\");\n assert map.size() == 2;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n assert map.remove(117).equals(\"C\");\n assert !map.containsKey(117);\n assert map.get(117) == null;\n assert map.size() == 1;\n assert map.putIfAbsent(17, \"D\").equals(\"B\");\n assert map.get(17).equals(\"B\");\n assert map.size() == 1;\n assert map.containsKey(17);\n assert map.putIfAbsent(217, \"E\") == null;\n assert map.get(217).equals(\"E\");\n assert map.size() == 2;\n assert map.containsKey(217);\n assert map.putIfAbsent(34, \"F\") == null;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n }", "private UtilsCache() {\n\t\tsuper();\n\t}", "private Map<String, Mutator> createMutatorMap() {\n Map<String, Mutator> mutators = new HashMap<String, Mutator>();\n\n Method[] methods = type.getMethods();\n for (int i = 0; i < methods.length; i++) {\n Method method = methods[i];\n\n // implement some rules to decide if this method is a mutator or not\n\n // not interested in methods declared by Object\n if (method.getDeclaringClass() == Object.class) continue;\n\n // method name should start with 'get'\n String fieldName = mutatorMethodNameToFieldName(method.getName());\n if (fieldName == null) continue;\n\n // method should have a single parameter\n Class<?>[] parameterTypes = method.getParameterTypes();\n if (parameterTypes.length != 1) continue;\n Class<?> parameterType = parameterTypes[0];\n\n // method have void return type\n Class<?> returnType = method.getReturnType();\n if (returnType != Void.TYPE) continue;\n\n // everything checks out, add mutator to list\n mutators.put(fieldName, new MethodMutatorImpl(method, fieldName, parameterType));\n }\n\n return mutators;\n }", "public void mo30767z() {\n C8178t3.m39123c(entrySet().iterator());\n }", "public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }", "XClass getMapKey();", "public void testCache() {\n MethodKey m = new MethodKey(\"aclass\", \"amethod\", new Object[]{1, \"fads\", new Object()});\n String mValue = \"my fancy value\";\n MethodKey m1 = new MethodKey(\"aclass\", \"amethod1\", new Object[]{1, \"fads\", new Object()});\n String mValue1 = \"my fancy value1\";\n MethodKey m2 = new MethodKey(\"aclass\", \"amethod2\", new Object[]{1, \"fads\", new Object()});\n String mValue2 = \"my fancy value2\";\n\n GenericCache.setValue(m, mValue);\n GenericCache.setValue(m1, mValue1);\n GenericCache.setValue(m2, mValue2);\n\n assertEquals(GenericCache.getValue(m), mValue);\n assertEquals(GenericCache.getValue(m1), mValue1);\n assertEquals(GenericCache.getValue(m2), mValue2);\n }", "public TimeMap2() {\n map = new HashMap<>();\n }", "private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}", "public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}", "private Map<Integer, Integer> buildRenaming() {\n\t\tMap<Integer, Integer> map = new HashMap<>();\n\n\t\tfor(int i = 0; i < this.dimension; i++){\n\t\t\tfor(int j = 0; j < this.dimension; j++)\n\t\t\t\tmap.put(board_p[i][j].var(), board[i][j].var());\n\t\t}\n\n\t\treturn map;\n\t}", "private void makeInverse() {\n if (_map != null) {\n for (Map.Entry<Integer, Integer> e : _map.entrySet()) {\n _inverse.put(e.getValue(), e.getKey());\n }\n }\n }", "@Test\n public void test12() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1332,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test12\");\n MapIterator<Class<StringTokenizer>, StringTokenizer> mapIterator0 = IteratorUtils.emptyMapIterator();\n MapIterator<Class<StringTokenizer>, StringTokenizer> mapIterator1 = IteratorUtils.unmodifiableMapIterator(mapIterator0);\n assertNotSame(mapIterator1, mapIterator0);\n }", "protected Object readResolve() {\n calculateHashCode(keys);\n return this;\n }", "public ScopedMap() {\n\t\tmap = new ArrayList<HashMap<K, V>>();\n\n\t}", "private void mapPrecincts() {\r\n\t\tMap<Integer, Precinct> allPrecincts = new HashMap<Integer, Precinct>();\r\n\t\tMap<Integer, Precinct> currPrecincts;\r\n\t\tfor (CongressionalDistrict district : districts.values()) {\r\n\t\t\tcurrPrecincts = district.getPrecincts(); // lazy loaded\r\n\t\t\tif (currPrecincts == null) {\r\n\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t}\r\n\t\t\tallPrecincts.putAll(currPrecincts);\r\n\t\t\tfor (Precinct precinct : currPrecincts.values()) {\r\n\t\t\t\tprecinct.setConDistrict(district); // make sure the object is the same\r\n\t\t\t}\r\n\t\t}\r\n\t\tmapNeighborPrecincts(allPrecincts);\r\n\t\tstate.setPrecincts(allPrecincts); //allow for retrieving maps and data later\r\n\t}", "@Test\n public void test3() {\n Map<Integer, Integer> map1 = new TreeMap<Integer, Integer>();\n assertEquals(map1, cashRegister.getContents());\n }", "@Esercizio(nro = \"1.15\", pag = 29, descrizione = \"01) Scrivere una interfaccia che estenda Lookup\" +\n \"02) in modo tale da dichiarare im metodi add() e remove().\" +\n \"03) Implementare questa interfaccia in una nuova classe. \")\npublic interface LookupMigliorata extends Lookup { //01) = LookupMigliorata extends Lookup ---> estendo l'interfaccia\n //02) in modo tale da dichiarare im metodi add() e remove().\n public void add(String nome, Object obj); // inserito 2 parametri perche si aggiunge il nome = chiave e l'oggetto = valore hashmap\n //public nei metodi dell'interfaccia è opzionale\n public Object remove(String nome); //per rimuovere basta la stringa chiave ma restituisce Object rimosso.\n\n\n}", "private DataCache() {\n this.people = new HashMap<>();\n this.events = new HashMap<>();\n this.personEvents = new HashMap<>();\n this.currentPersonEvents = new HashMap<>();\n this.eventTypes = new ArrayList<>();\n this.childrenMap = new HashMap<>();\n this.maleSpouse = new HashSet<>();\n this.femaleSpouse = new HashSet<>();\n this.paternalAncestorsMales = new HashSet<>();\n this.paternalAncestorsFemales = new HashSet<>();\n this.maternalAncestorsMales = new HashSet<>();\n this.maternalAncestorsFemales = new HashSet<>();\n }", "public void init() throws IllegalArgumentException {\r\n\t\tthis.listItemMapper = ListItemMapper.listitemMapper();\r\n\t\tthis.itemMapper = ItemMapper.itemMapper();\r\n\t\tthis.personMapper = PersonMapper.personMapper();\r\n\t\tthis.shoppingListMapper = ShoppingListMapper.shoppinglistMapper();\r\n\t\tthis.storeMapper = StoreMapper.storeMapper();\r\n\t\tthis.groupMapper = GroupMapper.groupMapper();\r\n\t\tthis.responsibilityMapper = ResponsibilityMapper.responsibilityMapper();\r\n\t\tthis.favoriteItemMapper = FavoriteItemMapper.favoriteItemMapper();\r\n\r\n\t}", "private void initializePermissionsMap() {\n }", "StackManipulation cached();", "public abstract void map(String key, String value) throws Exception;", "public IntObjectHashMap() {\n resetToDefault();\n }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "protected void rehash() {\n // TODO: fill this in.\n //double number of maps, k, each time it is called\n\t\t//use MyBetterMap.makeMaps and MyLinearMap.getEntries\n\t\t//collect entries in the table, resize the table, then put the entries back in\n\t\tList<MyLinearMap<K, V>> newmaps = MyBetterMap.makeMaps(maps.size()*2);\n\t\tfor(MyLinearMap<K, V> curr: this.maps) {\n\t\t\tfor(Entry ent: MyLinearMap.getEntries()) {\n\t\t\t\tnewmaps.put(ent.key, ent.value);\n\t\t\t}\n\t\t}\n\t\tthis.maps = newmaps;\n\t\treturn;\n\t}" ]
[ "0.6384953", "0.6129069", "0.57505137", "0.57403046", "0.5605601", "0.55530584", "0.554987", "0.55488855", "0.5544588", "0.5510913", "0.550736", "0.5507062", "0.55050665", "0.54946065", "0.54930556", "0.5484071", "0.54837155", "0.54830766", "0.5438354", "0.54229736", "0.5422394", "0.5422277", "0.5418773", "0.5417923", "0.540533", "0.5405046", "0.54009247", "0.53890646", "0.5387025", "0.538212", "0.53811276", "0.53739876", "0.53557193", "0.5350553", "0.5350252", "0.5345724", "0.534524", "0.53416693", "0.5336246", "0.53295135", "0.5326568", "0.5320132", "0.53194284", "0.53189856", "0.53104717", "0.53068125", "0.5303951", "0.5297539", "0.52865934", "0.5267243", "0.52652544", "0.5262823", "0.52520216", "0.52514756", "0.5229349", "0.52275586", "0.52087706", "0.5198694", "0.519798", "0.5195114", "0.5194387", "0.5193156", "0.5192347", "0.5192164", "0.51907754", "0.51879877", "0.5185597", "0.51828223", "0.5181368", "0.51795685", "0.51770157", "0.5176466", "0.51725197", "0.51626104", "0.515693", "0.5150504", "0.514939", "0.51402205", "0.5138156", "0.5137217", "0.51366454", "0.5134304", "0.51250684", "0.5124248", "0.51210934", "0.5120712", "0.51205593", "0.5118352", "0.51154125", "0.51152486", "0.51147866", "0.51076025", "0.5105129", "0.5095554", "0.509261", "0.5091198", "0.50890356", "0.5087072", "0.5086726", "0.5082663", "0.5081162" ]
0.0
-1
A node where the jar with the basic Takamaka classes have been installed, along with a gamete and a manifest. It is a view of a Tendermint node, hence it uses the chain identifier and the validator set of the underlying Tendermint network.
@ThreadSafe public interface TendermintInitializedNode extends InitializedNode { /** * Yields a decorated node with basic Takamaka classes, gamete and manifest. * Uses the chain id and the validators * of the underlying Tendermint network. It uses a generic gas station. * * @param parent the node to decorate * @param consensus the consensus parameters that will be set for the node * @param takamakaCode the jar containing the basic Takamaka classes * @return a decorated view of {@code parent} * @throws TransactionRejectedException if some transaction that installs the jar or creates the accounts is rejected * @throws TransactionException if some transaction that installs the jar or creates the accounts fails * @throws CodeExecutionException if some transaction that installs the jar or creates the accounts throws an exception * @throws IOException if the jar file cannot be accessed * @throws SignatureException if some initialization request could not be signed * @throws InvalidKeyException if some key used for signing initialization transactions is invalid * @throws NoSuchAlgorithmException if the signing algorithm for the node is not available in the Java installation */ static TendermintInitializedNode of(TendermintBlockchain parent, ValidatorsConsensusConfig consensus, Path takamakaCode) throws TransactionRejectedException, TransactionException, CodeExecutionException, IOException, InvalidKeyException, SignatureException, NoSuchAlgorithmException { return new TendermintInitializedNodeImpl(parent, consensus, null, takamakaCode); } /** * Yields a decorated node with basic Takamaka classes, gamete and manifest. * Uses the chain id and the validators * of the underlying Tendermint network. It allows one to specify the gas station to use. * * @param parent the node to decorate * @param consensus the consensus parameters that will be set for the node * @param producerOfGasStation an algorithm that creates the builder of the gas station to be installed in the manifest of the node; * if this is {@code null}, a generic gas station is created * @param takamakaCode the jar containing the basic Takamaka classes * @return a decorated view of {@code parent} * @throws TransactionRejectedException if some transaction that installs the jar or creates the accounts is rejected * @throws TransactionException if some transaction that installs the jar or creates the accounts fails * @throws CodeExecutionException if some transaction that installs the jar or creates the accounts throws an exception * @throws IOException if the jar file cannot be accessed * @throws SignatureException if some initialization request could not be signed * @throws InvalidKeyException if some key used for signing initialization transactions is invalid * @throws NoSuchAlgorithmException if the signing algorithm for the node is not available in the Java installation */ static TendermintInitializedNode of(TendermintBlockchain parent, ValidatorsConsensusConfig consensus, ProducerOfStorageObject<ConsensusConfig> producerOfGasStation, Path takamakaCode, BigInteger redAmount) throws TransactionRejectedException, TransactionException, CodeExecutionException, IOException, InvalidKeyException, SignatureException, NoSuchAlgorithmException { return new TendermintInitializedNodeImpl(parent, consensus, producerOfGasStation, takamakaCode); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws Throwable {\n NeoConfig.setMagicNumber(new byte[]{0x01, 0x03, 0x00, 0x0}); // Magic number 769\n\n // Set up the connection to the neo-node\n Neow3j neow3j = Neow3j.build(new HttpService(\"http://localhost:40332\"));\n // Setup an account and wallet for signing the transaction. Make sure that the account has a\n // sufficient GAS balance to pay for the deployment.\n Account a = Account.fromWIF(\"L3kCZj6QbFPwbsVhxnB8nUERDy4mhCSrWJew4u5Qh5QmGMfnCTda\");\n Wallet w = Wallet.withAccounts(a);\n\n // Retrieve the contract files.\n NefFile nefFile = NefFile.readFromFile(new File(\"./build/neow3j/AxLabsToken.nef\"));\n ContractManifest manifest;\n try (FileInputStream s = new FileInputStream(\"./build/neow3j/AxLabsToken.manifest.json\")) {\n manifest = ObjectMapperFactory.getObjectMapper().readValue(s, ContractManifest.class);\n }\n\n // Deploy the contract's NEF and manifest. This creates, signs and send a transaction to\n // the neo-node.\n NeoSendRawTransaction response = new ManagementContract(neow3j).deploy(nefFile, manifest)\n .wallet(w)\n .signers(Signer.calledByEntry(a.getScriptHash()))\n .sign()\n .send();\n\n if (response.hasError()) {\n System.out.printf(\"Deployment was not successful. Error message from neo-node \"\n + \"was: '%s'\\n\", response.getError().getMessage());\n }\n \n ScriptHash scriptHash = SmartContract.getContractHash(a.getScriptHash(), nefFile.getScript());\n System.out.printf(\"Script hash of the deployd contract: %s\\n\", scriptHash.toString());\n }", "NodeChain createNodeChain();", "public static KubevirtNode buildKubevirtNode(Node node) {\n String hostname = node.getMetadata().getName();\n IpAddress managementIp = null;\n IpAddress dataIp = null;\n\n for (NodeAddress nodeAddress:node.getStatus().getAddresses()) {\n if (nodeAddress.getType().equals(INTERNAL_IP)) {\n managementIp = IpAddress.valueOf(nodeAddress.getAddress());\n dataIp = IpAddress.valueOf(nodeAddress.getAddress());\n }\n }\n\n Set<String> rolesFull = node.getMetadata().getLabels().keySet().stream()\n .filter(l -> l.contains(K8S_ROLE))\n .collect(Collectors.toSet());\n\n KubevirtNode.Type nodeType = WORKER;\n\n for (String roleStr : rolesFull) {\n String role = roleStr.split(\"/\")[1];\n if (MASTER.name().equalsIgnoreCase(role)) {\n nodeType = MASTER;\n break;\n }\n }\n\n // start to parse kubernetes annotation\n Map<String, String> annots = node.getMetadata().getAnnotations();\n String physnetConfig = annots.get(PHYSNET_CONFIG_KEY);\n String gatewayConfig = annots.get(GATEWAY_CONFIG_KEY);\n String dataIpStr = annots.get(DATA_IP_KEY);\n Set<KubevirtPhyInterface> phys = new HashSet<>();\n String gatewayBridgeName = null;\n try {\n if (physnetConfig != null) {\n JsonArray configJson = JsonArray.readFrom(physnetConfig);\n\n for (int i = 0; i < configJson.size(); i++) {\n JsonObject object = configJson.get(i).asObject();\n String network = object.get(NETWORK_KEY).asString();\n String intf = object.get(INTERFACE_KEY).asString();\n\n if (network != null && intf != null) {\n String physBridgeId;\n if (object.get(PHYS_BRIDGE_ID) != null) {\n physBridgeId = object.get(PHYS_BRIDGE_ID).asString();\n } else {\n physBridgeId = genDpidFromName(network + intf + hostname);\n log.trace(\"host {} physnet dpid for network {} intf {} is null so generate dpid {}\",\n hostname, network, intf, physBridgeId);\n }\n\n phys.add(DefaultKubevirtPhyInterface.builder()\n .network(network)\n .intf(intf)\n .physBridge(DeviceId.deviceId(physBridgeId))\n .build());\n }\n }\n }\n\n if (dataIpStr != null) {\n dataIp = IpAddress.valueOf(dataIpStr);\n }\n\n if (gatewayConfig != null) {\n JsonNode jsonNode = new ObjectMapper().readTree(gatewayConfig);\n\n nodeType = GATEWAY;\n gatewayBridgeName = jsonNode.get(GATEWAY_BRIDGE_NAME).asText();\n }\n } catch (JsonProcessingException e) {\n log.error(\"Failed to parse physnet config or gateway config object\", e);\n }\n\n // if the node is taint with kubevirt.io key configured,\n // we mark this node as OTHER type, and do not add it into the cluster\n NodeSpec spec = node.getSpec();\n if (spec.getTaints() != null) {\n for (Taint taint : spec.getTaints()) {\n String effect = taint.getEffect();\n String key = taint.getKey();\n String value = taint.getValue();\n\n if (StringUtils.equals(effect, NO_SCHEDULE_EFFECT) &&\n StringUtils.equals(key, KUBEVIRT_IO_KEY) &&\n StringUtils.equals(value, DRAINING_VALUE)) {\n nodeType = OTHER;\n }\n }\n }\n\n return DefaultKubevirtNode.builder()\n .hostname(hostname)\n .managementIp(managementIp)\n .dataIp(dataIp)\n .type(nodeType)\n .state(KubevirtNodeState.ON_BOARDED)\n .phyIntfs(phys)\n .gatewayBridgeName(gatewayBridgeName)\n .build();\n }", "public static void main(String[] args) throws UnknownHostException, IOException \r\n{\t\r\n Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); //Adds Bouncycastle as a security provider of various cryptographic algorithm used later\r\n Shivani=new Wallet(\"Shivani\",\"1234\"); //Initialzing the wallets with their userID and passwords\r\n Pushkar=new Wallet(\"Pushkar\",\"1234\");\r\n walletsHash.put(Shivani.PublicAddress,Shivani); //Put these wallets into wallet hash for fast access\r\n walletsHash.put(Pushkar.PublicAddress, Pushkar);\r\n n=new Node(8332); //Starting the network for comunnication on port 8332 \r\n n.socket.joinGroup(n.address); //Joining the network\r\n bchain=new blockChain(); //Creating the blockchain with genesis block\r\n n.send(bchain.chain.get(0),n.address,n.port); //Transamit this block over the network\r\n db=new Dbconnect();\r\n n.receiveBlock();\r\n db.AddBlockToDB(bchain.chain.get(0)); //Add this block to database\r\n \r\n /*\r\n Getting login to your wallet\r\n */\r\n Scanner in=new Scanner(System.in);\r\n System.out.println(\"Welcome to Wallet\\nPlease Enter Your UserID \");\r\n String userId=in.next();\r\n in.nextLine();\r\n boolean flag=walletsHash.containsKey(userId);\r\n if(flag)\r\n {\r\n System.out.println(\"Enter Password\");\r\n String password=in.next();\r\n Wallet w=walletsHash.get(userId);\r\n if(w.password.equalsIgnoreCase(password))\r\n {\r\n \r\n \r\n System.out.println(\"Welcome \"+w.name+\" to Wallet\");\r\n int ch;\r\n //Displays the full menu for the user\r\n do\r\n {\r\n System.out.println(\"Select from following operation\\n1.Check Balance\\n2.Send Funds\\n3.Receive Transaction \\n4.Receive Block \\n5.Start mining \\n6.View Blockchain\\n7.Logout\");\r\n Scanner sc=new Scanner(System.in);\r\n ch=sc.nextInt();\r\n sc.nextLine();\r\n switch(ch)\r\n {\r\n //Check wallet balance\r\n case 1:System.out.println(w.name+\" you have \"+w.getBalance()+\"BTC in your Wallet\");\r\n break;\r\n // Send funds to a user on Bitcoin network\r\n case 2:System.out.println(\"Enter Public address of Receiver\");\r\n String receiver=sc.next();\r\n sc.nextLine();\r\n if(walletsHash.containsKey(receiver))\r\n {\r\n System.out.println(\"Enter Amount to be send:\");\r\n float amount=sc.nextFloat();\r\n Transaction t=w.sendFunds(walletsHash.get(receiver).PublicAddress,amount);\r\n if(t.verifiySignature(w.publicKey))\r\n {\r\n t.processTransaction();\r\n System.out.println(\"Tranaction created with transaction id = \"+t.getTransactionId()+\" and transmitted to the Bitcoin network\");\r\n n.send(t,n.address,n.port);\r\n n.receiveTransaction();\r\n }\r\n else\r\n {\r\n System.err.println(\"Signature verification fails!!!!\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Receiver exist In Network\");\r\n }\r\n break;\r\n case 3: System.out.println(\"Receiving transaction from network.........\");\r\n Transaction rt=n.receiveTransaction();\r\n System.out.println(rt.toString());\r\n for(TransactionOutput o:rt.outputs)\r\n {\r\n UTXOs.put(o.id, o);\r\n }\r\n for(TransactionInput i:rt.inputs)\r\n {\r\n if(i.UTXO==null)\r\n continue;\r\n UTXOs.remove(i); \r\n }\r\n \r\n db.AddTransactionToDB(rt);\r\n System.out.println(\"Transaction received sucessfully\");\r\n break;\r\n case 4: System.out.println(\"Receiving block from network.........\");\r\n Block b=n.receiveBlock();\r\n if(bchain.isBlockValid(b, difficulty))\r\n {\r\n bchain.addtochain(b);\r\n db.AddBlockToDB(b);\r\n }\r\n else\r\n {\r\n System.err.println(\"Block is not valid\");\r\n }\r\n System.out.println(\"Block received sucessfully\");\r\n break;\r\n case 5: \r\n Block mblock=w.startMining();\r\n System.out.println(\"New mined block created successfully and broadcasted over the network\");\r\n db.AddBlockToDB(mblock);\r\n bchain.addtochain(mblock);\r\n n.send(mblock,n.address,n.port);\r\n n.receiveBlock();\r\n break;\r\n case 6:\r\n bchain.toString();\r\n break;\r\n case 7:\r\n System.out.println(\"Thanks for using this application\\n Have a nice day ^_^\");\r\n break;\r\n default:\r\n System.out.println(\"This option is not valid\\nPlease try again...\");\r\n }\r\n }while(ch!=7); \r\n }\r\n else\r\n {\r\n System.out.println(\"Incorrect Password!!!\\nTry again\");\r\n }\r\n \r\n }\r\n else\r\n {\r\n System.out.println(\"No Such Wallet Exists!!!!!\\nTry Again\");\r\n }\r\n \r\n}", "@Test\n public void testKubevirtComputeNodeDecode() throws IOException {\n KubevirtNode node = getKubevirtNode(\"KubevirtWorkerNode.json\");\n\n assertThat(node.hostname(), is(\"worker-01\"));\n assertThat(node.type().name(), is(\"WORKER\"));\n assertThat(node.managementIp().toString(), is(\"172.16.130.4\"));\n assertThat(node.dataIp().toString(), is(\"172.16.130.4\"));\n assertThat(node.intgBridge().toString(), is(\"of:00000000000000a1\"));\n assertThat(node.tunBridge().toString(), is(\"of:00000000000000a2\"));\n assertThat(node.phyIntfs().size(), is(2));\n\n node.phyIntfs().forEach(intf -> {\n if (intf.network().equals(\"mgmtnetwork\")) {\n assertThat(intf.intf(), is(\"eth3\"));\n assertThat(intf.physBridge().toString(), is(\"of:00000000000000a3\"));\n }\n if (intf.network().equals(\"oamnetwork\")) {\n assertThat(intf.intf(), is(\"eth4\"));\n assertThat(intf.physBridge().toString(), is(\"of:00000000000000a4\"));\n }\n });\n }", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n System.out.println(\"___________________\");\n Node n1 = deserialize();\n System.out.println(n1 == n1.node.node);\n }", "public static void main(String[] args) throws Exception{\n Web3j web3 = Web3j.build(new HttpService(\"https://kovan.infura.io/mew\"));\n\n\n\n String sm1addr=\"0x16039e45f59c46507ba4c1c8a40e829af281256a\";\n String sm2addr=\"0x1286470032cc2729774f5cf966770b450825f104\";\n\n String privkey=\"8e1a2ec8d8e729183e028207c068ec9a4655512017e456b301a18d5bbc350775\";\n String pubkey=\"\";\n\n BigInteger privateKeyInBT = new BigInteger(privkey, 16);\n\n ECKeyPair aPair = ECKeyPair.create(privateKeyInBT);\n\n BigInteger publicKeyInBT = aPair.getPublicKey();\n\n String sPublickeyInHex = publicKeyInBT.toString(16);\n pubkey=sPublickeyInHex;\n\n\n\n\n Credentials credentials = Credentials.create(privkey,pubkey);//WalletUtils.loadCredentials(\"cfvggkrubhcg\",\"MezhBlockchain/keyMetamask.json\");\n //TransactionManager tm=;\n //Sum sumc=Sum.deploy(web3,credentials,big(1),big(200000)).send();\n //System.out.println(sumc.getContractAddress());\n //Sum sumc=Sum.load(\"\",web3,credentials,big(1),big(200000));System.out.println(\"CONNECTED!\");\n Sm1 sm1=Sm1.load(sm1addr,web3,credentials,big(1),big(2000000));\n System.out.println(\"SM1 IS READY!\");\n //Sm2 sm2=Sm2.load(sm2addr,web3,credentials,big(0),big(2000000));\n //System.out.println(\"SM2 IS READY!\");\n\n sm1.transwerMessage(\"0xafd6f3dd885ee964365f891d91733133b6c93017\",new byte[]{1,2,3,100}).send();\n System.out.println(\"OK!\");\n }", "Node(Path workDir) {\n vaultManager = new VaultManager(new PersistentVaultService(workDir.resolve(\"vault\")));\n\n clusterService = createClusterService(addr);\n\n raftManager = new Loza(clusterService, workDir);\n\n List<RootKey<?, ?>> rootKeys = List.of(NodeConfiguration.KEY);\n\n List<ConfigurationStorage> localStorage = List.of(new LocalConfigurationStorage(vaultManager));\n\n cfgManager = new ConfigurationManager(rootKeys, localStorage);\n\n metaStorageManager = new MetaStorageManager(\n vaultManager,\n cfgManager,\n clusterService,\n raftManager\n );\n\n cfgStorage = new DistributedConfigurationStorage(metaStorageManager, vaultManager);\n }", "public Manifest() {}", "entities.Torrent.NodeId getNode();", "entities.Torrent.NodeId getNode();", "CyRootNetwork getRootNetwork();", "TargetChain createTargetChain();", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tParser parser = new Parser(args[0]);\n\n\t\t// Check validity of origin node input by the user.\n\n\t\ttry {\n\t\t\tInteger.parseInt(args[1]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err.println(\"Error: Invalid input format. Origin node must be an integer.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tif ((Integer.parseInt(args[1]) < 0) || (Integer.parseInt(args[1]) >= parser.parseGraph().size())) {\n\t\t\tSystem.err.println(\"Error: Please submit a valid origin node\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t//Ask the user to set the network delay\n\t\tScanner reader = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Set minimum delay of the network (in ms): \");\n\t\twhile (!reader.hasNextInt()) {\n\t\t\t\n\t\t\tSystem.out.println(\"The minimum delay has to be an integer (in ms)\");\n\t\t\treader.next();\n\t\t}\n\t\tint minDelay = reader.nextInt(); // Set minimum delay\n\n\t\tSystem.out.println(\"Set maximum delay of the network (in ms): \");\n\n\t\twhile (!reader.hasNextInt()) {\n\t\t\t\n\t\t\tSystem.out.println(\"The maximum delay has to be an integer (in ms)\");\n\t\t\treader.next();\n\t\t}\n\t\tint maxDelay = reader.nextInt(); // Set maximum delay\n\n\t\t// close scanner\n\t\treader.close();\n\n\t\t// Checks on the user input\n\t\tif (minDelay >= maxDelay) {\n\t\t\tSystem.err.println(\"Error: The minimum delay should be smaller than the maximum delay\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tif ((minDelay <= 0) || (maxDelay <= 0)) {\n\t\t\tSystem.err.println(\"Error: The delay of the network should be a positive number\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t// Sanitize user input\n\t\tif (args.length != 2) {\n\t\t\tSystem.err.println(\"Error: Please submit 2 command line arguments\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t// Parse graph and deploy nodes and network on the cluster class.\n\n\t\tNetwork network = new Network(minDelay, maxDelay);\n\t\n\n\t\t// Deploy cluster\n\t\tCluster cluster = new Cluster(parser.parseGraph(), network);\n\n\t\tcluster.deployNetwork();\n\t\tcluster.deployNodes();\n \n System.out.println(\"Nodes Msg Received IDs\");\n\t\t// Start protocol\n\t\tcluster.startPushA(Integer.parseInt(args[1]));\n\n\t}", "@Test\n public void testKubevirtGatewayNodeDecode() throws IOException {\n KubevirtNode node = getKubevirtNode(\"KubevirtGatewayNode.json\");\n\n assertThat(node.hostname(), is(\"gateway-01\"));\n assertThat(node.type().name(), is(\"GATEWAY\"));\n assertThat(node.managementIp().toString(), is(\"172.16.130.4\"));\n assertThat(node.dataIp().toString(), is(\"172.16.130.4\"));\n assertThat(node.intgBridge().toString(), is(\"of:00000000000000a1\"));\n assertThat(node.tunBridge().toString(), is(\"of:00000000000000a2\"));\n assertThat(node.gatewayBridgeName(), is(\"gateway\"));\n }", "public static GraphNode createGraphNodeForActorConnector() {\n GraphNode graphNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNode.addContained(childNode);\n }\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(0, 0));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create an actor\n Actor actor = new ActorImpl();\n\n\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n actor.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(actor);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "abstract AbstractRuntimeServiceNode<T> newRuntimeNode();", "public interface BitcoinNetworkConfiguration {\n /**\n * Network that we are using as Default in the platform\n */\n public static final NetworkParameters DEFAULT_NETWORK_PARAMETERS = RegTestParams.get();\n\n /**\n * RegTest client configuration\n */\n public static final String BITCOIN_FULL_NODE_1_IP = \"52.32.106.35\";\n public static final int BITCOIN_FULL_NODE_1_PORT = 19020;\n public static final String BITCOIN_FULL_NODE_2_IP = \"52.34.184.168\";\n public static final int BITCOIN_FULL_NODE_2_PORT = 19030;\n\n /**\n * Agent name and version\n */\n public static final String USER_AGENT_NAME = \"Fermat Agent\";\n public static final String USER_AGENT_VERSION =\"2.1.0\";\n\n /**\n * amount of blocks depth to consider transaction IRReversible\n */\n public static final int IRREVERSIBLE_BLOCK_DEPTH = 3;\n\n /**\n * Amount of Timeout minutes for broadcasting transactions\n */\n public static final int TRANSACTION_BROADCAST_TIMEOUT = 5;\n}", "Manifest createManifest();", "public AddonInstaller() {\n \n }", "@Test\n public void testKubevirtComputeNodeEncode() {\n KubevirtPhyInterface phyIntf1 = DefaultKubevirtPhyInterface.builder()\n .network(\"mgmtnetwork\")\n .intf(\"eth3\")\n .physBridge(DEVICE_ID_1)\n .build();\n\n KubevirtPhyInterface phyIntf2 = DefaultKubevirtPhyInterface.builder()\n .network(\"oamnetwork\")\n .intf(\"eth4\")\n .physBridge(DEVICE_ID_2)\n .build();\n\n KubevirtNode node = DefaultKubevirtNode.builder()\n .hostname(\"worker\")\n .type(KubevirtNode.Type.WORKER)\n .state(KubevirtNodeState.INIT)\n .managementIp(IpAddress.valueOf(\"10.10.10.1\"))\n .intgBridge(DeviceId.deviceId(\"br-int\"))\n .tunBridge(DeviceId.deviceId(\"br-tun\"))\n .dataIp(IpAddress.valueOf(\"20.20.20.2\"))\n .phyIntfs(ImmutableList.of(phyIntf1, phyIntf2))\n .build();\n\n ObjectNode nodeJson = kubevirtNodeCodec.encode(node, context);\n assertThat(nodeJson, matchesKubevirtNode(node));\n }", "protected CreateMachineNodeModel() {\r\n super(0,1);\r\n }", "public static void main(String[] args) throws InterruptedException, IOException, ClassNotFoundException {\n\t\tbyte[] id = new byte[160];\r\n\t\tif (args[0].equals(\"bootstraper\")) {\r\n\t\t\tfor (int i = 0; i < id.length; i++)\r\n\t\t\t\tid[i] = 0;\r\n\t\t\tint port = Integer.parseInt(args[1]);\r\n\t\t\tNode n = new Node(id, port);\r\n\t\t\tRouting.initialize(n);\r\n//\t\t\tbyte[] bid = new byte[160];\r\n//\t\t\tfor (int i = 0; i < 160; i++)\r\n//\t\t\t\tbid[i] = 0;\r\n//\t\t\tbid[159] = 1;\r\n//\t\t\tRouting.insert(b);\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tbyte[] bid = new byte[160];\r\n\t\t\tfor (int i = 0; i < id.length; i++)\r\n\t\t\t\tbid[i] = 0;\r\n\t\t\tfor (int i = 0; i < id.length; i++)\r\n\t\t\t{\r\n\t\t\t\t\tid[i] = 0;\r\n\t\t\t}\r\n\t\t\tid[2] = 1;\r\n\t\t\tint port = Integer.parseInt(args[0]);\r\n\t\t\tmyPort = port;\r\n\t\t\tNode n = new Node(id, port);\r\n\t\t\tRouting.initialize(n);\r\n\t\t\tNode b = new Node(bid, InetAddress.getByName(args[1]), Integer.parseInt(args[2]));\r\n\t\t\tRouting.insert(b);\r\n\r\n\t\t\tPing p = new Ping(bid, b.getIP(), b.getPort());\r\n\t\t\tThread t = new Thread(p);\r\n\t\t\tt.start();\r\n\t\t}\r\n\r\n\t\tbyte[] id1 = new byte[160];\r\n\t\tfor (int i = 0; i < id1.length; i++)\r\n\t\t\tid1[i] = 0;\r\n\t\tid1[159]=1;\r\n\t\t\r\n\t\tbyte[] id2 = new byte[160];\r\n\t\tfor (int i = 0; i < id1.length; i++)\r\n\t\t\tid2[i] = 0;\r\n\r\n\t\tid2[158]=1;\r\n\t\t\r\n\t\tbyte[] id3 = new byte[160];\r\n\t\tfor (int i = 0; i < id1.length; i++)\r\n\t\t\tid3[i] = 0;\r\n\r\n\t\tid3[158]=1;\r\n\t\tid3[159]=1;\r\n\t\t\r\n\t\tbyte[] id4 = new byte[160];\r\n\t\tfor (int i = 0; i < id1.length; i++)\r\n\t\t\tid4[i] = 0;\r\n\r\n\t\tid4[157]=1;\r\n\t\t\r\n\t\tbyte[] id5= new byte[160];\r\n\t\tfor (int i = 0; i < id1.length; i++)\r\n\t\t\tid5[i] = 0;\r\n\r\n\t\tid5[157]=1;\r\n\t\tid5[159]=1;\r\n\t\t\r\n\t\tNode n1 = new Node(id1, InetAddress.getByName(\"192.168.2.134\"), 8000);\r\n\t\tNode n2 = new Node(id2, InetAddress.getByName(\"192.168.2.146\"), 8000);\r\n\t\tNode n4 = new Node(id4, InetAddress.getByName(\"192.168.34.154\"), 8000);\r\n\t\tNode n3 = new Node(id3, InetAddress.getByName(\"192.168.34.146\"), 8000);\r\n\t\tNode n5 = new Node(id5, InetAddress.getByName(\"192.168.34.147\"), 8000);\r\n\t\t\r\n\r\n\t\tRouting.insert(n1);\r\n//\t\tRouting.insert(n2);\r\n//\t\tRouting.insert(n4);\r\n//\t\tRouting.insert(n3);\r\n//\t\tRouting.insert(n5);\r\n\t\t\r\n\t\tReceivingThread thread;\r\n\t\tif (args[0].equals(\"bootstraper\"))\r\n\t\t\tthread = new ReceivingThread(Integer.parseInt(args[1]));\r\n\t\telse\r\n\t\t\tthread = new ReceivingThread(Integer.parseInt(args[0]));\r\n\t\tThread real = new Thread(thread);\r\n\t\treal.start();\r\n\t\t//\r\n\t\tTextInterface.main(null);\r\n\r\n\t}", "public interface SwiftClusterNode {\n\n String getId();\n\n String getName();\n\n String getIp();\n\n int getPort();\n\n}", "public Node getTB(String id,Node parent){\n try{\n HashMap hash= (HashMap)client.execute(\"getResource\", new Object[]{id});\n String path = hash.get(\"path\").toString();\n String name = path.split(\"/\")[path.split(\"/\").length-1];\n byte type = 1;\n if(path.indexOf(\"/\")==-1){\n type = 0;\n }\n Node node = new Node(id,path,name,parent,null,type);\n Object[] children = (Object[])hash.get(\"children\");\n for(Object o:children){\n node.addChild(o.toString(), null);\n }\n HashMap meta = (HashMap)hash.get(\"meta\");\n if(meta!=null&&meta.size()!=0){\n Set keys = meta.keySet();\n Iterator iter = keys.iterator();\n while(iter.hasNext()){\n String n = iter.next().toString();\n if(n.equals(\"_epnames_\"+RunnerRepository.user)){\n node.setEPs(meta.get(n).toString());\n continue;\n }\n node.addProperty(n, meta.get(n).toString());\n }\n }\n return node;\n }catch(Exception e){\n System.out.println(\"requested id: \"+id);\n try{System.out.println(\"server respons: \"+client.execute(\"getResource\", new Object[]{id}));}\n catch(Exception ex){ex.printStackTrace();}\n e.printStackTrace();\n return null;\n }\n }", "public Node program() {\r\n\r\n this.CheckError(\"PROGRAM\");\r\n\r\n\r\n Node n_program = new Node(\"program\");\r\n n_program.setParent(null);\r\n System.out.println(\"read node from app: \"+n_program.getData());\r\n System.out.println(\" :parent: \"+n_program.getParent());\r\n\r\n Node n_declarations = n_program.setChildren(\"decl list\");\r\n System.out.println(\"read node from app :data: \"+n_declarations.getData());\r\n System.out.println(\" :parent: \"+n_declarations.getParent().getData());\r\n\r\n this.declaration(n_declarations);\r\n\r\n this.CheckError(\"BEGIN\");\r\n\r\n Node n_statementSequence = n_program.setChildren(\"stmt list\");\r\n this.statementSequence(n_statementSequence);\r\n\r\n this.CheckError(\"END\");\r\n\r\n System.out.println(\":::: Parsing Successful Hamid ::::\");\r\n\r\n return n_program;\r\n //////////////////////////////////////////// writeout PROGRAM treee -----------------\r\n //////////////////////////////////////////////////////////////////////////////////////\r\n ///////////////////////////////////////////////////////////////////////////////////\r\n ///////////output test generator\r\n /////////////////////////////////////////////////////////////////////////////////\r\n\r\n\r\n /*Node iteration = n_program;\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\"|\");\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n iteration = n_program.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\" \");\r\n iteration = n_program.getChildren(1);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println(\"\");\r\n System.out.print(\" \");\r\n Node iteration0= iteration.getChildren(0);\r\n for (int i=0; i<iteration0.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration1= iteration.getChildren(1);\r\n for (int i=0; i<iteration1.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration2= iteration.getChildren(2);\r\n for (int i=0; i<iteration2.childrenSize();i++){\r\n System.out.print(\"| \"+iteration2.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration3= iteration.getChildren(3);\r\n for (int i=0; i<iteration3.childrenSize();i++){\r\n System.out.print(\"| \"+iteration3.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" \");\r\n Node iteration4= iteration.getChildren(4);\r\n for (int i=0; i<iteration4.childrenSize();i++){\r\n System.out.print(\"| \"+iteration4.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.println();\r\n System.out.print(\" w\\n\");\r\n System.out.print(\" \");\r\n Node iteration0w= iteration2.getChildren(0);\r\n for (int i=0; i<iteration0w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration0w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n Node iteration1w= iteration2.getChildren(1);\r\n for (int i=0; i<iteration1w.childrenSize();i++){\r\n System.out.print(\"| \"+iteration1w.getChildren(i).getData()+\" |\");\r\n }\r\n System.out.print(\"\\n \");\r\n iteration= iteration0w.getChildren(0);\r\n for (int i=0; i<iteration.childrenSize();i++){\r\n System.out.print(\"| \"+iteration.getChildren(i).getData()+\" |\");\r\n }*/\r\n\r\n }", "MeshAuthChain getAuthChain();", "entities.Torrent.NodeIdOrBuilder getNodeOrBuilder();", "entities.Torrent.NodeIdOrBuilder getNodeOrBuilder();", "Chain getChain();", "public final EObject ruleChain() throws RecognitionException {\n EObject current = null;\n\n EObject this_TargetChain_0 = null;\n\n EObject this_NodeChain_1 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalNgt.g:767:2: ( (this_TargetChain_0= ruleTargetChain | this_NodeChain_1= ruleNodeChain ) )\n // InternalNgt.g:768:2: (this_TargetChain_0= ruleTargetChain | this_NodeChain_1= ruleNodeChain )\n {\n // InternalNgt.g:768:2: (this_TargetChain_0= ruleTargetChain | this_NodeChain_1= ruleNodeChain )\n int alt15=2;\n int LA15_0 = input.LA(1);\n\n if ( (LA15_0==RULE_TESTTARGET_STRING) ) {\n switch ( input.LA(2) ) {\n case RULE_STEREOTYPE_STRING:\n {\n int LA15_3 = input.LA(3);\n\n if ( ((LA15_3>=21 && LA15_3<=23)) ) {\n alt15=2;\n }\n else if ( ((LA15_3>=19 && LA15_3<=20)) ) {\n alt15=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 15, 3, input);\n\n throw nvae;\n }\n }\n break;\n case 21:\n case 22:\n case 23:\n {\n alt15=2;\n }\n break;\n case 19:\n case 20:\n {\n alt15=1;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 15, 1, input);\n\n throw nvae;\n }\n\n }\n else if ( (LA15_0==16) ) {\n alt15=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 15, 0, input);\n\n throw nvae;\n }\n switch (alt15) {\n case 1 :\n // InternalNgt.g:769:3: this_TargetChain_0= ruleTargetChain\n {\n\n \t\t\tnewCompositeNode(grammarAccess.getChainAccess().getTargetChainParserRuleCall_0());\n \t\t\n pushFollow(FOLLOW_2);\n this_TargetChain_0=ruleTargetChain();\n\n state._fsp--;\n\n\n \t\t\tcurrent = this_TargetChain_0;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n\n }\n break;\n case 2 :\n // InternalNgt.g:778:3: this_NodeChain_1= ruleNodeChain\n {\n\n \t\t\tnewCompositeNode(grammarAccess.getChainAccess().getNodeChainParserRuleCall_1());\n \t\t\n pushFollow(FOLLOW_2);\n this_NodeChain_1=ruleNodeChain();\n\n state._fsp--;\n\n\n \t\t\tcurrent = this_NodeChain_1;\n \t\t\tafterParserOrEnumRuleCall();\n \t\t\n\n }\n break;\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public interface BlockchainPackage extends EPackage {\n\t/**\n\t * The package name.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tString eNAME = \"blockchain\";\n\n\t/**\n\t * The package namespace URI.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tString eNS_URI = \"http://www.example.org/blockchain\";\n\n\t/**\n\t * The package namespace name.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tString eNS_PREFIX = \"blockchain\";\n\n\t/**\n\t * The singleton instance of the package.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tBlockchainPackage eINSTANCE = blockchain.impl.BlockchainPackageImpl.init();\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.AplicacionImpl <em>Aplicacion</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.AplicacionImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getAplicacion()\n\t * @generated\n\t */\n\tint APLICACION = 0;\n\n\t/**\n\t * The feature id for the '<em><b>Smartcontract</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint APLICACION__SMARTCONTRACT = 0;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint APLICACION__NAME = 1;\n\n\t/**\n\t * The feature id for the '<em><b>Tipodato</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint APLICACION__TIPODATO = 2;\n\n\t/**\n\t * The number of structural features of the '<em>Aplicacion</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint APLICACION_FEATURE_COUNT = 3;\n\n\t/**\n\t * The number of operations of the '<em>Aplicacion</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint APLICACION_OPERATION_COUNT = 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.TipoDatoImpl <em>Tipo Dato</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.TipoDatoImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getTipoDato()\n\t * @generated\n\t */\n\tint TIPO_DATO = 10;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint TIPO_DATO__NAME = 0;\n\n\t/**\n\t * The number of structural features of the '<em>Tipo Dato</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint TIPO_DATO_FEATURE_COUNT = 1;\n\n\t/**\n\t * The number of operations of the '<em>Tipo Dato</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint TIPO_DATO_OPERATION_COUNT = 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.EntidadImpl <em>Entidad</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.EntidadImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getEntidad()\n\t * @generated\n\t */\n\tint ENTIDAD = 1;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ENTIDAD__NAME = TIPO_DATO__NAME;\n\n\t/**\n\t * The feature id for the '<em><b>Atributos</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ENTIDAD__ATRIBUTOS = TIPO_DATO_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Entidad</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ENTIDAD_FEATURE_COUNT = TIPO_DATO_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Entidad</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ENTIDAD_OPERATION_COUNT = TIPO_DATO_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.NamedElementImpl <em>Named Element</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.NamedElementImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getNamedElement()\n\t * @generated\n\t */\n\tint NAMED_ELEMENT = 23;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint NAMED_ELEMENT__NAME = 0;\n\n\t/**\n\t * The number of structural features of the '<em>Named Element</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint NAMED_ELEMENT_FEATURE_COUNT = 1;\n\n\t/**\n\t * The number of operations of the '<em>Named Element</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint NAMED_ELEMENT_OPERATION_COUNT = 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.AtributoImpl <em>Atributo</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.AtributoImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getAtributo()\n\t * @generated\n\t */\n\tint ATRIBUTO = 2;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ATRIBUTO__NAME = NAMED_ELEMENT__NAME;\n\n\t/**\n\t * The feature id for the '<em><b>Tipodato</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ATRIBUTO__TIPODATO = NAMED_ELEMENT_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Atributo</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ATRIBUTO_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Atributo</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ATRIBUTO_OPERATION_COUNT = NAMED_ELEMENT_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.SmartContractImpl <em>Smart Contract</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.SmartContractImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getSmartContract()\n\t * @generated\n\t */\n\tint SMART_CONTRACT = 3;\n\n\t/**\n\t * The feature id for the '<em><b>Entidades</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint SMART_CONTRACT__ENTIDADES = 0;\n\n\t/**\n\t * The feature id for the '<em><b>Operaciones</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint SMART_CONTRACT__OPERACIONES = 1;\n\n\t/**\n\t * The feature id for the '<em><b>Estado</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint SMART_CONTRACT__ESTADO = 2;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint SMART_CONTRACT__NAME = 3;\n\n\t/**\n\t * The number of structural features of the '<em>Smart Contract</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint SMART_CONTRACT_FEATURE_COUNT = 4;\n\n\t/**\n\t * The number of operations of the '<em>Smart Contract</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint SMART_CONTRACT_OPERATION_COUNT = 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.OperacionImpl <em>Operacion</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.OperacionImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getOperacion()\n\t * @generated\n\t */\n\tint OPERACION = 4;\n\n\t/**\n\t * The feature id for the '<em><b>Parametros</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint OPERACION__PARAMETROS = 0;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint OPERACION__NAME = 1;\n\n\t/**\n\t * The feature id for the '<em><b>Es User Defined</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint OPERACION__ES_USER_DEFINED = 2;\n\n\t/**\n\t * The feature id for the '<em><b>Retorno</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint OPERACION__RETORNO = 3;\n\n\t/**\n\t * The feature id for the '<em><b>Lineas</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint OPERACION__LINEAS = 4;\n\n\t/**\n\t * The number of structural features of the '<em>Operacion</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint OPERACION_FEATURE_COUNT = 5;\n\n\t/**\n\t * The number of operations of the '<em>Operacion</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint OPERACION_OPERATION_COUNT = 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ParametroImpl <em>Parametro</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ParametroImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getParametro()\n\t * @generated\n\t */\n\tint PARAMETRO = 5;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint PARAMETRO__NAME = NAMED_ELEMENT__NAME;\n\n\t/**\n\t * The feature id for the '<em><b>Tipodato</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint PARAMETRO__TIPODATO = NAMED_ELEMENT_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Parametro</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint PARAMETRO_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Parametro</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint PARAMETRO_OPERATION_COUNT = NAMED_ELEMENT_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.EstadoImpl <em>Estado</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.EstadoImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getEstado()\n\t * @generated\n\t */\n\tint ESTADO = 6;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ESTADO__NAME = NAMED_ELEMENT__NAME;\n\n\t/**\n\t * The feature id for the '<em><b>Tipodato</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ESTADO__TIPODATO = NAMED_ELEMENT_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Estado</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ESTADO_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Estado</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ESTADO_OPERATION_COUNT = NAMED_ELEMENT_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.Linea <em>Linea</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.Linea\n\t * @see blockchain.impl.BlockchainPackageImpl#getLinea()\n\t * @generated\n\t */\n\tint LINEA = 22;\n\n\t/**\n\t * The number of structural features of the '<em>Linea</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LINEA_FEATURE_COUNT = 0;\n\n\t/**\n\t * The number of operations of the '<em>Linea</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LINEA_OPERATION_COUNT = 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.Sentencia <em>Sentencia</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.Sentencia\n\t * @see blockchain.impl.BlockchainPackageImpl#getSentencia()\n\t * @generated\n\t */\n\tint SENTENCIA = 7;\n\n\t/**\n\t * The number of structural features of the '<em>Sentencia</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint SENTENCIA_FEATURE_COUNT = LINEA_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of operations of the '<em>Sentencia</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint SENTENCIA_OPERATION_COUNT = LINEA_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.Expresion <em>Expresion</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.Expresion\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresion()\n\t * @generated\n\t */\n\tint EXPRESION = 15;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_FEATURE_COUNT = LINEA_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of operations of the '<em>Expresion</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_OPERATION_COUNT = LINEA_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionBinariaImpl <em>Expresion Binaria</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionBinariaImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionBinaria()\n\t * @generated\n\t */\n\tint EXPRESION_BINARIA = 21;\n\n\t/**\n\t * The feature id for the '<em><b>Izq</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_BINARIA__IZQ = EXPRESION_FEATURE_COUNT + 0;\n\n\t/**\n\t * The feature id for the '<em><b>Der</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_BINARIA__DER = EXPRESION_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Binaria</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_BINARIA_FEATURE_COUNT = EXPRESION_FEATURE_COUNT + 2;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Binaria</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_BINARIA_OPERATION_COUNT = EXPRESION_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionLogicaImpl <em>Expresion Logica</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionLogicaImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionLogica()\n\t * @generated\n\t */\n\tint EXPRESION_LOGICA = 8;\n\n\t/**\n\t * The feature id for the '<em><b>Izq</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_LOGICA__IZQ = EXPRESION_BINARIA__IZQ;\n\n\t/**\n\t * The feature id for the '<em><b>Der</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_LOGICA__DER = EXPRESION_BINARIA__DER;\n\n\t/**\n\t * The feature id for the '<em><b>Operador</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_LOGICA__OPERADOR = EXPRESION_BINARIA_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Logica</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_LOGICA_FEATURE_COUNT = EXPRESION_BINARIA_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Logica</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_LOGICA_OPERATION_COUNT = EXPRESION_BINARIA_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.PrimitivoImpl <em>Primitivo</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.PrimitivoImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getPrimitivo()\n\t * @generated\n\t */\n\tint PRIMITIVO = 9;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint PRIMITIVO__NAME = TIPO_DATO__NAME;\n\n\t/**\n\t * The feature id for the '<em><b>Tipo</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint PRIMITIVO__TIPO = TIPO_DATO_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Primitivo</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint PRIMITIVO_FEATURE_COUNT = TIPO_DATO_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Primitivo</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint PRIMITIVO_OPERATION_COUNT = TIPO_DATO_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionAritmeticaImpl <em>Expresion Aritmetica</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionAritmeticaImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionAritmetica()\n\t * @generated\n\t */\n\tint EXPRESION_ARITMETICA = 11;\n\n\t/**\n\t * The feature id for the '<em><b>Izq</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_ARITMETICA__IZQ = EXPRESION_BINARIA__IZQ;\n\n\t/**\n\t * The feature id for the '<em><b>Der</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_ARITMETICA__DER = EXPRESION_BINARIA__DER;\n\n\t/**\n\t * The feature id for the '<em><b>Operador</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_ARITMETICA__OPERADOR = EXPRESION_BINARIA_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Aritmetica</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_ARITMETICA_FEATURE_COUNT = EXPRESION_BINARIA_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Aritmetica</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_ARITMETICA_OPERATION_COUNT = EXPRESION_BINARIA_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.VariableImpl <em>Variable</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.VariableImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getVariable()\n\t * @generated\n\t */\n\tint VARIABLE = 12;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint VARIABLE__NAME = SENTENCIA_FEATURE_COUNT + 0;\n\n\t/**\n\t * The feature id for the '<em><b>Tipodato</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint VARIABLE__TIPODATO = SENTENCIA_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of structural features of the '<em>Variable</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint VARIABLE_FEATURE_COUNT = SENTENCIA_FEATURE_COUNT + 2;\n\n\t/**\n\t * The number of operations of the '<em>Variable</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint VARIABLE_OPERATION_COUNT = SENTENCIA_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.MapaImpl <em>Mapa</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.MapaImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getMapa()\n\t * @generated\n\t */\n\tint MAPA = 13;\n\n\t/**\n\t * The feature id for the '<em><b>Name</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint MAPA__NAME = TIPO_DATO__NAME;\n\n\t/**\n\t * The feature id for the '<em><b>Tipo Dato Key</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint MAPA__TIPO_DATO_KEY = TIPO_DATO_FEATURE_COUNT + 0;\n\n\t/**\n\t * The feature id for the '<em><b>Tipo Dato Value</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint MAPA__TIPO_DATO_VALUE = TIPO_DATO_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of structural features of the '<em>Mapa</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint MAPA_FEATURE_COUNT = TIPO_DATO_FEATURE_COUNT + 2;\n\n\t/**\n\t * The number of operations of the '<em>Mapa</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint MAPA_OPERATION_COUNT = TIPO_DATO_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.IfImpl <em>If</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.IfImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getIf()\n\t * @generated\n\t */\n\tint IF = 14;\n\n\t/**\n\t * The feature id for the '<em><b>Expresionlogica</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint IF__EXPRESIONLOGICA = SENTENCIA_FEATURE_COUNT + 0;\n\n\t/**\n\t * The feature id for the '<em><b>Lineas</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint IF__LINEAS = SENTENCIA_FEATURE_COUNT + 1;\n\n\t/**\n\t * The feature id for the '<em><b>Else Lines</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint IF__ELSE_LINES = SENTENCIA_FEATURE_COUNT + 2;\n\n\t/**\n\t * The number of structural features of the '<em>If</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint IF_FEATURE_COUNT = SENTENCIA_FEATURE_COUNT + 3;\n\n\t/**\n\t * The number of operations of the '<em>If</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint IF_OPERATION_COUNT = SENTENCIA_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionNumericaDoubleImpl <em>Expresion Numerica Double</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionNumericaDoubleImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionNumericaDouble()\n\t * @generated\n\t */\n\tint EXPRESION_NUMERICA_DOUBLE = 16;\n\n\t/**\n\t * The feature id for the '<em><b>Value</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_NUMERICA_DOUBLE__VALUE = EXPRESION_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Numerica Double</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_NUMERICA_DOUBLE_FEATURE_COUNT = EXPRESION_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Numerica Double</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_NUMERICA_DOUBLE_OPERATION_COUNT = EXPRESION_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionTextoImpl <em>Expresion Texto</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionTextoImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionTexto()\n\t * @generated\n\t */\n\tint EXPRESION_TEXTO = 17;\n\n\t/**\n\t * The feature id for the '<em><b>Value</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_TEXTO__VALUE = EXPRESION_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Texto</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_TEXTO_FEATURE_COUNT = EXPRESION_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Texto</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_TEXTO_OPERATION_COUNT = EXPRESION_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionBooleanImpl <em>Expresion Boolean</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionBooleanImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionBoolean()\n\t * @generated\n\t */\n\tint EXPRESION_BOOLEAN = 18;\n\n\t/**\n\t * The feature id for the '<em><b>Value</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_BOOLEAN__VALUE = EXPRESION_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Boolean</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_BOOLEAN_FEATURE_COUNT = EXPRESION_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Boolean</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_BOOLEAN_OPERATION_COUNT = EXPRESION_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionReferenciadaImpl <em>Expresion Referenciada</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionReferenciadaImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionReferenciada()\n\t * @generated\n\t */\n\tint EXPRESION_REFERENCIADA = 19;\n\n\t/**\n\t * The feature id for the '<em><b>Id</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_REFERENCIADA__ID = EXPRESION_FEATURE_COUNT + 0;\n\n\t/**\n\t * The feature id for the '<em><b>Referencia</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_REFERENCIADA__REFERENCIA = EXPRESION_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Referenciada</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_REFERENCIADA_FEATURE_COUNT = EXPRESION_FEATURE_COUNT + 2;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Referenciada</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_REFERENCIADA_OPERATION_COUNT = EXPRESION_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionRelacionalImpl <em>Expresion Relacional</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionRelacionalImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionRelacional()\n\t * @generated\n\t */\n\tint EXPRESION_RELACIONAL = 20;\n\n\t/**\n\t * The feature id for the '<em><b>Izq</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_RELACIONAL__IZQ = EXPRESION_BINARIA__IZQ;\n\n\t/**\n\t * The feature id for the '<em><b>Der</b></em>' containment reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_RELACIONAL__DER = EXPRESION_BINARIA__DER;\n\n\t/**\n\t * The feature id for the '<em><b>Operador Relacional</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_RELACIONAL__OPERADOR_RELACIONAL = EXPRESION_BINARIA_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Relacional</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_RELACIONAL_FEATURE_COUNT = EXPRESION_BINARIA_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Relacional</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_RELACIONAL_OPERATION_COUNT = EXPRESION_BINARIA_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ElseImpl <em>Else</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ElseImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getElse()\n\t * @generated\n\t */\n\tint ELSE = 24;\n\n\t/**\n\t * The feature id for the '<em><b>Lineas</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ELSE__LINEAS = 0;\n\n\t/**\n\t * The number of structural features of the '<em>Else</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ELSE_FEATURE_COUNT = 1;\n\n\t/**\n\t * The number of operations of the '<em>Else</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ELSE_OPERATION_COUNT = 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.RetornoImpl <em>Retorno</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.RetornoImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getRetorno()\n\t * @generated\n\t */\n\tint RETORNO = 25;\n\n\t/**\n\t * The feature id for the '<em><b>Linea Retorno</b></em>' containment reference list.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint RETORNO__LINEA_RETORNO = SENTENCIA_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Retorno</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint RETORNO_FEATURE_COUNT = SENTENCIA_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Retorno</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint RETORNO_OPERATION_COUNT = SENTENCIA_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.impl.ExpresionNumericaIntImpl <em>Expresion Numerica Int</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.impl.ExpresionNumericaIntImpl\n\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionNumericaInt()\n\t * @generated\n\t */\n\tint EXPRESION_NUMERICA_INT = 26;\n\n\t/**\n\t * The feature id for the '<em><b>Value</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_NUMERICA_INT__VALUE = EXPRESION_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>Expresion Numerica Int</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_NUMERICA_INT_FEATURE_COUNT = EXPRESION_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>Expresion Numerica Int</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint EXPRESION_NUMERICA_INT_OPERATION_COUNT = EXPRESION_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.OperadorLogico <em>Operador Logico</em>}' enum.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.OperadorLogico\n\t * @see blockchain.impl.BlockchainPackageImpl#getOperadorLogico()\n\t * @generated\n\t */\n\tint OPERADOR_LOGICO = 27;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.Operador <em>Operador</em>}' enum.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.Operador\n\t * @see blockchain.impl.BlockchainPackageImpl#getOperador()\n\t * @generated\n\t */\n\tint OPERADOR = 28;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.DatoPrimitivo <em>Dato Primitivo</em>}' enum.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.DatoPrimitivo\n\t * @see blockchain.impl.BlockchainPackageImpl#getDatoPrimitivo()\n\t * @generated\n\t */\n\tint DATO_PRIMITIVO = 29;\n\n\t/**\n\t * The meta object id for the '{@link blockchain.OperadorRelacion <em>Operador Relacion</em>}' enum.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see blockchain.OperadorRelacion\n\t * @see blockchain.impl.BlockchainPackageImpl#getOperadorRelacion()\n\t * @generated\n\t */\n\tint OPERADOR_RELACION = 30;\n\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Aplicacion <em>Aplicacion</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Aplicacion</em>'.\n\t * @see blockchain.Aplicacion\n\t * @generated\n\t */\n\tEClass getAplicacion();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.Aplicacion#getSmartcontract <em>Smartcontract</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Smartcontract</em>'.\n\t * @see blockchain.Aplicacion#getSmartcontract()\n\t * @see #getAplicacion()\n\t * @generated\n\t */\n\tEReference getAplicacion_Smartcontract();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.Aplicacion#getName <em>Name</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Name</em>'.\n\t * @see blockchain.Aplicacion#getName()\n\t * @see #getAplicacion()\n\t * @generated\n\t */\n\tEAttribute getAplicacion_Name();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.Aplicacion#getTipodato <em>Tipodato</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Tipodato</em>'.\n\t * @see blockchain.Aplicacion#getTipodato()\n\t * @see #getAplicacion()\n\t * @generated\n\t */\n\tEReference getAplicacion_Tipodato();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Entidad <em>Entidad</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Entidad</em>'.\n\t * @see blockchain.Entidad\n\t * @generated\n\t */\n\tEClass getEntidad();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.Entidad#getAtributos <em>Atributos</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Atributos</em>'.\n\t * @see blockchain.Entidad#getAtributos()\n\t * @see #getEntidad()\n\t * @generated\n\t */\n\tEReference getEntidad_Atributos();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Atributo <em>Atributo</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Atributo</em>'.\n\t * @see blockchain.Atributo\n\t * @generated\n\t */\n\tEClass getAtributo();\n\n\t/**\n\t * Returns the meta object for the reference '{@link blockchain.Atributo#getTipodato <em>Tipodato</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Tipodato</em>'.\n\t * @see blockchain.Atributo#getTipodato()\n\t * @see #getAtributo()\n\t * @generated\n\t */\n\tEReference getAtributo_Tipodato();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.SmartContract <em>Smart Contract</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Smart Contract</em>'.\n\t * @see blockchain.SmartContract\n\t * @generated\n\t */\n\tEClass getSmartContract();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.SmartContract#getEntidades <em>Entidades</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Entidades</em>'.\n\t * @see blockchain.SmartContract#getEntidades()\n\t * @see #getSmartContract()\n\t * @generated\n\t */\n\tEReference getSmartContract_Entidades();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.SmartContract#getOperaciones <em>Operaciones</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Operaciones</em>'.\n\t * @see blockchain.SmartContract#getOperaciones()\n\t * @see #getSmartContract()\n\t * @generated\n\t */\n\tEReference getSmartContract_Operaciones();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.SmartContract#getEstado <em>Estado</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Estado</em>'.\n\t * @see blockchain.SmartContract#getEstado()\n\t * @see #getSmartContract()\n\t * @generated\n\t */\n\tEReference getSmartContract_Estado();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.SmartContract#getName <em>Name</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Name</em>'.\n\t * @see blockchain.SmartContract#getName()\n\t * @see #getSmartContract()\n\t * @generated\n\t */\n\tEAttribute getSmartContract_Name();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Operacion <em>Operacion</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Operacion</em>'.\n\t * @see blockchain.Operacion\n\t * @generated\n\t */\n\tEClass getOperacion();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.Operacion#getParametros <em>Parametros</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Parametros</em>'.\n\t * @see blockchain.Operacion#getParametros()\n\t * @see #getOperacion()\n\t * @generated\n\t */\n\tEReference getOperacion_Parametros();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.Operacion#getName <em>Name</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Name</em>'.\n\t * @see blockchain.Operacion#getName()\n\t * @see #getOperacion()\n\t * @generated\n\t */\n\tEAttribute getOperacion_Name();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.Operacion#isEsUserDefined <em>Es User Defined</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Es User Defined</em>'.\n\t * @see blockchain.Operacion#isEsUserDefined()\n\t * @see #getOperacion()\n\t * @generated\n\t */\n\tEAttribute getOperacion_EsUserDefined();\n\n\t/**\n\t * Returns the meta object for the reference '{@link blockchain.Operacion#getRetorno <em>Retorno</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Retorno</em>'.\n\t * @see blockchain.Operacion#getRetorno()\n\t * @see #getOperacion()\n\t * @generated\n\t */\n\tEReference getOperacion_Retorno();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.Operacion#getLineas <em>Lineas</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Lineas</em>'.\n\t * @see blockchain.Operacion#getLineas()\n\t * @see #getOperacion()\n\t * @generated\n\t */\n\tEReference getOperacion_Lineas();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Parametro <em>Parametro</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Parametro</em>'.\n\t * @see blockchain.Parametro\n\t * @generated\n\t */\n\tEClass getParametro();\n\n\t/**\n\t * Returns the meta object for the reference '{@link blockchain.Parametro#getTipodato <em>Tipodato</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Tipodato</em>'.\n\t * @see blockchain.Parametro#getTipodato()\n\t * @see #getParametro()\n\t * @generated\n\t */\n\tEReference getParametro_Tipodato();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Estado <em>Estado</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Estado</em>'.\n\t * @see blockchain.Estado\n\t * @generated\n\t */\n\tEClass getEstado();\n\n\t/**\n\t * Returns the meta object for the reference '{@link blockchain.Estado#getTipodato <em>Tipodato</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Tipodato</em>'.\n\t * @see blockchain.Estado#getTipodato()\n\t * @see #getEstado()\n\t * @generated\n\t */\n\tEReference getEstado_Tipodato();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Sentencia <em>Sentencia</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Sentencia</em>'.\n\t * @see blockchain.Sentencia\n\t * @generated\n\t */\n\tEClass getSentencia();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionLogica <em>Expresion Logica</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Logica</em>'.\n\t * @see blockchain.ExpresionLogica\n\t * @generated\n\t */\n\tEClass getExpresionLogica();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.ExpresionLogica#getOperador <em>Operador</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Operador</em>'.\n\t * @see blockchain.ExpresionLogica#getOperador()\n\t * @see #getExpresionLogica()\n\t * @generated\n\t */\n\tEAttribute getExpresionLogica_Operador();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Primitivo <em>Primitivo</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Primitivo</em>'.\n\t * @see blockchain.Primitivo\n\t * @generated\n\t */\n\tEClass getPrimitivo();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.Primitivo#getTipo <em>Tipo</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Tipo</em>'.\n\t * @see blockchain.Primitivo#getTipo()\n\t * @see #getPrimitivo()\n\t * @generated\n\t */\n\tEAttribute getPrimitivo_Tipo();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.TipoDato <em>Tipo Dato</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Tipo Dato</em>'.\n\t * @see blockchain.TipoDato\n\t * @generated\n\t */\n\tEClass getTipoDato();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.TipoDato#getName <em>Name</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Name</em>'.\n\t * @see blockchain.TipoDato#getName()\n\t * @see #getTipoDato()\n\t * @generated\n\t */\n\tEAttribute getTipoDato_Name();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionAritmetica <em>Expresion Aritmetica</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Aritmetica</em>'.\n\t * @see blockchain.ExpresionAritmetica\n\t * @generated\n\t */\n\tEClass getExpresionAritmetica();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.ExpresionAritmetica#getOperador <em>Operador</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Operador</em>'.\n\t * @see blockchain.ExpresionAritmetica#getOperador()\n\t * @see #getExpresionAritmetica()\n\t * @generated\n\t */\n\tEAttribute getExpresionAritmetica_Operador();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Variable <em>Variable</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Variable</em>'.\n\t * @see blockchain.Variable\n\t * @generated\n\t */\n\tEClass getVariable();\n\n\t/**\n\t * Returns the meta object for the reference '{@link blockchain.Variable#getTipodato <em>Tipodato</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Tipodato</em>'.\n\t * @see blockchain.Variable#getTipodato()\n\t * @see #getVariable()\n\t * @generated\n\t */\n\tEReference getVariable_Tipodato();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Mapa <em>Mapa</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Mapa</em>'.\n\t * @see blockchain.Mapa\n\t * @generated\n\t */\n\tEClass getMapa();\n\n\t/**\n\t * Returns the meta object for the reference '{@link blockchain.Mapa#getTipoDatoKey <em>Tipo Dato Key</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Tipo Dato Key</em>'.\n\t * @see blockchain.Mapa#getTipoDatoKey()\n\t * @see #getMapa()\n\t * @generated\n\t */\n\tEReference getMapa_TipoDatoKey();\n\n\t/**\n\t * Returns the meta object for the reference '{@link blockchain.Mapa#getTipoDatoValue <em>Tipo Dato Value</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Tipo Dato Value</em>'.\n\t * @see blockchain.Mapa#getTipoDatoValue()\n\t * @see #getMapa()\n\t * @generated\n\t */\n\tEReference getMapa_TipoDatoValue();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.If <em>If</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>If</em>'.\n\t * @see blockchain.If\n\t * @generated\n\t */\n\tEClass getIf();\n\n\t/**\n\t * Returns the meta object for the containment reference '{@link blockchain.If#getExpresionlogica <em>Expresionlogica</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference '<em>Expresionlogica</em>'.\n\t * @see blockchain.If#getExpresionlogica()\n\t * @see #getIf()\n\t * @generated\n\t */\n\tEReference getIf_Expresionlogica();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.If#getLineas <em>Lineas</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Lineas</em>'.\n\t * @see blockchain.If#getLineas()\n\t * @see #getIf()\n\t * @generated\n\t */\n\tEReference getIf_Lineas();\n\n\t/**\n\t * Returns the meta object for the containment reference '{@link blockchain.If#getElseLines <em>Else Lines</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference '<em>Else Lines</em>'.\n\t * @see blockchain.If#getElseLines()\n\t * @see #getIf()\n\t * @generated\n\t */\n\tEReference getIf_ElseLines();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Expresion <em>Expresion</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion</em>'.\n\t * @see blockchain.Expresion\n\t * @generated\n\t */\n\tEClass getExpresion();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionNumericaDouble <em>Expresion Numerica Double</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Numerica Double</em>'.\n\t * @see blockchain.ExpresionNumericaDouble\n\t * @generated\n\t */\n\tEClass getExpresionNumericaDouble();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.ExpresionNumericaDouble#getValue <em>Value</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Value</em>'.\n\t * @see blockchain.ExpresionNumericaDouble#getValue()\n\t * @see #getExpresionNumericaDouble()\n\t * @generated\n\t */\n\tEAttribute getExpresionNumericaDouble_Value();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionTexto <em>Expresion Texto</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Texto</em>'.\n\t * @see blockchain.ExpresionTexto\n\t * @generated\n\t */\n\tEClass getExpresionTexto();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.ExpresionTexto#getValue <em>Value</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Value</em>'.\n\t * @see blockchain.ExpresionTexto#getValue()\n\t * @see #getExpresionTexto()\n\t * @generated\n\t */\n\tEAttribute getExpresionTexto_Value();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionBoolean <em>Expresion Boolean</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Boolean</em>'.\n\t * @see blockchain.ExpresionBoolean\n\t * @generated\n\t */\n\tEClass getExpresionBoolean();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.ExpresionBoolean#isValue <em>Value</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Value</em>'.\n\t * @see blockchain.ExpresionBoolean#isValue()\n\t * @see #getExpresionBoolean()\n\t * @generated\n\t */\n\tEAttribute getExpresionBoolean_Value();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionReferenciada <em>Expresion Referenciada</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Referenciada</em>'.\n\t * @see blockchain.ExpresionReferenciada\n\t * @generated\n\t */\n\tEClass getExpresionReferenciada();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.ExpresionReferenciada#getId <em>Id</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Id</em>'.\n\t * @see blockchain.ExpresionReferenciada#getId()\n\t * @see #getExpresionReferenciada()\n\t * @generated\n\t */\n\tEAttribute getExpresionReferenciada_Id();\n\n\t/**\n\t * Returns the meta object for the reference '{@link blockchain.ExpresionReferenciada#getReferencia <em>Referencia</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Referencia</em>'.\n\t * @see blockchain.ExpresionReferenciada#getReferencia()\n\t * @see #getExpresionReferenciada()\n\t * @generated\n\t */\n\tEReference getExpresionReferenciada_Referencia();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionRelacional <em>Expresion Relacional</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Relacional</em>'.\n\t * @see blockchain.ExpresionRelacional\n\t * @generated\n\t */\n\tEClass getExpresionRelacional();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.ExpresionRelacional#getOperadorRelacional <em>Operador Relacional</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Operador Relacional</em>'.\n\t * @see blockchain.ExpresionRelacional#getOperadorRelacional()\n\t * @see #getExpresionRelacional()\n\t * @generated\n\t */\n\tEAttribute getExpresionRelacional_OperadorRelacional();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionBinaria <em>Expresion Binaria</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Binaria</em>'.\n\t * @see blockchain.ExpresionBinaria\n\t * @generated\n\t */\n\tEClass getExpresionBinaria();\n\n\t/**\n\t * Returns the meta object for the containment reference '{@link blockchain.ExpresionBinaria#getIzq <em>Izq</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference '<em>Izq</em>'.\n\t * @see blockchain.ExpresionBinaria#getIzq()\n\t * @see #getExpresionBinaria()\n\t * @generated\n\t */\n\tEReference getExpresionBinaria_Izq();\n\n\t/**\n\t * Returns the meta object for the containment reference '{@link blockchain.ExpresionBinaria#getDer <em>Der</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference '<em>Der</em>'.\n\t * @see blockchain.ExpresionBinaria#getDer()\n\t * @see #getExpresionBinaria()\n\t * @generated\n\t */\n\tEReference getExpresionBinaria_Der();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Linea <em>Linea</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Linea</em>'.\n\t * @see blockchain.Linea\n\t * @generated\n\t */\n\tEClass getLinea();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.NamedElement <em>Named Element</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Named Element</em>'.\n\t * @see blockchain.NamedElement\n\t * @generated\n\t */\n\tEClass getNamedElement();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.NamedElement#getName <em>Name</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Name</em>'.\n\t * @see blockchain.NamedElement#getName()\n\t * @see #getNamedElement()\n\t * @generated\n\t */\n\tEAttribute getNamedElement_Name();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Else <em>Else</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Else</em>'.\n\t * @see blockchain.Else\n\t * @generated\n\t */\n\tEClass getElse();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.Else#getLineas <em>Lineas</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Lineas</em>'.\n\t * @see blockchain.Else#getLineas()\n\t * @see #getElse()\n\t * @generated\n\t */\n\tEReference getElse_Lineas();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.Retorno <em>Retorno</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Retorno</em>'.\n\t * @see blockchain.Retorno\n\t * @generated\n\t */\n\tEClass getRetorno();\n\n\t/**\n\t * Returns the meta object for the containment reference list '{@link blockchain.Retorno#getLineaRetorno <em>Linea Retorno</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the containment reference list '<em>Linea Retorno</em>'.\n\t * @see blockchain.Retorno#getLineaRetorno()\n\t * @see #getRetorno()\n\t * @generated\n\t */\n\tEReference getRetorno_LineaRetorno();\n\n\t/**\n\t * Returns the meta object for class '{@link blockchain.ExpresionNumericaInt <em>Expresion Numerica Int</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>Expresion Numerica Int</em>'.\n\t * @see blockchain.ExpresionNumericaInt\n\t * @generated\n\t */\n\tEClass getExpresionNumericaInt();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link blockchain.ExpresionNumericaInt#getValue <em>Value</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Value</em>'.\n\t * @see blockchain.ExpresionNumericaInt#getValue()\n\t * @see #getExpresionNumericaInt()\n\t * @generated\n\t */\n\tEAttribute getExpresionNumericaInt_Value();\n\n\t/**\n\t * Returns the meta object for enum '{@link blockchain.OperadorLogico <em>Operador Logico</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for enum '<em>Operador Logico</em>'.\n\t * @see blockchain.OperadorLogico\n\t * @generated\n\t */\n\tEEnum getOperadorLogico();\n\n\t/**\n\t * Returns the meta object for enum '{@link blockchain.Operador <em>Operador</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for enum '<em>Operador</em>'.\n\t * @see blockchain.Operador\n\t * @generated\n\t */\n\tEEnum getOperador();\n\n\t/**\n\t * Returns the meta object for enum '{@link blockchain.DatoPrimitivo <em>Dato Primitivo</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for enum '<em>Dato Primitivo</em>'.\n\t * @see blockchain.DatoPrimitivo\n\t * @generated\n\t */\n\tEEnum getDatoPrimitivo();\n\n\t/**\n\t * Returns the meta object for enum '{@link blockchain.OperadorRelacion <em>Operador Relacion</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for enum '<em>Operador Relacion</em>'.\n\t * @see blockchain.OperadorRelacion\n\t * @generated\n\t */\n\tEEnum getOperadorRelacion();\n\n\t/**\n\t * Returns the factory that creates the instances of the model.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the factory that creates the instances of the model.\n\t * @generated\n\t */\n\tBlockchainFactory getBlockchainFactory();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * Defines literals for the meta objects that represent\n\t * <ul>\n\t * <li>each class,</li>\n\t * <li>each feature of each class,</li>\n\t * <li>each operation of each class,</li>\n\t * <li>each enum,</li>\n\t * <li>and each data type</li>\n\t * </ul>\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tinterface Literals {\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.AplicacionImpl <em>Aplicacion</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.AplicacionImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getAplicacion()\n\t\t * @generated\n\t\t */\n\t\tEClass APLICACION = eINSTANCE.getAplicacion();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Smartcontract</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference APLICACION__SMARTCONTRACT = eINSTANCE.getAplicacion_Smartcontract();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute APLICACION__NAME = eINSTANCE.getAplicacion_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tipodato</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference APLICACION__TIPODATO = eINSTANCE.getAplicacion_Tipodato();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.EntidadImpl <em>Entidad</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.EntidadImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getEntidad()\n\t\t * @generated\n\t\t */\n\t\tEClass ENTIDAD = eINSTANCE.getEntidad();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Atributos</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference ENTIDAD__ATRIBUTOS = eINSTANCE.getEntidad_Atributos();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.AtributoImpl <em>Atributo</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.AtributoImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getAtributo()\n\t\t * @generated\n\t\t */\n\t\tEClass ATRIBUTO = eINSTANCE.getAtributo();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tipodato</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference ATRIBUTO__TIPODATO = eINSTANCE.getAtributo_Tipodato();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.SmartContractImpl <em>Smart Contract</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.SmartContractImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getSmartContract()\n\t\t * @generated\n\t\t */\n\t\tEClass SMART_CONTRACT = eINSTANCE.getSmartContract();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Entidades</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference SMART_CONTRACT__ENTIDADES = eINSTANCE.getSmartContract_Entidades();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Operaciones</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference SMART_CONTRACT__OPERACIONES = eINSTANCE.getSmartContract_Operaciones();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Estado</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference SMART_CONTRACT__ESTADO = eINSTANCE.getSmartContract_Estado();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute SMART_CONTRACT__NAME = eINSTANCE.getSmartContract_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.OperacionImpl <em>Operacion</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.OperacionImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getOperacion()\n\t\t * @generated\n\t\t */\n\t\tEClass OPERACION = eINSTANCE.getOperacion();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Parametros</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference OPERACION__PARAMETROS = eINSTANCE.getOperacion_Parametros();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute OPERACION__NAME = eINSTANCE.getOperacion_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Es User Defined</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute OPERACION__ES_USER_DEFINED = eINSTANCE.getOperacion_EsUserDefined();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Retorno</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference OPERACION__RETORNO = eINSTANCE.getOperacion_Retorno();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Lineas</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference OPERACION__LINEAS = eINSTANCE.getOperacion_Lineas();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ParametroImpl <em>Parametro</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ParametroImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getParametro()\n\t\t * @generated\n\t\t */\n\t\tEClass PARAMETRO = eINSTANCE.getParametro();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tipodato</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference PARAMETRO__TIPODATO = eINSTANCE.getParametro_Tipodato();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.EstadoImpl <em>Estado</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.EstadoImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getEstado()\n\t\t * @generated\n\t\t */\n\t\tEClass ESTADO = eINSTANCE.getEstado();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tipodato</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference ESTADO__TIPODATO = eINSTANCE.getEstado_Tipodato();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.Sentencia <em>Sentencia</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.Sentencia\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getSentencia()\n\t\t * @generated\n\t\t */\n\t\tEClass SENTENCIA = eINSTANCE.getSentencia();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionLogicaImpl <em>Expresion Logica</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionLogicaImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionLogica()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_LOGICA = eINSTANCE.getExpresionLogica();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Operador</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute EXPRESION_LOGICA__OPERADOR = eINSTANCE.getExpresionLogica_Operador();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.PrimitivoImpl <em>Primitivo</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.PrimitivoImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getPrimitivo()\n\t\t * @generated\n\t\t */\n\t\tEClass PRIMITIVO = eINSTANCE.getPrimitivo();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tipo</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute PRIMITIVO__TIPO = eINSTANCE.getPrimitivo_Tipo();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.TipoDatoImpl <em>Tipo Dato</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.TipoDatoImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getTipoDato()\n\t\t * @generated\n\t\t */\n\t\tEClass TIPO_DATO = eINSTANCE.getTipoDato();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute TIPO_DATO__NAME = eINSTANCE.getTipoDato_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionAritmeticaImpl <em>Expresion Aritmetica</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionAritmeticaImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionAritmetica()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_ARITMETICA = eINSTANCE.getExpresionAritmetica();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Operador</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute EXPRESION_ARITMETICA__OPERADOR = eINSTANCE.getExpresionAritmetica_Operador();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.VariableImpl <em>Variable</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.VariableImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getVariable()\n\t\t * @generated\n\t\t */\n\t\tEClass VARIABLE = eINSTANCE.getVariable();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tipodato</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference VARIABLE__TIPODATO = eINSTANCE.getVariable_Tipodato();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.MapaImpl <em>Mapa</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.MapaImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getMapa()\n\t\t * @generated\n\t\t */\n\t\tEClass MAPA = eINSTANCE.getMapa();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tipo Dato Key</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference MAPA__TIPO_DATO_KEY = eINSTANCE.getMapa_TipoDatoKey();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tipo Dato Value</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference MAPA__TIPO_DATO_VALUE = eINSTANCE.getMapa_TipoDatoValue();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.IfImpl <em>If</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.IfImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getIf()\n\t\t * @generated\n\t\t */\n\t\tEClass IF = eINSTANCE.getIf();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Expresionlogica</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference IF__EXPRESIONLOGICA = eINSTANCE.getIf_Expresionlogica();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Lineas</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference IF__LINEAS = eINSTANCE.getIf_Lineas();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Else Lines</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference IF__ELSE_LINES = eINSTANCE.getIf_ElseLines();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.Expresion <em>Expresion</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.Expresion\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresion()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION = eINSTANCE.getExpresion();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionNumericaDoubleImpl <em>Expresion Numerica Double</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionNumericaDoubleImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionNumericaDouble()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_NUMERICA_DOUBLE = eINSTANCE.getExpresionNumericaDouble();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Value</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute EXPRESION_NUMERICA_DOUBLE__VALUE = eINSTANCE.getExpresionNumericaDouble_Value();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionTextoImpl <em>Expresion Texto</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionTextoImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionTexto()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_TEXTO = eINSTANCE.getExpresionTexto();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Value</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute EXPRESION_TEXTO__VALUE = eINSTANCE.getExpresionTexto_Value();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionBooleanImpl <em>Expresion Boolean</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionBooleanImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionBoolean()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_BOOLEAN = eINSTANCE.getExpresionBoolean();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Value</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute EXPRESION_BOOLEAN__VALUE = eINSTANCE.getExpresionBoolean_Value();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionReferenciadaImpl <em>Expresion Referenciada</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionReferenciadaImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionReferenciada()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_REFERENCIADA = eINSTANCE.getExpresionReferenciada();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Id</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute EXPRESION_REFERENCIADA__ID = eINSTANCE.getExpresionReferenciada_Id();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Referencia</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference EXPRESION_REFERENCIADA__REFERENCIA = eINSTANCE.getExpresionReferenciada_Referencia();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionRelacionalImpl <em>Expresion Relacional</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionRelacionalImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionRelacional()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_RELACIONAL = eINSTANCE.getExpresionRelacional();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Operador Relacional</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute EXPRESION_RELACIONAL__OPERADOR_RELACIONAL = eINSTANCE.getExpresionRelacional_OperadorRelacional();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionBinariaImpl <em>Expresion Binaria</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionBinariaImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionBinaria()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_BINARIA = eINSTANCE.getExpresionBinaria();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Izq</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference EXPRESION_BINARIA__IZQ = eINSTANCE.getExpresionBinaria_Izq();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Der</b></em>' containment reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference EXPRESION_BINARIA__DER = eINSTANCE.getExpresionBinaria_Der();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.Linea <em>Linea</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.Linea\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getLinea()\n\t\t * @generated\n\t\t */\n\t\tEClass LINEA = eINSTANCE.getLinea();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.NamedElementImpl <em>Named Element</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.NamedElementImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getNamedElement()\n\t\t * @generated\n\t\t */\n\t\tEClass NAMED_ELEMENT = eINSTANCE.getNamedElement();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute NAMED_ELEMENT__NAME = eINSTANCE.getNamedElement_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ElseImpl <em>Else</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ElseImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getElse()\n\t\t * @generated\n\t\t */\n\t\tEClass ELSE = eINSTANCE.getElse();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Lineas</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference ELSE__LINEAS = eINSTANCE.getElse_Lineas();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.RetornoImpl <em>Retorno</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.RetornoImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getRetorno()\n\t\t * @generated\n\t\t */\n\t\tEClass RETORNO = eINSTANCE.getRetorno();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Linea Retorno</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference RETORNO__LINEA_RETORNO = eINSTANCE.getRetorno_LineaRetorno();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.impl.ExpresionNumericaIntImpl <em>Expresion Numerica Int</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.impl.ExpresionNumericaIntImpl\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getExpresionNumericaInt()\n\t\t * @generated\n\t\t */\n\t\tEClass EXPRESION_NUMERICA_INT = eINSTANCE.getExpresionNumericaInt();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Value</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute EXPRESION_NUMERICA_INT__VALUE = eINSTANCE.getExpresionNumericaInt_Value();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.OperadorLogico <em>Operador Logico</em>}' enum.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.OperadorLogico\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getOperadorLogico()\n\t\t * @generated\n\t\t */\n\t\tEEnum OPERADOR_LOGICO = eINSTANCE.getOperadorLogico();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.Operador <em>Operador</em>}' enum.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.Operador\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getOperador()\n\t\t * @generated\n\t\t */\n\t\tEEnum OPERADOR = eINSTANCE.getOperador();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.DatoPrimitivo <em>Dato Primitivo</em>}' enum.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.DatoPrimitivo\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getDatoPrimitivo()\n\t\t * @generated\n\t\t */\n\t\tEEnum DATO_PRIMITIVO = eINSTANCE.getDatoPrimitivo();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link blockchain.OperadorRelacion <em>Operador Relacion</em>}' enum.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see blockchain.OperadorRelacion\n\t\t * @see blockchain.impl.BlockchainPackageImpl#getOperadorRelacion()\n\t\t * @generated\n\t\t */\n\t\tEEnum OPERADOR_RELACION = eINSTANCE.getOperadorRelacion();\n\n\t}\n\n}", "public static void main(String[] args) throws MalformedURLException, XmlRpcException {\n\n final long timeThen = System.nanoTime();\n final String packageName = \"java-1.8.0-openjdk\";\n\n System.out.println(\"Getting ID of package: \" + packageName);\n final XmlRpcRequestParams getPackageIdParams = new GetPackageId(packageName);\n final PackageId packageIdResponse = PackageId.create(execute(getPackageIdParams));\n final Integer packageId = packageIdResponse.getValue();\n System.out.println(\"ID of package: \" + packageName + \": \" + packageId);\n\n final XmlRpcRequestParams listBuildsParams = new ListBuilds(packageId);\n\n System.out.println(\"Getting builds of package: \" + packageName);\n final BuildList buildListResponse = BuildList.create(execute(listBuildsParams));\n List<Build> builds = buildListResponse.getValue();\n System.out.println(\"Number of builds: \" + builds.size());\n for (Build build : builds) {\n\n final Integer buildId = build.getId();\n System.out.println(\"Build \" + build.getNvr() + \" (\" + buildId + ')');\n System.out.println();\n\n final XmlRpcRequestParams listTagsParams = new ListTags(buildId);\n TagSet tagSetResponse = TagSet.create(execute(listTagsParams));\n Set<String> tags = tagSetResponse.getValue();\n System.out.println(\" tags(\" + tags.size() + \"):\");\n for (String tag : tags) {\n System.out.println(\" \" + tag);\n }\n final XmlRpcRequestParams listRPMsParams = new ListRPMs(\n buildId,\n Arrays.asList(\"x86_64\", \"i686\")\n );\n final RPMList rpmList = RPMList.create(execute(listRPMsParams));\n final List<RPM> rpms = rpmList.getValue();\n System.out.println(\" rpms(\" + rpms.size() + \"):\");\n for (RPM rpm : rpms) {\n System.out.println(\" Filename: \" + rpm.getFilename(\".tarxz\"));\n System.out.println(\" Hash sum: \" + rpm.getHashSum());\n System.out.println(\" NVR: \" + rpm.getNvr());\n System.out.println(\" Name: \" + rpm.getName());\n System.out.println(\" Version: \" + rpm.getVersion());\n System.out.println(\" Release: \" + rpm.getRelease());\n System.out.println(\" Arch: \" + rpm.getArch());\n System.out.println(\" Url: \" + rpm.getUrl());\n System.out.println();\n }\n }\n final long timeNow = System.nanoTime();\n System.out.println(timeNow - timeThen);\n }", "public Node() {\n name = null;\n missionDescription = null;\n roles = null;\n stateValueBindings = null;\n nodeRuntime = null;\n isNetworkSingleton = false;\n }", "public PackageNode getPackage();", "public interface ChainCodeService {\n String chainCodeInstall();\n String chainCodeInstantiate(String[] args);\n String chainCodeUpgrade(String[] args);\n String chainCodeInvoke(String fcn, String[] args);\n String chainCodeQuery(String fcn, String[] args);\n}", "public BlockTransferNode()\r\n/* 45: */ {\r\n/* 46: 44 */ super(0);\r\n/* 47: 45 */ setBlockName(\"extrautils:extractor_base\");\r\n/* 48: 46 */ setBlockTextureName(\"extrautils:extractor_base\");\r\n/* 49: 47 */ setCreativeTab(ExtraUtils.creativeTabExtraUtils);\r\n/* 50: 48 */ setHardness(0.5F);\r\n/* 51: 49 */ setStepSound(soundTypeStone);\r\n/* 52: */ }", "BlockchainFactory getBlockchainFactory();", "public static void main(String[] args){\n\n PartTwo p2 = new PartTwo();\n p2.start();\n\n PartThree p3 = new PartThree();\n p3.run(p2.getNodes());\n\n\n }", "public ManifestAieon getManifest();", "public interface NodeRoot extends RootVertex<Node> {\n\n\tpublic static final String TYPE = \"nodes\";\n\n\t/**\n\t * Create a new node.\n\t * \n\t * @param user\n\t * User that is used to set creator and editor references\n\t * @param container\n\t * Schema version that should be used when creating the node\n\t * @param project\n\t * Project to which the node should be assigned to\n\t * @return Created node\n\t */\n\tdefault Node create(HibUser user, HibSchemaVersion container, HibProject project) {\n\t\treturn create(user, container, project, null);\n\t}\n\n\t/**\n\t * Create a new node.\n\t * \n\t * @param user\n\t * User that is used to set creator and editor references\n\t * @param container\n\t * Schema version that should be used when creating the node\n\t * @param project\n\t * Project to which the node should be assigned to\n\t * @param uuid\n\t * Optional uuid\n\t * @return Created node\n\t */\n\tNode create(HibUser user, HibSchemaVersion container, HibProject project, String uuid);\n\n}", "TaskProtobufWrapper.LoginPack getLoginPack();", "public static void main(String[] args) {\n\t\t\n\t\tBlackBox core = new BlackBox();\n\t\tcore.newEnvironment();\n\t\t\n\t\ttry {\n\t\t\t/**\n\t\t\t * insert fire fighter agents\n\t\t\t * insert fire building tasks\n\t\t\t * insert fire station agents\n\t\t\t */\n\t\t\tcore.addAgent(FireFighter.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.variables\"));\n\t\t\tcore.addTask(FireBuildingTask.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.values\"));\n\t\t\tcore.addAgent(FireStation.class, Transmitter.getIntConfigParameter(\"config.properties\", \"config.central\"));\n\t\t\t\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tcore.simulationStart();\n\t\t} catch (SimulatorException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\tfor(Variable var : core.getEnvironment().getVariables())\n\t\t{\n\t\t\tSystem.out.println(var.getClass());\n\t\t\tif(var instanceof Human){\n\t\t\t\tHuman h = (Human)var;\n\t\t\t\tSystem.out.println(\"Attributes of Human \"+h.getId());\n\t\t\t\tSystem.out.println(\"Strength \"+h.getStrength());\n\t\t\t\tSystem.out.println(\"Dexterity \"+h.getDexterity());\n\t\t\t\tSystem.out.println(\"Stamina \"+h.getStamina());\n\t\t\t\tSystem.out.println(\"Charisma \"+h.getCharisma());\n\t\t\t\tSystem.out.println(\"Appearance \"+h.getAppearance());\n\t\t\t\tSystem.out.println(\"Leadership \"+h.getLeadership());\n\t\t\t\tSystem.out.println(\"Intelligence \"+h.getIntelligence());\n\t\t\t\tSystem.out.println(\"Reasoning \"+h.getReasoning());\n\t\t\t\tSystem.out.println(\"Perception \"+h.getPerception());\n\t\t\t\tSystem.out.println(\"ph \"+((h.getStrength()-1)+(h.getDexterity()-1)+(h.getStamina()-1)));\n\t\t\t\tSystem.out.println(\"sc \"+((h.getCharisma()-1)+(h.getAppearance()-1)+(h.getLeadership()-1)));\n\t\t\t\tSystem.out.println(\"mn \"+((h.getIntelligence()-1)+(h.getReasoning()-1)+(h.getPerception()-1)));\n\t\t\t\tSystem.out.println(\"will \"+h.getWill());\n\t\t\t\tSystem.out.println(\"x \"+h.getX());\n\t\t\t\tSystem.out.println(\"y \"+h.getY());\n\t\t\t\tSystem.out.println(\"domain \"+h.getDomain().size());\n\t\t\t\tSystem.out.println();\n\t\t\t}else if(var instanceof FireStation){\n\t\t\t\tFireStation h = (FireStation)var;\n\t\t\t\tSystem.out.println(\"Attributes of the Fire Station \"+h.getId());\n\t\t\t\tSystem.out.println(\"x \"+h.getX());\n\t\t\t\tSystem.out.println(\"y \"+h.getY());\n\t\t\t\tSystem.out.println(\"domain \"+h.getDomain().size());\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\tfor(Value val : core.getEnvironment().getValues())\n\t\t{\n\t\t\tSystem.out.println(val.getClass());\n\t\t\tFireBuildingTask t = (FireBuildingTask)val;\n\t\t\tSystem.out.println(\"Attributes of building \"+t.getId());\n\t\t\tSystem.out.println(\"Temperature \"+t.getTemperature());\n\t\t\tSystem.out.println(\"Floors \"+t.getFloors());\n\t\t\tSystem.out.println(\"Ground Area \"+t.getGroundArea());\n\t\t\tSystem.out.println(\"Success \"+t.getSuccess());\n\t\t\tSystem.out.println(\"HP \"+t.getBuildingHP());\n\t\t\tSystem.out.println(\"x \"+t.getX());\n\t\t\tSystem.out.println(\"y \"+t.getY());\n\t\t}*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "java.lang.String getManifestHashAlgorithm();", "public static void main(String[] args) {\n Blockchain.startApp();\n }", "public interface RMTConstants {\n\n\tstatic final String\tRMT_ROOT\t\t\t\t\t\t= OSGiTestCaseProperties\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getProperty(\"org.osgi.dmt.residential\");\n\tstatic final String FRAMEWORK = \"Framework\";\n\tstatic final String FRAMEWORK_ROOT = RMT_ROOT + \"/\" + FRAMEWORK;\n\tstatic final String FILTER_ROOT = RMT_ROOT + \"/Filter\";\n\tstatic final String LOG = \"Log\";\n\tstatic final String LOG_ROOT = RMT_ROOT + \"/\" + LOG;\n\t\n\t// first level children\n\tstatic final String STARTLEVEL = \"StartLevel\";\n\tstatic final String INITIAL_BUNDLE_STARTLEVEL = \"InitialBundleStartLevel\";\n\tstatic final String BUNDLE = \"Bundle\";\n\tstatic final String PROPERTY = \"Property\";\n\n\t// children of the Bundle node\n\t// Startlevel\n\tstatic final String URL_STRING = \"URL\";\n\tstatic final String AUTOSTART = \"AutoStart\";\n\tstatic final String FAULT_TYPE = \"FaultType\";\n\tstatic final String FAULT_MESSAGE = \"FaultMessage\";\n\tstatic final String BUNDLEID = \"BundleId\";\n\tstatic final String SYMBOLIC_NAME = \"SymbolicName\";\n\tstatic final String VERSION = \"Version\";\n\tstatic final String BUNDLETYPE = \"BundleType\";\n\tstatic final String HEADERS = \"Headers\";\n\tstatic final String LOCATION = \"Location\";\n\tstatic final String STATE = \"State\";\n\tstatic final String REQUESTED_STATE = \"RequestedState\";\n\tstatic final String LAST_MODIFIED = \"LastModified\";\n\tstatic final String WIRES = \"Wires\";\n\tstatic final String SIGNERS = \"Signers\";\n\tstatic final String ENTRIES = \"Entries\";\n\tstatic final String INSTANCEID = \"InstanceId\";\n\tstatic final String FRAGMENT = \"FRAGMENT\";\n\n\t// Namespaces: allowed children of a Bundle.Wires node\n\tstatic final String NAMESPACE_BUNLDE = \"osgi.wiring.bundle\"; \n\tstatic final String NAMESPACE_HOST = \"osgi.wiring.host\"; \n\tstatic final String NAMESPACE_PACKAGE = \"osgi.wiring.package\"; \n\tstatic final String NAMESPACE_RMT_SERVICE = \"osgi.wiring.rmt.service\"; \n\n\t// children of a Wire node\n\t// InstanceId\n\tstatic final String NAMESPACE = \"Namespace\";\n\tstatic final String REQUIREMENT = \"Requirement\";\n\tstatic final String CAPABILITY = \"Capability\";\n\tstatic final String REQUIRER = \"Requirer\";\n\tstatic final String PROVIDER = \"Provider\";\n\t// children of the Bundle.Wire.Capability node\n\tstatic final String DIRECTIVE = \"Directive\";\n\tstatic final String ATTRIBUTE = \"Attribute\";\n\t// children of the Bundle.Wire.Capability node\n\tstatic final String FILTER = \"Filter\";\n\t// Directive\n\t// Attribute\n\n\t\n\t// children of Signers node\n\t// InstanceId\n\tstatic final String ISTRUSTED = \"IsTrusted\";\n\tstatic final String CERTIFICATECHAIN = \"CertificateChain\";\n\n\t// children of Entries node\n\t// InstanceId\n\tstatic final String PATH = \"Path\";\n\tstatic final String CONTENT = \"Content\";\n\n\t// Log children\n\tstatic final String LOG_ENTRIES = \"LogEntries\";\n\t// LogEntry children\n\tstatic final String TIME = \"Time\";\n\tstatic final String LEVEL = \"Level\";\n\tstatic final String MESSAGE = \"Message\";\n\t\t// Bundle\n\tstatic final String EXCEPTION = \"Exception\";\n\t\n\t// FILTER children\n\tstatic final String TARGET = \"Target\";\n\tstatic final String LIMIT = \"Limit\";\n\tstatic final String RESULT = \"Result\";\n\tstatic final String RESULT_URI_LIST = \"ResultUriList\";\n\t\n\n\t\n\tstatic final String TESTBUNDLE_EXPORTPACKAGE = \"org.osgi.test.cases.residentialmanagement.tb1.jar\";\n\tstatic final String TESTBUNDLE_IMPORTPACKAGE = \"org.osgi.test.cases.residentialmanagement.tb2.jar\";\n\tstatic final String TESTBUNDLE_REGISTERING_SERVICES = \"org.osgi.test.cases.residentialmanagement.tb3.jar\";\n\tstatic final String TESTBUNDLE_USING_SERVICE2 = \"org.osgi.test.cases.residentialmanagement.tb5.jar\";\n\tstatic final String TESTBUNDLE_FRAGMENT = \"org.osgi.test.cases.residentialmanagement.tb7.jar\";\n\tstatic final String TESTBUNDLE_REQUIRE \t = \"org.osgi.test.cases.residentialmanagement.tb8.jar\";\n\tstatic final String TESTBUNDLE_TRUSTED \t = \"org.osgi.test.cases.residentialmanagement.tb9.jar\";\n\tstatic final String TESTBUNDLE_NON_TRUSTED = \"org.osgi.test.cases.residentialmanagement.tbnontrusted.jar\";\n\n}", "public final EObject entryRuleNodeChain() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleNodeChain = null;\n\n\n try {\n // InternalNgt.g:866:50: (iv_ruleNodeChain= ruleNodeChain EOF )\n // InternalNgt.g:867:2: iv_ruleNodeChain= ruleNodeChain EOF\n {\n newCompositeNode(grammarAccess.getNodeChainRule()); \n pushFollow(FOLLOW_1);\n iv_ruleNodeChain=ruleNodeChain();\n\n state._fsp--;\n\n current =iv_ruleNodeChain; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public static void main(String[] args) {\n\t\t HashMap<String, HashSet<String>> network = new HashMap<>();\r\n\t\t network = BuildNetwork();\r\n\t\t ValidateTransactaion(network);\r\n\t\t \r\n\t}", "public String getPrefix() { return \"linknode\"; }", "@Override\n public void run() {\n ShellResponse response =\n getNodeManager().nodeCommand(NodeManager.NodeCommandType.Configure, taskParams());\n processShellResponse(response);\n\n if (taskParams().type == UpgradeUniverse.UpgradeTaskType.Everything\n && !taskParams().updateMasterAddrsOnly) {\n // Check cronjob status if installing software.\n response = getNodeManager().nodeCommand(NodeManager.NodeCommandType.CronCheck, taskParams());\n\n // Create an alert if the cronjobs failed to be created on this node.\n if (response.code != 0) {\n Universe universe = Universe.getOrBadRequest(taskParams().universeUUID);\n Customer cust = Customer.get(universe.customerId);\n String alertErrCode = \"CRON_CREATION_FAILURE\";\n String nodeName = taskParams().nodeName;\n String alertMsg =\n \"Universe %s was successfully created but failed to \"\n + \"create cronjobs on some nodes (%s)\";\n\n // Persist node cronjob status into the DB.\n UniverseUpdater updater =\n new UniverseUpdater() {\n @Override\n public void run(Universe universe) {\n UniverseDefinitionTaskParams universeDetails = universe.getUniverseDetails();\n NodeDetails node = universe.getNode(nodeName);\n node.cronsActive = false;\n LOG.info(\n \"Updated \"\n + nodeName\n + \" cronjob status to inactive from universe \"\n + taskParams().universeUUID);\n }\n };\n saveUniverseDetails(updater);\n\n // Create new alert or update existing alert with current node name if alert already exists.\n if (Alert.exists(alertErrCode, universe.universeUUID)) {\n Alert cronAlert = Alert.list(cust.uuid, alertErrCode, universe.universeUUID).get(0);\n List<String> failedNodesList =\n universe\n .getNodes()\n .stream()\n .map(nodeDetail -> nodeDetail.nodeName)\n .collect(Collectors.toList());\n String failedNodesString = String.join(\", \", failedNodesList);\n cronAlert.update(String.format(alertMsg, universe.name, failedNodesString));\n } else {\n Alert.create(\n cust.uuid,\n universe.universeUUID,\n Alert.TargetType.UniverseType,\n alertErrCode,\n \"Warning\",\n String.format(alertMsg, universe.name, nodeName));\n }\n }\n\n // We set the node state to SoftwareInstalled when configuration type is Everything.\n // TODO: Why is upgrade task type used to map to node state update?\n setNodeState(NodeDetails.NodeState.SoftwareInstalled);\n }\n }", "@Test \r\n\tpublic void testSingleNodeTransform() throws Exception {\r\n\t\t//String id = \"7gwtr\"; //live api example\r\n\t\tString id = \"zr4bx\";\r\n\t\tString[] args = {\"osf_node\",\"-id\",id, \"-o\", \"testOneNode/\"};\r\n\t\tRMapTransformerCLI.main(args);\r\n\t\t//check output files\r\n\t\tInteger numfiles = new File(\"testOneNode\").list().length;\r\n\t\tassertTrue(numfiles.equals(1)); //one root Public Project, one partial\r\n\t}", "public String getNodeARN() {\n return this.nodeARN;\n }", "protected String suitename() {\n return \"TestManifestCommitProtocolLocalFS\";\n }", "AsrtPackage getAsrtPackage();", "@Test\n public void iPAddressIsTorNodeTest() throws Exception {\n String value = null;\n TorNodeResponse response = api.iPAddressIsTorNode(value);\n\n // TODO: test validations\n }", "TestCaseGraphRuntimePackage getTestCaseGraphRuntimePackage();", "private ActorSystemBootstrapTools() {}", "public Node() {\n portnum = 0;\n senders = new Hashtable<String, Sender>();\n }", "@Internal\n public Property<NativeToolChain> getToolChain() {\n return toolChain;\n }", "public ClusterRoot(Dispatcher dispatcher) throws IOException\n\t{\n\t\t// Initialize the peer. 06/13/2017, Bing Li\n\t\tthis.peer = new Peer.PeerBuilder<Dispatcher>()\n\t\t\t\t.peerPort(ChatConfig.CHAT_SERVER_PORT)\n\t\t\t\t.peerName(MulticastConfig.CLUSTER_SERVER_ROOT_NAME)\n\t\t\t\t.registryServerIP(RegistryConfig.PEER_REGISTRY_ADDRESS)\n\t\t\t\t.registryServerPort(RegistryConfig.PEER_REGISTRY_PORT)\n\t\t\t\t.isRegistryNeeded(true)\n\t\t\t\t.listenerCount(ServerConfig.LISTENING_THREAD_COUNT)\n//\t\t\t\t.listenerThreadPoolSize(ServerConfig.SHARED_THREAD_POOL_SIZE)\n//\t\t\t\t.listenerThreadKeepAliveTime(ServerConfig.SHARED_THREAD_POOL_KEEP_ALIVE_TIME)\n\t\t\t\t.dispatcher(dispatcher)\n\t\t\t\t.freeClientPoolSize(RegistryConfig.CLIENT_POOL_SIZE)\n\t\t\t\t.readerClientSize(RegistryConfig.READER_CLIENT_SIZE)\n\t\t\t\t.syncEventerIdleCheckDelay(RegistryConfig.SYNC_EVENTER_IDLE_CHECK_DELAY)\n\t\t\t\t.syncEventerIdleCheckPeriod(RegistryConfig.SYNC_EVENTER_IDLE_CHECK_PERIOD)\n\t\t\t\t.syncEventerMaxIdleTime(RegistryConfig.SYNC_EVENTER_MAX_IDLE_TIME)\n\t\t\t\t.asyncEventQueueSize(RegistryConfig.ASYNC_EVENT_QUEUE_SIZE)\n\t\t\t\t.asyncEventerSize(RegistryConfig.ASYNC_EVENTER_SIZE)\n\t\t\t\t.asyncEventingWaitTime(RegistryConfig.ASYNC_EVENTING_WAIT_TIME)\n\t\t\t\t.asyncEventerWaitTime(RegistryConfig.ASYNC_EVENTER_WAIT_TIME)\n\t\t\t\t.asyncEventerWaitRound(RegistryConfig.ASYNC_EVENTER_WAIT_ROUND)\n\t\t\t\t.asyncEventIdleCheckDelay(RegistryConfig.ASYNC_EVENT_IDLE_CHECK_DELAY)\n\t\t\t\t.asyncEventIdleCheckPeriod(RegistryConfig.ASYNC_EVENT_IDLE_CHECK_PERIOD)\n//\t\t\t\t.clientThreadPoolSize(RegistryConfig.CLIENT_THREAD_POOL_SIZE)\n//\t\t\t\t.clientThreadKeepAliveTime(RegistryConfig.CLIENT_THREAD_KEEP_ALIVE_TIME)\n\t\t\t\t.schedulerPoolSize(RegistryConfig.SCHEDULER_THREAD_POOL_SIZE)\n\t\t\t\t.schedulerKeepAliveTime(RegistryConfig.SCHEDULER_THREAD_POOL_KEEP_ALIVE_TIME)\n\t\t\t\t.build();\n\t}", "public ClusterRoot(Peer<Dispatcher> peer)\n\t{\n\t\tthis.peer = peer;\n\t}", "public BccManifest(Name alias) {\n this(alias, BCC_MANIFEST);\n }", "public static void main(String[] args) {\n neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0,\n 10.00);\n feedGas.addComponent(\"nitrogen\", 1.03);\n feedGas.addComponent(\"CO2\", 1.42);\n feedGas.addComponent(\"methane\", 83.88);\n feedGas.addComponent(\"ethane\", 8.07);\n feedGas.addComponent(\"propane\", 3.54);\n feedGas.addComponent(\"i-butane\", 0.54);\n feedGas.addComponent(\"n-butane\", 0.84);\n feedGas.addComponent(\"i-pentane\", 0.21);\n feedGas.addComponent(\"n-pentane\", 0.19);\n feedGas.addComponent(\"n-hexane\", 0.28);\n feedGas.addComponent(\"water\", 0.0);\n feedGas.addComponent(\"TEG\", 0);\n feedGas.createDatabase(true);\n feedGas.setMixingRule(10);\n feedGas.setMultiPhaseCheck(true);\n\n Stream dryFeedGas = new Stream(\"dry feed gas\", feedGas);\n dryFeedGas.setFlowRate(11.23, \"MSm3/day\");\n dryFeedGas.setTemperature(30.4, \"C\");\n dryFeedGas.setPressure(52.21, \"bara\");\n StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil(dryFeedGas);\n Stream waterSaturatedFeedGas = new Stream(saturatedFeedGas.getOutStream());\n saturatedFeedGas.setName(\"water saturator\");\n neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n feedTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02, 0.98 });\n\n Stream TEGFeed = new Stream(\"lean TEG to absorber\", feedTEG);\n TEGFeed.setFlowRate(6.1 * 1100.0, \"kg/hr\");\n TEGFeed.setTemperature(35.4, \"C\");\n TEGFeed.setPressure(52.21, \"bara\");\n\n SimpleTEGAbsorber absorber = new SimpleTEGAbsorber(\"SimpleTEGAbsorber\");\n absorber.addGasInStream(waterSaturatedFeedGas);\n absorber.addSolventInStream(TEGFeed);\n absorber.setNumberOfStages(10);\n absorber.setStageEfficiency(0.35);\n\n Stream dehydratedGas = new Stream(absorber.getGasOutStream());\n dehydratedGas.setName(\"dry gas from absorber\");\n Stream richTEG = new Stream(absorber.getSolventOutStream());\n\n ThrottlingValve glycol_flash_valve = new ThrottlingValve(richTEG);\n glycol_flash_valve.setName(\"Rich TEG HP flash valve\");\n glycol_flash_valve.setOutletPressure(4.9);\n\n Heater richGLycolHeaterCondeser = new Heater(glycol_flash_valve.getOutStream());\n richGLycolHeaterCondeser.setName(\"rich TEG preheater\");\n richGLycolHeaterCondeser.setOutTemperature(273.15 + 35.5);\n\n Heater richGLycolHeater = new Heater(richGLycolHeaterCondeser.getOutStream());\n richGLycolHeater.setName(\"rich TEG heater HP\");\n richGLycolHeater.setOutTemperature(273.15 + 62.0);\n\n Separator flashSep = new Separator(richGLycolHeater.getOutStream());\n flashSep.setName(\"degasing separator\");\n Stream flashGas = new Stream(flashSep.getGasOutStream());\n flashGas.setName(\"gas from degasing separator\");\n Stream flashLiquid = new Stream(flashSep.getLiquidOutStream());\n flashLiquid.setName(\"liquid from degasing separator\");\n\n Heater richGLycolHeater2 = new Heater(flashLiquid);\n richGLycolHeater2.setName(\"LP rich glycol heater\");\n richGLycolHeater2.setOutTemperature(273.15 + 139.0);\n richGLycolHeater2.setOutPressure(1.23);\n\n Mixer mixerTOreboiler = new Mixer(\"reboil mxer\");\n mixerTOreboiler.addStream(richGLycolHeater2.getOutStream());\n\n Heater heaterToReboiler = new Heater(mixerTOreboiler.getOutStream());\n heaterToReboiler.setOutTemperature(273.15 + 206.6);\n\n Separator regenerator2 = new Separator(heaterToReboiler.getOutStream());\n\n Stream gasFromRegenerator = new Stream(regenerator2.getGasOutStream());\n\n Heater sepregenGasCooler = new Heater(gasFromRegenerator);\n sepregenGasCooler.setOutTemperature(273.15 + 109.0);\n sepregenGasCooler.setOutPressure(1.23);\n//\t\tsepregenGasCooler.setEnergyStream(richGLycolHeaterCondeser.getEnergyStream());\n\n Separator sepRegen = new Separator(sepregenGasCooler.getOutStream());\n\n Stream liquidRegenReflux = new Stream(sepRegen.getLiquidOutStream());\n\n Recycle resycle2 = new Recycle(\"reflux resycle\");\n resycle2.addStream(liquidRegenReflux);\n\n Heater coolerRegenGas = new Heater(sepRegen.getGasOutStream());\n coolerRegenGas.setOutTemperature(273.15 + 35.5);\n\n Separator sepregenGas = new Separator(coolerRegenGas.getOutStream());\n\n Stream gasToFlare = new Stream(sepregenGas.getGasOutStream());\n\n Stream liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream());\n\n Stream hotLeanTEG = new Stream(regenerator2.getLiquidOutStream());\n\n neqsim.thermo.system.SystemInterface stripGas = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n stripGas.setMolarComposition(new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 });\n\n Stream strippingGas = new Stream(\"stripGas\", stripGas);\n strippingGas.setFlowRate(70.0, \"kg/hr\");\n strippingGas.setTemperature(206.6, \"C\");\n strippingGas.setPressure(1.23, \"bara\");\n\n WaterStripperColumn stripper = new WaterStripperColumn(\"TEG stripper\");\n stripper.addGasInStream(strippingGas);\n stripper.addSolventInStream(hotLeanTEG);\n stripper.setNumberOfStages(10);\n stripper.setStageEfficiency(0.5);\n\n Recycle resycle3 = new Recycle(\"gas stripper resycle\");\n resycle3.addStream(stripper.getGasOutStream());\n\n Pump hotLeanTEGPump = new Pump(stripper.getSolventOutStream());\n hotLeanTEGPump.setName(\"hot lean TEG pump\");\n hotLeanTEGPump.setOutletPressure(20.0);\n\n Heater coolerhOTteg = new Heater(hotLeanTEGPump.getOutStream());\n coolerhOTteg.setName(\"hot lean TEG cooler\");\n coolerhOTteg.setOutTemperature(273.15 + 116.8);\n\n Heater coolerhOTteg2 = new Heater(coolerhOTteg.getOutStream());\n coolerhOTteg2.setName(\"medium hot lean TEG cooler\");\n coolerhOTteg2.setOutTemperature(273.15 + 89.3);\n\n Heater coolerhOTteg3 = new Heater(coolerhOTteg2.getOutStream());\n coolerhOTteg3.setName(\"lean TEG cooler\");\n coolerhOTteg3.setOutTemperature(273.15 + 44.85);\n\n Pump hotLeanTEGPump2 = new Pump(coolerhOTteg3.getOutStream());\n hotLeanTEGPump2.setName(\"lean TEG HP pump\");\n hotLeanTEGPump2.setOutletPressure(52.21);\n\n Stream leanTEGtoabs = new Stream(hotLeanTEGPump2.getOutStream());\n leanTEGtoabs.setName(\"lean TEG to absorber\");\n\n neqsim.thermo.system.SystemInterface pureTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n pureTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 });\n\n Stream makeupTEG = new Stream(\"lean TEG to absorber\", pureTEG);\n makeupTEG.setFlowRate(1e-6, \"kg/hr\");\n makeupTEG.setTemperature(35.4, \"C\");\n makeupTEG.setPressure(52.21, \"bara\");\n\n Calculator makeupCalculator = new Calculator(\"makeup calculator\");\n makeupCalculator.addInputVariable(dehydratedGas);\n makeupCalculator.addInputVariable(flashGas);\n makeupCalculator.addInputVariable(gasToFlare);\n makeupCalculator.addInputVariable(liquidToTrreatment);\n makeupCalculator.setOutputVariable(makeupTEG);\n\n StaticMixer makeupMixer = new StaticMixer(\"makeup mixer\");\n makeupMixer.addStream(leanTEGtoabs);\n makeupMixer.addStream(makeupTEG);\n\n Recycle resycleLeanTEG = new Recycle(\"lean TEG resycle\");\n resycleLeanTEG.addStream(makeupMixer.getOutStream());\n\n neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();\n operations.add(dryFeedGas);\n operations.add(saturatedFeedGas);\n operations.add(waterSaturatedFeedGas);\n operations.add(TEGFeed);\n operations.add(absorber);\n operations.add(dehydratedGas);\n operations.add(richTEG);\n operations.add(glycol_flash_valve);\n operations.add(richGLycolHeaterCondeser);\n operations.add(richGLycolHeater);\n operations.add(flashSep);\n operations.add(flashGas);\n operations.add(flashLiquid);\n operations.add(richGLycolHeater2);\n operations.add(mixerTOreboiler);\n operations.add(heaterToReboiler);\n operations.add(regenerator2);\n operations.add(gasFromRegenerator);\n operations.add(sepregenGasCooler);\n operations.add(sepRegen);\n operations.add(liquidRegenReflux);\n operations.add(resycle2);\n\n operations.add(coolerRegenGas);\n operations.add(sepregenGas);\n operations.add(gasToFlare);\n operations.add(liquidToTrreatment);\n operations.add(hotLeanTEG);\n operations.add(strippingGas);\n operations.add(stripper);\n\n operations.add(resycle3);\n operations.add(hotLeanTEGPump);\n operations.add(coolerhOTteg);\n operations.add(coolerhOTteg2);\n operations.add(coolerhOTteg3);\n operations.add(hotLeanTEGPump2);\n operations.add(leanTEGtoabs);\n operations.add(makeupCalculator);\n operations.add(makeupTEG);\n operations.add(makeupMixer);\n operations.add(resycleLeanTEG);\n\n operations.run();\n richGLycolHeater2.getOutStream().getFluid().display();\n System.out.println(\"Energy reboiler \" + heaterToReboiler.getDuty());\n mixerTOreboiler.addStream(liquidRegenReflux);\n mixerTOreboiler.addStream(resycle3.getOutStream());\n //\n operations.run();\n absorber.replaceSolventInStream(resycleLeanTEG.getOutStream());\n operations.run();\n // richGLycolHeater2.getOutStream().getFluid().display();\n\n System.out.println(\"Energy reboiler 2 \" + heaterToReboiler.getDuty());\n\n System.out.println(\"wt lean TEG after stripper \"\n + ((WaterStripperColumn) operations.getUnit(\"TEG stripper\")).getSolventOutStream().getFluid()\n .getPhase(\"aqueous\").getWtFrac(\"TEG\"));\n\n operations.save(\"c:/temp/TEGprocessSimple.neqsim\");\n }", "public static void main(String[] args) throws Exception {\n InputStream clientCert = new FileInputStream(System.getenv(\"TEMPORAL_CLIENT_CERT\"));\n // PKCS8 client key, which should look like:\n // -----BEGIN PRIVATE KEY-----\n // ...\n // -----END PRIVATE KEY-----\n InputStream clientKey = new FileInputStream(System.getenv(\"TEMPORAL_CLIENT_KEY\"));\n // For temporal cloud this would likely be ${namespace}.tmprl.cloud:7233\n String targetEndpoint = System.getenv(\"TEMPORAL_ENDPOINT\");\n // Your registered namespace.\n String namespace = System.getenv(\"TEMPORAL_NAMESPACE\");\n // Create SSL enabled client by passing SslContext, created by SimpleSslContextBuilder.\n WorkflowServiceStubs service =\n WorkflowServiceStubs.newServiceStubs(\n WorkflowServiceStubsOptions.newBuilder()\n .setSslContext(SimpleSslContextBuilder.forPKCS8(clientCert, clientKey).build())\n .setTarget(targetEndpoint)\n .build());\n\n // Now setup and start workflow worker, which uses SSL enabled gRPC service to communicate with\n // backend.\n // client that can be used to start and signal workflows.\n WorkflowClient client =\n WorkflowClient.newInstance(\n service, WorkflowClientOptions.newBuilder().setNamespace(namespace).build());\n // worker factory that can be used to create workers for specific task queues\n WorkerFactory factory = WorkerFactory.newInstance(client);\n // Worker that listens on a task queue and hosts both workflow and activity implementations.\n factory.newWorker(TASK_QUEUE);\n // TODO now register your workflow types and activity implementations.\n // worker.registerWorkflowImplementationTypes(...);\n // worker.registerActivitiesImplementations(...);\n factory.start();\n }", "Chain createChain();", "entities.Torrent.RegistrationRequest getRegistrationRequest();", "void setManifestHashAlgorithm(java.lang.String manifestHashAlgorithm);", "public static void main(String[] args) {\n\n System.out.println(\"\\n... MakeNetworks Arguments :<rootFileName> \"\n +\":<inputDirectory>+ :<outputDirectory> +:<extractGCC>\"\n + \":<year> :<weightType> :<useWhat> :<infoLevel>\");\n System.out.println(\"Fieldname types are:- Bus for Business and International Management\");\n System.out.println(\" - Phy for Physics & astronomy\");\n for (int i=0; i<weightTypeDescription.length; i++) {\n System.out.println(\"... weightType \"+i+\" = \"+weightTypeDescription[i]);\n } \n System.out.println(\"... useWhat: 1,3= use title, 2,3=use keywords\");\n for(int a=0; a<args.length; a++) {\n System.out.print((a==0?\"... Arguments: \":\" \")+args[a]);\n }\n System.out.println();\n \n HashSet<Integer> yearSet = new HashSet();\n HashSet<String> fieldnameSet = new HashSet();\n HashSet<Integer> weightTypeSet = new HashSet();\n HashSet<Integer> useWhatSet = new HashSet();\n \n \n int ano=0;\n //String rootFileName = \"ebrp_03_set_01_documentsTEST\";\n //String rootFileName = \"ebrp_03_set_01_documentsHARDTEST\";\n String rootFileName = \"ebrp_03_set_01_documents\";\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) {\n rootFileName=args[ano].substring(1);\n }\n System.out.println(\"--- Root of file name is \"+rootFileName);\n \n final String fileSep=System.getProperty(\"file.separator\");\n String dirBase=System.getProperty(\"user.dir\")+fileSep;\n \n //String inputDirectory =\"C:\\\\PRG\\\\JAVA\\\\Elsevier\\\\input\\\\\";\n String inputDirectory =\"C:\\\\DATA\\\\Elsevier\\\\input\\\\\";\n ano++;\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) inputDirectory=args[ano].substring(1); \n System.out.println(\"--- Input directory is \"+inputDirectory);\n \n String outputDirectory =\"C:\\\\DATA\\\\Elsevier\\\\output\\\\\";\n ano++;\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) outputDirectory=args[ano].substring(1); \n System.out.println(\"--- Output directory is \"+outputDirectory);\n \n \n boolean extractGCC=true;\n ano++;\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) extractGCC=(StringAsBoolean.isTrue(args[ano].charAt(1))?true:false); \n System.out.println(\"--- extracting GCC - \"+(extractGCC?\"yes\":\"no\"));\n \n int minDegreeIn=3;\n int minDegreeOut=3;\n double minWeight=0;\n System.out.println(\"--- extracting simplified GCC with min in degree - \"\n +minDegreeIn+\", min out degree - \"+minDegreeOut+\", and min weight \"+minWeight);\n \n // set up filter\n int minChar=2;\n int minL=3;\n boolean keepRejectList=true;\n ElsevierPapersFilter ipf = new ElsevierPapersFilter(minChar, minL, keepRejectList);\n \n \n if (rootFileName.equalsIgnoreCase(\"ALL\")){\n //rootFileName = \"ebrp_03_set_01_documentsHARDTEST\"; \n rootFileName = \"ebrp_03_set_01_documents\";\n yearSet.add(2002);\n yearSet.add(2006);\n yearSet.add(2010);\n fieldnameSet.add(\"Bus\"); //Business and International Management\n fieldnameSet.add(\"Phy\"); //Physics & astronomy\n weightTypeSet.add(0);\n weightTypeSet.add(1);\n useWhatSet.add(1);\n useWhatSet.add(2);\n useWhatSet.add(3);\n int infoLevelAll=-1;\n process(rootFileName, inputDirectory, outputDirectory,\n yearSet, fieldnameSet,\n weightTypeSet,\n useWhatSet,\n ipf,\n extractGCC,\n minDegreeIn, minDegreeOut, minWeight,\n infoLevelAll);\n System.exit(0);\n }\n System.out.println(\"--- file name root \"+rootFileName);\n\n int year = 2002;\n ano++;\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) year=Integer.parseInt(args[ano].substring(1, args[ano].length())); \n System.out.println(\"--- Year used \"+year);\n yearSet.add(year);\n\n // Bus= Business and International Management\n // Phy= Physics & astronomy\n String fieldname = \"Phy\"; \n ano++;\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) fieldname=args[ano].substring(1, args[ano].length()); System.out.println(\"--- fieldname used \"+fieldname);\n fieldnameSet.add(fieldname);\n\n // 1 = total weight one for each paper, terms have equal weight, P1 in file name\n int weightType=1;\n ano++;\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) weightType=Integer.parseInt(args[ano].substring(1, args[ano].length())); \n if ((weightType<0) || (weightType>=weightTypeShort.length)) throw new RuntimeException(\"illegal weightType of \"+weightType+\", must be between 0 and \"+(weightTypeShort.length-1)+\" inclusive\");\n System.out.println(\"--- Weight Type \"+weightType+\" = \"+weightTypeDescription[weightType]);\n weightTypeSet.add(weightType);\n \n\n // 1,3= use title, 2,3=use keywords\n int useWhat=1;\n ano++;\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) useWhat=Integer.parseInt(args[ano].substring(1, args[ano].length())); \n boolean useTitle=((useWhat&1)>0);\n boolean useKeywords=((useWhat&2)>0);\n System.out.println(\"--- \"+(useTitle?\"U\":\"Not u\")+\"sing titles\");\n System.out.println(\"--- \"+(useKeywords?\"U\":\"Not u\")+\"sing keywords\");\n useWhatSet.add(useWhat);\n\n // 0 for normal, 1 for some, 2 for all debugging info, -1 for minimal\n int infoLevel=0;\n ano++;\n if ( (args.length>ano ) && (timgraph.isOtherArgument(args[ano]) )) infoLevel=Integer.parseInt(args[ano].substring(1, args[ano].length())); \n System.out.println(\"--- infoLevel=\"+infoLevel);\n boolean infoOn=(infoLevel>1);\n\n// if (args.length>ano ) if (timgraph.isOtherArgument(args[ano])) graphMLOutput=StringFilter.trueString(args[ano].charAt(1));\n\n\n process(rootFileName, inputDirectory, outputDirectory,\n yearSet, fieldnameSet,\n weightTypeSet,\n useWhatSet,\n ipf,\n extractGCC,\n minDegreeIn, minDegreeOut, minWeight,\n infoLevel);\n }", "public static void main(String[] args) {\n\t\tnem cpu = new nem();\r\n\t\t//creaye an object of inner class Processor using outer class\r\n\t\tnem.Processor processor = cpu.new Processor();\r\n\t\t//create an object of inner class RAM using outer class Multiarray\r\n\t\t\r\n\t\tnem.RAM ram = cpu.new RAM();\r\n\t\tSystem.out.println(\"\" + processor.getCache());\r\n\t\tSystem.out.println(\"\" + ram.getClockSpeed());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n\tpublic void testTreeloading() throws IOException{\n\t\tFile pFile = getResource(\"PTHR10000.arbre\");\n\t\tPANTHERTree ptree = new PANTHERTree(pFile);\n\t\t\n//\t\t// Trivial\n//\t\tOWLShuntGraph g = ptree.getOWLShuntGraph();\n//\t\tassertNotNull(g);\n\n\t\tSet<String> aSet = ptree.associatedIdentifierSet();\n\t\t\t\n\t\tassertTrue(\"Contains A\", aSet.contains(\"TAIR:At1g18640\"));\n\t\tassertTrue(\"Contains B\", aSet.contains(\"ENTREZ:3405244\"));\n\t\tassertTrue(\"Contains C\", aSet.contains(\"UniProtKB:Q4Q8D0\"));\n\t\tassertTrue(\"Contains D\", aSet.contains(\"NCBI:XP_001671160\"));\n\t\tassertTrue(\"Contains E\", aSet.contains(\"ZFIN:ZDB-GENE-050809-127\"));\n\t\tassertTrue(\"Contains F\", aSet.contains(\"ENSEMBL:AGAP012247\"));\n\t\tassertFalse(\"Does not contain A\", aSet.contains(\"TAIR:locus:2033535\"));\n\t\tassertFalse(\"Does not contain B\", aSet.contains(\"TAIR=locus=2043535\"));\n\t\tassertFalse(\"Does not contain C\", aSet.contains(\"ZFIN=ZDB-GENE-050809-127\"));\n\t\tassertFalse(\"Does not contain D\", aSet.contains(\"\"));\n\t\tassertFalse(\"Does not contain E\", aSet.contains(\"AN7\"));\n\t\tassertFalse(\"Does not contain F\", aSet.contains(\":\"));\n\t\tassertFalse(\"Does not contain G\", aSet.contains(\"GO:0022008\"));\n\t\t\n\t\t// DEBUG: Okay, now let's look at the generated graph a little.\n\t\t//OWLShuntGraph sg = ptree.getOWLShuntGraph();\n\t\t//String sg_json = sg.toJSON();\n\t\t//LOG.info(sg_json.toString());\n\t}", "public HIR\n getNextExecutableNode();", "public interface LptPackage extends EPackage {\n\t/**\n\t * The package name.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tString eNAME = \"lpt\";\n\n\t/**\n\t * The package namespace URI.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tString eNS_URI = \"http://www.github.com/aronbsz/automatalearning\";\n\n\t/**\n\t * The package namespace name.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tString eNS_PREFIX = \"lpt\";\n\n\t/**\n\t * The singleton instance of the package.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tLptPackage eINSTANCE = hu.bme.mit.lpt.impl.LptPackageImpl.init();\n\n\t/**\n\t * The meta object id for the '{@link hu.bme.mit.lpt.impl.LPTRootNodeImpl <em>LPT Root Node</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see hu.bme.mit.lpt.impl.LPTRootNodeImpl\n\t * @see hu.bme.mit.lpt.impl.LptPackageImpl#getLPTRootNode()\n\t * @generated\n\t */\n\tint LPT_ROOT_NODE = 0;\n\n\t/**\n\t * The feature id for the '<em><b>Children</b></em>' map.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_ROOT_NODE__CHILDREN = 0;\n\n\t/**\n\t * The number of structural features of the '<em>LPT Root Node</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_ROOT_NODE_FEATURE_COUNT = 1;\n\n\t/**\n\t * The number of operations of the '<em>LPT Root Node</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_ROOT_NODE_OPERATION_COUNT = 0;\n\n\t/**\n\t * The meta object id for the '{@link hu.bme.mit.lpt.impl.LPTUnloopedNodeImpl <em>LPT Unlooped Node</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see hu.bme.mit.lpt.impl.LPTUnloopedNodeImpl\n\t * @see hu.bme.mit.lpt.impl.LptPackageImpl#getLPTUnloopedNode()\n\t * @generated\n\t */\n\tint LPT_UNLOOPED_NODE = 1;\n\n\t/**\n\t * The feature id for the '<em><b>Children</b></em>' map.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_UNLOOPED_NODE__CHILDREN = LPT_ROOT_NODE__CHILDREN;\n\n\t/**\n\t * The feature id for the '<em><b>Output</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_UNLOOPED_NODE__OUTPUT = LPT_ROOT_NODE_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>LPT Unlooped Node</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_UNLOOPED_NODE_FEATURE_COUNT = LPT_ROOT_NODE_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>LPT Unlooped Node</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_UNLOOPED_NODE_OPERATION_COUNT = LPT_ROOT_NODE_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link hu.bme.mit.lpt.impl.LPTLoopedNodeImpl <em>LPT Looped Node</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see hu.bme.mit.lpt.impl.LPTLoopedNodeImpl\n\t * @see hu.bme.mit.lpt.impl.LptPackageImpl#getLPTLoopedNode()\n\t * @generated\n\t */\n\tint LPT_LOOPED_NODE = 2;\n\n\t/**\n\t * The feature id for the '<em><b>Children</b></em>' map.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_LOOPED_NODE__CHILDREN = LPT_UNLOOPED_NODE__CHILDREN;\n\n\t/**\n\t * The feature id for the '<em><b>Output</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_LOOPED_NODE__OUTPUT = LPT_UNLOOPED_NODE__OUTPUT;\n\n\t/**\n\t * The feature id for the '<em><b>Loop</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_LOOPED_NODE__LOOP = LPT_UNLOOPED_NODE_FEATURE_COUNT + 0;\n\n\t/**\n\t * The number of structural features of the '<em>LPT Looped Node</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_LOOPED_NODE_FEATURE_COUNT = LPT_UNLOOPED_NODE_FEATURE_COUNT + 1;\n\n\t/**\n\t * The number of operations of the '<em>LPT Looped Node</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint LPT_LOOPED_NODE_OPERATION_COUNT = LPT_UNLOOPED_NODE_OPERATION_COUNT + 0;\n\n\t/**\n\t * The meta object id for the '{@link hu.bme.mit.lpt.impl.EStringToLPTRootNodeMapImpl <em>EString To LPT Root Node Map</em>}' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @see hu.bme.mit.lpt.impl.EStringToLPTRootNodeMapImpl\n\t * @see hu.bme.mit.lpt.impl.LptPackageImpl#getEStringToLPTRootNodeMap()\n\t * @generated\n\t */\n\tint ESTRING_TO_LPT_ROOT_NODE_MAP = 3;\n\n\t/**\n\t * The feature id for the '<em><b>Key</b></em>' attribute.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ESTRING_TO_LPT_ROOT_NODE_MAP__KEY = 0;\n\n\t/**\n\t * The feature id for the '<em><b>Value</b></em>' reference.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ESTRING_TO_LPT_ROOT_NODE_MAP__VALUE = 1;\n\n\t/**\n\t * The number of structural features of the '<em>EString To LPT Root Node Map</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ESTRING_TO_LPT_ROOT_NODE_MAP_FEATURE_COUNT = 2;\n\n\t/**\n\t * The number of operations of the '<em>EString To LPT Root Node Map</em>' class.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t * @ordered\n\t */\n\tint ESTRING_TO_LPT_ROOT_NODE_MAP_OPERATION_COUNT = 0;\n\n\t/**\n\t * Returns the meta object for class '{@link hu.bme.mit.lpt.LPTRootNode <em>LPT Root Node</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>LPT Root Node</em>'.\n\t * @see hu.bme.mit.lpt.LPTRootNode\n\t * @generated\n\t */\n\tEClass getLPTRootNode();\n\n\t/**\n\t * Returns the meta object for the map '{@link hu.bme.mit.lpt.LPTRootNode#getChildren <em>Children</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the map '<em>Children</em>'.\n\t * @see hu.bme.mit.lpt.LPTRootNode#getChildren()\n\t * @see #getLPTRootNode()\n\t * @generated\n\t */\n\tEReference getLPTRootNode_Children();\n\n\t/**\n\t * Returns the meta object for class '{@link hu.bme.mit.lpt.LPTUnloopedNode <em>LPT Unlooped Node</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>LPT Unlooped Node</em>'.\n\t * @see hu.bme.mit.lpt.LPTUnloopedNode\n\t * @generated\n\t */\n\tEClass getLPTUnloopedNode();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link hu.bme.mit.lpt.LPTUnloopedNode#getOutput <em>Output</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Output</em>'.\n\t * @see hu.bme.mit.lpt.LPTUnloopedNode#getOutput()\n\t * @see #getLPTUnloopedNode()\n\t * @generated\n\t */\n\tEAttribute getLPTUnloopedNode_Output();\n\n\t/**\n\t * Returns the meta object for class '{@link hu.bme.mit.lpt.LPTLoopedNode <em>LPT Looped Node</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>LPT Looped Node</em>'.\n\t * @see hu.bme.mit.lpt.LPTLoopedNode\n\t * @generated\n\t */\n\tEClass getLPTLoopedNode();\n\n\t/**\n\t * Returns the meta object for the reference '{@link hu.bme.mit.lpt.LPTLoopedNode#getLoop <em>Loop</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Loop</em>'.\n\t * @see hu.bme.mit.lpt.LPTLoopedNode#getLoop()\n\t * @see #getLPTLoopedNode()\n\t * @generated\n\t */\n\tEReference getLPTLoopedNode_Loop();\n\n\t/**\n\t * Returns the meta object for class '{@link java.util.Map.Entry <em>EString To LPT Root Node Map</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for class '<em>EString To LPT Root Node Map</em>'.\n\t * @see java.util.Map.Entry\n\t * @model keyUnique=\"false\" keyDataType=\"org.eclipse.emf.ecore.EString\" keyRequired=\"true\"\n\t * valueType=\"hu.bme.mit.lpt.LPTRootNode\" valueRequired=\"true\"\n\t * @generated\n\t */\n\tEClass getEStringToLPTRootNodeMap();\n\n\t/**\n\t * Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Key</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the attribute '<em>Key</em>'.\n\t * @see java.util.Map.Entry\n\t * @see #getEStringToLPTRootNodeMap()\n\t * @generated\n\t */\n\tEAttribute getEStringToLPTRootNodeMap_Key();\n\n\t/**\n\t * Returns the meta object for the reference '{@link java.util.Map.Entry <em>Value</em>}'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the meta object for the reference '<em>Value</em>'.\n\t * @see java.util.Map.Entry\n\t * @see #getEStringToLPTRootNodeMap()\n\t * @generated\n\t */\n\tEReference getEStringToLPTRootNodeMap_Value();\n\n\t/**\n\t * Returns the factory that creates the instances of the model.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the factory that creates the instances of the model.\n\t * @generated\n\t */\n\tLptFactory getLptFactory();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * Defines literals for the meta objects that represent\n\t * <ul>\n\t * <li>each class,</li>\n\t * <li>each feature of each class,</li>\n\t * <li>each operation of each class,</li>\n\t * <li>each enum,</li>\n\t * <li>and each data type</li>\n\t * </ul>\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tinterface Literals {\n\t\t/**\n\t\t * The meta object literal for the '{@link hu.bme.mit.lpt.impl.LPTRootNodeImpl <em>LPT Root Node</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see hu.bme.mit.lpt.impl.LPTRootNodeImpl\n\t\t * @see hu.bme.mit.lpt.impl.LptPackageImpl#getLPTRootNode()\n\t\t * @generated\n\t\t */\n\t\tEClass LPT_ROOT_NODE = eINSTANCE.getLPTRootNode();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Children</b></em>' map feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference LPT_ROOT_NODE__CHILDREN = eINSTANCE.getLPTRootNode_Children();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link hu.bme.mit.lpt.impl.LPTUnloopedNodeImpl <em>LPT Unlooped Node</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see hu.bme.mit.lpt.impl.LPTUnloopedNodeImpl\n\t\t * @see hu.bme.mit.lpt.impl.LptPackageImpl#getLPTUnloopedNode()\n\t\t * @generated\n\t\t */\n\t\tEClass LPT_UNLOOPED_NODE = eINSTANCE.getLPTUnloopedNode();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Output</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute LPT_UNLOOPED_NODE__OUTPUT = eINSTANCE.getLPTUnloopedNode_Output();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link hu.bme.mit.lpt.impl.LPTLoopedNodeImpl <em>LPT Looped Node</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see hu.bme.mit.lpt.impl.LPTLoopedNodeImpl\n\t\t * @see hu.bme.mit.lpt.impl.LptPackageImpl#getLPTLoopedNode()\n\t\t * @generated\n\t\t */\n\t\tEClass LPT_LOOPED_NODE = eINSTANCE.getLPTLoopedNode();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Loop</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference LPT_LOOPED_NODE__LOOP = eINSTANCE.getLPTLoopedNode_Loop();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link hu.bme.mit.lpt.impl.EStringToLPTRootNodeMapImpl <em>EString To LPT Root Node Map</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see hu.bme.mit.lpt.impl.EStringToLPTRootNodeMapImpl\n\t\t * @see hu.bme.mit.lpt.impl.LptPackageImpl#getEStringToLPTRootNodeMap()\n\t\t * @generated\n\t\t */\n\t\tEClass ESTRING_TO_LPT_ROOT_NODE_MAP = eINSTANCE.getEStringToLPTRootNodeMap();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Key</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute ESTRING_TO_LPT_ROOT_NODE_MAP__KEY = eINSTANCE.getEStringToLPTRootNodeMap_Key();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Value</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference ESTRING_TO_LPT_ROOT_NODE_MAP__VALUE = eINSTANCE.getEStringToLPTRootNodeMap_Value();\n\n\t}\n\n}", "public EtherpadExtension()\n {\n super(ELEMENT, NAMESPACE);\n }", "public TurkeyMarket()\n {\n System.out.println(\"### Turkey Market is created. ###\\n\");\n }", "@Override\n public ITestbed create(ITasResolver tasResolver) {\n List<String> emChosenFeatures = Arrays.asList(\"Enterprise Manager\", \"WebView\");\n\n \n // Collector1 role\n EmRole collector1Role =\n new EmRole.LinuxBuilder(COLLECTOR1_ROLE_ID, tasResolver)\n .emClusterRole(DeployEMFlowContext.EmRoleEnum.COLLECTOR)\n .silentInstallChosenFeatures(emChosenFeatures)\n .dbhost(tasResolver.getHostnameById(MOM_ROLE_ID))\n .installDir(TasBuilder.LINUX_SOFTWARE_LOC+\"em_col\")\n .emPort(5005).emWebPort(8085).wvEmPort(8090)\n .nostartEM().nostartWV()\n .build();\n \n // MOM role\n EmRole momRole =\n new EmRole.LinuxBuilder(MOM_ROLE_ID, tasResolver)\n .emClusterRole(DeployEMFlowContext.EmRoleEnum.MANAGER)\n .emCollector(collector1Role)\n .nostartEM().nostartWV().build();\n \n //CDV role\n EmRole cdvRole = new EmRole.LinuxBuilder(CDV_ROLE_ID, tasResolver)\n .emClusterRole(DeployEMFlowContext.EmRoleEnum.CDV)\n .silentInstallChosenFeatures(emChosenFeatures)\n .emCollector(collector1Role)\n .nostartEM().nostartWV().build();\n\n // QAAppRole for Tomcat\n WebAppRole<TomcatRole> qaAppTomcatRole =\n new QaAppTomcatRole.Builder(QA_APP_TOMCAT_ROLE_ID, tasResolver)\n .cargoDeploy().contextName(\"qa-app\")\n .build(); \n\n // Tomcat Role\n TomcatRole tomcatRole =\n new TomcatRole.LinuxBuilder(TOMCAT_ROLE_ID, tasResolver).tomcatVersion(TomcatVersion.v70)\n .tomcatCatalinaPort(9091).webApp(qaAppTomcatRole).build();\n\n // Tomcat Agent Role\n IRole tomcatAgentRole =\n new AgentRole.LinuxBuilder(TOMCAT_AGENT_ROLE_ID, tasResolver).webAppServer(tomcatRole)\n .intrumentationLevel(AgentInstrumentationLevel.FULL).emRole(momRole)\n .build();\n \n \n // Configuration of Cdv machine\n TestbedMachine cdvMachine =\n TestBedUtils\n .createLinuxMachine(CDV_MACHINE_ID, EM_TEMPLATE_ID, cdvRole); \n \n // Configuration of Collector1 machine\n TestbedMachine emMachine =\n TestBedUtils\n .createLinuxMachine(EM_MACHINE_ID, EM_TEMPLATE_ID, momRole, collector1Role);\n\n\n // Configuration of Agent Machine\n TestbedMachine agentMachine =\n TestBedUtils.createLinuxMachine(AGENT_MACHINE_ID, AGENT_MACHINE_TEMPLATE_ID,\n tomcatRole, qaAppTomcatRole, tomcatAgentRole);\n \n return Testbed.create(this, cdvMachine, emMachine, agentMachine);\n\n }", "public static void main(String... args) throws Exception {\n final Component component = new Component();\n component.getServers().add(Protocol.HTTP, 8585);\n component.getClients().add(Protocol.FILE);\n component.getClients().add(Protocol.CLAP);\n component.getClients().add(Protocol.HTTP);\n // Attach the application to the default host and start it\n component.getDefaultHost().attach(\"/rmep\", new Application());\n component.start();\n }", "public static void main(String[] args) throws MqttSecurityException, MqttException, InterruptedException,\n\t\t\tKeyManagementException, NoSuchAlgorithmException, KeyStoreException {\n\t\ttry {\n\t\t\tjas=new JsonAnalysis();\n\t\t\tjas.getInfo();\n\t\t\tMqttConfigInfo config = tidyMqttConfig();\n\t\t\tMqttConnectOptions options = tidyMqttOptions(config);\n\t\t\tMqttsClientCallback callback = new MqttsClientCallback();\n\t\t\tMqttClient client = createMqttClient(MqttClient.generateClientId(), callback, config, options);\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"mqtts error 0!\");\n\t\t}\n\t}", "public static void main(String[] args) throws Exception{\n /* get location of the generic registry service */\n String rmiRegHostName;\n int rmiRegPortNumber;\n \n Scanner sc = new Scanner(System.in);\n int listeningPort = 22324;\n String nameEntry = RegistryConfig.bettingCenterNameEntry;\n \n System.out.println(\"Node process host name(RMI Service Host Name): \");\n rmiRegHostName = sc.nextLine();\n System.out.println(\"Node process port number(RMI Service Port Number): \");\n rmiRegPortNumber = sc.nextInt();\n \n /* Instanciate and install security manager */\n if(System.getSecurityManager() == null){\n System.setSecurityManager(new SecurityManager());\n }\n \n /* Get Central Registry */\n Registry registry = null;\n try{\n registry = LocateRegistry.getRegistry(rmiRegHostName, rmiRegPortNumber);\n }catch(RemoteException e){\n System.err.println(\"Wrong registry location!!!\");\n System.exit(1);\n }\n System.out.println(\"RMI Registry created!\");\n \n /* Get LogRepository register */\n Log_Interface log_itf = null;\n try{\n log_itf = (Log_Interface) registry.lookup(RegistryConfig.logRepositoryNameEntry);\n } catch (NotBoundException e){\n System.out.println(\"LogRepository lookup exception: \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n }\n \n /* Create Betting Center Stub */\n Betting_Center betting_center = new Betting_Center(log_itf, GlobalInfo.numSpec, rmiRegHostName, rmiRegPortNumber);\n BettingCenter_Itf betting_center_itf = null;\n \n try{\n betting_center_itf = (BettingCenter_Itf) UnicastRemoteObject.exportObject(betting_center, listeningPort);\n } catch (RemoteException e) {\n System.out.println(\"Betting stub create exception: \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n }\n System.out.print(\"Betting Center Stub created!\\n\");\n \n /* Register RMI register */\n Register register = null;\n String nameEntryBase = RegistryConfig.rmiRegisterName;\n try {\n register = (Register) registry.lookup(nameEntryBase);\n } catch (RemoteException | NotBoundException ex) {\n System.out.println(\"Wrong register location!\");\n System.exit (1);\n }\n \n try {\n register.bind(nameEntry, betting_center_itf);\n } catch (RemoteException e) {\n System.out.println(\"Betting Center register exception \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n } catch (Exception e) {\n System.out.println(\"Betting Center is already registered: \" + e.getMessage());\n e.printStackTrace();\n System.exit(1);\n }\n System.out.println(\"Betting Center module has been registered!\");\n }", "public static void main( String[] args )\n {\n\t//PROTIP: try creating a few nodes: traversible, connected...\n\t//note anything notable as you develop and test...\n\n\tLLNode zoo = new LLNode();\n\tLLNode wee = new LLNode();\n\tLLNode mama = new LLNode();\n\tSystem.out.println(zoo.setCargo( \"kylie\" ));\n\tSystem.out.println(zoo.setCargo( \"kayli\" ));\n\tSystem.out.println(wee.setCargo( \"jade\" ));\n\tSystem.out.println(mama.setCargo( \"matsuyoshi\" ));\n\tSystem.out.println(mama.getCargo());\n\tSystem.out.println(zoo.setNext( wee ));\n\tSystem.out.println(wee.setNext( mama ));\n\tSystem.out.println(zoo.toString());\n\tSystem.out.println(wee.toString());\n\t\n }", "private TPM_DIGEST setupInitialTransDigest()\r\n {\r\n// if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_BROADCOM )\r\n// {\r\n// return null;\r\n// }\r\n// else\r\n// {\r\n// return new TPM_DIGEST();\r\n// }\r\n if ( this.getTpmManufacturer() == TPMDriver.TPM_MANUFACTURER_INFINEON )\r\n {\r\n return new TPM_DIGEST();\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n \r\n }", "private String generateManifestMF(ConcreteSyntax cSyntax, String packageName) {\n StringBuffer s = new StringBuffer();\n \n s.append(\"Manifest-Version: 1.0\\n\");\n s.append(\"Bundle-ManifestVersion: 2\\n\");\n s.append(\"Bundle-Name: EMFTextEdit Parser Plugin: \" + cSyntax.getName() + \"\\n\");\n s.append(\"Bundle-SymbolicName: \" + packageName + \";singleton:=true\\n\");\n s.append(\"Bundle-Version: 1.0.0\\n\");\n s.append(\"Bundle-Vendor: Software Engineering Group - TU Dresden Germany\\n\");\n //s.append(\"Bundle-Localization: plugin\\n\");\n s.append(\"Require-Bundle: org.eclipse.core.runtime,\\n\");\n s.append(\" org.eclipse.emf.ecore,\\n\");\n s.append(\" \" + cSyntax.getPackage().getGenModel().getModelPluginID() + \",\\n\");\n if(EMFTextEditUIPlugin.getDefault().getPreferenceStore().getBoolean(EMFTextEditUIPlugin.GENERATE_TEST_ACTION_NAME)){\n s.append(\" org.reuseware.emftextedit.test,\\n\");\t\n }\n EList<GenModel> importedPlugins = new BasicEList<GenModel>();\n for(Import aImport : cSyntax.getImports()) {\n \tGenModel m = aImport.getPackage().getGenModel();\n \tif (!importedPlugins.contains(m)) {\n s.append(\" \" + m.getModelPluginID() + \",\\n\");\n \t\timportedPlugins.add(m);\n \t}\n }\n s.append(\" org.reuseware.emftextedit\\n\");\n s.append(\"Bundle-ActivationPolicy: lazy\\n\");\n s.append(\"Bundle-RequiredExecutionEnvironment: J2SE-1.5\\n\");\n // export the generated package\n s.append(\"Export-Package: \" + packageName + \"\\n\");\n \n return s.toString();\n }", "public static void main(String[] args) throws IOException {\n\r\n ParserMain Parse = new ParserMain(args);\r\n Node n_program = Parse.program();\r\n\tSystem.out.println(\"\\ninside parser: parsing end, pass tree ro type checking\\n\");\r\n CodeGener cg= new CodeGener(n_program,args[0]); ////////////////////////////////////////////////////////////////////////////////////kavita\r\n h_typeCheckingClass tp = new h_typeCheckingClass(n_program);\r\n Node result = tp.starttype(n_program);\r\n\tSystem.out.println(\"\\ninside parser: TYPE checking end, pass tree to WRITING AST\\n\");\r\n AST2word ast=new AST2word();\r\n ast.read(result, args);\r\n\r\n\r\n\r\n\r\n }", "@Test\n public void testKubevirtGatweayNodeEncode() {\n KubevirtNode node = DefaultKubevirtNode.builder()\n .hostname(\"gateway\")\n .type(KubevirtNode.Type.GATEWAY)\n .state(KubevirtNodeState.INIT)\n .managementIp(IpAddress.valueOf(\"10.10.10.1\"))\n .intgBridge(DeviceId.deviceId(\"br-int\"))\n .tunBridge(DeviceId.deviceId(\"br-tun\"))\n .dataIp(IpAddress.valueOf(\"20.20.20.2\"))\n .gatewayBridgeName(\"gateway\")\n .build();\n\n ObjectNode nodeJson = kubevirtNodeCodec.encode(node, context);\n assertThat(nodeJson, matchesKubevirtNode(node));\n }", "public ProgramModule getRootModule(String treeName);", "public TCgthmaster() {\n super();\n }", "ControllerNode localNode();", "public BccManifest(String alias) {\n this(DSL.name(alias), BCC_MANIFEST);\n }", "public _cls_script_13( AutomatonInstance ta,UserAccount _ua,UserInfo _ui) {\nparent = _cls_script_12._get_cls_script_12_inst( _ua,_ui);\nthis.ta = ta;\n}", "public Node(Network network,int address) {\n // TODO Auto-generated constructor stub\n this.network = network;\n this.address=address;\n this.key = null;\n }", "NodeConnection createNodeConnection();", "public static void main(java.lang.String[] args) throws java.lang.Exception {\n java.lang.System.out.println(\"Bootstrapping mutant\");\n java.net.URL bootstrapURL = org.apache.ant.init.ClassLocator.getClassLocationURL(org.apache.ant.bootstrap.Bootstrap.class);\n java.net.URL builderURL = new java.net.URL(bootstrapURL, \"../builder/\");\n java.net.URL toolsJarURL = org.apache.ant.init.ClassLocator.getToolsJarURL();\n java.net.URL[] urls = new java.net.URL[]{ builderURL, toolsJarURL };\n java.lang.ClassLoader builderLoader = new java.net.URLClassLoader(urls);\n // org.apache.ant.init.LoaderUtils.dumpLoader(System.out,\n // builderLoader);\n java.lang.Class builderClass = java.lang.Class.forName(\"org.apache.ant.builder.Builder\", true, builderLoader);\n final java.lang.Class[] param = new java.lang.Class[]{ java.lang.Class.forName(\"[Ljava.lang.String;\") };\n final java.lang.reflect.Method main = builderClass.getMethod(\"main\", param);\n final java.lang.Object[] argument = new java.lang.Object[]{ args };\n main.invoke(null, argument);\n }", "public void testNodeConversion() throws Exception {\n StringMetadataDefinition string = new StringMetadataDefinition(\"string\", \"myValue\");\n TreeNodeMetadataDefinition tree = new TreeNodeMetadataDefinition(\"tree\");\n tree.addChild(string);\n List<AbstractMetadataDefinition> list = new LinkedList<AbstractMetadataDefinition>();\n list.add(tree);\n PluginImpl.getInstance().setDefinitions(list);\n FreeStyleProject freeStyleProject = createFreeStyleProject();\n configRoundtrip(freeStyleProject);\n MetadataJobProperty property = freeStyleProject.getProperty(MetadataJobProperty.class);\n assertNotNull(\"No MetadataJobProperty\", property);\n StringMetadataValue stringMetadataValue =\n (StringMetadataValue)TreeStructureUtil.getLeaf(property, \"tree\", \"string\");\n assertNotNull(stringMetadataValue);\n assertEquals(\"myValue\", stringMetadataValue.getValue());\n }", "static public void main(String[] args) throws IOException, ClassNotFoundException\n\t{\n\t\tString loggingPath = \"logging.properties\";\n\t\tSystem.setProperty(\"java.util.logging.config.file\", loggingPath);\n\n\t\tString kbPath = \"/opt/data/nlp/sumo/SumoKB\";\n\t\tSystem.out.printf(\"Kb building%n\");\n\t\tfinal KB kb = new SUMOKb().make(kbPath);\n\t\tSystem.out.printf(\"%nKb built%n\");\n\t\tSystem.out.printf(\"Kb1%n\");\n\t\tdumpKb(kb);\n\t\tmakeClausalForms(kb);\n\n\t\tSystem.out.printf(\"%nKb serializing%n\");\n\t\tSerializer.serializeFile(\"./sumokb.ser\", kb);\n\t\tSerializer.serializeZip(\"./sumo.zip\", \"kb\", kb);\n\t\tSystem.out.printf(\"Kb serialized%n\");\n\n\t\tSystem.out.printf(\"%nKb de-serializing%n\");\n\t\tKB kb2 = (KB) DeSerializer.deserializeZip(\"./sumo.zip\", \"kb\");\n\t\tKB kb3 = (KB) DeSerializer.deserializeFile(\"./sumokb.ser\");\n\t\tSystem.out.printf(\"Kb de-serialized%n\");\n\t\tSystem.out.printf(\"Kb2%n\");\n\t\tdumpKb(kb2);\n\t\tSystem.out.printf(\"Kb3%n\");\n\t\tdumpKb(kb3);\n\n\t\tSystem.out.printf(\"%nDone\");\n\t}", "public static void main(String[] args) {\n final GraphNode root=new GraphBuilderConcurentV0().build(XOField.Figure.X,new XOField(),0);\n\n System.out.println(root.getNode());\n// GraphHelper.show(root,0);\n System.out.println(GraphHelper.countNodes(root));\n }", "public Backend() {\t\t\n\t\tthis.rpc = new HttpPost(Backend.URL_BASE + Backend.URL_PATH_RPC);\n\t\tthis.rpc.setHeader(Backend.HEADER_CONTENT_TYPE, Backend.HEADER_VALUE_CONTENT_TYPE);\n\t\t\n\t\tthis.shutdown = new HttpGet(Backend.URL_BASE + Backend.URL_PATH_SHUTDOWN);\n\t\tthis.ping = new HttpGet(Backend.URL_BASE + Backend.URL_PATH_PING);\n\t\tthis.guid = new HttpGet(Backend.URL_BASE + Backend.URL_PATH_GUID);\n\t\t\n\t\tFile basePath = new File(\"\");\n\t\ttry {\n\t\t\tbasePath = new File(FileLocator.toFileURL(Activator.getDefault().getBundle().getEntry(\"/\")).toURI());\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Could not resolve bundle absolute path.\");\n\t\t\tSystem.err.print(e);\n\t\t}\n\t\t\n\t\tthis.processRunner.setProcessPath(new File(basePath, Backend.NODE_PATH).getAbsolutePath());\n\t\tthis.processRunner.setArguments(\n\t\t\tnew File(basePath, Backend.APPLICATION_ENTRY_PATH).getAbsolutePath(),\n\t\t\tBackend.APPLICATION_OPTIONS\n\t\t);\n\t}", "public static void main(String []args) \n\t{ \n\t\tnew BMTron();\n\t}", "public FlowNodeInstance() {\n\t}", "TNode createTNode();", "BlockChainLink getGenesisLink();", "public DefaultRouterNode() {\n }" ]
[ "0.58309406", "0.54727846", "0.49712262", "0.49674737", "0.49152017", "0.4873573", "0.48339546", "0.4786473", "0.47528595", "0.47315332", "0.47315332", "0.46591112", "0.46535784", "0.46210638", "0.46196803", "0.45909837", "0.45550618", "0.45496625", "0.451076", "0.45012572", "0.44912547", "0.44860736", "0.4469368", "0.4466344", "0.44553414", "0.4453328", "0.44428754", "0.4439255", "0.4439255", "0.4431981", "0.4429804", "0.44268003", "0.44136444", "0.4402878", "0.43907934", "0.43878838", "0.4363713", "0.43618777", "0.43612817", "0.4358677", "0.43564045", "0.435334", "0.4347248", "0.4343735", "0.43434158", "0.43432793", "0.43375492", "0.4334213", "0.4328231", "0.4317797", "0.42966846", "0.42945784", "0.4292113", "0.42913824", "0.42846677", "0.42842686", "0.42833206", "0.42820024", "0.4275052", "0.42749822", "0.42569876", "0.4255432", "0.42532265", "0.42502078", "0.42482927", "0.42414084", "0.42275465", "0.42269546", "0.42243335", "0.42232883", "0.42217234", "0.42197043", "0.42175388", "0.42077816", "0.42055574", "0.41969246", "0.4195878", "0.4195836", "0.4189834", "0.41896608", "0.4189563", "0.41894495", "0.4185986", "0.4182496", "0.4179342", "0.41776475", "0.41744494", "0.41723323", "0.41634053", "0.41595566", "0.4157612", "0.41510245", "0.4145563", "0.41453958", "0.41402102", "0.4139546", "0.41373652", "0.4136103", "0.4131936", "0.4131431" ]
0.6453898
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_home, container, false); tabLayout = view.findViewById(R.id.tabs); viewPager = view.findViewById(R.id.viewpager); setViewPager(); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
TODO fix this!!!! (equals)
@Override public String toString() { return String.format("FrameData[%d: %d x %d] (%d,%d,%d) %s", frameId, width, height, d3dShareHandle, ioSurfaceHandle, textureName, surfaceData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "private Equals() {}", "String getEqual();", "@Override\n public boolean equals(Object other) {\n return super.equals(other);\n }", "@Override\n\t\tpublic boolean equals(Object obj) {\n\t\t\treturn super.equals(obj);\n\t\t}", "@Override\n\tpublic boolean equals(Object obj){\n\t\treturn super.equals(obj);\n\t}", "@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}", "@Override\n\tpublic boolean equals(Object other)\n\t{\n\t\treturn false;\n\t}", "@Override\r\n public boolean equals(Object obj) {\r\n return super.equals(obj);\r\n }", "@Override\n public final boolean equals( Object obj ) {\n return super.equals(obj);\n }", "@Override\n public final boolean equals(final Object other) {\n return super.equals(other);\n }", "@Override\n public boolean equals(Object o1) {\n return super.equals(o1);\n }", "@Override\n public boolean equals(Object other) {\n return this == other;\n }", "@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }", "@Override\n protected boolean runInEQ() {\n return true;\n }", "@Override\n public boolean equals(Object other) {\n return false;\n }", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn super.equals(o);\n\t}", "@Override\n public boolean equals(Object o) {\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n return this == obj;\n }", "@Override\n public int hashCode() {\n return 1;\n }", "@Override\n public final boolean equals(Object obj) {\n return super.equals(obj);\n }", "@Override\r\n\tpublic boolean equals(Object arg0) {\n\t\treturn super.equals(arg0);\r\n\t}", "@Override\n public boolean equals(Object obj) {\n return this == obj;\n }", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n public boolean equals(final Object obj) {\n return super.equals(obj);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn super.equals(arg0);\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn super.equals(arg0);\n\t}", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "public void testEquals() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n XIntervalDataItem item2 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n }", "boolean hasIsEquivalent();", "private static boolean equalityTest3(String a, String b)\n {\n return System.identityHashCode(a) == System.identityHashCode(b);\n }", "@Override\n public boolean equals(Object o) {\n return this == o;\n }", "@Override\n public boolean equals(Object obj) {\n \n //TODO: Complete Method\n \n return true;\n }", "@Override\n public boolean equals(Object o) {\n return false;\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "public void testObjEqual()\n {\n assertEquals( true, Util.objEqual(null,null) );\n assertEquals( false,Util.objEqual(this,null) );\n assertEquals( false,Util.objEqual(null,this) );\n assertEquals( true, Util.objEqual(this,this) );\n assertEquals( true, Util.objEqual(\"12\",\"12\") );\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Acquirente)) {\n return false;\n }\n Acquirente that = (Acquirente) other;\n if (this.getIdacquirente() != that.getIdacquirente()) {\n return false;\n }\n return true;\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Sanpham)) {\n return false;\n }\n Sanpham that = (Sanpham) other;\n Object myMasp = this.getMasp();\n Object yourMasp = that.getMasp();\n if (myMasp==null ? yourMasp!=null : !myMasp.equals(yourMasp)) {\n return false;\n }\n return true;\n }", "protected abstract Set method_1559();", "@Override\r\n \tpublic boolean equals(final Object obj) {\r\n \t\t// Insert code to compare the receiver and obj here.\r\n \t\t// This implementation forwards the message to super. You may replace or supplement this.\r\n \t\t// NOTE: obj might be an instance of any class\r\n \t\treturn super.equals(obj);\r\n \t}", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof BlastingtypeRelationsAud)) {\n return false;\n }\n BlastingtypeRelationsAud that = (BlastingtypeRelationsAud) other;\n Object myBtrAudUid = this.getBtrAudUid();\n Object yourBtrAudUid = that.getBtrAudUid();\n if (myBtrAudUid==null ? yourBtrAudUid!=null : !myBtrAudUid.equals(yourBtrAudUid)) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}", "private boolean isValuesEqual(BinaryMessage tocmp, BinaryMessage original) {\n\t\tif(tocmp.getValue().equals(original.getValue())) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn super.hashCode(); //Default implementation; may need to bring in line to equals\n\t\t}", "@Test\n\tpublic void equalsSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tboolean equals = key1.equals(key2);\n\t\tSystem.out.println();\n\t\tAssert.assertTrue(equals);\n\t}", "@Test\n public void testEquals() {\n Term t1 = structure(\"abc\", atom(\"a\"), atom(\"b\"), atom(\"c\"));\n Term t2 = structure(\"abc\", integerNumber(), decimalFraction(), variable());\n PredicateKey k1 = PredicateKey.createForTerm(t1);\n PredicateKey k2 = PredicateKey.createForTerm(t2);\n testEquals(k1, k2);\n }", "@Override\n protected int compareToInner(ExtractedParameterValue o) {\n return 0;\n }", "@Test\n public void testEquals() {\n \t\n \t//create data set\n \tString strJava = \"java\";\n \tString strScala = \"scala\";\n \tString strPhp = \"php\";\n \t\n \tfinal LastWriteWinSet<String> lastWriteWinSet1 = new LastWriteWinSet<>();\n\n \tlastWriteWinSet1.add(time1, strJava);\n \tlastWriteWinSet1.add(time1, strScala);\n \tlastWriteWinSet1.add(time1, strPhp);\n\n \tlastWriteWinSet1.delete(time2, strJava);\n \n final LastWriteWinSet<String> lastWriteWinSet2 = new LastWriteWinSet<>();\n\n lastWriteWinSet2.add(time1, strJava);\n lastWriteWinSet2.add(time1, strScala);\n lastWriteWinSet2.add(time1, strPhp);\n\n lastWriteWinSet2.delete(time2, strJava);\n \n final LastWriteWinSet<String> lastWriteWinSet3 = lastWriteWinSet2;\n \t\n assertTrue(lastWriteWinSet1.equals(lastWriteWinSet2));\n assertTrue(lastWriteWinSet3.equals(lastWriteWinSet2));\n assertTrue(lastWriteWinSet1.equals(lastWriteWinSet1));\n assertTrue(!lastWriteWinSet1.equals(null));\n }", "@Override\n public abstract boolean equals(Object abc);", "protected boolean equals(URL paramURL1, URL paramURL2) {\n/* 336 */ String str1 = paramURL1.getRef();\n/* 337 */ String str2 = paramURL2.getRef();\n/* 338 */ return ((str1 == str2 || (str1 != null && str1.equals(str2))) && \n/* 339 */ sameFile(paramURL1, paramURL2));\n/* */ }", "@Override \n boolean equals(Object obj);", "public boolean DEBUG_compare(Alphabet other) {\n System.out.println(\"now comparing the alphabets this with other:\\n\"+this+\"\\n\"+other);\n boolean sameSlexic = true;\n for (String s : other.slexic.keySet()) {\n if (!slexic.containsKey(s)) {\n sameSlexic = false;\n break;\n }\n if (!slexic.get(s).equals(other.slexic.get(s))) {\n sameSlexic = false;\n break;\n }\n slexic.remove(s);\n }\n System.out.println(\"the slexic attributes are the same : \" + sameSlexic);\n boolean sameSlexicinv = true;\n for (int i = 0, limit = other.slexicinv.size(); i < limit; i++) {\n boolean temp = false;\n for (int j = i, limit2 = slexicinv.size() + i; j < limit2; j++) {\n int k = j % slexicinv.size();\n if (other.slexicinv.get(i).equals(slexicinv.get(k))) {\n temp = true;\n break;\n }\n }\n if (!temp) {\n sameSlexicinv = false;\n break;\n }\n\n }\n boolean sameSpair = true;\n System.out.println(\"the slexicinv attributes are the same : \" + sameSlexicinv);\n for (IntegerPair p : other.spair.keySet()) {\n if(!spair.containsKey(p)) {\n //if (!containsKey(spair, p)) {\n sameSpair = false;\n break;\n }\n //if (!(get(spair, p).equals(get(a.spair, p)))) {\n if (!spair.get(p).equals(other.spair.get(p))) {\n sameSpair = false;\n break;\n }\n }\n System.out.println(\"the spair attributes are the same : \" + sameSpair);\n boolean sameSpairinv = true;\n for (int i = 0, limit = other.spairinv.size(); i < limit; i++) {\n boolean temp = false;\n for (int j = i, limit2 = spairinv.size() + i; j < limit2; j++) {\n int k = j % spairinv.size();\n if (other.spairinv.get(i).equals(spairinv.get(k))) {\n temp = true;\n break;\n }\n }\n if (!temp) {\n sameSpairinv = false;\n break;\n }\n }\n System.out.println(\"the spairinv attributes are the same : \" + sameSpairinv);\n return (sameSpairinv && sameSpair && sameSlexic && sameSlexicinv);\n }", "@Test\r\n public void testEquals() throws Exception\r\n {\r\n Object expectedValueToEqual = new Object();\r\n ValueEquals sut = new ValueEquals(\"MyReplaceId\", expectedValueToEqual);\r\n assertEquals(sut.compareDataSetElementTo(expectedValueToEqual), 0);\r\n ;\r\n }", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}", "private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }", "private boolean oneEquals(AccessPath that) {\n //if (this._n != that._n) return false;\n if (this._field != that._field) return false;\n if (this._last != that._last) return false;\n if (this.succ.size() != that.succ.size()) return false;\n return true;\n }", "private boolean equals() {\r\n return MARK(EQUALS) && CHAR('=') && gap();\r\n }", "@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }", "private boolean isEqual(Iterator<?> instance, OasisList<?> baseList) {\n\n boolean equal = true;\n int i = 0;\n while (instance.hasNext()) {\n if (!baseList.get(i++).equals(instance.next())) {\n equal = false;\n break;\n }\n }\n\n return equal;\n }", "private boolean equalKeys(Object other) {\r\n if (this == other) {\r\n return true;\r\n }\r\n if (!(other instanceof Contacto)) {\r\n return false;\r\n }\r\n Contacto that = (Contacto) other;\r\n if (this.getIdContacto() != that.getIdContacto()) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override //function was implemented as abstract in super class\n public boolean Equals(Instruction toCompare){\n if(toCompare == null)\n return false;\n Extra temp = (Extra) toCompare; //downcast for valid comparison\n if(this.Price != temp.Price || this.Allergens != temp.Allergens || !this.Notes.equals(temp.Notes) || this.Density != temp.Density || !this.Topping.equals(temp.Topping) || this.Vegetarian != Vegetarian)\n return false;\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n Pair temp = (Pair) obj;\n if(left == temp.left && right == temp.right) {\n return true;\n } else {\n return false;\n }\n }", "public void testEquals() {\n TaskSeries s1 = new TaskSeries(\"S\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S\");\n s2.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeries s1b = new TaskSeries(\"S\");\n s1b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2b = new TaskSeries(\"S\");\n s2b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c2 = new TaskSeriesCollection();\n c2.add(s1b);\n c2.add(s2b);\n }", "@Override\r\n\tpublic boolean equals(Object other) {\r\n\t\treturn (this.iD - other.hashCode()) == 0;\r\n\t}", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "public boolean equals(XMLString anObject) {\n/* 186 */ return this.m_str.equals(anObject.toString());\n/* */ }", "private void testEquals() {\n init();\n assertTrue(\"l0.equals(l0)\", l0.equals(l0));\n assertTrue(\"l3.equals(l5)\", l3.equals(l5));\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "public boolean equals(Object anObject) {\n/* 205 */ return this.m_str.equals(anObject);\n/* */ }", "private static boolean equalityTest1(String a, String b)\n {\n return a == b;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn EqualsBuilder.reflectionEquals(this, obj);\n\t}", "public /*override*/ boolean Equals(Object obj)\r\n { \r\n if(obj instanceof LocalValueEnumerator)\r\n { \r\n LocalValueEnumerator other = (LocalValueEnumerator) obj; \r\n\r\n return (_count == other._count && \r\n _index == other._index &&\r\n _snapshot == other._snapshot);\r\n }\r\n else \r\n {\r\n // being compared against something that isn't a LocalValueEnumerator. \r\n return false; \r\n }\r\n }", "private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }", "private static boolean equiv(VObject src, VObject dst)\n {\n return ((src.getId() != null && src.getId().equals(dst.getId()))\n || (src.getSid() != null && src.getSid().equals(dst.getSid())) \n || (src.getName() != null && src.getName().equals(dst.getName())));\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }", "@Override\r\n\t\tpublic boolean implementEquals(Object obj) {\n\t\t\treturn false;\r\n\t\t}", "private static boolean m4280b(Object obj, Object obj2) {\n if (obj != obj2) {\n if (obj == null || obj.equals(obj2) == null) {\n return null;\n }\n }\n return true;\n }", "@Test\n public void testEquals_1() {\n LOGGER.info(\"testEquals_1\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hello\");\n final boolean actual = atomString.equals(atom);\n assertTrue(actual);\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof ApptranregFeesAud)) {\n return false;\n }\n ApptranregFeesAud that = (ApptranregFeesAud) other;\n Object myAtrfAudUid = this.getAtrfAudUid();\n Object yourAtrfAudUid = that.getAtrfAudUid();\n if (myAtrfAudUid==null ? yourAtrfAudUid!=null : !myAtrfAudUid.equals(yourAtrfAudUid)) {\n return false;\n }\n return true;\n }", "protected boolean func_70814_o() { return true; }", "@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }" ]
[ "0.623337", "0.6190611", "0.6161924", "0.60936105", "0.59586877", "0.59515184", "0.58885413", "0.5865564", "0.5865564", "0.5865564", "0.5855894", "0.5855894", "0.5855894", "0.5855894", "0.5855894", "0.5855894", "0.5847763", "0.5830493", "0.58276486", "0.5806893", "0.5800287", "0.57954955", "0.57950014", "0.5787527", "0.57813936", "0.5764825", "0.5754342", "0.57425964", "0.5740563", "0.5736032", "0.5695438", "0.56883174", "0.5688276", "0.5688276", "0.5688276", "0.5688276", "0.56834024", "0.56784505", "0.56784505", "0.5678239", "0.5678239", "0.56696856", "0.56577647", "0.5654275", "0.5631021", "0.5630944", "0.5630819", "0.5627191", "0.5618724", "0.56157917", "0.5612026", "0.561097", "0.5601232", "0.55997616", "0.5592085", "0.5588319", "0.5588319", "0.5588319", "0.5588319", "0.55875677", "0.5583987", "0.555928", "0.5552922", "0.55463135", "0.554571", "0.5535943", "0.55332404", "0.5530847", "0.551786", "0.55169964", "0.55119956", "0.55119956", "0.55119956", "0.55119956", "0.55074173", "0.5500962", "0.5491547", "0.5491183", "0.54868895", "0.5472572", "0.54670054", "0.5462104", "0.5458992", "0.54572093", "0.54437643", "0.54366827", "0.5435949", "0.54351044", "0.54313195", "0.5419057", "0.54159105", "0.54120785", "0.540341", "0.5401499", "0.5400665", "0.5399768", "0.5396921", "0.53934586", "0.53918374", "0.53917485", "0.538778" ]
0.0
-1
Main method. Different tests.
public static void main (String[] param) { Fraction x = new Fraction (-8, 15); Fraction y = new Fraction (5, -6); Fraction z = null; try { z = (Fraction)x.clone(); } catch (CloneNotSupportedException e) {}; Fraction t = new Fraction (16, -30); System.out.println (x + " times " + y + " is " + x.times (y)); System.out.println (x + " plus " + y + " is " + x.plus (y)); System.out.println (x + " minus " + y + " is " + x.minus (y)); System.out.println (x + " divideBy " + y + " is " + x.divideBy (y)); System.out.println (x + " compareTo " + y + " is " + x.compareTo (y)); System.out.println (x.inverse() + " integer part is " + x.inverse().integerPart()); System.out.println (x.inverse() + " fraction part is " + x.inverse().fractionPart()); System.out.println (x + " is approximately " + String.valueOf (x.toDouble())); System.out.println (Math.PI + " is approximately " + Fraction.toFraction (Math.PI, 7) + " or " + Fraction.toFraction (Math.PI, 7).toDouble()); Fraction ff = Fraction.valueOf ("-4/7"); System.out.println (ff); System.out.println ("hashCode of x: " + x.hashCode()); System.out.println ("hashCode of y: " + y.hashCode()); System.out.println ("hashCode of z: " + z.hashCode()); System.out.println ("hashCode of t: " + t.hashCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }", "@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}", "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "@Test\n public void main() {\n MainApp.main(new String[] {});\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n GOL_Main.main(args);\n }", "public static void main(String... args) throws Exception {\n //testHelloWorld();\n //testExchange();\n //testParentChild();\n //testLinking();\n //testListener();\n //testParse(\"1\");\n //testOuterInner();\n //testResourceARM();\n //testExecuteAround();\n testExecuteAroundARM();\n }", "public static void main(String[] args) {\n\ttest(tests);\n }", "public static void main(String args[]){\n\t\tTestingUtils.runTests();\n\t\t\n\t}", "public static void main(String [] args) {\r\n\t\ttestOne(); //adds items to WH; tests getNumItems method & toString method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestTwo(); //tests getItem(String) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestThree(); //test getItem(Item) method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFour(); //tests total cost method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestFive(); //this will test the getRefrigeratedItems method\r\n\t\tSystem.out.print(\"\\n\"); \r\n\t\ttestSix(); //tests getTotalCostRefrigerated method\r\n\t\tSystem.out.print(\"\\n\");\r\n\t\ttestSeven(); //tests remove method\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tglobalTest();\n//\t\ttimeTest();\n//\t\ttestPrefixSearch();\n//\t\ttestSearch();\n//\t\ttestPrediction();\n//\t\ttestTrieSearch();\n//\t\ttestRebuid();\n//\t\ttest13();\n//\t\ttest14();\n\t}", "public static void main(String args[]) {\n\t\tSystem.out.println(\"\\r\\ngetGameSituationTest()\");\n\t\tgetGameSituationTest();\n\n\t\tSystem.out.println(\"\\r\\nstateCheckerboardConvertionTest()\");\n\t\tstateCheckerboardConvertionTest();\n\n\t\tSystem.out.println(\"\\r\\ngetValidActionsTest()\");\n\t\tgetValidActionsTest();\n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n Calculadora_teste.main(args);\n \n }", "public static void main (String[] args){\n\t\tincPieceCountTest();\n\t\tdecPieceCountTest();\n\t\tsetPieceTest();\n\t\tmoveTest();\n\t\tanyMoveTest();\n\t\tgetPiecesTest();\n\t\tsetPieceTest2();\n\t}", "@Test\t\n\tpublic void testMain() {\n\n\t\tSystem.out.println(\"hello\");\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Testing Calculator\");\r\n\t\ttestConstructors();\r\n\t\ttestSetters();\r\n\t\ttestGetters();\r\n\t\ttestToString();\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\t testType1();\n\n\t\t// testMatrix();\n//\t\ttestKening();\n\t\t\n//\t\ttestOutline();\n\t}", "public static void main(String[] args) {\n //init\n Client.getLayerIntersectDao().getConfig().getIntersectionFile(null);\n\n //tests\n TestLayers();\n// TestFields();\n// TestObjects();\n// TestDistributions();\n// TestDistributionData();\n// TestDistributionShapes();\n// TestObjNames();\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "@Test\n\tpublic void testMain() {\n\t}", "@Test\r\n\tpublic void mainTest(){\r\n\t\tMain m = new Main();\r\n\t\tm.main(null);\r\n\t}", "public static void main(String[] args) {\n\t\trun();\n\t\t//runTest();\n\n\t}", "public void testMain() throws ClassNotFoundException, IOException \r\n {\r\n String[] args = new String[1];\r\n args[0] = \"SyntaxTest\";\r\n \r\n System.out.println(\"Filename: SyntaxTest:\\n\");\r\n Rectangle1.main(args);\r\n \r\n\r\n\r\n String[] args2 = new String[1];\r\n args2[0] = \"SimpleInsertionTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: SimpleInsertionTest:\\n\");\r\n Rectangle1.main(args2);\r\n \r\n String[] args3 = new String[1];\r\n args3[0] = \"RegionSearchTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RegionSearchTest:\\n\");\r\n Rectangle1.main(args3);\r\n \r\n String[] args4 = new String[1];\r\n args4[0] = \"WebCatTests\";\r\n \r\n System.out.println(\"\\n\\nFilename: WebCatTests:\\n\");\r\n Rectangle1.main(args4);\r\n \r\n String[] args5 = new String[1];\r\n args5[0] = \"RemoveTest\";\r\n \r\n System.out.println(\"\\n\\nFilename: RemoveTest:\\n\");\r\n Rectangle1.main(args5);\r\n \r\n String[] args6 = new String[1];\r\n args6[0] = \"MoreCommands\";\r\n \r\n System.out.println(\"\\n\\nFilename: MoreCommands:\\n\");\r\n Rectangle1.main(args6);\r\n \r\n assertEquals(\"RegionSearchTest\", args3[0]);\r\n }", "public static void main(String[] args) {\r\n\r\n\t\ttry {\r\n\t\t\tDatabaseManager.setPatternNumber(1);\r\n\t\t\tDatabaseManager.getSingleton().openConnection();\r\n\r\n\t\t\tSingleTableCreator.dropAllTables();\r\n\t\t\tSingleTableCreator.createTables();\r\n\t\t\tSingleTableCreator.addTestRows();\r\n\r\n\t\t\tTestEVERYTHING.testRunAllTheTests();\r\n\r\n\t\t\tSystem.out.println(\"ya done diddly did it\");\r\n\r\n\t\t\tDatabaseManager.getSingleton().closeConnection();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tDatabaseException.detectError(e, \"Runnable - Single\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Just testing\");\r\n\t\t//lisää kommenttia\r\n\t\t\r\n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n Cic.main(args);\n \n }", "public static void main(String[] args) {\n\t\ttestStreamMapReduce();\r\n\t\t//testMethodReference();\r\n\t}", "public static void main(String[] args) {\n basePath = MatcherTest.class.getClassLoader().getResource(\"\").getPath() + \"/\";\n\n String russianPath = basePath + \"russianArticlesTokenizedShort-2.txt\";\n String ruOriginalPath = basePath + \"newRussianArticles.json\";\n String englishPath = basePath + \"englishArticlesTokenized.txt\";\n String enOriginalPath = basePath + \"englishArticles.txt\";\n\n String titleExpert = basePath + \"titleExpert.json\";\n String expertPath = basePath + \"matchExpert.json\";\n String articlePath = basePath + \"testMatchRussian3.json\";\n\n getRussianTokenized(russianPath);\n getRussianOriginal(ruOriginalPath);\n getEnglishTokenized(englishPath);\n getEnglishOriginal(enOriginalPath);\n// matchTitles(titleExpert);\n// matchArticles(articlePath);\n// matchTest(expertPath, articlePath);\n matchArticlesRussian(articlePath);\n ArticleClass.PlayMusic();\n }", "public static void main(String[] args) {\n System.out.println(testLibraryParseCardBarCode());\n System.out.println(testLibraryParseRunLibrarianCheckoutBookCommand());\n System.out.println(testLibraryParseRunSubscriberReturnBookCommand());\n System.out.println(testparseBookId());\n System.out.println(testparseRunSubscriberCheckoutBookCommand());\n }", "public static void main (String[] args) {\n \n doTest (\"hello\");\n doTest (\"query\");\n doTest (\"Mississippi\");\n doTest (\"elephant\");\n doTest (\"Qatar\");\n System.out.println();\n \n }", "public static void main(String[] args) {\n testFactorial();\n testFibonacci();\n testMissing();\n testPrime();\n\n\n }", "public static void main(String[] args) {\n\t\ttest();\n\t}", "public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }", "public static void main(String[] args) {\n\t\t \n\t\tResult result1 = JUnitCore.runClasses(TestUnitForCreate.class);\n\t for (Failure failure : result1.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result1.wasSuccessful());\n\n\t Result result2 = JUnitCore.runClasses(TestUnitForReadByCalimNumber.class);\n\t for (Failure failure : result2.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result2.wasSuccessful());\n\t \n\t Result result3 = JUnitCore.runClasses(TestUnitForReadByLossDate.class);\n\t for (Failure failure : result3.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result3.wasSuccessful());\n\t \n\t\tResult result4 = JUnitCore.runClasses(TestUnitForUpdate.class);\n\t\tfor (Failure failure : result4.getFailures()) {\n\t\t\tSystem.out.println(failure.toString());\n\t\t}\n\t\tSystem.out.println(result4.wasSuccessful());\n\t \n\t Result result5 = JUnitCore.runClasses(TestUnitForReadVehicle.class);\n\t for (Failure failure : result5.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result5.wasSuccessful());\n \n\t Result result6 = JUnitCore.runClasses(TestUnitForDelete.class);\n\t for (Failure failure : result6.getFailures()) {\n\t System.out.println(failure.toString());\n\t }\n\t System.out.println(result6.wasSuccessful());\n\t \n\t}", "@Test\n public void testMain() throws Exception {\n //main function cannot be tested as it is dependant on user input\n System.out.println(\"main\");\n }", "public static void main(String argv[]) {\n \r\n PolicyTest bmt = new PolicyTest();\r\n\r\n bmt.create_minibase();\r\n\r\n // run all the test cases\r\n System.out.println(\"\\n\" + \"Running \" + TEST_NAME + \"...\");\r\n boolean status = PASS;\r\n status &= bmt.test1();\r\n \r\n bmt = new PolicyTest();\r\n bmt.create_minibase();\r\n status &= bmt.test2();\r\n\r\n // display the final results\r\n System.out.println();\r\n if (status != PASS) {\r\n System.out.println(\"Error(s) encountered during \" + TEST_NAME + \".\");\r\n } else {\r\n System.out.println(\"All \" + TEST_NAME + \" completed successfully!\");\r\n }\r\n\r\n }", "@Test\r\n public void testMain() {\r\n System.out.println(\"main\");\r\n String[] args = null;\r\n ChessMain.main(args);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }", "public static void main (String args[]) {\n\t\tteste01();\n\t\tteste02();\n\t\tteste03();\n\t\t//teste04();\n\t}", "public static void main(String args[]) {\n\t\ttestFindStop();\n\t\ttestFindGene() ;\n\t\ttestAllGenes();\n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n SServer.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n CashRegister.main(args);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public static void main(String[] args) {\r\n System.out.println(runAllTests());\r\n }", "public static void main() {\n \n }", "public static void main(String arg[]) {\n System.out.println(\"testGuset(): \" + testGuset());\n System.out.println(\"testServingQueue(): \" + testServingQueue());\n System.out.println(\"testDessertSolvers(): \" + testDessertSolvers());\n testCapicity();\n }", "public static void main()\n\t{\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t testMid();\n\t\t testCircular();\n\t\n\t}", "public static void main(String[] args) {\n Part2_2 part2_2 = new Part2_2();\n part2_2.testHowMany();\n Part2_3 part_23 = new Part2_3();\n part_23.testHowManyGenes();\n Part3_1 part3_1 = new Part3_1();\n part3_1.testCgRatio();\n }", "@Test\n public void main() {\n System.out.println(\"main\");\n String[] args = null;\n SaalHelper.main(args);\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"main method\");\n\t\ttest();\n\t\t//RunprogramwithoutObject.test();// no need to create any object of class\n\t\tcover();\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\ttest01();\n\t}", "public static void main(String[] args)\r\n\t{\r\n\t\t// create the suite of tests\r\n\t\t/*final TestSuite tSuite = new TestSuite();\r\n\t\ttSuite.addTest(new PersonDaoGenericTest(\"testSavePerson\"));\r\n\t\ttSuite.addTest(new PersonDaoGenericTest(\"testLoadPerson\"));\r\n\t\tTestRunner.run(tSuite);*/\r\n\t}", "public static void main(String[] args) {\r\n\t\t// test method\r\n\t\tNewFeatures newFeatures = new NewFeatures();\r\n\t\tnewFeatures.testingArrayList();\r\n\t\tnewFeatures.testingTryCatch();\r\n\t\tnewFeatures.testingNumericValues();\r\n\t\tnewFeatures.testingSwitchWithStringStatemant();\r\n\r\n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n RefSystemGUI.main(args);\n }", "public static void main(String[] args) throws IOException, InterruptedException {\r\n\t\r\n TournamentTest();\r\n //humanPlayersTest();\r\n }", "@org.junit.Test\n public void main() throws Exception {\n DosEquis.main(null);\n }", "public static void main(String[] args) {\n\t\ttest1();\r\n\t\ttest2();\r\n\t\t\r\n\t}", "public static void main(String[] args){\n\t\ttest1();\r\n\t}", "public static void main(String[] args) {\n inOrbitDestinationControllerTest();\n// inOrbitReplayControllerTest();\n\n }", "@Test\n public void main() {\n // App.main(null);\n // assertEquals(\"Hello world\", outContent.toString());\n }", "@Test\r\n public void testMain() {\r\n System.out.println(\"main\");\r\n String[] args = null;\r\n Prog4.main(args);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public static void main(String[] args)\n {\n try\n {\n TestRunner.run(isuite());\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n LoginRegister.main(args);\n }", "public void TestMain(){\n SampleStatements();\n TestMyPow();\n }", "public static void main(String[] args) {\n\t\tTestGeneric t=new TestGeneric();\n\t\tt.testAdd();\n\t\tt.testForEach();\n\t\tt.testChild();\n\t\tt.testForEach();\n\t\tt.testBasicType();\n\t\t\n\n\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n MainWindow1.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Testing basic functions...\");\n\t\tQuiz q = new QuizImpl(1, \"Test quiz\");\n\t\tSystem.out.println(\"Quiz ID: \" + q.getId());\n\t\tSystem.out.println(\"Quiz name: \" + q.getTitle());\n\t\tSystem.out.println(\"Adding questions...\");\n\t\tq.addQuestions();\n\t\tSystem.out.println(\"Printing questions...\");\n\t\tq.printQuestions();\n\t}", "public static void main(String [] args) {\n TestFListInteger test = new TestFListInteger();\n \n test.testIsEmpty();\n test.testGet();\n test.testSet();\n test.testSize();\n test.testToString();\n test.testEquals();\n \n test.summarize();\n \n }", "public static void main(){\n\t}", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n displayInventoryTest();\n updateInventoryTest();\n getItemTest();\n }", "public static void main(String[] args) {\n\t\ttest4();\n//\t\ttest7();\n//\t\ttest8();\n//\t\ttest9();\n//\t\ttest10();\n//\t\ttest11();\n//\t\t test13() ;\n\t}", "@Test\n public void run () {\n\t \n\t System.out.println(\"---------->\");\n\t //System.out.println(md5list.getResult());\n\t //System.out.println(hashsearch.getResult());\n\t \n\t \n\t \n\t // System.out.println(samples.Testing());\n\t //System.out.println(\"getserult: \"+samples.getResult());\n\t \n }", "public static void main(String[] args)\n {\n TestRunner.run(suite());\n }", "public static void main(String[] args) {\n\n experiment();\n }", "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "public static void main(String[] args) {\n try {\n assert false;\n System.out.println(\"Please use the -ea jvm-option. Ex: java -ea AXE170009.TestMain\");\n System.exit(0);\n }catch (AssertionError error){\n System.out.println(\"-ea option enabled good to go\");\n }\n TestMain tester = new TestMain();\n tester.testAdd();\n tester.testRemove();\n System.out.println(\"All Tests passed\");\n }", "private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }", "public static void main(String[] args) {\n\t\t\n\t\ttestQuery();\n\t\t//testInsert();\n\t\t\n\t}", "public static void main(String[] args) {\n\n\n\n org.junit.runner.JUnitCore.main(\n \"dataAccessTest.databaseTest\",\n \"proxyTest.proxyTest\");\n }", "public static void main(String[] args) {\n\t\tdebutTest();\n\t\t\tinstancePerson();\n\t\t\tmodifier1Personne();\n\t\t\t//modifier2Personne();\n\t\t\n\t\tfinTest();\n\t}", "public static void main() {\n }", "public static void main(String[] args) {\n\t\tdeferTest();\n\t}", "public static void main(String[] args) {\n new TSL2550Test();\n }", "public static void run()\n {\n String[] testInput = FileIO.readAsStrings(\"2020/src/day17/Day17TestInput.txt\");\n String[] realInput = FileIO.readAsStrings(\"2020/src/day17/Day17Input.txt\");\n\n Test.assertEqual(\"Day 17 - Part A - Test input\", partA(testInput), 112);\n Test.assertEqual(\"Day 17 - Part A - Challenge input\", partA(realInput), 384);\n Test.assertEqual(\"Day 17 - Part B - Test input\", partB(testInput), 848);\n Test.assertEqual(\"Day 17 - Part B - Challenge input\", partB(realInput), 2012);\n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n WarPlane.main(args);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void main(String argv[]) {\n org.junit.runner.JUnitCore.main(Test_Data.class.getName()); // full name with package\n }", "public static void main(String[] args) {\n\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"INSERT\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testInsert);\r\n\t\t\tSystem.out.println(\"LOOKUP\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testLookup);\r\n\t\t\tSystem.out.println(\"DELETE BY NAME\");\r\n\t\t\tTestFromFile(\"C:\\\\Users\\\\dhdim\\\\projects\\\\Coursework\\\\src\\\\Coursework\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testDeleteByName);\r\n\t\t\tSystem.out.println(\"DELETE BY NUMBER\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testDeleteByNumber);\r\n\t\t\tSystem.out.println(\"CHANGE NUMBER\");\r\n\t\t\tTestFromFile(\"C:\\\\\\\\Users\\\\\\\\dhdim\\\\\\\\projects\\\\\\\\Coursework\\\\\\\\src\\\\\\\\Coursework\\\\\\\\test.txt\",\r\n\t\t\t\t\tHashDirectory::testChangeNumber);\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\ttest1();\n\t}", "public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }", "public static void main ( String [] args ) {\n test_containsVowel(); // 3 tests\n test_isPalindrome(); // 7 tests\n test_evensOnly(); // 8 tests\n test_oddsOnly(); // 8 tests\n test_evensOnlyNoDupes(); // 2 tests\n test_oddsOnlyNoDupes(); // 2 tests\n test_reverse(); // 2 tests\n\n }", "public static void start() {\n\t\t\n\t\ttestEmptyConstructors();\n\t\ttestConstructors();\n\n\t}", "public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }", "public static void main(String[] args) {\n\t\tTestST st2 = TestST.getInstance();\r\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) {\n\t\ttest1();\n\t\ttest2();\n\t\tdivision();\n\t\tdivision_nullexception();\n\t\n\t}", "@Test\n public void run_main(){\n\n String resource_folder = (new File(\"src/test/resources/\")).getAbsolutePath()+ File.separator ;\n\n String[] args = new String[7];\n args[0] = \"-run\";\n args[1] = resource_folder + \"test_configs/line_ctm.xml\";\n args[2] = \"mytest\";\n args[3] = resource_folder+\"sample_output_request.xml\";\n args[4] = \"temp\";\n args[5] = \"0\";\n args[6] = \"100\";\n\n OTM.main(args);\n\n }", "public static void main(String[] args) {\n test4();\n }", "public static void main(String[] args) {\n\n test5();\n }", "public static void main(String[] args) throws Exception{\n test1();\n }", "public static void main(String[] args)\r\t{", "public static void main(String[] args) {\n\n try {\n QueueProduceTest();\n System.out.println(\"test success\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n QueueConsumerTest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }" ]
[ "0.78428227", "0.77548516", "0.77194667", "0.7612889", "0.76071525", "0.75632113", "0.7515029", "0.75143206", "0.7509402", "0.74614435", "0.7443439", "0.7398789", "0.7373054", "0.7364984", "0.73457545", "0.7329306", "0.7326196", "0.7309668", "0.7270568", "0.7260601", "0.7256466", "0.722871", "0.7221966", "0.71773577", "0.71692675", "0.716063", "0.71580243", "0.7157418", "0.7148109", "0.714726", "0.7145739", "0.7140425", "0.71387947", "0.7132125", "0.71310234", "0.711487", "0.71016103", "0.70959496", "0.7091416", "0.7089631", "0.70857865", "0.708385", "0.70774865", "0.7075901", "0.7068699", "0.7067483", "0.7065558", "0.7054407", "0.70539063", "0.705187", "0.70508623", "0.70503813", "0.7043503", "0.7043064", "0.70416445", "0.70158845", "0.7011899", "0.7000064", "0.6992387", "0.69913745", "0.69708925", "0.69683135", "0.69444865", "0.69399524", "0.6935569", "0.6915531", "0.6914767", "0.6913046", "0.6910942", "0.69042397", "0.69037837", "0.68924636", "0.68868655", "0.6884682", "0.68805194", "0.68721664", "0.6871324", "0.6868044", "0.6861826", "0.68497276", "0.68414325", "0.68365717", "0.6833034", "0.6830759", "0.6825345", "0.68233895", "0.6816868", "0.68083096", "0.68054265", "0.6800184", "0.679771", "0.6795019", "0.6793562", "0.67862386", "0.6786133", "0.6782418", "0.67818725", "0.6757823", "0.6755928", "0.6754806", "0.67347014" ]
0.0
-1
Default constructor returns 0/1.
Fraction () { this (0, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Counter()\n {\n this(0);\n }", "DefaultConstructor(int a){}", "public Int() {\n this(0);\n }", "protected Int() {}", "public MyInteger( )\n {\n this( 0 );\n }", "defaultConstructor(){}", "public Counter() {\r\n value = 0;\r\n }", "public AllDifferent()\n {\n this(0);\n }", "@Test\r\n\tpublic void constructorTest() \r\n\t{\r\n\t\tassertEquals(0, scoreBehavior.score());\r\n\t}", "void DefaultConstructor(){}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "public MyInteger(){\n //initialize to 0\n Integer myint = new Integer(0);\n }", "public ConnectionCount() {\nthis(0);\n}", "private Count() {}", "private Count() {}", "public lo() {}", "public Naive() {\n\n }", "public Counter() {\r\n this.count = 0;\r\n }", "public static numero getZero()\n {\n return new numero(ZERO);\n }", "public BasicCounter() {\n count = 0;\n }", "private Default()\n {}", "private final int initializeInt() {\n\t\treturn 0;\r\n\t}", "public Constructor(){\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "student(){\r\n \r\n //constructor\r\n //always same as class name\r\n //we can also have code here\r\n //this will be the first method to be intialised\r\n //can never return a value\r\n number++;// default initialisation\r\n }", "public BasicCalculator() {\n // Initialization here.\n // this.count = 0;\n\n }", "public Int() {\n super(Expression.X_IS_UNDEFINED);\n this.value = 0;\n }", "private Value() {\n\t}", "public Score()\n {\n // initialize instance variables\n score = 0;\n }", "public DataInt() {\n }", "public Stat()\n {\n // empty constructor\n }", "@Test\n public void test_constructor_0(){\n\tSystem.out.println(\"Testing MeasuredRatioModel's MeasuredRatioModel()\");\n //Tests if default values are correct\n MeasuredRatioModel instance=new MeasuredRatioModel();\n String expResult=\"NONE\";\n String result=instance.getName();\n assertEquals(expResult,result);\n result=instance.getUncertaintyType();\n assertEquals(expResult,result);\n BigDecimal expectedResult=new BigDecimal(\"0\");\n BigDecimal actualResult=instance.getValue();\n assertEquals(expectedResult,actualResult);\n actualResult=instance.getOneSigma();\n assertEquals(expectedResult,actualResult);\n assertEquals(false,instance.isFracCorr());\n assertEquals(false,instance.isOxideCorr());\n }", "public Counter(int init){\n \tvalue = init;\n }", "public IntHolder() {\r\n\t}", "public Self__1() {\n }", "@Override\r\n\tprotected Integer zero() {\n\t\treturn 0;\r\n\t}", "public Value() {}", "public Stat() {\n }", "public NoiseCalculator() {\n this(1.0);\n }", "public no() {}", "public MutableInt() {}", "BruceScore() {}", "public Circle() {\n this( 1.0 ); \n }", "public Tester()\n {\n // initialise instance variables\n x = 0;\n }", "public Counter() {\n //this.max = max;\n }", "public Basic() {}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Pitonyak_09_02() {\r\n }", "@Override\n public int value() {\n return 0;\n }", "public Result() {\r\n super();\r\n System.out.println(\"Result:Constructor\");\r\n }", "public Complex() {\n this(0);\n }", "public void testConstructor() {\n AtomicLong ai = new AtomicLong(1);\n assertEquals(1, ai.get());\n }", "private Instantiation(){}", "public Demo3() {}", "public D() {}", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public void testConstructor() {\n Measurement a = new Measurement();\n assertTrue(a.getFeet() == 0);\n assertTrue(a.getInches() == 0);\n \n Measurement b = new Measurement(5);\n assertTrue(b.getFeet() == 5);\n assertTrue(b.getInches() == 0);\n \n Measurement c = new Measurement(4, 3);\n assertTrue(c.getFeet() == 4);\n assertTrue(c.getInches() == 3);\n }", "public void testConstructor1() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n }", "public myCounter() {\n\t\tcounter = 1;\n\t}", "public void testConstructor2() {\n AtomicLong ai = new AtomicLong();\n assertEquals(0, ai.get());\n }", "public ConstructorsDemo() \n\t {\n\t x = 5; // Set the initial value for the class attribute x\n\t }", "public IntPar() { }", "private Numbers() {\n\t}", "public Result() {\n }", "public Result() {\n }", "public Value() {\n }", "public Distance() {\n \n }", "public _355() {\n\n }", "@Override\n\tpublic double classValue() {\n\t\treturn 0;\n\t}", "public Ruby() {}", "@Override\n public int retroceder() {\n return 0;\n }", "public Counter(int val) {\r\n value = val;\r\n }", "public Spec__1() {\n }", "private Solution() { }", "private Solution() { }", "NullSt (int ln) { super (ln); }", "public Log() { //Null constructor is adequate as all values start at zero\n\t}", "TypesOfConstructor(){\n System.out.println(\"This is default constructor\");\n }", "public Lanceur() {\n\t}", "public CyanSus() {\n\n }", "public Clade() {}", "public Metric(){\n\t}", "public Test05() {\n this(0);\n n2 = \"n2\";\n n4 = \"n4\";\n }", "private\tNum(int num) { value = num; }", "public BabbleValue() {}", "public Calculator() {\r\n\t\t/*\r\n\t\t * Constructor - Method name which has the same class name is called a Consatructor\r\n\t\t */\r\n\t\tSystem.out.println(\"Calling constructor\");\r\n\t}", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "protected Status() {\r\n\t\t;\r\n\t}", "public Rol() {}", "Reproducible newInstance();", "public Method() {\n }", "private MyMath() {\n }", "public LessThanZeroException() {}", "public Orbiter() {\n }", "public Demo() {\n\t\t\n\t}", "public A(int x)\n {\n xValue = x;\n }", "public MainClass() {\n\t\t\n\t\t//Since we haven't actually assigned this a value yet, it is\n\t\t// going to print out the default value of this datatype, in\n\t\t// this case, 0.\n\t\tSystem.out.println( mainTest );\n\t\t\n\t\t//Then we're going to print out something that we have actually\n\t\t// given a value to. This should print out the default value of\n\t\t// 5, the thing that we assigned just above us on line 42.\n\t\tSystem.out.println( mainTest2 );\n\t\t\n\t}", "public ZeroCountDataWriter() {\n\t\tsuper(DataWriterType.ZEROCNTType);\n\t}", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public GenerateurImpl() {\n\t\tsuper();\n\t\tthis.value = 0;\n\t}" ]
[ "0.7175936", "0.7097531", "0.70881885", "0.7019328", "0.7018581", "0.6837372", "0.68114716", "0.6724462", "0.6685829", "0.6658548", "0.6622475", "0.6613026", "0.6563088", "0.651076", "0.651076", "0.65094095", "0.6482177", "0.64644545", "0.6454913", "0.6441951", "0.6431257", "0.64045477", "0.63967633", "0.639488", "0.6381884", "0.637607", "0.6338666", "0.6322825", "0.6311641", "0.62941486", "0.6266207", "0.626488", "0.626183", "0.626117", "0.62499183", "0.6249126", "0.62398565", "0.6236583", "0.6236395", "0.62329566", "0.6228896", "0.62233025", "0.62226874", "0.62156886", "0.62043613", "0.62012774", "0.61877465", "0.6184723", "0.61794853", "0.61569494", "0.61560065", "0.61557084", "0.61536235", "0.61519635", "0.6147297", "0.6140987", "0.6139105", "0.61351913", "0.6133888", "0.61250687", "0.612427", "0.6115266", "0.6101221", "0.6097984", "0.6097984", "0.60955036", "0.60827464", "0.6082293", "0.6075872", "0.605738", "0.6050309", "0.60418326", "0.60418", "0.60413325", "0.60413325", "0.6031591", "0.60309005", "0.6028277", "0.6024092", "0.602212", "0.601772", "0.60159427", "0.60103744", "0.60088193", "0.6005985", "0.59967834", "0.59958947", "0.599479", "0.59938407", "0.5991952", "0.59881365", "0.59804094", "0.5978912", "0.5978524", "0.5977445", "0.5976678", "0.59739923", "0.59722334", "0.5971564", "0.59688264" ]
0.606351
69
Public method to access the numerator field.
public int getNumerator() { return numerator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumerator()\r\n {\r\n return numerator;\r\n }", "public int getNumerator() {\n return numerator;\n }", "public double getNumeratorValue() {\n return numeratorValue;\n }", "public int getNumerator() {\r\n\t\treturn numerator;\r\n\t}", "public int getNumerator()\n\t{\n\t\treturn numerator;\n\t}", "public int getNumerator()\n {\n return this.numerator;\n }", "public int getNumerator() {\n return this.numerator;\n }", "public int getDenominator() { \n return denominator; \n }", "public double getValue(){\n return (double) numerator / (double) denominator;\n }", "public double value() {\n return ((double) this.numerator / this.denominator);\n }", "public int getDenominator()\r\n {\r\n return denominator;\r\n }", "public int getDenominator()\n {\n return this.denominator;\n }", "public double getValue() {\n return (numeratorValue * multiplier) / (denominatorValue * divisor);\n }", "public Integer getRatio() {\n return ratio;\n }", "public int getDenominator() {\n return this.denominator;\n }", "int getRatioQuantity();", "public double floatValue() {\n\treturn numerator/(double)denominator;\n }", "public int getRatio() {\r\n\t\treturn ratio;\r\n\t}", "double getRatio();", "public double getMedia()\n {\n return ( suma / cantidad );\n }", "public Fraction getFraction() {\n return fraction;\n }", "public void setNumerator(int num)\r\n {\r\n this.numerator = num;\r\n }", "public String getFraction() {\n return fraction;\n }", "public int getDenominator(){\n\n\t\treturn myDenominator;\n }", "public int getFractionsNumber() {\n return fractionsNumber;\n }", "public void setNumerator (int numer) {\r\n\t\tnumerator = numer;\r\n\t}", "public double getN() {\r\n return n;\r\n }", "public String get_fraction_part();", "public Fraction getReciprocal() {\n return new Fraction(denominator, numerator);\n }", "public double getFactor() {\n return ((double) multiplier) / ((double) divisor);\n }", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public int getPartieFractionnaire() {\n return partieFractionnaire;\n }", "public abstract String getFraction();", "public long getDenominator();", "double doubleValue()\n {\n double top = 1.0 * numerator;\n double bottom=1.0*denominator;\n top=top/bottom;\n return top;\n\n }", "public double getValue() {\n return this.num;\n }", "int getLumMod(){\n return getPercentageValue(\"lumMod\");\n }", "public double getValue() {\n return NUMERATOR / DENOMINATOR;\n }", "public abstract double getFractionMultiplier();", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "public double getDoubleValue() {\n\t\treturn (this.numerator/1.0)/this.denominator;\n\t}", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "@Override\r\n public String toString()\r\n {\r\n this.reduce(); \r\n return \"(\" + numerator + \"/\" + denominator + \")\";\r\n }", "public abstract double getPreis();", "public int getNumerator(){\n\n\t\treturn myNumerator;\n }", "public float getNitrateMin() {\n return nitrateMin;\n }", "public int getNumer()\n\t{\n\t\treturn numer;\n\t}", "public String toString() {\n\t\treturn numerator + \"/\" + denominator;\n\t}", "public float getFirstNumber(){\n return firstNumber;\n }", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\tif (denominator.equals(BigInteger.ONE))\n\t\t\t\treturn numerator + \"\";\n\t\t\telse\n\t\t\t\treturn numerator + \"/\" + denominator; // Else carry out this operation\n\t\t}", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "public double getNu() {return nu;}", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public int getDen()\n {\n return den;\n }", "public double getAveragePrecursorIntensityPerFraction() {\n return AveragePrecursorIntensityPerFraction;\n }", "public String toString(){\n return numerator + \"/\" + denominator;\n }", "public double module() {\n return getMagnitude();\n }", "public int getPercentage() {\r\n return Percentage;\r\n }", "public double getRe() {\r\n return re;\r\n }", "int getLikelihoodValue();", "int getLum(){\n return getPercentageValue(\"lum\");\n }", "public double getPreco();", "public double getPreco();", "public Integer getMeterDenominator() {\n return this.meterDenominator;\n }", "public Integer getMeterNumerator() {\n return this.meterNumerator;\n }", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "public double doubleValue()\n\t\t{\n\t\t\t// Converts BigIntegers to doubles and then divides \n\t\t\treturn (numerator.doubleValue()*1)/denominator.doubleValue();\n\t\t}", "public Fraction reciprocal()\n {\n int newNumerator = this.getDenominator();\n int newDenominator = this.getNumerator();\n Fraction newFraction = new Fraction(newNumerator, newDenominator);\n return newFraction;\n }", "public double getPreco() {\n\t\treturn this.preco;\n\t}", "public double getRe() {\n return re;\n }", "public float getRate(){\r\n return rate;\r\n }", "public double getNumber () throws IOException, ArithmeticException\n {\n\tdouble z = 0;\n\n\tif (Uniform() > p)\n\t z = Mean/(1.0-p);\n\telse\n\t z = Mean/p;\n\t\n\treturn -0.5*z*Math.log(Uniform());\n }", "public Number getNumberValue();", "public double getPreco(){\n return pagamento.getPreco();\n }", "org.hl7.fhir.Ratio getValueRatio();", "public double getRealPart()\n {\n return this.realPart;\n }", "public Integer getRate() {\r\n return rate;\r\n }", "public int integerPart() {\n Fraction tmp = reduce();\n return tmp.getNumerator()/tmp.getDenominator();\n }", "public float getPreis() {\r\n\t\treturn preis;\r\n\t}", "public double getIncrement() {\n return increment;\n }", "public double getPreco() {\n\t\treturn preco;\n\t}", "public double getLikePercentMath() {\n return likePercentMath;\n }", "public int getRemainderPercent() {\n return remainderPercent_;\n }", "public float getWidth() {\n\treturn widthRatio;\n }", "public float getMinRatio();", "public double calculateRatio() {\n \tdouble ratioCalc = new Double(0);\n \tif(this.count_human_dna > 0) {\n \t\tratioCalc = (double) this.count_mutant_dna / this.count_human_dna;\n \t}\n \tthis.setRatio(ratioCalc);\n \treturn ratioCalc;\n }", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public int notaMedia() {\n\t\tint media = 0;\n\t\t//sumatoria\n\t\tfor (Integer integer : notas) {\n\t\t\tmedia += integer.intValue();\n\t\t}\n\t\t//division\n //control divison por 0\n if(notas.size() != 0){\n\t\tmedia /= notas.size();\n }\n\t\treturn media;\n\t}", "@Override\r\n public String toString() {\n return this.getNumerator() + \" / \" + this.getDenominator();\r\n }", "public float toFloat() {\n return (float) numerator/(float) denominator;\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn numerator.toString() + \" rdiv \" + denominator.toString();\n\t\t//return new BigDecimal(numerator).divide(new BigDecimal(denominator), mc).toString();\n\t}", "public double getRe() {\n\t\treturn re;\n\t}", "public Number getRemainder() {\n\t\treturn remainder;\n\t}", "public double getLikePercentReading() {\n return likePercentReading;\n }", "public float getNoOfPositiveReviewsMohan(){\n return mohanPositive;\n }", "public float getRate() {\n\treturn durationStretch * nominalRate;\n }", "public Float getPreco() { return this.preco; }", "int getRemainderPercent();", "@Override\n\tpublic double perimetro() {\n\t\treturn getBase()*4;\n\t}" ]
[ "0.80612636", "0.804322", "0.7907787", "0.78717124", "0.7822332", "0.7802595", "0.77772665", "0.7113335", "0.695186", "0.69043577", "0.68992025", "0.6747765", "0.6622151", "0.66190714", "0.65388757", "0.65268964", "0.6485569", "0.6370051", "0.6363475", "0.6360755", "0.63526714", "0.63160723", "0.6216133", "0.6210023", "0.612012", "0.61199564", "0.611818", "0.61169183", "0.6111357", "0.6104586", "0.6102067", "0.6094709", "0.6077439", "0.60613626", "0.60517895", "0.60511506", "0.60508263", "0.60424924", "0.6041252", "0.60398376", "0.60305274", "0.6019511", "0.6002095", "0.5995877", "0.59913886", "0.5974276", "0.5972796", "0.5967843", "0.59616643", "0.5950663", "0.59461194", "0.5930453", "0.5924027", "0.59239185", "0.59164095", "0.59014595", "0.5901207", "0.5882408", "0.5865215", "0.5863928", "0.58507884", "0.5825065", "0.5813397", "0.5813397", "0.5809544", "0.5801668", "0.57930195", "0.57919145", "0.5786644", "0.5785761", "0.5784096", "0.57838833", "0.5773209", "0.57730913", "0.5764737", "0.5764709", "0.57619745", "0.5758865", "0.5757971", "0.5756334", "0.57560545", "0.57526207", "0.5742103", "0.57396245", "0.5736723", "0.5735083", "0.5733995", "0.5727876", "0.5710521", "0.5706693", "0.57041335", "0.5703627", "0.5694327", "0.5693077", "0.5691894", "0.56914175", "0.56727153", "0.56657195", "0.5662067", "0.5661612" ]
0.81146187
0
Public method to access the denominator field.
public int getDenominator() { return denominator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getDenominator()\r\n {\r\n return denominator;\r\n }", "public double getValue(){\n return (double) numerator / (double) denominator;\n }", "public int getDenominator()\n {\n return this.denominator;\n }", "public int getDenominator() {\n return this.denominator;\n }", "public double value() {\n return ((double) this.numerator / this.denominator);\n }", "public int getDenominator(){\n\n\t\treturn myDenominator;\n }", "public long getDenominator();", "public double getDoubleValue() {\n\t\treturn (this.numerator/1.0)/this.denominator;\n\t}", "public double floatValue() {\n\treturn numerator/(double)denominator;\n }", "public double getValue() {\n return (numeratorValue * multiplier) / (denominatorValue * divisor);\n }", "public double toDouble(){\n return (double)this.numerator /(double)this.denominator;\n }", "public Integer getMeterDenominator() {\n return this.meterDenominator;\n }", "public double toDouble() {\n return ((double)numerator) / ((double)denominator);\n }", "public String get_fraction_part();", "public int getDen()\n {\n return den;\n }", "public void setDenominator(int dem)\r\n {\r\n this.denominator = dem;\r\n }", "public int getDenom()\n\t{\n\t\treturn denom;\n\t}", "org.hl7.fhir.Ratio getValueRatio();", "private double denominator(int iter) {\n switch (DENOM) {\n case 0: return Math.pow((double) iter, 2.0);\n default: return (double) CONSTANT / Math.log(1+iter);\n }\n }", "public double doubleValue()\n\t\t{\n\t\t\t// Converts BigIntegers to doubles and then divides \n\t\t\treturn (numerator.doubleValue()*1)/denominator.doubleValue();\n\t\t}", "double getRatio();", "public abstract String getFraction();", "double doubleValue()\n {\n double top = 1.0 * numerator;\n double bottom=1.0*denominator;\n top=top/bottom;\n return top;\n\n }", "@java.lang.Override\n public float getD() {\n return d_;\n }", "public double getFactor() {\n return ((double) multiplier) / ((double) divisor);\n }", "@java.lang.Override\n public float getD() {\n return d_;\n }", "public String denominatorString() {\n switch (DENOM) {\n case 0: return \"i^2\";\n default: return CONSTANT + \" / log(1 + i)\";\n }\n }", "public Fraction getFraction() {\n return fraction;\n }", "public float getDCD();", "public String getDenomination() {\n return denomination;\n }", "public double getMedia()\n {\n return ( suma / cantidad );\n }", "public String getFraction() {\n return fraction;\n }", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "public double getNumeratorValue() {\n return numeratorValue;\n }", "public Integer getRatio() {\n return ratio;\n }", "public double getValue() {\n return NUMERATOR / DENOMINATOR;\n }", "float getD();", "public float toFloat() {\n return (float) numerator/(float) denominator;\n }", "public String toString(){\n return numerator + \"/\" + denominator;\n }", "public String toString() {\n\t\treturn numerator + \"/\" + denominator;\n\t}", "public double getRealPart()\n {\n return this.realPart;\n }", "public abstract double getFractionMultiplier();", "Double getNominalDiameter();", "@Override\r\n public String toString() {\n return this.getNumerator() + \" / \" + this.getDenominator();\r\n }", "@Override\r\n public String toString()\r\n {\r\n this.reduce(); \r\n return \"(\" + numerator + \"/\" + denominator + \")\";\r\n }", "public double getDoubleValue()\n {\n return (double) getValue() / (double) multiplier;\n }", "public java.lang.String getDivision() {\n return division;\n }", "double getFloatingPointField();", "public Fraction getReciprocal() {\n return new Fraction(denominator, numerator);\n }", "public abstract float getDensity();", "public float getDensity() {\n return density;\n }", "public float getDensity() {\n return density;\n }", "public String getDivision() {\n return division;\n }", "public int getRatio() {\r\n\t\treturn ratio;\r\n\t}", "public int getNumerator() {\n return numerator; \n }", "public double getRealPart() {\r\n return real_part;\r\n }", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "public double getDm() {\n return dm;\n }", "public Number getDivisor() {\n\t\treturn divisor;\n\t}", "public double value(){\n\t return (double) this.f;\n }", "protected abstract float getMeasurement();", "public float getDrz() {\r\n\t\treturn drz;\r\n\t}", "public Fraction toDenominator(int denominator){\n if (denominator == 0) {\n throw new NullPointerException(\"denominator doesn't be '0'\");\n } else if (denominator < this.denominator) {\n throw new NullPointerException(\"Can't cast denominator to '\" + denominator + \"'.\");\n }\n\n int lcm = Fractions.getLCM(this.denominator, denominator);\n\n int factor = lcm / this.denominator;\n return new Fraction(\n this.numerator * factor,\n this.denominator * factor);\n }", "public Double getDx();", "public int getNumerator()\r\n {\r\n return numerator;\r\n }", "int getLum(){\n return getPercentageValue(\"lum\");\n }", "protected float getDpUnit() {\n return mDpUnit;\n }", "public abstract double getMeasurement();", "public abstract double getMeasurement();", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public String toString(){\n return this.numerator + \" / \" + this.denominator;\n }", "public abstract double getMeasure();", "int getRatioQuantity();", "public int getNumerator() {\n return numerator;\n }", "public Double subsampleFraction() {\n return mSubsampleFraction;\n }", "public double calculateRatio() {\n \tdouble ratioCalc = new Double(0);\n \tif(this.count_human_dna > 0) {\n \t\tratioCalc = (double) this.count_mutant_dna / this.count_human_dna;\n \t}\n \tthis.setRatio(ratioCalc);\n \treturn ratioCalc;\n }", "@Override\n\tpublic String toString()\n\t{\n\t\treturn numerator.toString() + \" rdiv \" + denominator.toString();\n\t\t//return new BigDecimal(numerator).divide(new BigDecimal(denominator), mc).toString();\n\t}", "int getLumMod(){\n return getPercentageValue(\"lumMod\");\n }", "public Double getFactor();", "public double getRatio() {\n return (double) vector.length / size;\n }", "public void divide()\r\n {\r\n if (fractionDisplay)\r\n {\r\n result = Operations.fractionFormat(leftOperand, rightOperand);\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n divisionFormatResult = true;\r\n }\r\n else \r\n {\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n }\r\n resultResetHelper();\r\n }", "private int getRemainder (int numerator, int denominator)\n {\n if (denominator >= numerator)\n return 0;\n\n int diff = numerator;\n while (diff >= denominator)\n {\n diff = diff - denominator;\n }\n\n return diff;\n }", "public int getNumerator()\n {\n return this.numerator;\n }", "public String toString() {\n String myFraction = \"\" + this.numerator + \"/\" + this.denominator;\n return myFraction;\n }", "public int getPercentage() {\r\n return Percentage;\r\n }", "public String getPERatio() {\n\t\treturn peRatio;\n\t}", "double getpercentage() {\n return this.percentage;\n }", "public String toString() {\n\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "public String toString()\n\t{\n\t\treturn myNumerator + \"/\" + myDenominator;\n\t}", "public Fraction getInvalidNumberAttribute();", "private Fraction reduce() {\n Fraction f = null;\n try {\n f = (Fraction)clone();\n } catch (CloneNotSupportedException e) {};\n if (denominator == 0)\n throw new ArithmeticException (\" illegal denominator zero \");\n if (denominator < 0) {\n f.numerator = -numerator;\n f.denominator = -denominator;\n }\n if (numerator == 0)\n f.denominator = 1;\n else {\n int n = gcd (numerator, denominator);\n f.numerator = numerator / n;\n f.denominator = denominator / n;\n }\n return f;\n }", "public double calculateField(double aSide);", "double getRealValue();", "public int getNumerator() {\n return this.numerator;\n }", "public double getDouble();", "public BigDecimal getsDrpr() {\n return sDrpr;\n }", "public String toFractionString() {\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "public double divide(double n, double den) {\r\n\t\treturn n/den;\r\n\t}", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public double volume() {\n\t\treturn this.iWidth * this.iLength * this.iDepth\r\n\t}" ]
[ "0.8031469", "0.79633176", "0.7886073", "0.77679247", "0.7619961", "0.74318326", "0.73807174", "0.73569953", "0.7147148", "0.7106477", "0.69307995", "0.6901467", "0.6852794", "0.68507975", "0.68265724", "0.6793107", "0.6774194", "0.6724536", "0.67233634", "0.6720709", "0.6634655", "0.6631496", "0.66060925", "0.6596534", "0.6572168", "0.65678626", "0.65246797", "0.64883196", "0.6438879", "0.64248264", "0.64232045", "0.6419806", "0.64167726", "0.6405523", "0.6391809", "0.63890564", "0.6365846", "0.63329834", "0.63256884", "0.63114774", "0.6266261", "0.62498283", "0.62332624", "0.62317264", "0.62288123", "0.62231994", "0.6208883", "0.6200732", "0.6193124", "0.6193038", "0.61785", "0.61785", "0.61671007", "0.6166672", "0.6165672", "0.61637104", "0.615508", "0.61468095", "0.6132866", "0.6123132", "0.61036825", "0.60944605", "0.6082188", "0.60767776", "0.60750186", "0.60488766", "0.603888", "0.60301363", "0.60301363", "0.60216004", "0.6020292", "0.60101193", "0.6006772", "0.5996294", "0.5992907", "0.5988965", "0.59842783", "0.5975649", "0.59702563", "0.5959258", "0.5919701", "0.59195733", "0.59091425", "0.588718", "0.58800465", "0.587917", "0.58575034", "0.58433235", "0.5841586", "0.58394396", "0.5821612", "0.58213335", "0.5819936", "0.58189785", "0.58151776", "0.5812051", "0.5810391", "0.58053863", "0.57984966", "0.5792374" ]
0.8141338
0
Greatest common divisor of two given integers.
private static int gcd (int a, int b) { int m = Math.max (Math.abs (a), Math.abs (b)); if (m == 0) throw new ArithmeticException (" zero in gcd "); int n = Math.min (Math.abs (a), Math.abs (b)); while (n > 0) { a = m % n; m = n; n = a; } return m; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int greatestCommonDivisor(int inputOne, int inputTwo)\n {\n inputOne = Math.abs(inputOne);\t\t\n inputTwo = Math.abs(inputTwo);\t\t\n \t\t\n int smaller = Math.min(inputOne, inputTwo);\t\t\n int greatestCommonDivisor = 1;\n \t\t\n for (int index = 1; index <= smaller; index++)\t\n \tif ((inputOne % index) == 0 && (inputTwo % index) == 0)\n \t\tgreatestCommonDivisor = index;\n return greatestCommonDivisor;\t\t\n }", "private int gcd(int a, int b){\r\n int r, temp;\r\n if( a<b ){ temp = a; a = b; b = temp; }\r\n while( b!=0 ){ r = a%b; a = b; b = r; }\r\n return a;\r\n }", "public int getGreatestCommonDivisor(int first, int second) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tint GCD = 0;\n\t\tboolean found = false;\n\t\tArrayList<Integer> firstDivisor = new ArrayList<Integer>();\n\t\tArrayList<Integer> secondDivisor = new ArrayList<Integer>();\n\t\tif(first < 10 || second < 10) {\n\t\t\tGCD = -1;\n\t\t}\n\t\telse {\n\t\t\tfor(int i = 1; i <= first; i++) {\n\t\t\t\tif(first % i == 0) {\n\t\t\t\t\tfirstDivisor.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 1; i <= second; i++) {\n\t\t\t\tif(second % i ==0) {\n\t\t\t\t\tsecondDivisor.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tfor(Integer i: firstDivisor) {\n//\t\t\t\tSystem.out.println(i);\n//\t\t\t}\n//\t\t\tfor(Integer i: secondDivisor) {\n//\t\t\t\tSystem.out.println(i);\n//\t\t\t}\n\t\t\t\n\t\t\tif(firstDivisor.size() >= secondDivisor.size()) {\n\t\t\t\tGCD = firstDivisor.get(0);\n\t\t\t\tfor(int i =0; i < firstDivisor.size(); i++) {\n\t\t\t\t\tfor(int j =0; j < secondDivisor.size(); j++) {\n\t\t\t\t\t\tif(secondDivisor.get(j)==firstDivisor.get(i)) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(found == true) {\n\t\t\t\t\t\tif(firstDivisor.get(i) >= GCD) {\n\t\t\t\t\t\t\tGCD = firstDivisor.get(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfound = false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(secondDivisor.size() >= firstDivisor.size()) {\n\t\t\t\tGCD = secondDivisor.get(0);\n\t\t\t\tfor(int i =0; i < secondDivisor.size(); i++) {\n\t\t\t\t\tfor(int j =0; j < firstDivisor.size(); j++) {\n\t\t\t\t\t\tif(firstDivisor.get(j)==secondDivisor.get(i)) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(found == true) {\n\t\t\t\t\t\tif(secondDivisor.get(i) >= GCD) {\n\t\t\t\t\t\t\tGCD = secondDivisor.get(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfound = false;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\t//System.out.println(GCD);\n\t\treturn GCD;\n\t}", "public static int gcd(int a, int b) {\n return BigInteger.valueOf(a).gcd(BigInteger.valueOf(b)).intValue();\n }", "static int gcd(int a, int b) {\r\n\t\tif (b == 0)\r\n\t\t\treturn a;\r\n\t\treturn gcd(b, a % b);\r\n\t}", "static long getGCD(long x, long y) {\n long a = Math.max(x, y);\n long b = Math.min(x, y);\n\n while (b != 0) {\n long r = a % b;\n a = b;\n b = r;\n }\n\n return a;\n }", "public static int gcd(int a, int b){\r\n return a>b ? lnko_ordered(a,b) : lnko_ordered(b,a);\r\n }", "public static int gcd(int a, int b) {\n\t\t// take absolute values\n\t\tif (a < 0) {\n\t\t\ta *= -1;\n\t\t}\n\t\tif (b < 0) {\n\t\t\tb *= -1;\n\t\t}\n\n\t\t// ensure a > b\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\t// a = b * (a / b) + (a % b)\n\t\t// then b = (a % b) * ((a % b) / b) + (a % b) % b\n\t\t// by the division algorithm. Execute until some\n\t\t// such product has no remainder, the remainder of\n\t\t// the previous equation is GCD(a, b).\n\t\twhile (b > 0) {\n\t\t\tint temp = b;\n\t\t\tb = a % b;\n\t\t\ta = temp;\n\t\t}\n\t\treturn a;\n\t}", "public static int gcd(int a, int b) {\r\n\t\twhile(b > 0) {\r\n\t\t\tint temp = b;\r\n\t\t\tb = a % b;\r\n\t\t\ta = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn a;\r\n\t}", "public static int gcd(int a, int b) {\n int t = 0;\n while (b != 0) {\n t = b;\n b = a % b;\n a = t;\n }\n return Math.abs(a);\n }", "public static int gcd(int a, int b){\n int tmp = a;\r\n a = Math.max(a,b);\r\n b = Math.min(tmp,b);\r\n \r\n //write GCD\r\n int remainder;\r\n do{\r\n remainder = a%b;\r\n a = b;\r\n b = remainder;\r\n } while(remainder !=0);\r\n \r\n return a;\r\n }", "private static int gcd(int a, int b)\r\n\t{\r\n\t\tint remainder = a % b;\r\n\t\tif(remainder == 0)\r\n\t\t{\r\n\t\t\treturn b;\r\n\t\t}\r\n\t\treturn gcd(b, remainder);\r\n\t}", "static int greatestDenominator(int a, int b) {\n int denominator = 0;\n\n // Loops from 0 to max(a, b) to test denominators\n for (int i = 1; i < Math.max(a, b); i++) {\n if (a % i == 0 && b % i == 0) {\n denominator = i;\n }\n }\n\n return denominator;\n }", "private int gcd(int a, int b) {\n // Note that the loop below, as-is, will time out on negative inputs.\n // The gcd should always be a positive number.\n // Add code here to pre-process the inputs so this doesn't happen.\n if ( a < 0 ) {\n a = - a;\n }\n if ( b < 0 ) {\n b = - b;\n }\n\n \twhile (a != b)\n \t if (a > b)\n \t\t a = a - b;\n \t else\n \t\t b = b - a;\n \treturn a;\n }", "public static int findGCD(int int1, int int2) {\n\t\tint gcd = 1;\n\t\t\n\t\tfor (int i = 2; i <= int1 && i <= int2; i++) {\n\t\t\tif (int1 % i == 0 && int2 % i == 0)\n\t\t\t\tgcd = i;\n\t\t}\n\t\t\n\t\treturn gcd;\n\t}", "public int gcd(){\n\tint min;\n\tint max;\n\tint stor;\n\tif ((numerator == 0) || (denominator == 0)){\n\t return 0;\n\t}\n\telse {\n\t if ( numerator >= denominator ) {\n\t\tmax = numerator;\n\t\tmin = denominator;\n\t }\n\t else {\n\t\tmax = denominator;\n\t\tmin = numerator;\n\t }\n\t while (min != 0){\n\t stor = min;\n\t\tmin = max % min;\n\t\tmax = stor;\n\t }\n\t return max;\n\t}\n }", "private static int gcd(int a, int b) {\n\t\tif(a==0){\n\t\t\treturn b;\n\t\t}\n\t\treturn gcd(b%a,a);\n\t}", "static long gcd(long a, long b) {\n\t\ta = Math.abs(a); b = Math.abs(b);\n\t\tif(a < b) return gcd(b,a);\n\t\tif(b == 0) return a;\n\t\treturn gcd(a%b, b);\n\t}", "private int getGCD(int a, int b) {\n \n /** This ensures the larger of the two numbers is in a */\n if(a < b){\n /** Temp variable used for swapping two variables */\n int temp = a;\n a = b;\n b = temp;\n }\n\n /** The remainder needs to be stored to recursively find the gcd */\n int remainder;\n if((remainder = a % b) == 0) {\n return b;\n } else {\n return getGCD(b, remainder);\n }\n }", "public static int GCD(int a, int b){\r\n if (b == 0){\r\n return a;\r\n }\r\n return GCD(b,a%b);\r\n }", "int gcd(int x,int y)\n\t{\n\t\tif(x>0 && y>0)\n\t\t{\n\t\t\twhile(x!=y)\n\t\t\t{\n\t\t\t\tif(x>y) //If number1>number2\n\t\t\t\t\treturn(gcd(x-y,y)); \n\t\t\t\telse //If number2>number1 \n\t\t\t\t\treturn(gcd(y-x,x));\n\t\t\t}\n\t\t\treturn x; //Return final calculated GCD\n\t\t}\n\t\telse\n\t\t\treturn -1; //If user input is a negative number\n\t}", "private static int greatestCommonDivisor(int alpha, int beta){\n\n\t\talpha = Math.abs(alpha); // take absolute values of operands\n\t\tbeta = Math.abs(beta);\n\t\n\t\tif (beta == 0) // base case\n\t \treturn alpha;\n\t\telse{ // induction step\n\t\t\tint remainder = alpha % beta;\n\t\t\n\t\t\treturn greatestCommonDivisor(beta, remainder);\n\t }\n }", "public int gcd(int a, int b) {\n\t\tint result;\n\t\tif (a > 0) {\n\t\t\tresult = gcd(b % a, a);\n\t\t} else {\n\t\t\tresult = b;\n\t\t}\n\n\t\treturn result;\n\t}", "private static int gcd(int n1,int n2){\n int a = n1>n2?n1:n2;\r\n int b = n1>n2?n2:n1;\r\n int r = a%b;\r\n while(r!=0){\r\n a = b;\r\n b = r;\r\n r = a%b;\r\n }\r\n return b;\r\n }", "public static int gcf(int num1, int num2) {\r\n\t\tint maxNumber = max(num1, num2);\r\n\t\tint minNumber = min(num1, num2);\r\n\t\tif (minNumber == 0) \r\n\t\t\treturn maxNumber;\r\n\t\tif (minNumber < 0)\r\n\t\t\tminNumber *= -1;\r\n\t\tSystem.out.println(maxNumber + \" \" + minNumber);\r\n\t\tfor (int i = minNumber; i > 0; i--) {\r\n\t\t\tboolean a = isDivisibleBy(maxNumber, i);\r\n\t\t\tboolean b = isDivisibleBy(minNumber, i);\r\n\t\t\tif (a == true && b == true) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "public static int GCD(int a, int b){\n\t\tif(b == 0) return a;\n\t\treturn GCD(b, a%b);\n\t}", "private int getGCD(int a, int b) {\r\n if ( b == 0 ) {\r\n return a;\r\n } else {\r\n return getGCD(b, a % b);\r\n }\r\n }", "private static int findGcd(int a, int b) {\n\n\t\tint low = a < b ? a : b;\n\t\tint high = a < b ? b : a;\n\n\t\tif (high % low == 0) {\n\t\t\treturn low;\n\t\t} else {\n\t\t\treturn findGcd(high, high % low);\n\t\t}\n\t}", "int gcd(int a, int b) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t int x,y,r=1;\r\n\t\t if(a<b)\r\n\t\t {\r\n\t\t\t x = b;\r\n\t\t\t y = a;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\t x = a;\r\n\t\t\t y = b;\r\n\t\t }\r\n\t\t while(r!=0)\r\n\t\t {\r\n\t\t r = x%y;\r\n\t\t if(r==0)\r\n\t\t\t break;\r\n\t\t x = y;\r\n\t\t y = r;\r\n\t\t }\r\n\t\t// System.out.println(\"====\"+y);\r\n\t\treturn y;\r\n\t}", "private int gcd(int x, int y) {\n if (y == 0) {\n return x;\n }\n return gcd(y, x % y);\n }", "public static int findGCF(int a, int b) {\r\n\t\tint GCF = 1;\r\n\t\tfor (int i = 1; i <= Math.abs(a); i++) {\r\n\t\t\t// loop to find greatest common factor\r\n\t\t\tif (((a % i) == 0) && ((b % i) == 0)) {\r\n\t\t\t\tGCF = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn GCF;\r\n\t}", "public int gcd(int a, int b) {\n // write your code here\n if (b != 0) {\n return gcd(b, a % b);\n }\n else\n return a;\n }", "private RunGreatestCommonDivisor() {\r\n\t}", "public int findGCD(int num1, int num2)\n {\n if (num1 < num2)\n {\n //calls findGCD with the numbers reversed\n findGCD(num2, num1);\n }\n //if num2 is equal to 0\n else if (num2 == 0)\n {\n //the GCD is num1\n divisor = num1;\n } \n else\n {\n //calls GCD with num2 and the remainder of num1 and num2\n findGCD(num2, (num1%num2)); \n }\n \n //returns the divisor\n return divisor;\n }", "public static int lcm(int a, int b) {\r\n\t\treturn a * (b / gcd(a, b));\r\n\t}", "public static int gcd(int n1, int n2) {\n BigInteger n1_big = BigInteger.valueOf(n1);\n BigInteger n2_big = BigInteger.valueOf(n2);\n return n1_big.gcd(n2_big).intValue();\n }", "public static int LCM(int a, int b){\r\n int lowest = a * b / GCD(a,b);\r\n //System.out.print(lowest);\r\n return lowest;\r\n }", "public int gcd(int x, int y) {\n if (x < y) return gcd(y, x);\n return y == 0 ? x : gcd(y, x % y);\n }", "static int lcm(int num1, int num2, int hcf){\n return (num1*num2)/hcf;\n }", "private static int findGCD(int number1, int number2) {\r\n\t\t// base case\r\n\t\tif (number2 == 0) {\r\n\t\t\treturn number1;\r\n\t\t}\r\n\t\treturn findGCD(number2, number1 % number2);\r\n\t}", "private long maxDivide(long a, long b) {\n\t\twhile (a % b == 0) {\n\t\t\ta = a / b;\n\t\t}\n\t\treturn a;\n\t}", "public static int GCD(int A, int B) {\n while (B != 0) {\n int remainder = A % B;\n A = B;\n B = remainder;\n }\n\n return A;\n }", "public static long PGCD (int a, int b) {\r\n\r\n\t\tlong pgcd = 0;\r\n\t\tint r = 0;\r\n\r\n\t\ta = Math.abs(a);\r\n\t\tb = Math.abs(b);\r\n\r\n\t\twhile(true){\r\n\t\t\tif (b == 0) {\r\n\t\t\t\tpgcd = a;\r\n\t\t\t\tbreak;\r\n\t\t\t} else {\r\n\t\t\t\tr = a % b;\r\n\t\t\t\ta = b;\r\n\t\t\t\tb = r;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pgcd;\r\n\r\n\t}", "private int findGCD(int n1, int n2) {\n //n1 and n2 must always be positive for this GCD algorithm\n n1 = Math.abs(n1);\n n2 = Math.abs(n2);\n\n //continue through the loop if n2 is greater than 0\n while (n2 > 0) {\n int remainder = n1 % n2;\n //n1 will keep track of the GCD value\n n1 = n2;\n //n2 will keep track of the remainder\n n2 = remainder;\n }\n //setting n1 is the gcd value\n return n1;\n }", "static long lcm(long a, long b) \n\t\t{ \n\t\t\treturn (a*b)/gcd(a, b); \n\t\t}", "private static boolean gcd(int a, int b) {\n while (b > 0) {\n int temp = b;\n b = a % b;\n a = temp;\n }\n return a == 1;\n }", "public static void launchEuclidAlgorithmForGCD(int a, int b) {\n int number = Math.max(a, b);\n int divisor = Math.min(a, b);\n int quot = number / divisor;\n int rem = number - (divisor * quot);\n while (rem != 0) {\n System.out.println(number+\" = \"+divisor+\"(\"+quot+\") + \"+rem);\n number = divisor;\n divisor = rem;\n quot = number / divisor;\n rem = number - (divisor * quot);\n }\n System.out.println(number+\" = \"+divisor+\"(\"+quot+\") + \"+rem);\n System.out.println(\" \\u2234 gcd(\"+a+\", \"+b+\") = \"+divisor);\n }", "static int hcf(int num1, int num2){\n int i = 1;\n int hcf = 0;\n\n while(i<=num1 || i<=num2){\n if (num1%i == 0 && num2%i==0){\n hcf = i;\n }\n i++;\n }\n return hcf;\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int a, b;\n\n System.out.println(\"Please input two integers.\");\n a = input.nextInt();\n b = input.nextInt();\n\n System.out.println(\"Greatest common denominator is: \");\n System.out.println(greatestDenominator(a, b));\n\n }", "private static int findLCM(int a, int b) {\n return a * (b / findGCD(a, b));\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = 1, lcm = 1;\n int temp = a;\n int temp2 = b;\n // int fact = 1;\n if (a > b) {\n\n for (int i = a; i < a * b;i+=a) {\n if ( i % b == 0) {\n lcm = i;\n break;\n // System.out.println(lcm);\n } \n }\n } else {\n for (int i = b; i < a * b; i+=b) {\n if ( i%a == 0) {\n lcm = i;\n break;\n // System.out.println(lcm);\n } \n }\n\n }\n gcd = (a * b) / lcm;\n System.out.println(gcd);\n System.out.println(lcm);\n }", "private static int pair_GCF(int a, int b) {\n int t;\n while (b != 0) {\n t = a;\n a = b;\n b = t % b;\n }\n return a;\n }", "public void reduce(){\r\n int num = numerator;\r\n int denom = denominator;\r\n int greatest;\r\n \r\n // Find the greater of numerator and denominator\r\n if(numerator < 0){\r\n num = -numerator;\r\n }\r\n if(num > denom){\r\n greatest = num;\r\n }\r\n else\r\n greatest = denom;\r\n \r\n // Find the GCD\r\n int gcd = 0;\r\n // starting from the largest\r\n for(int i = greatest; i > 1; i--){\r\n if((numerator % i == 0) && (denominator % i == 0)){\r\n gcd = i;\r\n break;\r\n }\r\n }\r\n // factor out the gcd in both the numerator and denominator\r\n if(gcd != 0){\r\n numerator /= gcd;\r\n denominator /= gcd;\r\n }\r\n }", "private static int calculateLCM(int a, int b){\n\t\tint gcd = calculateGCD(a, b);\n\t\tint lcm = (a/gcd)*b; //same as a*b/gcd but a*b could be very large number so avoiding that\n\t\treturn lcm;\n\t}", "@Test\r\n\tpublic void testGreatestCommonDivisorCalculation() {\r\n\r\n\t\tGreatestCommonDivisor testGcd = new GreatestCommonDivisor();\r\n\t\tint testGcdOne = testGcd.greatestCommonDivisorCalculation(21, 180);\r\n\t\tint testGcdTwo = testGcd.greatestCommonDivisorCalculation(5, 10);\r\n\t\tint testGcdTree = testGcd.greatestCommonDivisorCalculation(37, 77);\r\n\t\tint testGcdFour = testGcd.greatestCommonDivisorCalculation(30, 77);\r\n\r\n\t\tAssert.assertEquals(3, testGcdOne);\r\n\t\tAssert.assertEquals(5, testGcdTwo);\r\n\t\tAssert.assertEquals(1, testGcdTree);\r\n\t\tAssert.assertNotEquals(4, testGcdFour);\r\n\t}", "public static int lowestCommonFactor(int a, int b)\n\t{\n\t\treturn (a * b) / greatestCommonFactor(a, b);\n\t}", "private static long gcd(long n, long d) {\n\t long n1 = Math.abs(n);\n\t long n2 = Math.abs(d);\n\t int gcd = 1;\n\t \n\t for (int k = 1; k <= n1 && k <= n2; k++) {\n\t if (n1 % k == 0 && n2 % k == 0) \n\t gcd = k;\n\t }\n\n\t return gcd;\n\t }", "public int pgcdByDE(int a, int b) throws Exception{\n if(a <1 || b <1){\n throw new Exception(\"a et b doivent etre >= 1\");\n }\n int reste = a > b ? a % b : b % a;\n if(reste == 0)\n return a > b ? b : a;\n if(a > b){\n a = reste;\n }else b = reste;\n return pgcdByDE(a,b);\n }", "static private long lcm(long x, long y) {\n\t\tif (x != 0 && y != 0) {\n\t\t\tlong firstValue = x;\n\t\t\tlong secondValue = y;\n\t\t\treturn (firstValue * secondValue) / hcf(x, y);\n\t\t} else\n\t\t\treturn 1;\n\n\t}", "public static void main(String[] args) {\r\n\t\tScanner kb = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter two non-negative integers: \");\r\n\t\tint num1 = kb.nextInt();\r\n\t\tint num2 = kb.nextInt();\r\n\t\tkb.close();\r\n\r\n\t\tif (num1 < 0 || num2 < 0) {\r\n\t\t\tSystem.err.println(\"Fatal error: Cannot compute the greatest\" +\r\n\t\t\t\t\t\" common divisor of negative integers!\");\r\n\t\t\tSystem.exit(1); // Exit with error status code\r\n\t\t}\r\n\t\tSystem.out.println(\"Iteration: Greatest common divisor is \" +\r\n\t\t\t\tIteration.gcd(num1, num2));\r\n\t\tSystem.out.println(\"Recursion: Greatest common divisor is \" +\r\n\t\t\t\tRecursion.gcd(num1, num2));\r\n\t}", "public static int gcf(int num, int denom) {\n \tint number=1;\t//declare num to equal 1\t\r\n\t\tif(denom<0) { //if denom is negative, multiply by -1 to get a positive denom\r\n\t\t\tdenom *= -1;\r\n\t\t}\r\n\t\tif(num<0) {\t//if the num is negative multiply it by -1 to make it positive\r\n\t\t\tnum *= -1;\r\n\t\t}\r\n\t\tfor(int i = 1; i <= num && i <= denom; i++) {\t//make a for loop that will test to see if i <=x&y (iterate to lowest # possible) to find the gcd\r\n\t\t\tif (isDivisibleBy(num,i) == true && isDivisibleBy(denom,i)==true) { \t// add 1 to i each loop; uses the method to check if i is factor of both integers\r\n\t\t\t\tnumber = i;\t//make num equal to i\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn number; //return the number\r\n\t}", "public static int gcf(int [] operand) {\r\n \t\tint count = 1;\r\n \t\tint factor = 1;\r\n \t\twhile (count <= Math.min(Math.abs(operand[0]), operand[1])) { \r\n \t\t\t//Java had sign problems here if the numerator was negative\r\n \t\t\tif (Math.abs(operand[0]%count) == 0 && Math.abs(operand[1]%count) ==0) {\r\n \t\t\t\tfactor = count; \r\n \t\t\t}\r\n \t\t\tcount++;\r\n \t\t}\r\n \t\treturn (factor);\r\n \t}", "static int findGreatestValue(int x, int y) {\r\n\t\t\r\n\t\tif(x>y)\r\n\t\t\treturn x;\r\n\t\telse\r\n\t\t return y;\r\n\t}", "public static int greatestCommonFactor(ArrayList<Integer> num1, ArrayList<Integer> num2)\n {\n //create an ArrayList to hold common factors\n ArrayList<Integer> commonFactors = new ArrayList<Integer>();\n int greatestFactor = 0;\n for(Integer i : num1)\n {\n if(num2.contains(i))\n {\n commonFactors.add(i);\n }\n }\n\n //find the greatest factor by looping through each element in the commonFactors list\n for(Integer a : commonFactors)\n {\n if(a > greatestFactor)\n {\n greatestFactor = a;\n }\n }\n return greatestFactor;\n }", "public static int HCF(int a, int b){\r\n int x, i, hcf = 0;\r\n \r\n for(i = 1; i<=a || i<=b; i++){\r\n if(a%i == 0 && b%i == 0){\r\n hcf = i;\r\n }} \r\n //System.out.print(hcf);\r\n return hcf;\r\n }", "int div(int num1, int num2) {\n\t\treturn num1/num2;\n\t}", "public static void gcd (int a[], int b[], int gcd[]) {\n\t\tif (isZero(a)) { assign (gcd, a); return; }\n\t\tif (isZero(b)) { assign (gcd, b); return; }\n\t\t\n\t\ta = copy (a); // Make copies to ensure\n\t\tb = copy (b); // that a and b are not modified.\n\t\t\n\t\twhile (!isZero(b)) {\n\t\t\t// last argument to subtract represents sign of result which\n\t\t\t// we can ignore since we only subtract smaller from larger.\n\t\t\t// Note compareTo (a, b) is positive if a > b.\n\t\t\tif (compareTo(a, b) > 0) {\n\t\t\t\tsubtract (a, b, gcd, new int[1]);\n\t\t\t\tassign (a, gcd);\n\t\t\t} else {\n\t\t\t\tsubtract (b, a, gcd, new int[1]);\n\t\t\t\tassign (b, gcd);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// value held in a is the computed gcd of original (a,b).\n\t\tassign (gcd, a);\n\t}", "public int findMax(int num1, int num2) {\n return 0;\n }", "public static void main(String[] args) {\n DateTime();\r\n\r\n System.out.println(\"Enter two Positive Integers to Find GCD\");\r\n\r\n //Reading two positive integers\r\n Scanner scan = new Scanner(System.in);\r\n int Num1 = scan.nextInt();\r\n int Num2 = scan.nextInt();\r\n\r\n System.out.println(\"GCD of two number \" + Num1 + \" and \" + Num2 + \" is \" + GCD(Num1, Num2));\r\n\r\n }", "private static int cprModFunction(int a, int b) {\n\t\tint res = a % b;\n\t\tif (res < 0)\n\t\t\tres += b;\n\t\treturn res;\n\t}", "public int compare(Integer a,Integer b)\n\t{\n\t\treturn a%2-b%2;\n\t}", "public int getGCD(int numerator, int denominator)\n\t{\n\t\tif (denominator == 0)\n\t\t{\n\t\t\treturn numerator;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn getGCD(denominator, numerator % denominator);\n\t\t}\n\t}", "public int division(int a, int b) {\n return a / b;\n }", "public static void modgcd (int a[], int b[], int gcd[]) {\n\t\tif (isZero(a)) { assign (gcd, a); return; }\n\t\tif (isZero(b)) { assign (gcd, b); return; }\n\t\t\n\t\t// align a and b to have same number of digits and work on copies\n\t\ta = copy(normalize(a, b.length));\n\t\tb = copy(normalize(b, a.length));\n\t\t\n\t\t// ensure that a is greater than b. Also return trivial gcd.\n\t\tint rc = compareTo(a,b);\n\t\tif (rc == 0) { assign (gcd, a); return; }\n\t\tif (rc < 0) {\n\t\t\tint t[] = b;\n\t\t\tb = a;\n\t\t\ta = t;\n\t\t}\n\t\t\n\t\tint quot[] = new int[a.length];\n\t\tint remainder[] = new int[a.length];\n\t\twhile (!isZero(b)) {\n\t\t\tint t[] = copy (b);\n\t\t\tdivide (a, b, quot, remainder);\n\t\t\tassign (b, remainder);\t\t\t\n\t\t\tassign (a, t);\n\t\t}\n\n\t\t// value held in a is the computed gcd of (a,b).\n\t\tassign (gcd, a);\n\t}", "private static int gcd(int m, int n)\n {\n int mx = Math.max(m, n);\n int mn = Math.min(m, n);\n int remainder = 1;\n while (remainder != 0)\n {\n remainder = mx % mn;\n mx = mn;\n mn = remainder;\n }\n return mx;\n }", "private BigInteger lcm(BigInteger input1, BigInteger input2) {\n return input1.multiply(input2).divide(input1.gcd(input2));\n }", "@Test\n\tpublic void gcdOfFiboNumsTest() {\n\n\t\tAssert.assertTrue(ifn.gcdOfFiboNums(3, 12) == 2);\n\t}", "public static int max(int a, int b) {\n return a - ((a - b) & ((a - b) >> 31));\n }", "public int div(int a, int b) {\n\t\t\treturn compute(a, b, OPER_DIV);\n\t\t}", "private int getGCD(int[] a) {\r\n\r\n int gcd = a[0];\r\n\r\n for (int i = 1; i < a.length; i++) {\r\n gcd = getGCD(gcd, a[i]);\r\n }\r\n return gcd;\r\n }", "public static int largestMultipleOfXLeqY(int x, int y) {\n\treturn (y / x) * x;\n }", "public static BigInteger lcm(String a, String b) \n\t\t{\n\t\t\tBigInteger s = new BigInteger(a); \n\t\t\tBigInteger s1 = new BigInteger(b); \n\n\t\t\t// calculate multiplication of two bigintegers \n\t\t\tBigInteger mul = s.multiply(s1); \n\n\t\t\t// calculate gcd of two bigintegers \n\t\t\tBigInteger gcd = s.gcd(s1); \n\n\t\t\t// calculate lcm using formula: lcm * gcd = x * y \n\t\t\tBigInteger lcm = mul.divide(gcd); \n\t\t\treturn lcm; \n\t\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.print(\"Enter num1: \");\n int num1 = sc.nextInt();\n System.out.print(\"Enter num2: \");\n int num2 = sc.nextInt();\n\n int hcf = hcf(num1, num2);\n int lcm = lcm(num1, num2, hcf);\n\n System.out.println(\"the lcm is: \" + lcm);\n\n }", "public T div(T first, T second);", "public static void main(String[] args) {\n\t\tint a=ArithmeticUtils.gcd(361,285);\n\t\tSystem.out.println(a);\n\t}", "public static int MCD_recursivo(int num1, int num2) {\n if (num2 == 0) {\r\n return num1;\r\n //como el if solo esta impriemindo el resultado aqui tenemos que volver a llamar la funcion recursiva las veces que sea necesario para encontra el maximon comun divisor\r\n } else {\r\n return MCD_recursivo(num2, num1 % num2);\r\n }\r\n }", "private int getLCD(int a, int b){\n return ( (a * b) / getGCD(a, b) ); \n }", "public static int GCF(int... ints) {\n int gcd = pair_GCF(ints[0], ints[1]);\n for (int i = 2, n = ints.length; i < n; i++) {\n gcd = pair_GCF(ints[2], gcd);\n }\n return gcd;\n }", "private BigInteger gcd(BigInteger n, BigInteger d)\n\t\t{\n\t\t\t// Returns the absolute values of the BigInteger\n\t\t\tBigInteger n1 = n.abs();\n\t\t\tBigInteger n2 = d.abs();\n\t\t\t\n\t\t\t// If n2 equals 0 return n1\n\t\t\tif(n2.equals(BigInteger.ZERO)){\n\t\t\t\treturn n1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// else recursively return the gcd of n2 and n1%n2\n\t\t\t\treturn gcd(n2,n1.mod(n2));\n\t\t\t}\n\t\t}", "private int gcd(int m, int n) {\n\t\tint r;\n\t\twhile(n != 0) {\n\t\t\tr = m % n;\n\t\t\tm = n;\n\t\t\tn = r;\n\t\t}\n\t\treturn m;\n\t}", "public static Integer gcd(Integer p, Integer q) {\n\t\tif (q == 0) {\n\t\t return p;\n\t\t}\n\t\treturn gcd(q, p % q);\n\t}", "static int gcd2(int m, int n) {\n if (m==0) return n;\n else return gcd2(n%m,m);\n }", "public double divisao (double numero1, double numero2){\n\t}", "public static int gcd(int m,int n) {\n\t\tint p=m,q=n;\n\t\twhile(p%q!=0) {\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}\n\t\treturn q;\n\t}", "@Override\r\n\tpublic int umul(int a,int b) {\n\t\treturn a/b;\r\n\t}", "public int dividir(int a, int b) throws ExececaoCalculo{\n \n if(b==0){\n //ExececaoCalculo é uma class que esta nesse pacote atual\n throw new ExececaoCalculo(a, b);\n }\n return a/b;\n }", "public static void main (String[] args){\n Scanner in=new Scanner(System.in);\n int n1=in.nextInt();\n int n2=in.nextInt();\n int n3=in.nextInt();\n int ans=gcd(n1,n2,n3);\n System.out.println(ans);\n }", "public int gcd() {\n return BigInteger.valueOf(row)\n .gcd(BigInteger.valueOf(column)).intValue();\n }", "private double calcG(int a, int b) {\n return a % 2 == 0 && b % 2 == 0 ? 20 : a % 2 == 1 && b % 2 == 1 ? 1 : 5;\n }", "public int pgcdBySubstract(int a, int b) throws Exception {\n if(a <1 || b <1){\n throw new Exception(\"a et b doivent etre >= 1\");\n }\n int difference = Math.abs(a-b);\n if(difference == 0)\n return a;\n if(a > b){\n a = difference;\n }else b = difference;\n return pgcdBySubstract(a,b);\n }" ]
[ "0.7972691", "0.7510588", "0.74857336", "0.7457217", "0.7399363", "0.7362999", "0.7362735", "0.73582554", "0.7356415", "0.7337904", "0.73070157", "0.7303091", "0.72854584", "0.72539675", "0.72451943", "0.72285134", "0.72124773", "0.71995115", "0.71893007", "0.71516544", "0.71478885", "0.7142042", "0.712574", "0.7120325", "0.7092969", "0.7061316", "0.7054503", "0.7052247", "0.7038554", "0.70351744", "0.6968918", "0.69524384", "0.69401914", "0.68873215", "0.6871891", "0.68644613", "0.6864129", "0.6852341", "0.6811049", "0.6737197", "0.67200637", "0.6719506", "0.66761345", "0.6625612", "0.66092616", "0.65815145", "0.6560847", "0.65474206", "0.65297204", "0.6484681", "0.646826", "0.64333606", "0.6404381", "0.6394927", "0.6388081", "0.6379347", "0.6346174", "0.6319514", "0.628264", "0.62556124", "0.62230146", "0.6205844", "0.61746544", "0.61676735", "0.61416197", "0.6079304", "0.5994759", "0.5990849", "0.5985255", "0.59829634", "0.5977057", "0.59757173", "0.5955794", "0.5952061", "0.59448564", "0.5935151", "0.5925808", "0.5921172", "0.5917346", "0.5915016", "0.5908171", "0.59022915", "0.5888496", "0.5823616", "0.5813211", "0.5794186", "0.57919025", "0.5791675", "0.5769413", "0.57529193", "0.5750214", "0.57471603", "0.57404965", "0.57121265", "0.5707199", "0.57013094", "0.5667479", "0.56555706", "0.56552416", "0.5648274" ]
0.7654101
1
Reduce this fraction (and make denominator > 0).
private Fraction reduce() { Fraction f = null; try { f = (Fraction)clone(); } catch (CloneNotSupportedException e) {}; if (denominator == 0) throw new ArithmeticException (" illegal denominator zero "); if (denominator < 0) { f.numerator = -numerator; f.denominator = -denominator; } if (numerator == 0) f.denominator = 1; else { int n = gcd (numerator, denominator); f.numerator = numerator / n; f.denominator = denominator / n; } return f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}", "private void reduce() {\n /** The fraction is equal to 0. The numerator is 0 in this case */\n if(this.numerator == 0)\n this.denominator = 1;\n /** The numerator and denominator are not equal */\n else if (this.numerator != this.denominator) {\n\n /** The greatest common divisor of the numerator and denominator of this fraction */\n int gcd = getGCD(Math.abs(this.numerator), Math.abs(this.denominator));\n\n /** There is a greatest common divisor greater than 1 */\n if (gcd > 1) {\n this.numerator /= gcd;\n this.denominator /= gcd;\n }\n } \n /** The fraction is equal to 1 */\n else {\n this.numerator = 1;\n this.denominator = 1;\n }\n }", "private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Divide by zero error: \" + numerator + \"/\" + denominator);\r\n\t\t}\r\n\t\tint gcd;\r\n\t\tif(numerator >= denominator)\r\n\t\t{\r\n\t\t\tgcd = gcd(numerator, denominator);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgcd = gcd(denominator, numerator);\r\n\t\t}\r\n\t\tnumerator /= gcd;\r\n\t\tdenominator /= gcd;\r\n\t\tif(denominator == 1)\r\n\t\t{\r\n\t\t\t//Quotient is integer\r\n\t\t\treturn new Rational(numerator);\r\n\t\t}\t\t\r\n\t\t//Negative denominator\r\n\t\tif(denominator < 0)\t\t\t\r\n\t\t{\r\n\t\t\tdenominator *= -1;\r\n\t\t\tnumerator *= -1;\r\n\t\t}\r\n\t\t//Quotient is fraction\r\n\t\treturn new FullExpression(new Rational(numerator), new Rational(denominator), Operator.QUOT);\r\n\t}", "public void reduce() {\n\tint g = this.gcd();\n\tif ( g != 0 ) {\n\t numerator /= g;\n\t denominator /= g;\n\t}\n }", "private void reduce() {\n int gcd = gcd(this.numerator, this.denominator);\n this.numerator = this.numerator / gcd;\n this.denominator = this.denominator / gcd;\n }", "public void Reduce() {\n\t\tint gcd = MathHelper.GreatestCommonDivisor(this.numerator, this.denominator);\n\t\t\n\t\t// avoid divide by 0\n\t\tif (gcd > 0) {\n\t\t\tthis.numerator = this.numerator / gcd;\n\t\t\tthis.denominator = this.denominator / gcd;\n\t\t}\n\t}", "public void reduce()\n\t{\n\t\tint divider = getGCD(myNumerator, myDenominator);\n\t\tmyNumerator /= divider;\n\t\tmyDenominator /= divider;\n\t}", "private void reduce()\r\n {\r\n int lowest, highest, temp;\r\n if(Math.abs(numerator) >= Math.abs(denominator))\r\n { \r\n lowest = Math.abs(denominator);\r\n highest = Math.abs(numerator);\r\n }\r\n else\r\n {\r\n lowest = Math.abs(numerator);\r\n highest = Math.abs(denominator);\r\n }\r\n while(lowest != 0)\r\n {\r\n temp = lowest;\r\n lowest = highest % lowest;\r\n highest = temp;\r\n } \r\n numerator = numerator / highest;\r\n denominator = denominator / highest; \r\n \r\n if(denominator < 0)\r\n {\r\n numerator = numerator * (-1);\r\n denominator = denominator * (-1); \r\n } \r\n }", "public void reduce(){\r\n int num = numerator;\r\n int denom = denominator;\r\n int greatest;\r\n \r\n // Find the greater of numerator and denominator\r\n if(numerator < 0){\r\n num = -numerator;\r\n }\r\n if(num > denom){\r\n greatest = num;\r\n }\r\n else\r\n greatest = denom;\r\n \r\n // Find the GCD\r\n int gcd = 0;\r\n // starting from the largest\r\n for(int i = greatest; i > 1; i--){\r\n if((numerator % i == 0) && (denominator % i == 0)){\r\n gcd = i;\r\n break;\r\n }\r\n }\r\n // factor out the gcd in both the numerator and denominator\r\n if(gcd != 0){\r\n numerator /= gcd;\r\n denominator /= gcd;\r\n }\r\n }", "public static int reduceDenominator(int numerator, int denominator) {\n int start;\n int greatestCommonFactor = 1;\n if (numerator > denominator) {\n start = numerator;\n } else {\n start = denominator;\n }\n if (start != 0) {\n while (greatestCommonFactor != start) {\n if (numerator % start == 0 && denominator % start == 0) {\n greatestCommonFactor = start;\n start++;\n }\n start--;\n }\n }\n return denominator / greatestCommonFactor;\n }", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "public Fraction simplify(){\n long n = this.numerator;\n long d = this.denominator;\n for(long k = d; k >= 1; k--){\n if(n % k == 0 && d % k == 0) {\n n = n / k;\n d = d / k;\n break;\n }\n }\n return new Fraction(n,d);\n }", "private void simplify()\n\t{\n\t\tint gcd=1;\n\t\tint smallest= Math.min(numerator, denominator);\n\t\tfor(int i=2;i<=smallest;i++)\n\t\t{\n\t\t\tif(numerator%i==0 && denominator%i==0)\n\t\t\t{\n\t\t\t\tgcd=i;\n\t\t\t}\n\t\t}\n\t\t//To get the fraction into its simplest form we divide the numerator and denominator with their gcd\n\t\tnumerator= numerator/gcd;\n\t\tdenominator= denominator/gcd;\n\t}", "public void subtract(Fraction f)\r\n {\r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator - f.getNumerator();\r\n this.reduce();\r\n }", "Rational(int num, int denom){\r\n // If fraction is negative, the numerator is negative\r\n numerator = (denom < 0 ? -num : num);\r\n denominator = (denom < 0 ? -denom : denom);\r\n reduce();\r\n }", "public static int reduceNumerator(int numerator, int denominator) {\n int start;\n int greatestCommonFactor = 1;\n if (numerator > denominator) {\n start = numerator;\n } else {\n start = denominator;\n }\n if (start != 0) {\n while (greatestCommonFactor != start) {\n if (numerator % start == 0 && denominator % start == 0) {\n greatestCommonFactor = start;\n start++;\n }\n start--;\n }\n }\n return numerator / greatestCommonFactor;\n }", "public static String reduceFraction(String mixedAnswer)\r\n {\r\n \tint underscore = mixedAnswer.indexOf('_');\r\n \tint slash = mixedAnswer.indexOf('/');\r\n \tint num = Integer.parseInt(mixedAnswer.substring(underscore + 1, slash));\r\n \tint denom = Integer.parseInt(mixedAnswer.substring(slash + 1, mixedAnswer.length()));\r\n \tint newNum = num / findGCF(num, denom);\r\n \tint newDenom = denom / findGCF(num, denom);\r\n \tString reducedFraction = newNum + \"/\" + newDenom;\r\n \treturn reducedFraction; \r\n }", "public static int [] reduceFrac(int [] operand) {\r\n \tint [] simpleFrac = new int [3]; \r\n \tint whole = operand[0]/operand[1];\r\n \toperand[0] = (operand[0]%operand[1]);\r\n \tif (whole != 0) {\r\n \toperand[0] = Math.abs(operand[0]);\r\n \t}\r\n \r\n \tint factor = gcf(operand);\r\n \tint numerator = operand[0]/factor;\r\n \tint denominator = Math.abs(operand[1]/factor); \r\n \t\t\tsimpleFrac[0] = whole; \r\n \t\t\tsimpleFrac[1] = numerator;\r\n \t\t\tsimpleFrac[2] = denominator; \r\n \t\treturn simpleFrac; \r\n\r\n }", "void unsetFractionalMinimum();", "void unsetFractional();", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "public static int convertToImproperFractionNumerator(int whole, int numerator, int denominator) {\n numerator = (denominator * whole) + numerator;\n return numerator;\n }", "public Fraction inverse() {\n return new Fraction (denominator, numerator).reduce();\n }", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public void subtract(Rational s) {\n\tif ( denominator == s.denominator ) {\n\t numerator -= s.numerator;\n\t}\n\telse {\n\t numerator *= s.denominator;\n\t numerator -= s.numerator * denominator;\n\t denominator *= s.denominator;\n\t}\n }", "public Fraction reciprocal()\n {\n int newNumerator = this.getDenominator();\n int newDenominator = this.getNumerator();\n Fraction newFraction = new Fraction(newNumerator, newDenominator);\n return newFraction;\n }", "public Fraction div(Fraction f) {\n /** Accounts for the input of a negative fraction */\n if(f.getNumerator() < 0)\n return new Fraction( (-1) * (this.numerator * f.getDenominator()), Math.abs(this.denominator * f.getNumerator()));\n return new Fraction( (this.numerator * f.getDenominator()), (this.denominator * f.getNumerator()));\n }", "private void simplify(){\n\n\t\tint gcd;\n\t\twhile(true){ \n\t \tgcd = greatestCommonDivisor(myNumerator, myDenominator);\n\t \tif (gcd ==1) return;\n\t \tmyNumerator = myNumerator / gcd;\n\t \tmyDenominator = myDenominator / gcd;\n\t\t}\n }", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator * f.numerator);\n }", "@Override\n\tpublic void take(Fraction fraction) {\n\t\tFraction amount = Fraction.minimum(getAmount(), fraction);\n\n\t\tsetAmount(Fraction.subtract(getAmount(), amount));\n\t}", "public Fraction(int numerator, int denominator) {\n if(denominator < 1)\n throw new IllegalArgumentException();\n this.numerator = numerator;\n this.denominator = denominator;\n this.reduce();\n }", "public static String simplify(int numerator, int denominator) {\n \tint result = gcf(numerator, denominator);\t//use gcf to get the result and store it in an int variable\r\n \tint newNum = numerator/result;\t\t//make newnum equal to num/result\r\n \tint newDenom = denominator/result;\t\t//new denom equals denom/result\r\n \treturn newNum + \"/\" + newDenom;\t\t\t//return statement of num / newdenom\r\n }", "public void divide(Rational s) {\n\tnumerator *= s.denominator;\n\tdenominator *= s.numerator;\n }", "public Fraction opposite() {\n return new Fraction (-numerator, denominator).reduce();\n }", "public Fraction dividedBy(Fraction other) {\n Fraction end = times(other.getReciprocal());\n\n return end;\n\n }", "@Override\n public Float div(Float lhs, Float rhs) {\n\t\n\tassert(rhs != 0);\n\t\n\tfloat res = lhs/rhs;\n\treturn res;\n }", "public Fraction subtract(Fraction f){\n return new Fraction(this.numerator * f.denominator - f.numerator * this.denominator, this.denominator * f.denominator);\n }", "public void divide()\r\n {\r\n if (fractionDisplay)\r\n {\r\n result = Operations.fractionFormat(leftOperand, rightOperand);\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n divisionFormatResult = true;\r\n }\r\n else \r\n {\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n }\r\n resultResetHelper();\r\n }", "public void reduct() {\n\t\tint divider = bunmo;\n\t\tif(bunja < bunmo){\n\t\t\tdivider = bunja;\n\t\t}\n\t\twhile(divider > 1){\n//\t\twhile(!util.Uitl.isPrime(bunmo)||!util.Uitl.isPrime(bunja)){\n\t\t\tboolean canDivide = (bunmo%divider==0)&&(bunja%divider==0);\n\t\t\tif(canDivide){\n\t\t\t\tbunja/=divider;\n\t\t\t\tbunmo/=divider;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdivider--;\n\t\t\t}\n\t\t}\n\t}", "public Rational(int numerator, int denominator) {\n\t\tthis.numerator = numerator;\n\t\tthis.denominator = denominator;\n\t\t\n\t\tthis.Reduce(); //reduce immediately\n\t}", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "public Fraction(int num, int den){\n numerator = num;\n if (den != 0){\n denominator = den;\n }\n else{\n denominator = 1;\n }\n reduce();\n }", "public static Fraction toFraction (double f, int d) {\n if (d > 0)\n return new Fraction ((int)(Math.round (f*d)), d);\n else\n throw new ArithmeticException (\" illegal denominator \");\n }", "public Fraction divide(Fraction divisor)\n {\n Fraction flipDivisor = divisor.reciprocal();\n Fraction newFraction = new Fraction();\n newFraction = this.multiply(flipDivisor);\n return newFraction;\n }", "public static String reduceAnswer(String Answer)\r\n {\r\n \tint slash = Answer.indexOf('/');\r\n \tint num = Integer.parseInt(Answer.substring(0, slash));\r\n \tint denom = Integer.parseInt(Answer.substring(slash + 1, Answer.length()));\r\n \tif(denom == 0)\r\n \t{\r\n \t\tString error = \"Error: cannot divide by 0\";\r\n \t\treturn error;\r\n \t}\r\n \telse if(num == 0)\r\n \t{\r\n \t\treturn Integer.toString(0);\r\n \t}\r\n \telse if (denom == 1)\r\n \t{\r\n \t\treturn Integer.toString(num);\t\r\n \t\r\n \t}\r\n \telse\r\n \t{\r\n \t\tint wholeNumber = num / denom; \r\n \t\tint newNum = num % denom;\r\n \t\tString mixedAnswer = wholeNumber + \"_\" + newNum + \"/\" + denom;\r\n \t\tint underscore = mixedAnswer.indexOf('_');\r\n \t\tslash = mixedAnswer.indexOf('/');\r\n \t\twholeNumber = Integer.parseInt(mixedAnswer.substring(0, underscore));\r\n \t\tnum = Integer.parseInt(mixedAnswer.substring(underscore + 1, slash));\r\n \tdenom = Integer.parseInt(mixedAnswer.substring(slash + 1, mixedAnswer.length()));\r\n \t\tif (mixedAnswer.contains(\"_-\") && (wholeNumber < 0))\r\n \t\t{\r\n \t\t\tnewNum = Integer.parseInt(mixedAnswer.substring(underscore + 2, slash));\r\n \t\t\tmixedAnswer = wholeNumber + \"_\" + newNum + \"/\" + denom;\r\n \t\t}\r\n \tif(wholeNumber == 0)\r\n \t\t{\r\n \t\t\tString finalAnswer = reduceFraction(mixedAnswer);\r\n \t\t\treturn finalAnswer; \r\n \t\t}\r\n \t\telse if (num == 0)\r\n \t\t{\r\n \t\t\treturn Integer.toString(wholeNumber);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\tString finalAnswer = wholeNumber + \"_\" + reduceFraction(mixedAnswer);\r\n \treturn finalAnswer;\r\n \t\t}\r\n \t}\r\n }", "Rational divide(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n\n firstarg.numerator=firstarg.numerator*p.denominator;\n firstarg.denominator=p.numerator*firstarg.denominator;\n return firstarg;\n }", "public String get_fraction_part();", "public Fraction sub(Fraction f) {\n /** Denominators equal */\n if( f.getDenominator() == this.denominator )\n return new Fraction( this.numerator - f.getNumerator(), this.denominator);\n \n /** Denominators different */\n \n /** The least common multiple found between both denominators. */\n int lcd = getLCD(this.denominator, f.getDenominator());\n\n /** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */\n return new Fraction( (lcd / this.denominator * this.numerator) - (lcd / f.getDenominator() * f.getNumerator()), lcd);\n }", "public Fraction(){\n\t\n\t\tsetFraction(0,1);\n }", "public Fraction(int numerator,int denominator)\n\t{\n\t\tthis.numerator=numerator;\n\t\tthis.denominator= denominator;\n\t\tsimplify();\n\t}", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "private int getRemainder (int numerator, int denominator)\n {\n if (denominator >= numerator)\n return 0;\n\n int diff = numerator;\n while (diff >= denominator)\n {\n diff = diff - denominator;\n }\n\n return diff;\n }", "public String simplify(){\n\n int simp = gcd(numerator, denominator);\n numerator = (numerator/simp);\n denominator = (denominator/simp);\n if (denominator == 1){\n return (numerator + \"\");\n }\n if (numerator > denominator){\n int first = (numerator/denominator);\n numerator = (numerator%denominator);\n return (first + \"_\" + numerator + \"/\" + denominator);\n }\n else {\n return (numerator + \"/\" + denominator);\n }\n\n }", "public Fraction toDenominator(int denominator){\n if (denominator == 0) {\n throw new NullPointerException(\"denominator doesn't be '0'\");\n } else if (denominator < this.denominator) {\n throw new NullPointerException(\"Can't cast denominator to '\" + denominator + \"'.\");\n }\n\n int lcm = Fractions.getLCM(this.denominator, denominator);\n\n int factor = lcm / this.denominator;\n return new Fraction(\n this.numerator * factor,\n this.denominator * factor);\n }", "public Fraction divide( Fraction divisor ) {\n // Division ist genau wie multiplication aber in Kreuz\n // also, wir tauschen den numerator und den denomitanor aus, und\n // multiplizieren wie üblich\n Fraction upsideDown = new Fraction( divisor.denominator, divisor.numerator );\n Fraction result = this.multiply( upsideDown );\n\n return result;\n }", "public void depreciate(){\r\n float amountN = getAmount();\r\n float reduce = amountN*(rate/100);\r\n amountN = amountN - reduce;\r\n this.amount = amountN;\r\n }", "public Rational divide(Rational other)\n\t{\n\t\tint divNumer = (getNumer() * other.getDenom());\n\t\tint divDenom = (getDenom() * other.getNumer());\n\n\t\tRational quotient = new Rational(divNumer, divDenom);\n\t\tquotient.normalize();\n\t\treturn quotient;\n\t}", "public abstract double getFractionMultiplier();", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "public static Rational divide(Rational num1, Rational num2){\r\n Rational quotient = new Rational();\r\n // keep change flip\r\n \r\n quotient.numerator = num1.getNumerator() * num2.getDenominator();\r\n quotient.denominator = num1.getDenominator() * num2.getNumerator();\r\n \r\n quotient.reduce();\r\n return quotient;\r\n }", "public Coord simplifyAsFraction() {\n int gcd = gcd();\n return new Coord(row / gcd, column / gcd);\n }", "public float toFloat() {\n return (float) numerator/(float) denominator;\n }", "public void setFraction(int fraction) {\n this.fraction = fraction;\n }", "@Override\n\tpublic void give(Fraction fraction) {\n\t\tFraction amount = Fraction.minimum(getSize().subtract(getAmount()), fraction);\n\n\t\tsetAmount(Fraction.add(getAmount(), amount));\n\t}", "public BigInt divide(BigInt rhs) throws ArithmeticException, BigIntException {\n if (null == rhs) {\n throw new BigIntException(\"null parameter\");\n }\n\n if (rhs.equals(new BigInt(\"0\"))) {\n // The rhs is 0\n throw new ArithmeticException(\"Zero division\");\n }\n\n BigInt absNumerator = new BigInt(number, true);\n BigInt quotient = new BigInt(new ArrayList<Integer>(), true);\n BigInt origDenominator = new BigInt(rhs.number, true);\n BigInt denominator = new BigInt(rhs.number, true);\n while (0 >= denominator.compareTo(absNumerator)) {\n quotient = quotient.plus(new BigInt(\"1\"));\n denominator = denominator.plus(origDenominator);\n }\n\n quotient.isPositive = (isPositive == rhs.isPositive);\n\n return quotient;\n }", "public Fraction(int numerator, int denominator) {\n\n //won't allow you to set the denominator equal to 0 because dividing by a 0 gives you an error\n if (denominator == 0) {\n throw new PizzaException(\"denominator can't be 0\");\n } else {\n //finding the GCD value depending on num and den\n int gcd = findGCD(numerator, denominator);\n\n //numerator/gcd and denominator/gcd give a reduced form and initialize them\n numerator = numerator / gcd;\n denominator = denominator / gcd;\n\n // if they both are negatives\n //Convert them to positive\n if (numerator < 0 && denominator < 0) {\n numerator = Math.abs(numerator);\n denominator = Math.abs(denominator);\n }\n //move the negative sign to the top for comparison reason\n else if (numerator > 0 && denominator < 0) {\n numerator = -numerator;\n denominator = Math.abs(denominator);\n }\n //set the final value for numerator and constructor\n this.NUMERATOR = numerator;\n this.DENOMINATOR = denominator;\n }\n\n }", "public FractionImpl(String fraction) {\n\n //use the trim String method to remove white space before and after the fraction characters\n\n String trimmed = fraction.trim();\n\n //whole number procedure - if no \"/\" is present\n\n if (!trimmed.contains(\"/\")) {\n this.numerator = Integer.parseInt(trimmed);\n this.denominator = 1;\n }\n\n //fraction procedure - split on \"/\" then convert string numbers to int and pass to the normalise function\n\n else {\n String[] bits = trimmed.split(\"/\");\n\n this.numerator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[0];\n this.denominator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[1];\n }\n\n\n }", "Rational subtract(Rational p){\n\n Rational firstarg =new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg=firstarg.lowestform();\n p=p.lowestform();\n //need to get it in it's lowest form before you can work with it\n int tempgcd=gcd(firstarg.denominator,p.denominator);\n if(firstarg.denominator==p.denominator)\n {\n // if both denominators are the same just got to add the numerator\n p.numerator=firstarg.numerator-p.numerator;;\n return p;\n }\n else if(tempgcd==1)\n {\n int tempdenominator=p.denominator;\n\n p.denominator=firstarg.denominator*p.denominator;\n p.numerator=p.numerator*firstarg.denominator;\n\n //calculate the second fraction\n firstarg.numerator=firstarg.numerator*tempdenominator;\n firstarg.denominator=firstarg.denominator*tempdenominator;\n\n //now just add the numerators\n p.numerator=firstarg.numerator-p.numerator;;\n\n return p;\n }\n else if(tempgcd>1)\n {\n\n p.denominator=tempgcd*p.denominator;\n p.numerator=p.numerator*tempgcd;\n //calculate the second fraction by getting the gcd and multiplying it by the top and bottom of bot fractions\n firstarg.numerator=firstarg.numerator*tempgcd;\n firstarg.denominator=firstarg.denominator*tempgcd;\n //now just add the numerators\n p.numerator=firstarg.numerator-p.numerator;\n\n return p;\n }\n return null;\n\n }", "public static String toMixedNum(int numerator, int denominator) {\n \tint whole=numerator/denominator;\t\t//make variable to store whole number by dividing num and denom\r\n\t\tint newnumerator=numerator%denominator;\t//get newnum by doing num mod denom\r\n\t\t\r\n\t\tif(whole<0) {\t\t\t//if whole number is negative and the new num is neg as well,\r\n\t\t\tnewnumerator *= -1;\t// make the new num positive\r\n\t\t}\r\n\t\tif(newnumerator==0 && whole==0) {\t//if the frac is 0 all-around\r\n\t\t\treturn \"0\";\t\t\t\t\t\t//return 0\r\n\t\t}\r\n\t\tif(newnumerator==0) {\t//if the num is 0 it's most likely\r\n\t\t\treturn whole + \"\";\t//just a whole number\r\n\t\t}\r\n\t\tif(newnumerator<0 && denominator<0) {\t//if the num and denom is both neg\r\n\t\t\tnewnumerator *= -1;\t\t\t\t\t//then the frac itself should be negative\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(denominator<0) {\t\t\t\t//if denom is negative \r\n\t\t\tnewnumerator *= -1;\t\t\t//multiply both num and denom by -1 to get a postitive denom and neg num\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(whole==0) {\t\t\t//if the whole num is 0\r\n\t\t\treturn simplify(newnumerator, denominator);\t//then it should just return num/denom\r\n\t\t}\r\n\t\treturn whole + \"_\"+ simplify(newnumerator, denominator); //return statement of the whole mixed frac\r\n }", "public Fraction minus(Fraction other) {\n int finder = MathUtils.findLowestCommonMultiple(denominator, other.getDenominator());\n\n int idk = finder/denominator;\n int idc = finder/other.getDenominator();\n int fraction = (idk * getNumerator()) - (idc * other.getNumerator());\n return new Fraction(fraction, finder);\n\n }", "public void add(Fraction f)\r\n { \r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator + f.getNumerator();\r\n this.reduce();\r\n }", "@Override\r\n\tpublic int umul(int a,int b) {\n\t\treturn a/b;\r\n\t}", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public int getDenominator() { \n return denominator; \n }", "public Fraction(int numerator, int denominator){\n \n\t\tsetFraction(numerator, denominator);\n }", "public String getFraction() {\n return fraction;\n }", "public Fraction(long numerator){\n this.numerator = (int)numerator;\n this.denominator = 1;\n }", "public Fraction getReciprocal() {\n return new Fraction(denominator, numerator);\n }", "public int getDenominator()\r\n {\r\n return denominator;\r\n }", "public Rational() {\n\tnumerator = 0;\n\tdenominator = 1;\n }", "public Fraction getFraction() {\n return fraction;\n }", "public static int findDenominator(String fraction) {\n \tif(fraction.contains(\"/\")) {\t//check to see if it has a /\r\n \t\tint denominator= Integer.parseInt(fraction.substring(fraction.indexOf(\"/\")+1,fraction.length( )));\t//use substring to get numbers from / to the frac length; make variable\r\n \t\treturn denominator;\t//return the number\r\n \t} else {\r\n \t\treturn 1; //else if it's a whole number return 1\r\n \t}\r\n }", "void unsetValueRatio();", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "public Fraction(int numerator, int denominator){\n this.numerator= numerator;\n this.denominator = denominator;\n }", "@Override\n\tpublic double DivideOperation(double dividend, double divisor) {\n\t\treturn 0;\n\t}", "public void sub(Fraction f1, Fraction f2) {\n\t\tnumerator = f1.getNumerator() * f2.getDenominator() - f2.getNumerator() * f1.getDenominator();\n\t\tdenominator = f1.getDenominator() * f2.getDenominator();\n\t\tint gcd = gcd(f1.getDenominator(), f2.getDenominator());\n\t\tnumerator /= gcd;\n\t\tdenominator /= gcd;\n\t}", "public static Rational divide(Rational one, Rational two) {\n\t\t// prevent divide by zero\n\t\tif (two.numerator == 0)\n\t\t\tthrow new RuntimeException(\"Cannot divide by Rational with numerator of 0 (divide by zero exception)\");\n\t\t\t\t\t\n\t\treturn new Rational(one.numerator * two.denominator, one.denominator * two.numerator);\n\t}", "public BigRational divide(BigRational b) {\n return valueOf(this.num.multiply(b.getDenominator()), this.den.multiply(b.getNumerator()));\n }", "public Fraction( int num, int den ) {\n if( den == 0 ) {\n throw new RuntimeException( \"0 is not a valid denominator!\");\n } else {\n this.value = num/den;\n this.numerator = num;\n this.denominator = den;\n // Mit der unteren Schleife kürzen wir.\n if( this.denominator > 1 ){\n for( int i = this.denominator; i >= 2; i-- ) {\n if( this.numerator % i == 0 && this.denominator % i == 0 ) {\n this.numerator /= i;\n this.denominator /= i;\n }\n }\n }\n }\n\n }", "public void setRational(int a)\n {\n num = a / gcd(a, 1);\n den = 1;\n }", "public void allowFractional() {\n APIlib.getInstance().addJSLine(jsBase + \".allowFractional();\");\n }", "public int getDenominator()\n {\n return this.denominator;\n }", "public String toFractionString() {\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "public FractionImpl(int wholeNumber) {\n\n //set implicit denominator to 1, handle printing with the toString method\n\n this.numerator = wholeNumber;\n this.denominator = 1;\n }", "public final void div() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (topMostValue > 0) {\n\t\t\t\tpush(secondTopMostValue / topMostValue);\n\t\t\t}\n\t\t}\n\t}", "public static double divFraction(Fraction f1, Fraction f2) {\n\t\treturn (f1.getNumerator() * f2.getDenominator()) / (f1.getDenominator() * f2.getNumerator());\n\t}" ]
[ "0.8232469", "0.7995409", "0.7873992", "0.78169614", "0.7680819", "0.73902416", "0.7307941", "0.72625273", "0.72115207", "0.69528943", "0.6727647", "0.6665192", "0.6577517", "0.6500464", "0.64728504", "0.6464681", "0.6313467", "0.63075566", "0.6304652", "0.62537414", "0.61855966", "0.6168063", "0.61550087", "0.6142681", "0.60907096", "0.608567", "0.6085262", "0.6017972", "0.6016975", "0.6013661", "0.5975433", "0.596485", "0.5951174", "0.5949942", "0.59357363", "0.5928293", "0.5910397", "0.58701324", "0.5849441", "0.57920885", "0.5791015", "0.57837147", "0.57464886", "0.5739116", "0.57360756", "0.5725138", "0.5715273", "0.569732", "0.56850195", "0.56688243", "0.5662933", "0.56626326", "0.5661388", "0.5655044", "0.5649196", "0.562616", "0.56050116", "0.5601759", "0.55913216", "0.55893296", "0.5570643", "0.5565719", "0.55526185", "0.55487615", "0.55225027", "0.55139625", "0.551333", "0.5505712", "0.5498355", "0.54974663", "0.54834676", "0.54827476", "0.54708445", "0.5470297", "0.54699063", "0.5442374", "0.5440627", "0.54320157", "0.5422238", "0.5418082", "0.5411037", "0.5395697", "0.5394869", "0.5389808", "0.53850394", "0.53808886", "0.53726107", "0.5364031", "0.5359498", "0.53558236", "0.5354236", "0.5336167", "0.5334591", "0.53321046", "0.5312417", "0.5310513", "0.53098434", "0.53093594", "0.5309222", "0.53047794" ]
0.77593803
4
Hashcode has to be equal for equal fractions.
@Override public int hashCode() { return (int) (Double.doubleToLongBits (toDouble())>>31); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public int hashCode() {\n\t\t// for details on the use of result and prime below, see Effective Java, 2E, page 47-48\n\t\tint result = 7; // arbitrary number\n\t\tint prime = 31; // this ensures order matters\n\t\t\n\t\t// factor in each field used in the equals method\n\t\tresult = prime * result + numerator;\n\t\tresult = prime * result + denominator;\n\t\t\n\t\treturn result;\n\t}", "@Test\r\n public void testHash() {\r\n Settings expResult = Settings.EXPERT;\r\n int kod = 16 * 30 * 99;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.INTERMEDIATE;\r\n kod = 16 * 16 * 40;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.BEGINNER;\r\n kod = 9 * 9 * 10;\r\n assertEquals(expResult.hashCode(), kod);\r\n }", "public int hashcode();", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "public int hashCode()\n {\n return inDegrees();\n }", "public void testHashcode() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n int h1 = r1.hashCode();\n int h2 = r2.hashCode();\n }", "int getHash();", "public abstract int getHash();", "public static int hash(double value)\r\n/* 15: */ {\r\n/* 16: 57 */ return new Double(value).hashCode();\r\n/* 17: */ }", "@Override\n public int hashCode() {\n long longBits = Double.doubleToLongBits(this.size + this.unit.hashCode());\n return (int) (longBits ^ (longBits >>> 32));\n }", "static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>> 7) ^ (h >>> 4);\n\t}", "private static int computeHash(int par0)\n {\n par0 ^= par0 >>> 20 ^ par0 >>> 12;\n return par0 ^ par0 >>> 7 ^ par0 >>> 4;\n }", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "private String hash(){\r\n return Utility.SHA512(this.simplify());\r\n }", "public int hashCode() {\n return 37 * 17;\n }", "@Override\n\tpublic int hashCode()\n\t{\n\t\tint hash = 5;\n\t\thash = 41 * hash + (int) (Double.doubleToLongBits(this.latitude) ^ (Double.doubleToLongBits(this.latitude) >>> 32));\n\t\thash = 41 * hash + (int) (Double.doubleToLongBits(this.longitude) ^ (Double.doubleToLongBits(this.longitude) >>> 32));\n\t\treturn hash;\n\t}", "public int actualHashForEqual() {\n\treturn getCategory().hashForEqual() + 1;\n/*\nudanax-top.st:15776:SequenceSpace methodsFor: 'testing'!\n{UInt32} actualHashForEqual\n\t\"is equal to any basic space on the same category of positions\"\n\t^self getCategory hashForEqual + 1!\n*/\n}", "String getHash();", "String getHash();", "@Override\n public int hashCode ()\n {\n int hash = 7;\n hash = 53 * hash + Arrays.hashCode (this.bytes);\n return hash;\n }", "int hash(String makeHash, int mod);", "public void testHashFunction(){\r\n Token otherToken;\r\n\r\n try{\r\n token = new Token(TokenType.ID, \"abc\", 5);\r\n otherToken = new Token(TokenType.ID, \"abc\", 6);\r\n //assertTrue(token.hashCode() == 28456490);\r\n assertTrue(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.STRING, \"abc\", 5);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n\r\n token = new Token(TokenType.Q_MARK, \"?\", 10);\r\n otherToken = new Token(TokenType.Q_MARK, \"?\", 10);\r\n assertTrue(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.STRING, \"?\", 10);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.PERIOD, \".\", 10);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n \r\n }catch(ParserException e){\r\n };\r\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\tint hash = 3;\r\n\t\thash = 7 * hash + this.color.hashCode();\r\n\t\thash = 7 * hash + this.stripePattern.hashCode();\r\n\t\treturn hash;\r\n\t}", "@Override\n public final int hashCode() {\n\t\n \treturn Float.floatToIntBits(this.m00) ^\n \t\t Float.floatToIntBits(this.m01) ^\n \t\t Float.floatToIntBits(this.m02) ^\n Float.floatToIntBits(this.m10) ^\n Float.floatToIntBits(this.m11) ^\n Float.floatToIntBits(this.m12) ^\n Float.floatToIntBits(this.m20) ^\n Float.floatToIntBits(this.m21) ^\n Float.floatToIntBits(this.m22);\n }", "private int hash(T x)\n {\n // calcolo della chiave ridotta - eventualmente negativa\n int h = x.hashCode() % v.length;\n\n // calcolo del valore assoluto\n if (h < 0)\n h = -h;\n \n return h; \n }", "String getHashAlgorithm();", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result\n\t\t\t\t+ ((composer == null) ? 0 : composer.hashCode());\n\t\tresult = prime * result + meterDenominator;\n\t\tresult = prime * result + meterNumerator;\n\t\tresult = prime * result + ((phrases == null) ? 0 : phrases.hashCode());\n\t\tresult = prime * result + tempoDenominator;\n\t\tresult = prime * result + tempoNumerator;\n\t\tresult = prime * result + tempoSpeed;\n\t\tresult = prime * result + ((title == null) ? 0 : title.hashCode());\n\t\treturn result;\n\t}", "@Override\r\n public int hashCode() {\r\n int hash = 7;\r\n hash = 19 * hash + (int) (this.grauDeEquilibrio ^ (this.grauDeEquilibrio >>> 32));\r\n return hash;\r\n }", "@Test\n\tpublic void testToHashCode() throws HashUtilException {\n\t\tshort sh = 121;\n\t\tbyte b = 14;\n\t\tObject obj1 = new String[] { \"Ra\", \"sh\" };\n\t\tObject obj2 = new int[] { 23, 46, 74 };\n\t\tObject obj3 = new boolean[] { true, false };\n\t\tObject obj4 = new double[] { 12.3, 45.7 };\n\t\tObject obj5 = new byte[] { 51, 60 };\n\t\tObject obj6 = new short[] { 121, 127 };\n\t\tObject obj7 = new long[] { 23, 46, 74 };\n\t\tObject obj8 = new float[] { 20f, 23.567f };\n\t\tObject obj9 = new char[] { 'r', 'e' };\n\n\t\tassertEquals(\n\t\t\t\t((((((((((23l * 45) + 34) * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 'm') * 45 + 1) * 45)\n\t\t\t\t\t\t+ Double.doubleToLongBits(12.3),\n\t\t\t\tnew HashUtility(23, 45).append(34).append(\"Ram\").append(false).append(12.3).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((23l * 45) + 123456789000l) * 45) + Float.floatToIntBits(2.453f)) * 45) + sh) * 45) + b) * 45)\n\t\t\t\t\t\t+ (long) 'r',\n\t\t\t\tnew HashUtility(23, 45).append(123456789000l).append(2.453f).append(sh).append(b).append('r')\n\t\t\t\t\t\t.toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t((((((((((((((((((((23l * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 's') * 45) + (long) 'h')\n\t\t\t\t\t\t* 45 + 23) * 45) + 46) * 45) + 74) * 45) + 0) * 45) + 1) * 45) + Double.doubleToLongBits(12.3))\n\t\t\t\t\t\t* 45) + Double.doubleToLongBits(45.7),\n\t\t\t\tnew HashUtility(23, 45).append(new String[] { \"Ra\", \"sh\" }).append(new int[] { 23, 46, 74 })\n\t\t\t\t\t\t.append(new boolean[] { true, false }).append(new double[] { 12.3, 45.7 }).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 's') * 45) + (long) 'h')\n\t\t\t\t\t\t* 45) + 23) * 45) + 46) * 45) + 74) * 45) + 0) * 45) + 1) * 45) + Double.doubleToLongBits(12.3))\n\t\t\t\t\t\t* 45) + Double.doubleToLongBits(45.7),\n\t\t\t\tnew HashUtility(23, 45).append(obj1).append(obj2).append(obj3).append(obj4).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + 51) * 45) + 60) * 45) + 121) * 45) + 127) * 45) + 23) * 45) + 46) * 45)\n\t\t\t\t\t\t+ 74) * 45) + Float.floatToIntBits(20f)) * 45) + Float.floatToIntBits(23.567f)) * 45)\n\t\t\t\t\t\t+ (long) 'r') * 45) + (long) 'e',\n\t\t\t\tnew HashUtility(23, 45).append(new byte[] { 51, 60 }).append(new short[] { 121, 127 })\n\t\t\t\t\t\t.append(new long[] { 23, 46, 74 }).append(new float[] { 20f, 23.567f })\n\t\t\t\t\t\t.append(new char[] { 'r', 'e' }).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + 51) * 45) + 60) * 45) + 121) * 45) + 127) * 45) + 23) * 45) + 46) * 45)\n\t\t\t\t\t\t+ 74) * 45) + Float.floatToIntBits(20f)) * 45) + (long) Float.floatToIntBits(23.567f)) * 45)\n\t\t\t\t\t\t+ (long) 'r') * 45) + (long) 'e',\n\t\t\t\tnew HashUtility(23, 45).append(obj5).append(obj6).append(obj7).append(obj8).append(obj9).toHashCode());\n\t}", "public abstract int hashCode();", "@Override\n\tpublic int hashCode() {\n\t\treturn m * 100 + c * 10 + b;\n\t}", "public int hashCode() {\n // This implementation will work, but you may want to modify it\n // for improved performance.\n\n checkRep();\n return (this.latitude / 1000000 + this.longitude / 1000000) / 2;\n }", "public int hashCode(){\n int hashcode = name == null ? 0 : name.hashCode() / 2;\n return hashcode += ( value == null ? 0 : value.hashCode()/2 );\n }", "int hashCode();", "int hashCode();", "@Override\n public int hashCode() {\n return Objects.hash(denomination);\n }", "@Override\n public int hashCode() {\n return (first != null ? 41 * first.hashCode() : 0) + (second != null ? second.hashCode() : 0);\n }", "@Override\n public int hashCode() {\n int B = 31, M = 1000000007, code = 0;\n for(int pos = 0; pos < this.objectA.length(); pos++) {\n code = ((this.objectA.charAt(pos) - 'a') + B * code) % M;\n }\n return (code * this.objectB) % M;\n }", "public int hash(T input);", "int computeHashCode(byte val);", "@Test\n public void testHashCode() {\n LOGGER.info(\"testHashCode\");\n final String value = \"Hello\";\n final int actual = new AtomString(value).hashCode();\n final int expected = 61 * 7 + Objects.hashCode(value);\n assertEquals(expected, actual);\n }", "public int nextHashForEqual() {\n\t/* This actually needs to roll over the UInt32 limit. */\n\tmyCount = myCount + 1;\n\treturn myCount;\n/*\nudanax-top.st:16757:FakePacker methodsFor: 'shepherds'!\n{UInt32} nextHashForEqual\n\t\"Shepherds use a sequence number for their hash. Return the next one\n\t and increment. This should actually spread the hashes.\"\n\t\"This actually needs to roll over the UInt32 limit.\"\n\tmyCount _ myCount + 1.\n\t^ myCount!\n*/\n}", "public int hashCode(){\n \n long code;\n\n // Values in linear combination with two\n // prime numbers.\n\n code = ((21599*(long)value)+(20507*(long)n.value));\n code = code%(long)prime;\n return (int)code;\n }", "@Override\n public int hashCode() {\n int hash = 3;\n hash = 97 * hash + this.x;\n hash = 97 * hash + this.y;\n return hash;\n }", "public HASH256 getHash1(){return hash1;}", "@Override\r\n\tpublic int hashCode()\r\n\t{\r\n\t\tint hash = 1;\r\n\r\n\t\tif (containingExpression != null)\r\n\t\t{\r\n\t\t\thash = hash & Constants.HASH_PRIME + containingExpression.hashCode();\r\n\t\t}\r\n\r\n\t\tif (conditions != null)\r\n\t\t{\r\n\t\t\thash = hash * Constants.HASH_PRIME + new HashSet<ICondition>(conditions).hashCode();\r\n\t\t}\r\n\r\n\t\treturn hash;\r\n\t}", "@Test\n public void testHashCode() {\n System.out.println(\"Animal.hashCode\");\n assertEquals(471, animal1.hashCode());\n assertEquals(384, animal2.hashCode());\n }", "@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }", "private int computeHash(URI location) {\n \t\treturn location.hashCode();\n \t}", "@Override\n public int hashCode() {\n int result = 42;\n int prime = 37;\n for (char ch : key.toCharArray()) {\n result = prime * result + (int) ch;\n }\n result = prime * result + summary.length();\n result = prime * result + value;\n return result;\n }", "public int hashCode() {\n/* 360 */ return Objects.hashCode(new Object[] { Long.valueOf(this.count), Double.valueOf(this.mean), Double.valueOf(this.sumOfSquaresOfDeltas), Double.valueOf(this.min), Double.valueOf(this.max) });\n/* */ }", "@Override\n public void computeHash(Hasher hasher) {\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + _currencyPair.hashCode();\n result = prime * result + _vega.hashCode();\n return result;\n }", "public int hashCode() {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[28]++;\r\n long start = getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[29]++;\r\n long end = getEndMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[30]++;\r\n int result = 97;\r\n result = 31 * result + ((int) (start ^ (start >>> 32)));\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[31]++;\r\n result = 31 * result + ((int) (end ^ (end >>> 32)));\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[32]++;\r\n result = 31 * result + getChronology().hashCode();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[33]++;\r\n return result;\r\n }", "public void testHashcode() {\n StandardXYBarPainter p1 = new StandardXYBarPainter();\n StandardXYBarPainter p2 = new StandardXYBarPainter();\n int h1 = p1.hashCode();\n int h2 = p2.hashCode();\n }", "@Override\n public int hashCode() {\n int i;\n int result = 17;\n if (getMasp() == null) {\n i = 0;\n } else {\n i = getMasp().hashCode();\n }\n result = 37*result + i;\n return result;\n }", "@Test\n\tpublic void testHashCode() {\n\t\t// Same hashcode must be returned for equal objects\n\t\tassertTrue(\"Should have same hash code\", basic.hashCode() == equalsBasic.hashCode());\n\t}", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tlong temp;\n\t\ttemp = Double.doubleToLongBits(duration);\n\t\tresult = prime * result + (int) (temp ^ (temp >>> 32));\n\t\tresult = prime * result + ((name == null) ? 0 : name.hashCode());\n\t\ttemp = Double.doubleToLongBits(startingTime);\n\t\tresult = prime * result + (int) (temp ^ (temp >>> 32));\n\t\tresult = prime * result + tab;\n\t\treturn result;\n\t}", "public int hashCode() {\n int hash = 0;\n hash = width;\n hash <<= 8;\n hash ^= height;\n hash <<= 8;\n hash ^= numBands;\n hash <<= 8;\n hash ^= dataType;\n hash <<= 8;\n for (int i = 0; i < bandOffsets.length; i++) {\n hash ^= bandOffsets[i];\n hash <<= 8;\n }\n for (int i = 0; i < bankIndices.length; i++) {\n hash ^= bankIndices[i];\n hash <<= 8;\n }\n hash ^= numBands;\n hash <<= 8;\n hash ^= numBanks;\n hash <<= 8;\n hash ^= scanlineStride;\n hash <<= 8;\n hash ^= pixelStride;\n return hash;\n }", "private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }", "@Override\n public int hashCode() {\n int result = fullwidth.hashCode();\n result = 31 * result + halfwidth.hashCode();\n return result;\n }", "@Override\n public int hashCode() \n {\n int vysledek = 3;\n int hashNazvu = java.util.Objects.hashCode(this.nazev);\n vysledek = 37 * vysledek + hashNazvu;\n return vysledek;\n }", "@Override\n\t\tpublic int hashCode() {\n\t\t\treturn (int) (this.sum * 100 + this.index);\n\t\t}", "int _hash(int maximum);", "@Override\n\tpublic int hashCode() {\n\t\treturn Objects.hash(sigla);\n\t}", "public int hashCode() {\n return (7 + this.key.hashCode() + this.value.hashCode() / 5) \n + this.left.hashCode()\n + this.right.hashCode();\n }", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "@Override\n public int hashCode() {\n int hash = 5;\n hash = 11 * hash + Objects.hashCode(this.color);\n return hash;\n }", "@Override\n public int hashCode() {\n\n if (this.hashCode == null) {\n int hashCode = this.symbol.hashCode();\n\n if (this.isLookahead) {\n hashCode *= 109;\n }\n\n this.hashCode = hashCode;\n }\n\n return this.hashCode;\n }", "public int hash1(int x)\n {\n return ((a1*(x)+b1)%n);\n }", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "public int hashCode() {\n int result = 1;\n Object $pageSize = this.getPageSize();\n result = result * 59 + ($pageSize == null ? 43 : $pageSize.hashCode());\n Object $pageNo = this.getPageNo();\n result = result * 59 + ($pageNo == null ? 43 : $pageNo.hashCode());\n Object $sort = this.getSort();\n result = result * 59 + ($sort == null ? 43 : $sort.hashCode());\n Object $orderByField = this.getOrderByField();\n result = result * 59 + ($orderByField == null ? 43 : $orderByField.hashCode());\n return result;\n }", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "long hash(Block block, int position);", "private int calculateHash(int id, String uri) {\n\t\treturn uri.hashCode() * Constants.HASH_PRIMES[0]\n\t\t\t\t+ Integer.toString(id).hashCode() * Constants.HASH_PRIMES[1];\n\t}", "@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = QAOperation.SEED;\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operator.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operand.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + constraint.hashCode();\r\n\t\treturn result;\r\n\t}", "private int hash1(K key) {\n int h = 0;\n int seed = 31;//素数\n String s = key.toString();\n for (int i = 0; i != s.length(); ++i) {\n h = seed * h + s.charAt(i);\n }\n return h % length;\n }", "@Override\n\tpublic int hashCode() {\n\t\tint karprabin = 0;\n\t\tfinal int B = 31;\n\t\tfor (int k = 0; k < this.actualsizeinwords; ++k) {\n\t\t\tkarprabin += B * karprabin + (this.buffer[k] & ((1l << 32) - 1));\n\t\t\tkarprabin += B * karprabin + (this.buffer[k] >>> 32);\n\t\t}\n\t\treturn this.sizeinbits ^ karprabin;\n\t}", "@Override\n public int hashCode() {\n return Objects.hash(mGx, mGy, mGz);\n }", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "public int hashCode()\n {\n return hash;\n }", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + ((color == null) ? 0 : color.hashCode());\n\t\tresult = prime * result + (int) (id ^ (id >>> 32));\n\t\tresult = prime * result + ((largeImage == null) ? 0 : largeImage.hashCode());\n\t\tlong temp;\n\t\ttemp = Double.doubleToLongBits(listPrice);\n\t\tresult = prime * result + (int) (temp ^ (temp >>> 32));\n\t\tresult = prime * result + ((mediumImage == null) ? 0 : mediumImage.hashCode());\n\t\tresult = prime * result + ((parentProduct == null) ? 0 : parentProduct.hashCode());\n\t\tresult = prime * result + (int) (quantityOnHand ^ (quantityOnHand >>> 32));\n\t\ttemp = Double.doubleToLongBits(salePrice);\n\t\tresult = prime * result + (int) (temp ^ (temp >>> 32));\n\t\tresult = prime * result + ((size == null) ? 0 : size.hashCode());\n\t\tresult = prime * result + ((smallImage == null) ? 0 : smallImage.hashCode());\n\t\treturn result;\n\t}", "int\n computeHashCodeOfNode(HIR pNode)\n {\n int lCode, lNodeIndex, lChild, lChildCount;\n Sym lSym;\n\n if (fDbgLevel > 3)\n ioRoot.dbgFlow.print(7, \" computeHashCodeOfNode \");\n if (pNode == null)\n return 0;\n lNodeIndex = pNode.getIndex();\n lCode = getHashCodeOfIndexedNode(lNodeIndex);\n if (lCode != 0) // Hash code is already computed. return it.\n return lCode;\n lCode = pNode.getOperator() + System.identityHashCode(pNode.getType());\n lSym = pNode.getSym();\n if (lSym != null) { // This is a leaf node attached with a symbol.\n lCode = lCode * 2 + System.identityHashCode(lSym);\n }\n else {\n lChildCount = pNode.getChildCount();\n for (lChild = 1; lChild <= lChildCount; lChild++) {\n lCode = lCode * 2\n + computeHashCodeOfNode((HIR)(pNode.getChild(lChild)));\n }\n }\n //##60 BEGIN\n // Assign different hash code for l-value compared to r-value.\n //##65 if ((pNode.getParent()instanceof AssignStmt) &&\n //##65 (pNode.getParent().getChild1() == pNode))\n if (FlowUtil.isAssignLHS(pNode)) //##65\n {\n lCode = lCode * 2;\n }\n //##60 END\n lCode = (lCode & 0x7FFFFFFF) % EXP_ID_HASH_SIZE;\n if (fDbgLevel > 3)\n ioRoot.dbgFlow.print(7, Integer.toString(lCode, 10));\n setHashCodeOfIndexedNode(lNodeIndex, lCode);\n return lCode;\n }", "@Test public void hashCodeTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n \n Assert.assertEquals(0, pb1.hashCode(), 0.0001);\n }", "public int hashCode()\n { \n \tint result = 17;\n \t\n \tresult = 37 * result + score; \t\n \t\n \treturn result;\n }", "@Test\n public void testHashCode() {\n System.out.println(\"hashCode\");\n int expResult = 7;\n int result = instance.hashCode();\n assertEquals(result, expResult);\n }", "public BigInteger hash(String element)\n\t{ \n\t\treturn (BigInteger.valueOf(element.hashCode())).mod(modulus);\n\t}", "public int hashCode() {\n int result = 17;\n result = (37 * result)\n + ((nullCheck == null) ? 0 : nullCheck.hashCode());\n\n return result;\n }", "public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }", "public int hashCode() {\n int result = 1;\n for (int i = 0; i < parts.length; i++) {\n result = 31 * result + parts[i].hashCode();\n }\n return result;\n }", "@Test\n public void testHashcodeReturnsSameValueForIdenticalRecords() {\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(true));\n }", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }", "@Override\n int hashCode();" ]
[ "0.71533906", "0.67542064", "0.66839564", "0.6586728", "0.65826654", "0.6562221", "0.6534472", "0.64672023", "0.6456049", "0.6443152", "0.6431716", "0.6390713", "0.63473594", "0.6341219", "0.63330036", "0.63153255", "0.63061434", "0.629279", "0.629279", "0.62863976", "0.62807477", "0.6267016", "0.6250058", "0.6242393", "0.6241655", "0.62327546", "0.62297565", "0.6228915", "0.62278813", "0.62137765", "0.62134165", "0.6191587", "0.61899906", "0.6187837", "0.6187837", "0.61871684", "0.6187066", "0.6168309", "0.61601573", "0.615509", "0.61524266", "0.61485416", "0.6132742", "0.6128577", "0.6118359", "0.6115762", "0.6108025", "0.610435", "0.609049", "0.60849357", "0.6082576", "0.6080839", "0.60748553", "0.60718167", "0.6068144", "0.6060465", "0.60591745", "0.6058199", "0.60532326", "0.60499346", "0.6046543", "0.6040446", "0.60400754", "0.60367674", "0.6031551", "0.60261935", "0.602261", "0.602261", "0.602261", "0.602261", "0.60155183", "0.59984255", "0.5994804", "0.59899086", "0.598904", "0.5983602", "0.5983014", "0.5980109", "0.5979254", "0.5976334", "0.5973607", "0.59707457", "0.5967648", "0.5964609", "0.5964609", "0.5964609", "0.59625924", "0.59395176", "0.5937374", "0.5935192", "0.5927825", "0.5927208", "0.59215325", "0.5916149", "0.591305", "0.5907008", "0.5905934", "0.59043175", "0.59016407", "0.5900852" ]
0.61466
42
Inverse of the fraction. n/d becomes d/n.
public Fraction inverse() { return new Fraction (denominator, numerator).reduce(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Fraction opposite() {\n return new Fraction (-numerator, denominator).reduce();\n }", "public final void invert() {\n\tdouble s = determinant();\n\tif (s == 0.0)\n\t return;\n\ts = 1/s;\n\t// alias-safe way.\n\tset(\n\t m11*m22 - m12*m21, m02*m21 - m01*m22, m01*m12 - m02*m11,\n\t m12*m20 - m10*m22, m00*m22 - m02*m20, m02*m10 - m00*m12,\n\t m10*m21 - m11*m20, m01*m20 - m00*m21, m00*m11 - m01*m10\n\t );\n\tmul((float)s);\n }", "public static double inverseFunction(Double num) {\n// try {\n// return 1 / num;\n// } catch (Exception e) {\n// Console.println(\"Err\");\n// }\n return 1 / num;\n }", "public Double inverse(Double advNum1){\n answer = 1 / advNum1;\n return answer;\n }", "public final void invert() {\r\n\t\tRadical1 s = determinant();\r\n\t\tif (s.equals(Radical1.ZERO))\r\n\t\t\treturn;\r\n\r\n\t\tif (!s.equals(Radical1.ONE))\r\n\t\t\tthrow new ArithmeticException(\"can't invert radical expressions that have non-1 determinant (i.e. that rescale)\");\r\n\r\n\t\t// see Matrix4f.invert for an explination\r\n\r\n\t\tl1.setZero();\r\n\t\tl2.setZero();\r\n\t\tl3.setZero();\r\n\t\tl4.setZero();\r\n\t\tl5.setZero();\r\n\t\tl6.setZero();\r\n\t\tl7.setZero();\r\n\t\tl8.setZero();\r\n\t\tl9.setZero();\r\n\t\tl10.setZero();\r\n\t\tl11.setZero();\r\n\t\tl12.setZero();\r\n\t\tl13.setZero();\r\n\t\tl14.setZero();\r\n\t\tl15.setZero();\r\n\t\tl16.setZero();\r\n\r\n\t\tcalcPartInverse(5, 10, 15, 11, 14, op1, op2, op3, op4, l1);\r\n\t\tcalcPartInverse(6, 11, 13, 9, 15, op1, op2, op3, op4, l1);\r\n\t\tcalcPartInverse(7, 9, 14, 10, 13, op1, op2, op3, op4, l1);\r\n\r\n\t\tcalcPartInverse(9, 2, 15, 3, 14, op1, op2, op3, op4, l2);\r\n\t\tcalcPartInverse(10, 3, 13, 1, 15, op1, op2, op3, op4, l2);\r\n\t\tcalcPartInverse(11, 1, 14, 2, 13, op1, op2, op3, op4, l2);\r\n\r\n\t\tcalcPartInverse(13, 2, 7, 3, 6, op1, op2, op3, op4, l3);\r\n\t\tcalcPartInverse(14, 3, 5, 1, 7, op1, op2, op3, op4, l3);\r\n\t\tcalcPartInverse(15, 1, 6, 2, 5, op1, op2, op3, op4, l3);\r\n\r\n\t\tcalcPartInverse(1, 7, 10, 6, 11, op1, op2, op3, op4, l4);\r\n\t\tcalcPartInverse(2, 5, 11, 7, 9, op1, op2, op3, op4, l4);\r\n\t\tcalcPartInverse(3, 6, 9, 5, 10, op1, op2, op3, op4, l4);\r\n\r\n\t\tcalcPartInverse(6, 8, 15, 11, 12, op1, op2, op3, op4, l5);\r\n\t\tcalcPartInverse(7, 10, 12, 8, 14, op1, op2, op3, op4, l5);\r\n\t\tcalcPartInverse(4, 11, 14, 10, 15, op1, op2, op3, op4, l5);\r\n\r\n\t\tcalcPartInverse(10, 0, 15, 3, 12, op1, op2, op3, op4, l6);\r\n\t\tcalcPartInverse(11, 2, 12, 0, 14, op1, op2, op3, op4, l6);\r\n\t\tcalcPartInverse(8, 3, 14, 2, 15, op1, op2, op3, op4, l6);\r\n\r\n\t\tcalcPartInverse(14, 0, 7, 3, 4, op1, op2, op3, op4, l7);\r\n\t\tcalcPartInverse(15, 2, 4, 0, 6, op1, op2, op3, op4, l7);\r\n\t\tcalcPartInverse(12, 3, 6, 2, 7, op1, op2, op3, op4, l7);\r\n\r\n\t\tcalcPartInverse(2, 7, 8, 4, 11, op1, op2, op3, op4, l8);\r\n\t\tcalcPartInverse(3, 4, 10, 6, 8, op1, op2, op3, op4, l8);\r\n\t\tcalcPartInverse(0, 6, 11, 7, 10, op1, op2, op3, op4, l8);\r\n\r\n\t\tcalcPartInverse(7, 8, 13, 9, 12, op1, op2, op3, op4, l9);\r\n\t\tcalcPartInverse(4, 9, 15, 11, 13, op1, op2, op3, op4, l9);\r\n\t\tcalcPartInverse(5, 11, 12, 8, 15, op1, op2, op3, op4, l9);\r\n\r\n\t\tcalcPartInverse(11, 0, 13, 1, 12, op1, op2, op3, op4, l10);\r\n\t\tcalcPartInverse(8, 1, 15, 3, 13, op1, op2, op3, op4, l10);\r\n\t\tcalcPartInverse(9, 3, 12, 0, 15, op1, op2, op3, op4, l10);\r\n\r\n\t\tcalcPartInverse(15, 0, 5, 1, 4, op1, op2, op3, op4, l11);\r\n\t\tcalcPartInverse(12, 1, 7, 3, 5, op1, op2, op3, op4, l11);\r\n\t\tcalcPartInverse(13, 3, 4, 0, 7, op1, op2, op3, op4, l11);\r\n\r\n\t\tcalcPartInverse(3, 5, 8, 4, 9, op1, op2, op3, op4, l12);\r\n\t\tcalcPartInverse(0, 7, 9, 5, 11, op1, op2, op3, op4, l12);\r\n\t\tcalcPartInverse(1, 4, 11, 7, 8, op1, op2, op3, op4, l12);\r\n\r\n\t\tcalcPartInverse(4, 10, 13, 9, 14, op1, op2, op3, op4, l13);\r\n\t\tcalcPartInverse(5, 8, 14, 10, 12, op1, op2, op3, op4, l13);\r\n\t\tcalcPartInverse(6, 9, 12, 8, 13, op1, op2, op3, op4, l13);\r\n\r\n\t\tcalcPartInverse(8, 2, 13, 1, 14, op1, op2, op3, op4, l14);\r\n\t\tcalcPartInverse(9, 0, 14, 2, 12, op1, op2, op3, op4, l14);\r\n\t\tcalcPartInverse(10, 1, 12, 0, 13, op1, op2, op3, op4, l14);\r\n\r\n\t\tcalcPartInverse(12, 2, 5, 1, 6, op1, op2, op3, op4, l15);\r\n\t\tcalcPartInverse(13, 0, 6, 2, 4, op1, op2, op3, op4, l15);\r\n\t\tcalcPartInverse(14, 1, 4, 0, 5, op1, op2, op3, op4, l15);\r\n\r\n\t\tcalcPartInverse(0, 5, 10, 6, 9, op1, op2, op3, op4, l16);\r\n\t\tcalcPartInverse(1, 6, 8, 4, 10, op1, op2, op3, op4, l16);\r\n\t\tcalcPartInverse(2, 4, 9, 5, 8, op1, op2, op3, op4, l16);\r\n\r\n\t\tvalues[0].set(l1);\r\n\t\tvalues[1].set(l2);\r\n\t\tvalues[2].set(l3);\r\n\t\tvalues[3].set(l4);\r\n\t\tvalues[4].set(l5);\r\n\t\tvalues[5].set(l6);\r\n\t\tvalues[6].set(l7);\r\n\t\tvalues[7].set(l8);\r\n\t\tvalues[8].set(l9);\r\n\t\tvalues[9].set(l10);\r\n\t\tvalues[10].set(l11);\r\n\t\tvalues[11].set(l12);\r\n\t\tvalues[12].set(l13);\r\n\t\tvalues[13].set(l14);\r\n\t\tvalues[14].set(l15);\r\n\t\tvalues[15].set(l16);\r\n\r\n\t\tif (s.equals(Radical1.MINUS_ONE))\r\n\t\t\tnegate();\r\n\t}", "public Fraction simplify(){\n long n = this.numerator;\n long d = this.denominator;\n for(long k = d; k >= 1; k--){\n if(n % k == 0 && d % k == 0) {\n n = n / k;\n d = d / k;\n break;\n }\n }\n return new Fraction(n,d);\n }", "public Fraction reciprocal()\n {\n int newNumerator = this.getDenominator();\n int newDenominator = this.getNumerator();\n Fraction newFraction = new Fraction(newNumerator, newDenominator);\n return newFraction;\n }", "private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "public double divide(double n, double den) {\r\n\t\treturn n/den;\r\n\t}", "public void subtract(Fraction f)\r\n {\r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator - f.getNumerator();\r\n this.reduce();\r\n }", "private int[] normalise(int n, int d) {\n\n //throw exception is denominator is zero\n\n if (d == 0) {\n throw new ArithmeticException(\"Divide by zero\");\n }\n\n //use gcd function to calculate GCD and transform numerator and denominator values\n\n int gcd_val = gcd(n, d);\n int values[] = new int[2];\n n = n/gcd_val;\n d = d/gcd_val;\n\n //transform so a negative fraction always has a negative numerator, not a negative denominator\n\n if (d < 0) {\n n *= -1;\n d *= -1;\n }\n\n values[0] = n;\n values[1] = d;\n return values;\n }", "public void inverse(Projection projection);", "public NumberType inverse(\n final double probability );", "public static Fraction toFraction (double f, int d) {\n if (d > 0)\n return new Fraction ((int)(Math.round (f*d)), d);\n else\n throw new ArithmeticException (\" illegal denominator \");\n }", "public Fraction(int num,int den) {\n\t\t if (den ==0) {\n\t\t\tthrow new IllegalArgumentException(\"Cant have the Devisor to be zero\");\n\t\t}\n\t\t this.num=num;\n\t\t this.den=den;\n\t\t if (num ==0) {\n\t\t\tthis.den=1;\n\t\t\t\n\t\t}\n\t\t simplify();\n\t\t value = num/den;\n\t }", "public Fraction( int n, int d )\n\t{\tint gcd = gcd( n, d );\n\t\tsetNumer(n/gcd);\n\t\tsetDenom(d/gcd);\n\t}", "public Fraction( int num, int den ) {\n if( den == 0 ) {\n throw new RuntimeException( \"0 is not a valid denominator!\");\n } else {\n this.value = num/den;\n this.numerator = num;\n this.denominator = den;\n // Mit der unteren Schleife kürzen wir.\n if( this.denominator > 1 ){\n for( int i = this.denominator; i >= 2; i-- ) {\n if( this.numerator % i == 0 && this.denominator % i == 0 ) {\n this.numerator /= i;\n this.denominator /= i;\n }\n }\n }\n }\n\n }", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "void unsetFractional();", "public double[][] inverse(double[][] X, int n) {\n\t\tdouble[][] adj = adjoint(X, n);\n\t\tdouble[][] inv = new double[n][n];\n\t\tdouble det = determinant(X, n);\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\tinv[i][j] = adj[i][j] / det;\n\t\treturn inv;\n\t}", "public static void displayFractionalUndIngeralFromDoubleNumber(){\n\t\tSystem.out.println(\"please enter a double number: \");\n\t\tScanner scann=new Scanner(System.in);\n\t\tdouble x=scann.nextDouble();\n\t\tdouble fractional_part=x%1;\n\t\tdouble integral_part=x-fractional_part;\n\t\tSystem.out.println(\"The integral part of (\" +x +\" ) is: \" +integral_part);\n\t\tSystem.out.println(\"The fractional part of ( \" +x +\" ) is: \" +fractional_part);\n\t}", "public Fraction(int numerator,int denominator)\n\t{\n\t\tthis.numerator=numerator;\n\t\tthis.denominator= denominator;\n\t\tsimplify();\n\t}", "@Override\n\tpublic void visit(InverseExpression arg0) {\n\n\t}", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "public Fraction divide(Fraction divisor)\n {\n Fraction flipDivisor = divisor.reciprocal();\n Fraction newFraction = new Fraction();\n newFraction = this.multiply(flipDivisor);\n return newFraction;\n }", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "public BigRational reciprocal() {\n return valueOf(den, num);\n }", "public Fraction subtract(Fraction f){\n return new Fraction(this.numerator * f.denominator - f.numerator * this.denominator, this.denominator * f.denominator);\n }", "public static double inverseSquare(double z){ //TODO: This needs a little love. Should probably use the repel method instead.\n boolean positive = z >= 0;\n z += positive? 1:(-1);\n double square = Math.pow(z,2);\n return positive? 1/square:square;\n }", "public Fraction(int num, int den){\n numerator = num;\n if (den != 0){\n denominator = den;\n }\n else{\n denominator = 1;\n }\n reduce();\n }", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "static void pregenInverse() \n\t{ \n\t\tinvfact[0] = invfact[1] = 1; \n\n\t\t// calculates the modInverse of \n\t\t// the last factorial \n\t\tinvfact[1000000] = modInverse(fact[1000000], mod); \n\n\t\t// precalculates the modInverse of \n\t\t// all factorials by formulae \n\t\tfor (int i = 999999; i > 1; --i) \n\t\t{ \n\t\t\tinvfact[i] = (int) (((long) invfact[i + 1] \n\t\t\t\t\t* (long) (i + 1)) % mod); \n\t\t} \n\t}", "public void invert() {\n\t\tthis.vector.setXYZ(-this.vector.x(), -this.vector.y(), -this.vector.z());\n\t\tthis.energy = -this.energy;\n\t}", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "static int modInverse(int a, int m) \n\t{ \n\t\tint m0 = m; \n\t\tint y = 0, x = 1; \n\t\tif (m == 1) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (a > 1) \n\t\t{ \n\n\t\t\t// q is quotient \n\t\t\tint q = a / m; \n\t\t\tint t = m; \n\n\t\t\t// m is remainder now, process \n\t\t\t// same as Euclid's algo \n\t\t\tm = a % m; \n\t\t\ta = t; \n\t\t\tt = y; \n\n\t\t\t// Update y and x \n\t\t\ty = x - q * y; \n\t\t\tx = t; \n\t\t} \n\n\t\t// Make x positive \n\t\tif (x < 0) \n\t\t{ \n\t\t\tx += m0; \n\t\t} \n\n\t\treturn x; \n\t}", "private void simplify()\n\t{\n\t\tint gcd=1;\n\t\tint smallest= Math.min(numerator, denominator);\n\t\tfor(int i=2;i<=smallest;i++)\n\t\t{\n\t\t\tif(numerator%i==0 && denominator%i==0)\n\t\t\t{\n\t\t\t\tgcd=i;\n\t\t\t}\n\t\t}\n\t\t//To get the fraction into its simplest form we divide the numerator and denominator with their gcd\n\t\tnumerator= numerator/gcd;\n\t\tdenominator= denominator/gcd;\n\t}", "public Fraction div(Fraction f) {\n /** Accounts for the input of a negative fraction */\n if(f.getNumerator() < 0)\n return new Fraction( (-1) * (this.numerator * f.getDenominator()), Math.abs(this.denominator * f.getNumerator()));\n return new Fraction( (this.numerator * f.getDenominator()), (this.denominator * f.getNumerator()));\n }", "@Override\n public void Invert() {\n\t \n }", "public void invert() {\n \n for(T first : getFirstDimension()) {\n \n for(T second : getMatches(first)) {\n \n Double sim = get(first, second);\n \n if(sim!=null && sim > 0.0) {\n set(first, second, 1.0/sim);\n }\n \n }\n \n }\n }", "private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Divide by zero error: \" + numerator + \"/\" + denominator);\r\n\t\t}\r\n\t\tint gcd;\r\n\t\tif(numerator >= denominator)\r\n\t\t{\r\n\t\t\tgcd = gcd(numerator, denominator);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgcd = gcd(denominator, numerator);\r\n\t\t}\r\n\t\tnumerator /= gcd;\r\n\t\tdenominator /= gcd;\r\n\t\tif(denominator == 1)\r\n\t\t{\r\n\t\t\t//Quotient is integer\r\n\t\t\treturn new Rational(numerator);\r\n\t\t}\t\t\r\n\t\t//Negative denominator\r\n\t\tif(denominator < 0)\t\t\t\r\n\t\t{\r\n\t\t\tdenominator *= -1;\r\n\t\t\tnumerator *= -1;\r\n\t\t}\r\n\t\t//Quotient is fraction\r\n\t\treturn new FullExpression(new Rational(numerator), new Rational(denominator), Operator.QUOT);\r\n\t}", "public void ToiGian(){\n if(this.denominator != 0 && this.numerator != 0){\n int uocChung = Task1.gcd(this.numerator, this.denominator);\n this.numerator = this.numerator/uocChung;\n this.denominator = this.denominator/uocChung;\n }\n }", "public void invert()\n {\n assert isComplete;\n \n isInverted = !isInverted;\n }", "public Fraction(int num, int deno) {\n\t\tsetNumerator(num);\n\t\tsetDenominator(deno);\n\t}", "public FractionImpl(String fraction) {\n\n //use the trim String method to remove white space before and after the fraction characters\n\n String trimmed = fraction.trim();\n\n //whole number procedure - if no \"/\" is present\n\n if (!trimmed.contains(\"/\")) {\n this.numerator = Integer.parseInt(trimmed);\n this.denominator = 1;\n }\n\n //fraction procedure - split on \"/\" then convert string numbers to int and pass to the normalise function\n\n else {\n String[] bits = trimmed.split(\"/\");\n\n this.numerator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[0];\n this.denominator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[1];\n }\n\n\n }", "private static float[] qinv(float[] d, float[] s) {\n \td[0] = s[0];\n \td[1] = -s[1];\n \td[2] = -s[2];\n \td[3] = -s[3];\n \treturn(d);\n }", "long modInverse(long a, long m) \r\n { \r\n\t\t long m0 = m; \r\n long y = 0, x = 1; \r\n \r\n if (m == 1) \r\n return 0; \r\n \r\n while (a > 1) \r\n { \r\n // q is quotient \r\n \tlong q = a / m; \r\n \r\n \tlong t = m; \r\n \r\n // m is remainder now, process \r\n // same as Euclid's algo \r\n m = a % m; \r\n a = t; \r\n t = y; \r\n \r\n // Update x and y \r\n y = x - q * y; \r\n x = t; \r\n } \r\n \r\n // Make x positive \r\n if (x < 0) \r\n x += m0; \r\n \r\n return x; \r\n }", "@Override\n public void visit(P_Inverse inversePath) {\n engine.flipDirection() ;\n engine.eval(inversePath.getSubPath(), node, output) ;\n engine.flipDirection() ;\n }", "public Fraction(long numerator){\n this.numerator = (int)numerator;\n this.denominator = 1;\n }", "public static String simplify(int numerator, int denominator) {\n \tint result = gcf(numerator, denominator);\t//use gcf to get the result and store it in an int variable\r\n \tint newNum = numerator/result;\t\t//make newnum equal to num/result\r\n \tint newDenom = denominator/result;\t\t//new denom equals denom/result\r\n \treturn newNum + \"/\" + newDenom;\t\t\t//return statement of num / newdenom\r\n }", "public Fraction(int numerator, int denominator){\n this.numerator= numerator;\n this.denominator = denominator;\n }", "public void normalize()\n\t{\n\t\tif (this.getDenom() < 0)\n\t\t{\n\t\t\tthis.setDenom(this.getDenom() * (-1));\n\t\t\tthis.setNumer(this.getNumer() * (-1));\n\t\t}\n\t}", "public void subtract(Rational s) {\n\tif ( denominator == s.denominator ) {\n\t numerator -= s.numerator;\n\t}\n\telse {\n\t numerator *= s.denominator;\n\t numerator -= s.numerator * denominator;\n\t denominator *= s.denominator;\n\t}\n }", "public static Optional<Double> inverse(Double x) {\n return x == 0 ? Optional.empty() : Optional.of(1 / x);\n }", "public FImage inverse() {\n\t\tfinal int cs = real.getCols();\n\t\tfinal int rs = real.getRows();\n\n\t\tfinal FloatFFT_2D fft = new FloatFFT_2D(rs, cs);\n\t\tfinal float[][] prepared = new float[rs][cs * 2];\n\t\tfor (int y = 0; y < rs; y++) {\n\t\t\tfor (int x = 0; x < cs; x++) {\n\t\t\t\tprepared[y][x * 2] = real.pixels[y][x];\n\t\t\t\tprepared[y][1 + x * 2] = imaginary.pixels[y][x];\n\t\t\t}\n\t\t}\n\n\t\tfft.complexInverse(prepared, true);\n\n\t\tfinal FImage image = new FImage(cs, rs);\n\t\tFourierTransform.unprepareData(prepared, image, centre);\n\n\t\treturn image;\n\t}", "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public static String toMixedNum(int numerator, int denominator) {\n \tint whole=numerator/denominator;\t\t//make variable to store whole number by dividing num and denom\r\n\t\tint newnumerator=numerator%denominator;\t//get newnum by doing num mod denom\r\n\t\t\r\n\t\tif(whole<0) {\t\t\t//if whole number is negative and the new num is neg as well,\r\n\t\t\tnewnumerator *= -1;\t// make the new num positive\r\n\t\t}\r\n\t\tif(newnumerator==0 && whole==0) {\t//if the frac is 0 all-around\r\n\t\t\treturn \"0\";\t\t\t\t\t\t//return 0\r\n\t\t}\r\n\t\tif(newnumerator==0) {\t//if the num is 0 it's most likely\r\n\t\t\treturn whole + \"\";\t//just a whole number\r\n\t\t}\r\n\t\tif(newnumerator<0 && denominator<0) {\t//if the num and denom is both neg\r\n\t\t\tnewnumerator *= -1;\t\t\t\t\t//then the frac itself should be negative\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(denominator<0) {\t\t\t\t//if denom is negative \r\n\t\t\tnewnumerator *= -1;\t\t\t//multiply both num and denom by -1 to get a postitive denom and neg num\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(whole==0) {\t\t\t//if the whole num is 0\r\n\t\t\treturn simplify(newnumerator, denominator);\t//then it should just return num/denom\r\n\t\t}\r\n\t\treturn whole + \"_\"+ simplify(newnumerator, denominator); //return statement of the whole mixed frac\r\n }", "Edge inverse() {\n return bond.inverse().edge(u, v);\n }", "public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator * f.numerator);\n }", "public String fractionToDecimal(int numerator, int denominator) {\n if(numerator == 0) return \"0\";\n \n StringBuilder sb = new StringBuilder();\n //key is remainder, value is len of curr sb, which is starting index of this remainder \n HashMap<Long, Integer> hs = new HashMap<Long, Integer>();\n \n //convert to long to prevent overflow\n long n = (long) numerator;\n long d = (long) denominator;\n \n //catch negative sign\n if( (n < 0) ^ (d < 0) ){\n sb.append(\"-\");\n n = Math.abs(n);\n d = Math.abs(d);\n }\n \n sb.append(n/d);\n long remainder = n%d;\n \n if(remainder == 0) return sb.toString();\n \n sb.append(\".\");\n \n //we will process inputs until we face a visited remainder again\n //in case inputs are dividable, we will return result inside the loop\n while( !hs.containsKey(remainder) ){\n \t//each loop we will start with a new remainder from last loop\n \t\n //record curr remainder and its starting index\n hs.put( remainder, sb.length() );\n \n //update remainder like what we did in math division\n remainder *= 10;\n \n sb.append( remainder/d );\n \n //update remainder to get next remainder\n remainder %= d;\n \n //inputs are dividable\n if(remainder == 0) return sb.toString();\n }\n \n //we get here only when we have Recurring Decimal, add \"(\" based on hashMap value \n sb.insert( hs.get(remainder), \"(\" ).append(\")\");\n \n return sb.toString();\n }", "public Fraction sub(Fraction f) {\n /** Denominators equal */\n if( f.getDenominator() == this.denominator )\n return new Fraction( this.numerator - f.getNumerator(), this.denominator);\n \n /** Denominators different */\n \n /** The least common multiple found between both denominators. */\n int lcd = getLCD(this.denominator, f.getDenominator());\n\n /** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */\n return new Fraction( (lcd / this.denominator * this.numerator) - (lcd / f.getDenominator() * f.getNumerator()), lcd);\n }", "public Fraction(int numerator, int denominator){\n \n\t\tsetFraction(numerator, denominator);\n }", "public Fraction toDenominator(int denominator){\n if (denominator == 0) {\n throw new NullPointerException(\"denominator doesn't be '0'\");\n } else if (denominator < this.denominator) {\n throw new NullPointerException(\"Can't cast denominator to '\" + denominator + \"'.\");\n }\n\n int lcm = Fractions.getLCM(this.denominator, denominator);\n\n int factor = lcm / this.denominator;\n return new Fraction(\n this.numerator * factor,\n this.denominator * factor);\n }", "public String get_fraction_part();", "public Fraction(int numerator, int denominator)\n {\n setNumerator(numerator);\n setDenominator(denominator);\n }", "public static double invert(double x){\n\t\tif (x == 0)\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "public Fraction getReciprocal() {\n return new Fraction(denominator, numerator);\n }", "@Override\n public void invert() {\n getInvertibles().parallelStream().forEach(Invertible::invert);\n }", "public static RationalNumber negate(RationalNumber r1) {\n\t\t//Executable pre-condition: Stopping the wrong form of Fraction.\n\t\tassert r1.getDenominator() != 0: \"Invalid Fraction! Denominator cannot equal to 0\";\n\t\t//Numerator and Denominator initialization\n\t\tint negateNum;\n\t\tint negateDeno;\n\t\t\n\t\t//Extracting variables:\n\t\tint num1 = r1.getNumerator();\n\t\tint deno1 = r1.getDenominator();\n\n\t\t//negation process:\n\t\tnegateNum = num1 * -1;\n\t\tnegateDeno = deno1;\n\t\t\n\t\t//converting from an integer into a fraction:\n\t\tRationalNumber answer = new RationalNumberImpl_Luong(negateNum,negateDeno);\n\t\treturn answer;\n\t}", "private Proof notDivides(int n, int m, Expression expression) {\n Expression litMPrev = intToLit(m - 1); //[m - 1]\n if (n == 0) {\n return notDividesBase(expression, litMPrev); //|- 0 * z = [m - 1]\n }\n Variable x = var(\"x\");\n Expression litN = intToLit(n); //[n]\n Proof noDivi0 = notMulZero(litN, litMPrev); //![n] * 0 = [m]\n Expression litM = intToLit(m); //[m]\n Expression not = not(equal(multi(litN, x), litM)); //![n] * x = [m]\n Proof nextStep = notDividesInductionStep(n, m, x); //![n] * x' = [m]\n Proof imWeak = implLeftWeakness(not, nextStep); //![n] * x = [m] -> ![n] * x' = [m]\n return inductConclusion(x, expression, noDivi0, imWeak); //![n] * 0 = [m] & @z(![n] * x = [m] -> ![n] * x' = [m]) -> !([n] * x = [m])\n }", "private Proof notDividesBase(Expression s, Expression t) {\n Proof axm2convertOnce = faxm2ConvertOnce(succ(t), mulLeftZero(s));\n Proof equalitySym = equalitySym(zero(), succ(t));\n Proof imTrans2 = implTrans(axm2convertOnce, equalitySym);\n Proof succNotZero = succIsNotZero(t);\n return contraTwice(imTrans2, succNotZero);\n }", "private static long modInverse64(long d)\n {\n long x = d + (((d + 1L) & 4L) << 1); // d.x == 1 mod 2**4\n x *= 2 - d * x; // d.x == 1 mod 2**8\n x *= 2 - d * x; // d.x == 1 mod 2**16\n x *= 2 - d * x; // d.x == 1 mod 2**32\n x *= 2 - d * x; // d.x == 1 mod 2**64\n// assert d * x == 1L;\n return x;\n }", "public Fraction(int numerator, int denominator)\n\t{\n\t\tmyNumerator = numerator;\n\t\tmyDenominator = denominator;\n\t}", "public static double frac(double d)\n {\n return frac( new BigDecimal(\"\" + d) ).doubleValue();\n }", "public void invert() throws NoninvertibleTransform3DException {\r\n\t\tthis.set(getInverse());\r\n\t}", "public Fraction(int numerator, int denominator) {\n if(denominator < 1)\n throw new IllegalArgumentException();\n this.numerator = numerator;\n this.denominator = denominator;\n this.reduce();\n }", "public static long modInverse(long a, long m) {\n a = mod(a, m);\n return a == 0 ? 0 : mod((1 - modInverse(m % a, a) * m) / a, m);\n }", "public Coord simplifyAsFraction() {\n int gcd = gcd();\n return new Coord(row / gcd, column / gcd);\n }", "public void setDenominator(int dem)\r\n {\r\n this.denominator = dem;\r\n }", "int ainverse(int z)\n {\n return (65536-z);\n }", "public static Transform inverse(Transform t) {\n\t\tfloat inv_det = 1.0f / (t.a * t.d - t.c * t.b);\n\t\treturn transpose(t.d * inv_det, -t.c * inv_det, (t.c * t.ty - t.tx * t.d) * inv_det, -t.b * inv_det,\n\t\t\t\t\t\t t.a * inv_det, (t.tx * t.b - t.a * t.ty) * inv_det);\n\t}", "@Override\n public Object clone() throws CloneNotSupportedException {\n return new Fraction (getNumerator(), getDenominator());\n }", "public final void invert(Matrix4rad toInvert) {\r\n\t\tthis.set(toInvert);\r\n\t\tinvert();\r\n\t}", "public abstract O reciprocal();", "@Deprecated\n public static EquationExpression inverse(EquationExpression x) {\n return x.getInverse();\n }", "static double negate(double num) {\n\t\t\n\t\treturn num*(-1);\n\t\n\t}", "private Fraction reduce() {\n Fraction f = null;\n try {\n f = (Fraction)clone();\n } catch (CloneNotSupportedException e) {};\n if (denominator == 0)\n throw new ArithmeticException (\" illegal denominator zero \");\n if (denominator < 0) {\n f.numerator = -numerator;\n f.denominator = -denominator;\n }\n if (numerator == 0)\n f.denominator = 1;\n else {\n int n = gcd (numerator, denominator);\n f.numerator = numerator / n;\n f.denominator = denominator / n;\n }\n return f;\n }", "public Rational(int n, int d) {\n\tif ( d == 0 ) {\n\t System.out.println(\"Nope.\");\n\t numerator = 0;\n\t denominator = 1;\n\t}\n\telse {\n\t numerator = n;\n\t denominator = d;\n\t}\n }", "public Fraction dividedBy(Fraction other) {\n Fraction end = times(other.getReciprocal());\n\n return end;\n\n }", "static int[][] inverse(int A[][]) \n { \n int inverse[][] = new int[4][4];\n // Find determinant of A[][] \n int det = determinant(A, N)%26; \n System.out.println(det);\n if (det == 0) \n { \n System.out.print(\"Singular matrix, can't find its inverse\"); \n return null; \n } \n \n // Find adjoint \n int [][]adj = new int[N][N]; \n adjoint(A, adj); \n \n // Find Inverse using formula \"inverse(A) = adj(A)/det(A)\" \n for (int i = 0; i < N; i++) \n for (int j = 0; j < N; j++) {\n inverse[i][j] = adj[i][j]/det; \n inverse[i][j] = inverse[i][j]%26;\n System.out.print(inverse[i][j]);\n }\n return inverse; \n }", "public Fraction(){\n\t\n\t\tsetFraction(0,1);\n }", "public Inverse(int m, int n) \n { \n super(m, n); \n }", "public FractionImpl(int wholeNumber) {\n\n //set implicit denominator to 1, handle printing with the toString method\n\n this.numerator = wholeNumber;\n this.denominator = 1;\n }", "public void sub(Fraction f1, Fraction f2) {\n\t\tnumerator = f1.getNumerator() * f2.getDenominator() - f2.getNumerator() * f1.getDenominator();\n\t\tdenominator = f1.getDenominator() * f2.getDenominator();\n\t\tint gcd = gcd(f1.getDenominator(), f2.getDenominator());\n\t\tnumerator /= gcd;\n\t\tdenominator /= gcd;\n\t}", "private void drawComponentsInverse(Chart chart, Point p, Size s) {\n Node n = this; // current node in the level\n boolean samelevel = true; // next node in same level?\n Point p1 = new Point(0, 0);\n while (n != null && samelevel) {\n p.x -= n.size.getWidth();\n if (n.typ.matches(NodeType.TERM, NodeType.NONTERM, NodeType.EXCEPTION, NodeType.PREDICATE)) {\n drawDefaultInverse(chart, p, n);\n } else if (n.typ == NodeType.EPS) {\n drawEpsilon(chart, p, n);\n } else if(n.typ == NodeType.PREDICATE) {\n } else if (n.typ == NodeType.OPT) {\n drawOptionInverse(chart, p, n, p1);\n } else if (n.typ == NodeType.RERUN) {\n drawRerunInverse(chart, p, n, p1);\n } else if (n.typ == NodeType.ITER) {\n drawIterationReverse(chart, p, n, p1);\n } else if (n.typ == NodeType.ALT) {\n drawAltInverse(chart, p, n, p1);\n }\n if (n.up) {\n samelevel = false;\n }\n n = n.next;\n }\n }", "public Fraction over(Fraction rightOperand){\n\t\tFraction inverse = new Fraction(rightOperand.getDenominator(),\n\t\t\t\t\t\t\t\t\t\trightOperand.getNumerator());\n\t\treturn this.times(inverse);\n\t}", "@Deprecated\n\tpublic static EquationExpression inverse(EquationExpression x) {\n\t\treturn x.getInverse();\n\t}" ]
[ "0.67512584", "0.6605625", "0.64188004", "0.64130354", "0.6378927", "0.61871576", "0.5966856", "0.59212756", "0.59161144", "0.58808887", "0.577919", "0.57340306", "0.5694598", "0.56857276", "0.5651094", "0.56457984", "0.5621532", "0.55988795", "0.55727696", "0.5552027", "0.5545897", "0.55290157", "0.552158", "0.55132365", "0.5507673", "0.54689413", "0.54689246", "0.5465336", "0.5456205", "0.5426084", "0.5419215", "0.5418276", "0.54009384", "0.53978866", "0.53971463", "0.53971237", "0.5386608", "0.53830785", "0.5373339", "0.5367126", "0.53665024", "0.536006", "0.5347293", "0.534233", "0.5336823", "0.5333151", "0.533221", "0.5331485", "0.5307674", "0.530436", "0.5300597", "0.5299587", "0.5297968", "0.5295081", "0.52842337", "0.52833354", "0.52773905", "0.52691895", "0.5263493", "0.52572536", "0.5254243", "0.52459604", "0.5242199", "0.5237382", "0.5228828", "0.52278316", "0.5224453", "0.52168137", "0.52059543", "0.5194462", "0.51894224", "0.5189093", "0.51880753", "0.5185052", "0.51838386", "0.51811206", "0.5179617", "0.5176242", "0.5131739", "0.5129998", "0.51256675", "0.5124065", "0.511986", "0.51092374", "0.51005924", "0.508139", "0.50793624", "0.5075144", "0.50685585", "0.5067108", "0.50635415", "0.50486684", "0.5046877", "0.5042718", "0.50396794", "0.5028406", "0.5021733", "0.5001957", "0.49942073", "0.499135" ]
0.7895754
0
Opposite of the fraction. n/d becomes n/d.
public Fraction opposite() { return new Fraction (-numerator, denominator).reduce(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Fraction inverse() {\n return new Fraction (denominator, numerator).reduce();\n }", "void unsetFractional();", "private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}", "public void subtract(Fraction f)\r\n {\r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator - f.getNumerator();\r\n this.reduce();\r\n }", "public Fraction subtract(Fraction f){\n return new Fraction(this.numerator * f.denominator - f.numerator * this.denominator, this.denominator * f.denominator);\n }", "public Fraction minus(Fraction other) {\n int finder = MathUtils.findLowestCommonMultiple(denominator, other.getDenominator());\n\n int idk = finder/denominator;\n int idc = finder/other.getDenominator();\n int fraction = (idk * getNumerator()) - (idc * other.getNumerator());\n return new Fraction(fraction, finder);\n\n }", "public void subtract(Rational s) {\n\tif ( denominator == s.denominator ) {\n\t numerator -= s.numerator;\n\t}\n\telse {\n\t numerator *= s.denominator;\n\t numerator -= s.numerator * denominator;\n\t denominator *= s.denominator;\n\t}\n }", "public Fraction simplify(){\n long n = this.numerator;\n long d = this.denominator;\n for(long k = d; k >= 1; k--){\n if(n % k == 0 && d % k == 0) {\n n = n / k;\n d = d / k;\n break;\n }\n }\n return new Fraction(n,d);\n }", "void unsetFractionalMinimum();", "public static RationalNumber negate(RationalNumber r1) {\n\t\t//Executable pre-condition: Stopping the wrong form of Fraction.\n\t\tassert r1.getDenominator() != 0: \"Invalid Fraction! Denominator cannot equal to 0\";\n\t\t//Numerator and Denominator initialization\n\t\tint negateNum;\n\t\tint negateDeno;\n\t\t\n\t\t//Extracting variables:\n\t\tint num1 = r1.getNumerator();\n\t\tint deno1 = r1.getDenominator();\n\n\t\t//negation process:\n\t\tnegateNum = num1 * -1;\n\t\tnegateDeno = deno1;\n\t\t\n\t\t//converting from an integer into a fraction:\n\t\tRationalNumber answer = new RationalNumberImpl_Luong(negateNum,negateDeno);\n\t\treturn answer;\n\t}", "public Fraction minus(Fraction rightOperand){\n\t\tint denom = myDenominator*rightOperand.getDenominator();\n\n\t\tint num = (myNumerator * (denom/myDenominator)) -\n\t\t\t\t\t(rightOperand.getNumerator() *\n\t\t\t\t\t(denom/rightOperand.getDenominator()));\n\n\t\treturn new Fraction(num, denom);\n\t}", "private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Divide by zero error: \" + numerator + \"/\" + denominator);\r\n\t\t}\r\n\t\tint gcd;\r\n\t\tif(numerator >= denominator)\r\n\t\t{\r\n\t\t\tgcd = gcd(numerator, denominator);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgcd = gcd(denominator, numerator);\r\n\t\t}\r\n\t\tnumerator /= gcd;\r\n\t\tdenominator /= gcd;\r\n\t\tif(denominator == 1)\r\n\t\t{\r\n\t\t\t//Quotient is integer\r\n\t\t\treturn new Rational(numerator);\r\n\t\t}\t\t\r\n\t\t//Negative denominator\r\n\t\tif(denominator < 0)\t\t\t\r\n\t\t{\r\n\t\t\tdenominator *= -1;\r\n\t\t\tnumerator *= -1;\r\n\t\t}\r\n\t\t//Quotient is fraction\r\n\t\treturn new FullExpression(new Rational(numerator), new Rational(denominator), Operator.QUOT);\r\n\t}", "private Fraction reduce() {\n Fraction f = null;\n try {\n f = (Fraction)clone();\n } catch (CloneNotSupportedException e) {};\n if (denominator == 0)\n throw new ArithmeticException (\" illegal denominator zero \");\n if (denominator < 0) {\n f.numerator = -numerator;\n f.denominator = -denominator;\n }\n if (numerator == 0)\n f.denominator = 1;\n else {\n int n = gcd (numerator, denominator);\n f.numerator = numerator / n;\n f.denominator = denominator / n;\n }\n return f;\n }", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "static double negate(double num) {\n\t\t\n\t\treturn num*(-1);\n\t\n\t}", "public Fraction sub(Fraction f) {\n /** Denominators equal */\n if( f.getDenominator() == this.denominator )\n return new Fraction( this.numerator - f.getNumerator(), this.denominator);\n \n /** Denominators different */\n \n /** The least common multiple found between both denominators. */\n int lcd = getLCD(this.denominator, f.getDenominator());\n\n /** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */\n return new Fraction( (lcd / this.denominator * this.numerator) - (lcd / f.getDenominator() * f.getNumerator()), lcd);\n }", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "private Proof notDivides(int n, int m, Expression expression) {\n Expression litMPrev = intToLit(m - 1); //[m - 1]\n if (n == 0) {\n return notDividesBase(expression, litMPrev); //|- 0 * z = [m - 1]\n }\n Variable x = var(\"x\");\n Expression litN = intToLit(n); //[n]\n Proof noDivi0 = notMulZero(litN, litMPrev); //![n] * 0 = [m]\n Expression litM = intToLit(m); //[m]\n Expression not = not(equal(multi(litN, x), litM)); //![n] * x = [m]\n Proof nextStep = notDividesInductionStep(n, m, x); //![n] * x' = [m]\n Proof imWeak = implLeftWeakness(not, nextStep); //![n] * x = [m] -> ![n] * x' = [m]\n return inductConclusion(x, expression, noDivi0, imWeak); //![n] * 0 = [m] & @z(![n] * x = [m] -> ![n] * x' = [m]) -> !([n] * x = [m])\n }", "public String get_fraction_part();", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public Fraction reciprocal()\n {\n int newNumerator = this.getDenominator();\n int newDenominator = this.getNumerator();\n Fraction newFraction = new Fraction(newNumerator, newDenominator);\n return newFraction;\n }", "public Fraction div(Fraction f) {\n /** Accounts for the input of a negative fraction */\n if(f.getNumerator() < 0)\n return new Fraction( (-1) * (this.numerator * f.getDenominator()), Math.abs(this.denominator * f.getNumerator()));\n return new Fraction( (this.numerator * f.getDenominator()), (this.denominator * f.getNumerator()));\n }", "public static double not(final double value) {\n return 1 - value;\n }", "private void simplify()\n\t{\n\t\tint gcd=1;\n\t\tint smallest= Math.min(numerator, denominator);\n\t\tfor(int i=2;i<=smallest;i++)\n\t\t{\n\t\t\tif(numerator%i==0 && denominator%i==0)\n\t\t\t{\n\t\t\t\tgcd=i;\n\t\t\t}\n\t\t}\n\t\t//To get the fraction into its simplest form we divide the numerator and denominator with their gcd\n\t\tnumerator= numerator/gcd;\n\t\tdenominator= denominator/gcd;\n\t}", "public DoubleExpression getOppositeProgress()\n {\n return opposite;\n }", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "Rational subtract(Rational p){\n\n Rational firstarg =new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg=firstarg.lowestform();\n p=p.lowestform();\n //need to get it in it's lowest form before you can work with it\n int tempgcd=gcd(firstarg.denominator,p.denominator);\n if(firstarg.denominator==p.denominator)\n {\n // if both denominators are the same just got to add the numerator\n p.numerator=firstarg.numerator-p.numerator;;\n return p;\n }\n else if(tempgcd==1)\n {\n int tempdenominator=p.denominator;\n\n p.denominator=firstarg.denominator*p.denominator;\n p.numerator=p.numerator*firstarg.denominator;\n\n //calculate the second fraction\n firstarg.numerator=firstarg.numerator*tempdenominator;\n firstarg.denominator=firstarg.denominator*tempdenominator;\n\n //now just add the numerators\n p.numerator=firstarg.numerator-p.numerator;;\n\n return p;\n }\n else if(tempgcd>1)\n {\n\n p.denominator=tempgcd*p.denominator;\n p.numerator=p.numerator*tempgcd;\n //calculate the second fraction by getting the gcd and multiplying it by the top and bottom of bot fractions\n firstarg.numerator=firstarg.numerator*tempgcd;\n firstarg.denominator=firstarg.denominator*tempgcd;\n //now just add the numerators\n p.numerator=firstarg.numerator-p.numerator;\n\n return p;\n }\n return null;\n\n }", "Rational(int num, int denom){\r\n // If fraction is negative, the numerator is negative\r\n numerator = (denom < 0 ? -num : num);\r\n denominator = (denom < 0 ? -denom : denom);\r\n reduce();\r\n }", "@Override\n public Object clone() throws CloneNotSupportedException {\n return new Fraction (getNumerator(), getDenominator());\n }", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "private void reduce() {\n /** The fraction is equal to 0. The numerator is 0 in this case */\n if(this.numerator == 0)\n this.denominator = 1;\n /** The numerator and denominator are not equal */\n else if (this.numerator != this.denominator) {\n\n /** The greatest common divisor of the numerator and denominator of this fraction */\n int gcd = getGCD(Math.abs(this.numerator), Math.abs(this.denominator));\n\n /** There is a greatest common divisor greater than 1 */\n if (gcd > 1) {\n this.numerator /= gcd;\n this.denominator /= gcd;\n }\n } \n /** The fraction is equal to 1 */\n else {\n this.numerator = 1;\n this.denominator = 1;\n }\n }", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "private Proof notDividesBase(Expression s, Expression t) {\n Proof axm2convertOnce = faxm2ConvertOnce(succ(t), mulLeftZero(s));\n Proof equalitySym = equalitySym(zero(), succ(t));\n Proof imTrans2 = implTrans(axm2convertOnce, equalitySym);\n Proof succNotZero = succIsNotZero(t);\n return contraTwice(imTrans2, succNotZero);\n }", "public Fraction( int num, int den ) {\n if( den == 0 ) {\n throw new RuntimeException( \"0 is not a valid denominator!\");\n } else {\n this.value = num/den;\n this.numerator = num;\n this.denominator = den;\n // Mit der unteren Schleife kürzen wir.\n if( this.denominator > 1 ){\n for( int i = this.denominator; i >= 2; i-- ) {\n if( this.numerator % i == 0 && this.denominator % i == 0 ) {\n this.numerator /= i;\n this.denominator /= i;\n }\n }\n }\n }\n\n }", "public Fraction( int n, int d )\n\t{\tint gcd = gcd( n, d );\n\t\tsetNumer(n/gcd);\n\t\tsetDenom(d/gcd);\n\t}", "public final void invert() {\n\tdouble s = determinant();\n\tif (s == 0.0)\n\t return;\n\ts = 1/s;\n\t// alias-safe way.\n\tset(\n\t m11*m22 - m12*m21, m02*m21 - m01*m22, m01*m12 - m02*m11,\n\t m12*m20 - m10*m22, m00*m22 - m02*m20, m02*m10 - m00*m12,\n\t m10*m21 - m11*m20, m01*m20 - m00*m21, m00*m11 - m01*m10\n\t );\n\tmul((float)s);\n }", "public static Fraction toFraction (double f, int d) {\n if (d > 0)\n return new Fraction ((int)(Math.round (f*d)), d);\n else\n throw new ArithmeticException (\" illegal denominator \");\n }", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "public Fraction(int num,int den) {\n\t\t if (den ==0) {\n\t\t\tthrow new IllegalArgumentException(\"Cant have the Devisor to be zero\");\n\t\t}\n\t\t this.num=num;\n\t\t this.den=den;\n\t\t if (num ==0) {\n\t\t\tthis.den=1;\n\t\t\t\n\t\t}\n\t\t simplify();\n\t\t value = num/den;\n\t }", "public Fraction(int num, int den){\n numerator = num;\n if (den != 0){\n denominator = den;\n }\n else{\n denominator = 1;\n }\n reduce();\n }", "public Rational(int n, int d) {\n\tif ( d == 0 ) {\n\t System.out.println(\"Nope.\");\n\t numerator = 0;\n\t denominator = 1;\n\t}\n\telse {\n\t numerator = n;\n\t denominator = d;\n\t}\n }", "public static String toMixedNum(int numerator, int denominator) {\n \tint whole=numerator/denominator;\t\t//make variable to store whole number by dividing num and denom\r\n\t\tint newnumerator=numerator%denominator;\t//get newnum by doing num mod denom\r\n\t\t\r\n\t\tif(whole<0) {\t\t\t//if whole number is negative and the new num is neg as well,\r\n\t\t\tnewnumerator *= -1;\t// make the new num positive\r\n\t\t}\r\n\t\tif(newnumerator==0 && whole==0) {\t//if the frac is 0 all-around\r\n\t\t\treturn \"0\";\t\t\t\t\t\t//return 0\r\n\t\t}\r\n\t\tif(newnumerator==0) {\t//if the num is 0 it's most likely\r\n\t\t\treturn whole + \"\";\t//just a whole number\r\n\t\t}\r\n\t\tif(newnumerator<0 && denominator<0) {\t//if the num and denom is both neg\r\n\t\t\tnewnumerator *= -1;\t\t\t\t\t//then the frac itself should be negative\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(denominator<0) {\t\t\t\t//if denom is negative \r\n\t\t\tnewnumerator *= -1;\t\t\t//multiply both num and denom by -1 to get a postitive denom and neg num\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(whole==0) {\t\t\t//if the whole num is 0\r\n\t\t\treturn simplify(newnumerator, denominator);\t//then it should just return num/denom\r\n\t\t}\r\n\t\treturn whole + \"_\"+ simplify(newnumerator, denominator); //return statement of the whole mixed frac\r\n }", "public double divide(double n, double den) {\r\n\t\treturn n/den;\r\n\t}", "public void sub(Fraction f1, Fraction f2) {\n\t\tnumerator = f1.getNumerator() * f2.getDenominator() - f2.getNumerator() * f1.getDenominator();\n\t\tdenominator = f1.getDenominator() * f2.getDenominator();\n\t\tint gcd = gcd(f1.getDenominator(), f2.getDenominator());\n\t\tnumerator /= gcd;\n\t\tdenominator /= gcd;\n\t}", "public Fraction(int numerator,int denominator)\n\t{\n\t\tthis.numerator=numerator;\n\t\tthis.denominator= denominator;\n\t\tsimplify();\n\t}", "private void simplify(){\n\n\t\tint gcd;\n\t\twhile(true){ \n\t \tgcd = greatestCommonDivisor(myNumerator, myDenominator);\n\t \tif (gcd ==1) return;\n\t \tmyNumerator = myNumerator / gcd;\n\t \tmyDenominator = myDenominator / gcd;\n\t\t}\n }", "public void setFraction(int fraction) {\n this.fraction = fraction;\n }", "public void setFraction(String fraction) {\n this.fraction = fraction == null ? null : fraction.trim();\n }", "public static double inverseFunction(Double num) {\n// try {\n// return 1 / num;\n// } catch (Exception e) {\n// Console.println(\"Err\");\n// }\n return 1 / num;\n }", "public void normalize()\n\t{\n\t\tif (this.getDenom() < 0)\n\t\t{\n\t\t\tthis.setDenom(this.getDenom() * (-1));\n\t\t\tthis.setNumer(this.getNumer() * (-1));\n\t\t}\n\t}", "private void reduce()\r\n {\r\n int lowest, highest, temp;\r\n if(Math.abs(numerator) >= Math.abs(denominator))\r\n { \r\n lowest = Math.abs(denominator);\r\n highest = Math.abs(numerator);\r\n }\r\n else\r\n {\r\n lowest = Math.abs(numerator);\r\n highest = Math.abs(denominator);\r\n }\r\n while(lowest != 0)\r\n {\r\n temp = lowest;\r\n lowest = highest % lowest;\r\n highest = temp;\r\n } \r\n numerator = numerator / highest;\r\n denominator = denominator / highest; \r\n \r\n if(denominator < 0)\r\n {\r\n numerator = numerator * (-1);\r\n denominator = denominator * (-1); \r\n } \r\n }", "public FractionImpl(String fraction) {\n\n //use the trim String method to remove white space before and after the fraction characters\n\n String trimmed = fraction.trim();\n\n //whole number procedure - if no \"/\" is present\n\n if (!trimmed.contains(\"/\")) {\n this.numerator = Integer.parseInt(trimmed);\n this.denominator = 1;\n }\n\n //fraction procedure - split on \"/\" then convert string numbers to int and pass to the normalise function\n\n else {\n String[] bits = trimmed.split(\"/\");\n\n this.numerator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[0];\n this.denominator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[1];\n }\n\n\n }", "public void reduce(){\r\n int num = numerator;\r\n int denom = denominator;\r\n int greatest;\r\n \r\n // Find the greater of numerator and denominator\r\n if(numerator < 0){\r\n num = -numerator;\r\n }\r\n if(num > denom){\r\n greatest = num;\r\n }\r\n else\r\n greatest = denom;\r\n \r\n // Find the GCD\r\n int gcd = 0;\r\n // starting from the largest\r\n for(int i = greatest; i > 1; i--){\r\n if((numerator % i == 0) && (denominator % i == 0)){\r\n gcd = i;\r\n break;\r\n }\r\n }\r\n // factor out the gcd in both the numerator and denominator\r\n if(gcd != 0){\r\n numerator /= gcd;\r\n denominator /= gcd;\r\n }\r\n }", "public String toFractionString() {\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "public String getFraction() {\n return fraction;\n }", "private void reduce() {\n int gcd = gcd(this.numerator, this.denominator);\n this.numerator = this.numerator / gcd;\n this.denominator = this.denominator / gcd;\n }", "public void reduce()\n\t{\n\t\tint divider = getGCD(myNumerator, myDenominator);\n\t\tmyNumerator /= divider;\n\t\tmyDenominator /= divider;\n\t}", "public void reduce() {\n\tint g = this.gcd();\n\tif ( g != 0 ) {\n\t numerator /= g;\n\t denominator /= g;\n\t}\n }", "public static String toImproperFrac(int number, int numer, int denom) {\n\t\tString answer = \"0\";\r\n\t\tanswer = number * denom + numer + \"/\" + denom;\r\n\t\treturn(answer);\r\n\t\t\r\n\t}", "public Fraction divide(Fraction divisor)\n {\n Fraction flipDivisor = divisor.reciprocal();\n Fraction newFraction = new Fraction();\n newFraction = this.multiply(flipDivisor);\n return newFraction;\n }", "public Fraction(int numerator, int denominator){\n this.numerator= numerator;\n this.denominator = denominator;\n }", "public static String simplify(int numerator, int denominator) {\n \tint result = gcf(numerator, denominator);\t//use gcf to get the result and store it in an int variable\r\n \tint newNum = numerator/result;\t\t//make newnum equal to num/result\r\n \tint newDenom = denominator/result;\t\t//new denom equals denom/result\r\n \treturn newNum + \"/\" + newDenom;\t\t\t//return statement of num / newdenom\r\n }", "public Fraction(){\n\t\n\t\tsetFraction(0,1);\n }", "public Fraction(int num, int deno) {\n\t\tsetNumerator(num);\n\t\tsetDenominator(deno);\n\t}", "public BigRational reciprocal() {\n return valueOf(den, num);\n }", "public static int reduceDenominator(int numerator, int denominator) {\n int start;\n int greatestCommonFactor = 1;\n if (numerator > denominator) {\n start = numerator;\n } else {\n start = denominator;\n }\n if (start != 0) {\n while (greatestCommonFactor != start) {\n if (numerator % start == 0 && denominator % start == 0) {\n greatestCommonFactor = start;\n start++;\n }\n start--;\n }\n }\n return denominator / greatestCommonFactor;\n }", "public String simplify(){\n\n int simp = gcd(numerator, denominator);\n numerator = (numerator/simp);\n denominator = (denominator/simp);\n if (denominator == 1){\n return (numerator + \"\");\n }\n if (numerator > denominator){\n int first = (numerator/denominator);\n numerator = (numerator%denominator);\n return (first + \"_\" + numerator + \"/\" + denominator);\n }\n else {\n return (numerator + \"/\" + denominator);\n }\n\n }", "public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator * f.numerator);\n }", "public void depreciate(){\r\n float amountN = getAmount();\r\n float reduce = amountN*(rate/100);\r\n amountN = amountN - reduce;\r\n this.amount = amountN;\r\n }", "public static void displayFractionalUndIngeralFromDoubleNumber(){\n\t\tSystem.out.println(\"please enter a double number: \");\n\t\tScanner scann=new Scanner(System.in);\n\t\tdouble x=scann.nextDouble();\n\t\tdouble fractional_part=x%1;\n\t\tdouble integral_part=x-fractional_part;\n\t\tSystem.out.println(\"The integral part of (\" +x +\" ) is: \" +integral_part);\n\t\tSystem.out.println(\"The fractional part of ( \" +x +\" ) is: \" +fractional_part);\n\t}", "void unsetValueRatio();", "public Fraction dividedBy(Fraction other) {\n Fraction end = times(other.getReciprocal());\n\n return end;\n\n }", "private int[] normalise(int n, int d) {\n\n //throw exception is denominator is zero\n\n if (d == 0) {\n throw new ArithmeticException(\"Divide by zero\");\n }\n\n //use gcd function to calculate GCD and transform numerator and denominator values\n\n int gcd_val = gcd(n, d);\n int values[] = new int[2];\n n = n/gcd_val;\n d = d/gcd_val;\n\n //transform so a negative fraction always has a negative numerator, not a negative denominator\n\n if (d < 0) {\n n *= -1;\n d *= -1;\n }\n\n values[0] = n;\n values[1] = d;\n return values;\n }", "public Fraction(long numerator){\n this.numerator = (int)numerator;\n this.denominator = 1;\n }", "public Fraction subtract(Fraction subtrahend)\n {\n int newDenominator = (this.getDenominator() * subtrahend.getDenominator());\n int convertedNumerator1 = (this.getNumerator() * subtrahend.getDenominator());\n int convertedNumerator2 = (subtrahend.getNumerator() * this.getDenominator());\n int newNumerator = convertedNumerator1 - convertedNumerator2;\n \n Fraction newFraction =new Fraction(newNumerator, newDenominator);\n return newFraction;\n }", "public static String randomFraction(){\r\n int denom = randomNumber();\r\n int numer = randomNumber();\r\n String fraction = \"\";\r\n \r\n if (numer>denom){\r\n fraction = numer+\"/\"+denom;\r\n }\r\n else {\r\n fraction = denom+\"/\"+numer;\r\n }\r\n \r\n return fraction;\r\n }", "public static double frac(double d)\n {\n return frac( new BigDecimal(\"\" + d) ).doubleValue();\n }", "public SortFractions(String fraction) {\n String[] fArray = fraction.split(\"/\");\n numerator = Integer.parseInt(fArray[0]);\n denominator = Integer.parseInt(fArray[1]);\n this.sol = numerator / denominator; \n }", "public Fraction(int numerator, int denominator){\n \n\t\tsetFraction(numerator, denominator);\n }", "public Fraction(int numerator, int denominator)\n {\n setNumerator(numerator);\n setDenominator(denominator);\n }", "private void negate()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.negate();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "public abstract String getFraction();", "public static String reduceFraction(String mixedAnswer)\r\n {\r\n \tint underscore = mixedAnswer.indexOf('_');\r\n \tint slash = mixedAnswer.indexOf('/');\r\n \tint num = Integer.parseInt(mixedAnswer.substring(underscore + 1, slash));\r\n \tint denom = Integer.parseInt(mixedAnswer.substring(slash + 1, mixedAnswer.length()));\r\n \tint newNum = num / findGCF(num, denom);\r\n \tint newDenom = denom / findGCF(num, denom);\r\n \tString reducedFraction = newNum + \"/\" + newDenom;\r\n \treturn reducedFraction; \r\n }", "public Coord simplifyAsFraction() {\n int gcd = gcd();\n return new Coord(row / gcd, column / gcd);\n }", "public FractionImpl(int wholeNumber) {\n\n //set implicit denominator to 1, handle printing with the toString method\n\n this.numerator = wholeNumber;\n this.denominator = 1;\n }", "public Fraction getReciprocal() {\n return new Fraction(denominator, numerator);\n }", "public Fraction(int numerator, int denominator)\n\t{\n\t\tmyNumerator = numerator;\n\t\tmyDenominator = denominator;\n\t}", "Proof notDivides(int n, int m) {\n return introduceNotExists(var(\"z\"), notDivides(n, m, var(\"z\")));\n }", "public Fraction(int numerator, int denominator) {\n if(denominator < 1)\n throw new IllegalArgumentException();\n this.numerator = numerator;\n this.denominator = denominator;\n this.reduce();\n }", "private int getRemainder (int numerator, int denominator)\n {\n if (denominator >= numerator)\n return 0;\n\n int diff = numerator;\n while (diff >= denominator)\n {\n diff = diff - denominator;\n }\n\n return diff;\n }", "public Rational subtract(Rational other)\n\t{\n\t\tint diffNumer = (getNumer() * other.getDenom()) - (getDenom() * other.getNumer());\n\t\tint diffDenom = (getDenom() * other.getDenom());\n\n\t\tRational difference = new Rational(diffNumer, diffDenom);\n\t\tdifference.normalize();\n\t\treturn difference;\n\t}", "public Fraction toDenominator(int denominator){\n if (denominator == 0) {\n throw new NullPointerException(\"denominator doesn't be '0'\");\n } else if (denominator < this.denominator) {\n throw new NullPointerException(\"Can't cast denominator to '\" + denominator + \"'.\");\n }\n\n int lcm = Fractions.getLCM(this.denominator, denominator);\n\n int factor = lcm / this.denominator;\n return new Fraction(\n this.numerator * factor,\n this.denominator * factor);\n }", "public static int findDenominator(String fraction) {\n \tif(fraction.contains(\"/\")) {\t//check to see if it has a /\r\n \t\tint denominator= Integer.parseInt(fraction.substring(fraction.indexOf(\"/\")+1,fraction.length( )));\t//use substring to get numbers from / to the frac length; make variable\r\n \t\treturn denominator;\t//return the number\r\n \t} else {\r\n \t\treturn 1; //else if it's a whole number return 1\r\n \t}\r\n }", "public void setDenominator(int dem)\r\n {\r\n this.denominator = dem;\r\n }", "public void allowFractional() {\n APIlib.getInstance().addJSLine(jsBase + \".allowFractional();\");\n }", "public Percentage minus(Percentage other) {\n return new Percentage(amount.minus(other.amount));\n }", "public String fractionToDecimal(int numerator, int denominator) {\n if(numerator == 0) return \"0\";\n \n StringBuilder sb = new StringBuilder();\n //key is remainder, value is len of curr sb, which is starting index of this remainder \n HashMap<Long, Integer> hs = new HashMap<Long, Integer>();\n \n //convert to long to prevent overflow\n long n = (long) numerator;\n long d = (long) denominator;\n \n //catch negative sign\n if( (n < 0) ^ (d < 0) ){\n sb.append(\"-\");\n n = Math.abs(n);\n d = Math.abs(d);\n }\n \n sb.append(n/d);\n long remainder = n%d;\n \n if(remainder == 0) return sb.toString();\n \n sb.append(\".\");\n \n //we will process inputs until we face a visited remainder again\n //in case inputs are dividable, we will return result inside the loop\n while( !hs.containsKey(remainder) ){\n \t//each loop we will start with a new remainder from last loop\n \t\n //record curr remainder and its starting index\n hs.put( remainder, sb.length() );\n \n //update remainder like what we did in math division\n remainder *= 10;\n \n sb.append( remainder/d );\n \n //update remainder to get next remainder\n remainder %= d;\n \n //inputs are dividable\n if(remainder == 0) return sb.toString();\n }\n \n //we get here only when we have Recurring Decimal, add \"(\" based on hashMap value \n sb.insert( hs.get(remainder), \"(\" ).append(\")\");\n \n return sb.toString();\n }", "public Heading negate() {\r\n return new Heading(HeadingType.DEGREES, -this.degreeNum);\r\n }" ]
[ "0.7031492", "0.6890945", "0.6846739", "0.6770786", "0.6498943", "0.6289274", "0.6233391", "0.62077856", "0.6159316", "0.6091861", "0.5985239", "0.59421194", "0.59265435", "0.59129053", "0.5910371", "0.58201", "0.57793075", "0.5776477", "0.57673705", "0.573997", "0.57358634", "0.57355034", "0.570527", "0.570277", "0.5697142", "0.56809545", "0.5676258", "0.5657741", "0.5622505", "0.5593258", "0.5590731", "0.55720663", "0.5559423", "0.55533963", "0.55477226", "0.55301654", "0.55260867", "0.55233264", "0.55089027", "0.5499305", "0.5496121", "0.54895455", "0.5481656", "0.5464498", "0.5457552", "0.5452797", "0.5451949", "0.5450297", "0.544993", "0.5440641", "0.54301", "0.54297537", "0.54233354", "0.5405341", "0.53942657", "0.5379904", "0.53788644", "0.5377955", "0.5365691", "0.5361018", "0.535889", "0.53491145", "0.5345792", "0.531874", "0.5299353", "0.5293964", "0.5293697", "0.5286896", "0.52859503", "0.5281019", "0.5278286", "0.5276818", "0.5274637", "0.5262093", "0.52591705", "0.5256674", "0.52467465", "0.5231967", "0.5202228", "0.5200037", "0.51993454", "0.5194091", "0.5152434", "0.51353073", "0.5121409", "0.5120483", "0.51164204", "0.51085687", "0.51080483", "0.510696", "0.5106693", "0.5101304", "0.50961626", "0.5087778", "0.5085379", "0.50788254", "0.507543", "0.5059521", "0.50573885", "0.5055757" ]
0.7396277
0
Clone of the fraction.
@Override public Object clone() throws CloneNotSupportedException { return new Fraction (getNumerator(), getDenominator()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }", "@Override\n\tpublic <V extends Volume<Fraction>> V copy() {\n\t\treturn (V) of(getAmount(), getSize(), getFluid());\n\t}", "public ComplexNum copy() {\n /*\n * returns a deep copy of this complex number\n * */\n\n return new ComplexNum(realPart, imaginaryPart);\n }", "public Fraction(){\n\t\n\t\tsetFraction(0,1);\n }", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "public Fraction( Fraction other )\n\t{\n\t\tthis( other.getNumer(), other.getDenom() ); // call my full C'Tor with other Fraction's data\n\t}", "private Fraction reduce() {\n Fraction f = null;\n try {\n f = (Fraction)clone();\n } catch (CloneNotSupportedException e) {};\n if (denominator == 0)\n throw new ArithmeticException (\" illegal denominator zero \");\n if (denominator < 0) {\n f.numerator = -numerator;\n f.denominator = -denominator;\n }\n if (numerator == 0)\n f.denominator = 1;\n else {\n int n = gcd (numerator, denominator);\n f.numerator = numerator / n;\n f.denominator = denominator / n;\n }\n return f;\n }", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "public Fraction reciprocal()\n {\n int newNumerator = this.getDenominator();\n int newDenominator = this.getNumerator();\n Fraction newFraction = new Fraction(newNumerator, newDenominator);\n return newFraction;\n }", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "@Override\n\tpublic Spielfeld clone() {\n\t\tint[] mulden = new int[this.getMulden().length];\n\t\t\n\t\tfor(int i = 0; i < this.getMulden().length; i++) {\n\t\t\tmulden[i] = this.getMulden()[i];\n\t\t}\n\t\t\n\t\treturn new Spielfeld(mulden);\n\t}", "public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "public void cloningFactor() {\n\t\t\t\n\t\t\tsort();\n\t\t\tdouble factorNum = 0.0; \n\t\t\t\n\t\t\tfor(Solution sol : population) {\n\t\t\t\tfactorNum = averagePath / (double) sol.getPath();\n\t\t\t\tsol.setCloningFactor(factorNum);\n\t\t\t}\n\t\t}", "public Fraction subtract(Fraction f){\n return new Fraction(this.numerator * f.denominator - f.numerator * this.denominator, this.denominator * f.denominator);\n }", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "@Override\n\tpublic function copy() {\n\t\tMonom M=new Monom(this.get_coefficient(),this.get_power());\n\t\t\n\t\treturn M;\n\t}", "public Object clone()\n {\n DataSetDivide new_op = new DataSetDivide( );\n // copy the data set associated\n // with this operator\n new_op.setDataSet( this.getDataSet() );\n new_op.CopyParametersFrom( this );\n\n return new_op;\n }", "@Override\n public Interval clone() {\n return this;\n }", "public Fraction(long numerator){\n this.numerator = (int)numerator;\n this.denominator = 1;\n }", "public Object clone(){\n \t\n \treturn this;\n \t\n }", "Fraction () {\n this (0, 1);\n }", "public Complex makeDeepCopy() {\r\n Complex complex2 = new Complex(this.getReal(), this.getImaginary());\r\n return complex2;\r\n }", "public Fraction simplify(){\n long n = this.numerator;\n long d = this.denominator;\n for(long k = d; k >= 1; k--){\n if(n % k == 0 && d % k == 0) {\n n = n / k;\n d = d / k;\n break;\n }\n }\n return new Fraction(n,d);\n }", "public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }", "public Fraction inverse() {\n return new Fraction (denominator, numerator).reduce();\n }", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "public Function clone();", "public Fraction(Fraction fraction) {\n if (fraction == null) {\n throw new PizzaException(\"fraction can't be null\");\n } else {\n this.NUMERATOR = fraction.NUMERATOR;\n this.DENOMINATOR = fraction.DENOMINATOR;\n }\n }", "@Override\n\tAlgebraicExpression clone();", "@Override\n\tpublic Expression copy() {\n\t\treturn null;\n\t}", "public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator * f.numerator);\n }", "public Object clone() {\n return this.copy();\n }", "public Object clone();", "public Object clone();", "public Object clone();", "public Object clone();", "public Coord simplifyAsFraction() {\n int gcd = gcd();\n return new Coord(row / gcd, column / gcd);\n }", "public static void main (String[] param) {\n Fraction x = new Fraction (-8, 15);\n Fraction y = new Fraction (5, -6);\n Fraction z = null;\n try {\n z = (Fraction)x.clone();\n } catch (CloneNotSupportedException e) {};\n Fraction t = new Fraction (16, -30);\n System.out.println (x + \" times \" + y + \" is \" + x.times (y));\n System.out.println (x + \" plus \" + y + \" is \" + x.plus (y));\n System.out.println (x + \" minus \" + y + \" is \" + x.minus (y));\n System.out.println (x + \" divideBy \" + y + \" is \" + x.divideBy (y));\n System.out.println (x + \" compareTo \" + y + \" is \" + x.compareTo (y));\n System.out.println (x.inverse() + \" integer part is \" \n + x.inverse().integerPart());\n System.out.println (x.inverse() + \" fraction part is \"\n + x.inverse().fractionPart());\n System.out.println (x + \" is approximately \" + \n String.valueOf (x.toDouble()));\n System.out.println (Math.PI + \" is approximately \" + \n Fraction.toFraction (Math.PI, 7)\n + \" or \" + Fraction.toFraction (Math.PI, 7).toDouble());\n Fraction ff = Fraction.valueOf (\"-4/7\");\n System.out.println (ff);\n System.out.println (\"hashCode of x: \" + x.hashCode());\n System.out.println (\"hashCode of y: \" + y.hashCode());\n System.out.println (\"hashCode of z: \" + z.hashCode());\n System.out.println (\"hashCode of t: \" + t.hashCode());\n }", "Object clone();", "Object clone();", "public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }", "public Fraction sub(Fraction f) {\n /** Denominators equal */\n if( f.getDenominator() == this.denominator )\n return new Fraction( this.numerator - f.getNumerator(), this.denominator);\n \n /** Denominators different */\n \n /** The least common multiple found between both denominators. */\n int lcd = getLCD(this.denominator, f.getDenominator());\n\n /** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */\n return new Fraction( (lcd / this.denominator * this.numerator) - (lcd / f.getDenominator() * f.getNumerator()), lcd);\n }", "@Override\n public AggregationBuilder clone() {\n try {\n AggregationBuilder clone = (AggregationBuilder) super.clone();\n clone.root = root.clone();\n clone.current = clone.root;\n return clone;\n } catch(CloneNotSupportedException ex){\n return null;\n }\n }", "public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}", "public Fraction getFraction() {\n return fraction;\n }", "public Fraction divide(Fraction divisor)\n {\n Fraction flipDivisor = divisor.reciprocal();\n Fraction newFraction = new Fraction();\n newFraction = this.multiply(flipDivisor);\n return newFraction;\n }", "public Object clone()\n {\n PSSearchField copy = null;\n\n copy = (PSSearchField) super.clone();\n\n //don't call getFieldValues because that makes a clone\n copy.setValues(getOperator(), getExternalOperator(), m_values);\n\n return copy;\n }", "public Fraction()\n {\n }", "public Object clone() {\n AggregateSymbol copy = new AggregateSymbol(getName(), getAggregateFunction(), isDistinct(), LanguageObject.Util.deepClone(getArgs()));\n if (orderBy != null) {\n copy.setOrderBy(orderBy.clone());\n }\n if (condition != null) {\n copy.setCondition((Expression) condition.clone());\n }\n copy.isWindowed = this.isWindowed;\n copy.type = this.type;\n copy.setFunctionDescriptor(getFunctionDescriptor());\n return copy;\n }", "public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}", "public abstract Object clone();", "public a clone() {\n try {\n a aVar = (a) super.clone();\n aVar.f22064a = null;\n return aVar;\n } catch (CloneNotSupportedException unused) {\n return null;\n }\n }", "public Fraction add(Fraction f){\n return new Fraction(this.numerator * f.denominator + f.numerator * this.denominator, this.denominator * f.denominator);\n }", "private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}", "@Override\n\tpublic Object clone() {\n\t\treturn new MeanVar(n, mean, s);\n\t}", "public Fraction(int numerator, int denominator){\n this.numerator= numerator;\n this.denominator = denominator;\n }", "public Fraction dividedBy(Fraction other) {\n Fraction end = times(other.getReciprocal());\n\n return end;\n\n }", "public DessertVO clone() {\r\n return (DessertVO) super.clone();\r\n }", "public Fraction(int numerator, int denominator){\n \n\t\tsetFraction(numerator, denominator);\n }", "public CFExp deepCopy(){\r\n return this;\r\n }", "@Override\n public Object clone() {\n return super.clone();\n }", "public Object clone() {\r\n return new DateTimeFormat(dateFormat);\r\n }", "@Override\n\t\tpublic ImmutableSequentialGraph copy() {\n\t\t\treturn new ComposedGraph( g0, g1.copy() );\n\t\t}", "public void subtract(Fraction f)\r\n {\r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator - f.getNumerator();\r\n this.reduce();\r\n }", "public abstract Object clone() ;", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "public Object clone(){\n\t\tSongRecord cloned = new SongRecord();\n\t\tif (this.title == null){\n\t\t\tcloned.title = null;\n\t\t}\n\t\telse {\n\t\t\tcloned.title = new String(this.getTitle());\n\t\t}\n\t\tif (this.artist == null){\n\t\t\tcloned.artist = null;\n\t\t}\n\t\telse {\n\t\t\tcloned.artist = new String(this.getArtist());\n\t\t}\n\t\tcloned.min = this.getMin();\n\t\tcloned.sec = this.getSec();\n\t\treturn cloned;\n\t}", "public Object clone() throws CloneNotSupportedException { return super.clone(); }", "@Override\n public MovePath clone() {\n final MovePath copy = new MovePath(getGame(), getEntity());\n copy.steps = new Vector<MoveStep>(steps);\n copy.careful = careful;\n return copy;\n }", "@Override\n protected Currency clone() {\n final Currency currency = new Currency();\n if (data != null) {\n currency.data = data.clone();\n }\n return currency;\n\n }", "public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}", "public FractionImpl(int wholeNumber) {\n\n //set implicit denominator to 1, handle printing with the toString method\n\n this.numerator = wholeNumber;\n this.denominator = 1;\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "public INodo copy(){\n INodo copia = new FuncionMultiplicacion(getRaiz(), getNHijos());\n copia.setEtiqueta(getEtiqueta());\n for (INodo aux : getDescendientes()){\n copia.incluirDescendiente(aux.copy());\n }\n return copia;\n }", "public ParticleRenderData copy()\n\t{\n\t\tRenderData copy = super.copy();\n\t\tParticleRenderData pcopy = new ParticleRenderData(new Vector3f(), new Euler(), new Vector3f());\n\t\tpcopy.transform = copy.transform;\n\t\tpcopy.postStage = this.postStage;\n\t\tpcopy.currStage = this.currStage;\n\t\tpcopy.particleColor = this.particleColor;\n\t\treturn pcopy;\n\t}", "private void selfClone() {\n stroke = stroke.clone();\n }", "public Field copy()\n {\n return new Field(name, type, vis);\n }", "public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }", "public Fraction(int numerator,int denominator)\n\t{\n\t\tthis.numerator=numerator;\n\t\tthis.denominator= denominator;\n\t\tsimplify();\n\t}", "public /*@ non_null @*/ Object clone() {\n return this;\n }", "public AST copy()\n {\n return new Implicate(left, right);\n }", "public String getFraction() {\n return fraction;\n }", "Point clone ();", "public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}", "Rational divide(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n\n firstarg.numerator=firstarg.numerator*p.denominator;\n firstarg.denominator=p.numerator*firstarg.denominator;\n return firstarg;\n }", "public static Fraction add(Fraction f1, Fraction f2)// to construct a new object of the same class and store the value of the sum in that object and then return the object\n\t{\n\t\tint num1= f1.numerator*f2.denominator + f2.numerator*f1.denominator;\n\t\tint den1= f1.denominator*f2.denominator;\n\t\tFraction f3= new Fraction(num1,den1);\n\t\treturn f3;\n\t\n}", "public Object clone() {\n \t\treturn new Term(this);\n \t}", "public ArrayOfFraction()\r\n\t{\r\n\t\ta=new Fraction [2];\r\n\t\tn=0;\r\n\t}", "public Image clone() {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, width, height);\r\n\t}", "public Fraction times(Fraction other) {\n\n int denomSec = denominator * other.getDenominator();\n int numerSec = numerator * other.getNumerator();\n\n return new Fraction(numerSec, denomSec);\n }", "public final PaintObject clone() {\n \t\n \ttry {\n\t\t\treturn (PaintObject) super.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }", "public Object clone()\n {\n try {\n Object newObj = super.clone();\n ((LDAPUrl)newObj).url = (com.github.terefang.jldap.ldap.LDAPUrl)this.url.clone();\n return newObj;\n } catch( CloneNotSupportedException ce) {\n throw new RuntimeException(\"Internal error, cannot create clone\");\n }\n }", "public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}", "public Object clone() {\t\n\t\tGrille o = new Grille();\t\t//On créé une nouvelle grille\n\t\to.score=this.score;\n\t\tfor (Case i : this.grille){\n\t\t\tCase i2= (Case) i.clone();\t//On copie chaque case de la grille\n\t\t\ti2.setGrille(o);\n\t\t\to.grille.add(i2);\t\t\t//On les ajoute à la nouvelle grille\n\t\t}\n\t\t// on renvoie le clone\n\t\treturn o;\n\t}", "@Override\r\n\tpublic SolutionRepresentationInterface clone() {\n\t\tint[] oSolution = new int[getNumberOfLocations()];\r\n\t\toSolution = aiSolutionRepresentation.clone();\r\n\t\tSolutionRepresentation oRepresentation = new SolutionRepresentation(oSolution);\r\n\t\t\r\n\t\treturn oRepresentation;\r\n\t}", "public abstract Pattern copy();" ]
[ "0.73458105", "0.70246094", "0.66444546", "0.65944564", "0.65443754", "0.6535522", "0.652088", "0.64753556", "0.642075", "0.6393762", "0.63843757", "0.63765776", "0.6362588", "0.6342973", "0.6305858", "0.6282979", "0.6263398", "0.62332356", "0.6202689", "0.6185717", "0.6157001", "0.61240804", "0.61126983", "0.61120486", "0.61049783", "0.6100237", "0.6098687", "0.6095624", "0.60813797", "0.60758024", "0.60458237", "0.6032655", "0.60310346", "0.6017873", "0.600351", "0.5980118", "0.59703887", "0.59703887", "0.59703887", "0.59703887", "0.59634656", "0.5941615", "0.5940504", "0.5940504", "0.5937629", "0.5925453", "0.5917256", "0.59136415", "0.58961135", "0.5891049", "0.5890183", "0.5890037", "0.58891946", "0.5885992", "0.5882318", "0.58568406", "0.58559024", "0.58557016", "0.5850174", "0.58453053", "0.58315307", "0.5828812", "0.5825983", "0.58197224", "0.5807413", "0.5805584", "0.58041614", "0.57950073", "0.579255", "0.57782555", "0.57732135", "0.5762273", "0.5760165", "0.57533276", "0.57497364", "0.5745391", "0.5739862", "0.57356715", "0.5728628", "0.57277924", "0.5723766", "0.57180625", "0.5715259", "0.5705116", "0.5697899", "0.56939405", "0.56894", "0.56757724", "0.5673446", "0.5668208", "0.5664878", "0.5662472", "0.5661217", "0.56593686", "0.56578696", "0.5651663", "0.5650355", "0.5650036", "0.5645555", "0.5644312" ]
0.8399419
0
Integer part of the (improper) fraction.
public int integerPart() { Fraction tmp = reduce(); return tmp.getNumerator()/tmp.getDenominator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String get_fraction_part();", "public static int findNumerator(String fraction) {\n \tif(fraction.contains(\"_\")) {\t//check if the frac has an _\r\n \t\tint numerator= Integer.parseInt(fraction.substring(fraction.indexOf(\"_\") +1, fraction.indexOf(\"/\")));\t//if so use substring from _ to the /; convert to int ant make variable for numerator\r\n \t\treturn numerator;\t//return the numerator\r\n \t} else {\r\n \t\tif(fraction.contains(\"/\")) {\t//check if the frac just had a /\r\n \t\t\tint numeratorSlash= Integer.parseInt(fraction.substring(0, fraction.indexOf(\"/\")));\t//use substring to get numbers from index 0 to / ; make variable and convert to int\r\n \t\t\treturn numeratorSlash;\t//return the number\r\n \t\t} \r\n \t}\r\n \treturn 0;\t//else if it doesnt apply to any of the conditionals above it's most likely a whole number so just return 0\r\n }", "public static int parseFractionForNumerator(String fraction) {\n int length = fraction.length();\n int underscore = fraction.indexOf(\"_\");\n int slash = fraction.indexOf(\"/\");\n String numerator = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n if (slash != -1) { // underscore and a slash ==> mixed number\n numerator = fraction.substring(underscore + 1, slash);\n }\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n numerator = fraction.substring(0, slash);\n } else { // no underscore and no slash ==> whole number\n numerator = \"0\";\n }\n }\n int numeratorNumber = Integer.parseInt(numerator);\n String whole = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n whole = fraction.substring(0, underscore);\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n whole = \"0\";\n } else { // no underscore and no slash ==> whole number\n whole = fraction.substring(0, length);\n }\n }\n int wholeNumber = Integer.parseInt(whole);\n if (wholeNumber < 0) {\n numeratorNumber = -numeratorNumber;\n }\n return numeratorNumber;\n }", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "void milestone2(double num){\n System.out.println(\"Integer part: \" + (int)num);\n double fractionPart = num - (int)num;\n fractionPart *= 100;\n System.out.println(\"Fractional part: \" + (int)fractionPart);\n }", "public static int convertToImproperFractionNumerator(int whole, int numerator, int denominator) {\n numerator = (denominator * whole) + numerator;\n return numerator;\n }", "public void ToiGian(){\n if(this.denominator != 0 && this.numerator != 0){\n int uocChung = Task1.gcd(this.numerator, this.denominator);\n this.numerator = this.numerator/uocChung;\n this.denominator = this.denominator/uocChung;\n }\n }", "public String get_integer_part();", "int getDefaultFractionCounter();", "public int getHourFraction()\n {\n return (int)Math.floor(hours);\n }", "public int getFractionsNumber() {\n return fractionsNumber;\n }", "private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}", "public static int parseFractionForWholeNumber(String fraction) {\n int length = fraction.length();\n int underscore = fraction.indexOf(\"_\");\n int slash = fraction.indexOf(\"/\");\n String whole = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n whole = fraction.substring(0, underscore);\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n whole = \"0\";\n } else { // no underscore and no slash ==> whole number\n whole = fraction.substring(0, length);\n }\n }\n int wholeNumber = Integer.parseInt(whole);\n return wholeNumber;\n }", "public static int findWhole(String fraction) {\t//method to find the whole #\r\n \tif(fraction.contains(\"_\")) {\t//check if the fraction has an _\r\n \t\tint whole= Integer.parseInt(fraction.substring(0, fraction.indexOf(\"_\"))); //if so use substring to get num from index 0 to the _ ; set as a variable\r\n \t\treturn whole;\t//return the number; use parseint to convert answer to an int\r\n \t} else {\r\n \t\tif(fraction.contains(\"/\")) { //else if it contains a /\r\n \t\t\treturn 0;\t//just return a 0\r\n \t\t} \r\n \t\treturn Integer.parseInt(fraction); //if it doesnt match any of conditionals then its probably just a whole num so just return it; convert to int\r\n \t}\t\t\r\n }", "public abstract String getFraction();", "public static int calculateIntegerPart(int a)\n\t\t\t{\n\t\t\t\tint integerPart = a / 10;\t\t\t\t\n\t\t\t\treturn integerPart;\n\t\t\t}", "public static int findDenominator(String fraction) {\n \tif(fraction.contains(\"/\")) {\t//check to see if it has a /\r\n \t\tint denominator= Integer.parseInt(fraction.substring(fraction.indexOf(\"/\")+1,fraction.length( )));\t//use substring to get numbers from / to the frac length; make variable\r\n \t\treturn denominator;\t//return the number\r\n \t} else {\r\n \t\treturn 1; //else if it's a whole number return 1\r\n \t}\r\n }", "public int getPartieFractionnaire() {\n return partieFractionnaire;\n }", "public abstract double getFractionMultiplier();", "@Override\n public IntType divideToInt(IntType dividend) {\n int intDivisor = this.asInt().getValue();\n int intDividend = dividend.getValue();\n return TypeFactory.getIntType(intDividend / intDivisor);\n }", "public static int p(int i)\n {\n return (i - 1) / 2;\n }", "public int getMinuteFraction()\n {\n return (((int)(hours*100.0)%100)*60)/100;\n }", "public String getFraction() {\n return fraction;\n }", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "public int getNumerator()\n {\n return this.numerator;\n }", "public static int getWholeFromImproper(int improperNumerator, int denominator) {\n return improperNumerator/denominator;\n }", "private int getRemainder (int numerator, int denominator)\n {\n if (denominator >= numerator)\n return 0;\n\n int diff = numerator;\n while (diff >= denominator)\n {\n diff = diff - denominator;\n }\n\n return diff;\n }", "public static int part1(double num)\r\n {\r\n \r\n //Math.floor extract the integer part, then substract it from the original one \r\n int firstNum=(int)Math.floor(num);\r\n double secondNum=num-firstNum;\r\n return firstNum;\r\n \r\n }", "public int getNumerator()\r\n {\r\n return numerator;\r\n }", "public static void displayFractionalUndIngeralFromDoubleNumber(){\n\t\tSystem.out.println(\"please enter a double number: \");\n\t\tScanner scann=new Scanner(System.in);\n\t\tdouble x=scann.nextDouble();\n\t\tdouble fractional_part=x%1;\n\t\tdouble integral_part=x-fractional_part;\n\t\tSystem.out.println(\"The integral part of (\" +x +\" ) is: \" +integral_part);\n\t\tSystem.out.println(\"The fractional part of ( \" +x +\" ) is: \" +fractional_part);\n\t}", "private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Divide by zero error: \" + numerator + \"/\" + denominator);\r\n\t\t}\r\n\t\tint gcd;\r\n\t\tif(numerator >= denominator)\r\n\t\t{\r\n\t\t\tgcd = gcd(numerator, denominator);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgcd = gcd(denominator, numerator);\r\n\t\t}\r\n\t\tnumerator /= gcd;\r\n\t\tdenominator /= gcd;\r\n\t\tif(denominator == 1)\r\n\t\t{\r\n\t\t\t//Quotient is integer\r\n\t\t\treturn new Rational(numerator);\r\n\t\t}\t\t\r\n\t\t//Negative denominator\r\n\t\tif(denominator < 0)\t\t\t\r\n\t\t{\r\n\t\t\tdenominator *= -1;\r\n\t\t\tnumerator *= -1;\r\n\t\t}\r\n\t\t//Quotient is fraction\r\n\t\treturn new FullExpression(new Rational(numerator), new Rational(denominator), Operator.QUOT);\r\n\t}", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "public void setFraction(int fraction) {\n this.fraction = fraction;\n }", "public int getNumerator() {\n return numerator; \n }", "protected final int calculateInterst1(int pr){\n\t\t return pr*10*1/100;\n\t }", "public Fraction(long numerator){\n this.numerator = (int)numerator;\n this.denominator = 1;\n }", "public static int fractionDigits(String percent) {\n\t return BCMath.numberPrecision(percent) + 8;\n }", "public int getNumerator() {\n return this.numerator;\n }", "public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}", "public int getNumerator()\n\t{\n\t\treturn numerator;\n\t}", "public int getNumerator() {\n return numerator;\n }", "@Override\n public int compareTo(Fraction in) {\n double thisQuotient = numerator/denominator;\n double inQuotient = in.getNumerator()/in.getDenominator();\n if (thisQuotient > inQuotient) {\n return 1;\n } else if (thisQuotient < inQuotient) {\n return -1;\n }\n return 0;\n }", "public Fraction getFraction() {\n return fraction;\n }", "public FractionImpl(int wholeNumber) {\n\n //set implicit denominator to 1, handle printing with the toString method\n\n this.numerator = wholeNumber;\n this.denominator = 1;\n }", "public String getSubInt() {\n this.subInt();\n return this.subintegral;\n\n }", "public int getNumerator() {\r\n\t\treturn numerator;\r\n\t}", "public int getInteger(String subExpression) {\n return (int)getNumber(subExpression);\n }", "public List<Integer> getFractionIds() {\n return fractionIds;\n }", "BaseNumber divide(BaseNumber operand);", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "public int getNumberOfPeptidePerFraction() {\n return numberOfPeptidePerFraction;\n }", "int getRatioQuantity();", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public static void main(String[] args) {\n\n double fraction = 1/2.0;\n System.out.println(fraction);\n\n //Modules is the remainder of a division problem\n //25 % 6 = 1\n //31 % 5 = 1\n //17 % 3 = 2\n //4 % 2 = 0\n //5 % 2 = 1\n //6 % 2 = 0\n //121 % 100 = 21\n // 47 % 15 = 2\n //55 % 15 =10\n\n //5 + 2 * 4 =\n //12 / 2 - 4 =\n //4 + 17 % 2 -1 =\n //4 + 5 * 2 / 2 + 1 =\n //4 * (6 + 3 * 2) + 7 =\n\n System.out.println(5 + 2 * 4);\n System.out.println (12 / 2 -4);\n System.out.println(4 + 17 % 2 - 1);\n System.out.println(4 + 5 * 2 / 2 + 1);\n System.out.println(4 * (6 + 3 *2) + 7);\n\n\n }", "public FractionImpl(String fraction) {\n\n //use the trim String method to remove white space before and after the fraction characters\n\n String trimmed = fraction.trim();\n\n //whole number procedure - if no \"/\" is present\n\n if (!trimmed.contains(\"/\")) {\n this.numerator = Integer.parseInt(trimmed);\n this.denominator = 1;\n }\n\n //fraction procedure - split on \"/\" then convert string numbers to int and pass to the normalise function\n\n else {\n String[] bits = trimmed.split(\"/\");\n\n this.numerator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[0];\n this.denominator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[1];\n }\n\n\n }", "public SortFractions(String fraction) {\n String[] fArray = fraction.split(\"/\");\n numerator = Integer.parseInt(fArray[0]);\n denominator = Integer.parseInt(fArray[1]);\n this.sol = numerator / denominator; \n }", "public static String convertMixedNumber(String originalFraction)\r\n {\r\n\t\tint slash = originalFraction.indexOf('/');\r\n \tint underscore = originalFraction.indexOf('_');\r\n\t\tif (originalFraction.contains(\"-\"))\r\n\t\t{\r\n\t\t\tint wholeNumber = Integer.parseInt(originalFraction.substring(1, underscore));\r\n\t\t\tint num = Integer.parseInt(originalFraction.substring(underscore + 1, slash));\r\n\t\t\tint denom = Integer.parseInt(originalFraction.substring(slash + 1, originalFraction.length()));\r\n\t\t\tint num1 = (denom * wholeNumber + num) * -1;\r\n\t\t\tString improperFraction = num1 + \"/\" + denom;\r\n\t\t\treturn improperFraction;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\tint wholeNumber = Integer.parseInt(originalFraction.substring(0, underscore));\r\n\t\tint num = Integer.parseInt(originalFraction.substring(underscore + 1, slash));\r\n\t\tint denom = Integer.parseInt(originalFraction.substring(slash + 1, originalFraction.length()));\r\n\t\tint num1 = (denom * wholeNumber) + num;\r\n\t\tString improperFraction = num1 + \"/\" + denom;\r\n\t\treturn improperFraction;\r\n\t\t}\r\n }", "public DigitsValidator(int integer, int fraction) {\n this.integer = integer;\n this.fraction = fraction;\n }", "public static int getPeriod(int i) {\n int count = 1;\n int mod = 10 % i;\n //If i is not divisible by 2 or 5, compute.\n //If i is divisible by 2 or 5, it's period is had in a smaller number\n if(i%2!=0 && i%5 !=0) {\n //While mod is not 1, multiply by 10 and mod with i, increment period.\n while(mod != 1) {\n mod = mod * 10;\n mod = mod % i;\n count++;\n }\n }\n return count;\n \n }", "Rational(int num, int denom){\r\n // If fraction is negative, the numerator is negative\r\n numerator = (denom < 0 ? -num : num);\r\n denominator = (denom < 0 ? -denom : denom);\r\n reduce();\r\n }", "public String toFractionString() {\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "int getRemainder(int num, int divisor) {\n\t\treturn (num - divisor * (num/divisor));\n\t}", "public Fraction(){\n\t\n\t\tsetFraction(0,1);\n }", "public Fraction div(Fraction f) {\n /** Accounts for the input of a negative fraction */\n if(f.getNumerator() < 0)\n return new Fraction( (-1) * (this.numerator * f.getDenominator()), Math.abs(this.denominator * f.getNumerator()));\n return new Fraction( (this.numerator * f.getDenominator()), (this.denominator * f.getNumerator()));\n }", "private void reduce() {\n /** The fraction is equal to 0. The numerator is 0 in this case */\n if(this.numerator == 0)\n this.denominator = 1;\n /** The numerator and denominator are not equal */\n else if (this.numerator != this.denominator) {\n\n /** The greatest common divisor of the numerator and denominator of this fraction */\n int gcd = getGCD(Math.abs(this.numerator), Math.abs(this.denominator));\n\n /** There is a greatest common divisor greater than 1 */\n if (gcd > 1) {\n this.numerator /= gcd;\n this.denominator /= gcd;\n }\n } \n /** The fraction is equal to 1 */\n else {\n this.numerator = 1;\n this.denominator = 1;\n }\n }", "public static int [] toImproperFrac(int [] operand) { \r\n \tint [] newFrac = new int [2];\r\n \tif (operand[0] != 0) {\r\n \t if (operand[0] > 0 && operand.length != 2) {\r\n \tnewFrac[0] = (operand[0] * operand[2]) + operand[1]; \r\n \tnewFrac[1] = operand[2];\r\n \t//if the mixed number is positive, then multiply whole by denominator then add numerator\r\n \t} \r\n \telse if (operand[0] < 0 && operand.length != 2){\r\n \tnewFrac[0] = (operand[0] * operand[2]) - operand[1];\r\n \tnewFrac[1] = operand[2];\r\n \t}\r\n \telse {\r\n \t\tnewFrac = operand;\r\n \t}\r\n \t}\r\n \telse {\r\n \t\tnewFrac[0] = operand[1];\r\n \t\tnewFrac[1] = operand[2];\r\n \t}\r\n \treturn newFrac;\r\n }", "public int getInterdigitInterval();", "public int getDenominator() { \n return denominator; \n }", "private int getInt(int n) {\n if (n < 0)\n return 0;\n if (n >= mag.length)\n return signInt();\n\n int magInt = mag[mag.length-n-1];\n\n return (signum >= 0 ? magInt :\n (n <= firstNonzeroIntNum() ? -magInt : ~magInt));\n }", "public static int getFinalNumerator(int whole, int improperNumerator, int denominator) {\n if (whole <= 0) {\n if (denominator < 0 && improperNumerator > 0 || denominator > 0 && improperNumerator < 0) {\n improperNumerator = -improperNumerator;\n }\n }\n return improperNumerator % denominator;\n }", "public void setNumerator(int num)\r\n {\r\n this.numerator = num;\r\n }", "boolean getFractional();", "public Fraction(int numerator, int denominator){\n this.numerator= numerator;\n this.denominator = denominator;\n }", "public static float ipart (double x) {\n\t\tFloat a;\r\n\t\tif (x != 0) {\r\n\t\ta = new Float(x/Math.abs(x) * Math.floor(Math.abs(x)));\r\n\t\t}\r\n\t\telse {\r\n\t\t a=new Float(0);\r\n\t\t}\r\n\t\treturn a.floatValue();\r\n\t}", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "public static int [] reduceFrac(int [] operand) {\r\n \tint [] simpleFrac = new int [3]; \r\n \tint whole = operand[0]/operand[1];\r\n \toperand[0] = (operand[0]%operand[1]);\r\n \tif (whole != 0) {\r\n \toperand[0] = Math.abs(operand[0]);\r\n \t}\r\n \r\n \tint factor = gcf(operand);\r\n \tint numerator = operand[0]/factor;\r\n \tint denominator = Math.abs(operand[1]/factor); \r\n \t\t\tsimpleFrac[0] = whole; \r\n \t\t\tsimpleFrac[1] = numerator;\r\n \t\t\tsimpleFrac[2] = denominator; \r\n \t\treturn simpleFrac; \r\n\r\n }", "private void simplify()\n\t{\n\t\tint gcd=1;\n\t\tint smallest= Math.min(numerator, denominator);\n\t\tfor(int i=2;i<=smallest;i++)\n\t\t{\n\t\t\tif(numerator%i==0 && denominator%i==0)\n\t\t\t{\n\t\t\t\tgcd=i;\n\t\t\t}\n\t\t}\n\t\t//To get the fraction into its simplest form we divide the numerator and denominator with their gcd\n\t\tnumerator= numerator/gcd;\n\t\tdenominator= denominator/gcd;\n\t}", "public static int getDigits(int i) {\n\t\tif (i < 10) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 1 + getDigits(i / 10);\n\t}", "public int getDenominator()\r\n {\r\n return denominator;\r\n }", "public int compareTo(Fraction frac)\n\t{\n\t\tint implicitFraction = myNumerator * frac.myDenominator;\n\t\tint explicitFraction = frac.myNumerator * myDenominator;\n\t\treturn implicitFraction - explicitFraction;\n\t}", "public static String toMixedNum(int numerator, int denominator) {\n \tint whole=numerator/denominator;\t\t//make variable to store whole number by dividing num and denom\r\n\t\tint newnumerator=numerator%denominator;\t//get newnum by doing num mod denom\r\n\t\t\r\n\t\tif(whole<0) {\t\t\t//if whole number is negative and the new num is neg as well,\r\n\t\t\tnewnumerator *= -1;\t// make the new num positive\r\n\t\t}\r\n\t\tif(newnumerator==0 && whole==0) {\t//if the frac is 0 all-around\r\n\t\t\treturn \"0\";\t\t\t\t\t\t//return 0\r\n\t\t}\r\n\t\tif(newnumerator==0) {\t//if the num is 0 it's most likely\r\n\t\t\treturn whole + \"\";\t//just a whole number\r\n\t\t}\r\n\t\tif(newnumerator<0 && denominator<0) {\t//if the num and denom is both neg\r\n\t\t\tnewnumerator *= -1;\t\t\t\t\t//then the frac itself should be negative\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(denominator<0) {\t\t\t\t//if denom is negative \r\n\t\t\tnewnumerator *= -1;\t\t\t//multiply both num and denom by -1 to get a postitive denom and neg num\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(whole==0) {\t\t\t//if the whole num is 0\r\n\t\t\treturn simplify(newnumerator, denominator);\t//then it should just return num/denom\r\n\t\t}\r\n\t\treturn whole + \"_\"+ simplify(newnumerator, denominator); //return statement of the whole mixed frac\r\n }", "public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator * f.numerator);\n }", "void setDefaultFractionCounter(int defaultFractionCounter);", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public int indexOf(Fraction x)\r\n\t{\r\n\t\tfor(int i=0;i<n;i++)\r\n\t\t\tif(x.gettu()==a[i].gettu() && x.getmau()==a[i].getmau())\r\n\t\t\t\treturn i;\r\n\t\treturn -1;\r\n\t}", "public int getIntegerValue()\n {\n// if (val != Math.round(val))\n// System.err.println(\"IntegerYoVariable: returning a different value than what it used to be.\");\n return val;\n }", "public int division(){\r\n return Math.round(x/y);\r\n }", "public int getDenominator()\n {\n return this.denominator;\n }", "public Fraction simplify(){\n long n = this.numerator;\n long d = this.denominator;\n for(long k = d; k >= 1; k--){\n if(n % k == 0 && d % k == 0) {\n n = n / k;\n d = d / k;\n break;\n }\n }\n return new Fraction(n,d);\n }", "public Fraction dividedBy(Fraction other) {\n Fraction end = times(other.getReciprocal());\n\n return end;\n\n }", "public Fraction(long numerator, long denominator){\n this.numerator= (int)numerator;\n this.denominator = (int)denominator;\n }", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "public static int reduceNumerator(int numerator, int denominator) {\n int start;\n int greatestCommonFactor = 1;\n if (numerator > denominator) {\n start = numerator;\n } else {\n start = denominator;\n }\n if (start != 0) {\n while (greatestCommonFactor != start) {\n if (numerator % start == 0 && denominator % start == 0) {\n greatestCommonFactor = start;\n start++;\n }\n start--;\n }\n }\n return numerator / greatestCommonFactor;\n }", "private int convertToBase() {\n if (numResultsPerPage == 100) {\n return pageNumber;\n } else {\n return (pageNumber - 1) * numResultsPerPage / 100 + 1;\n }\n }", "private int parent(int i) {\n double d = (double) i;\n d = Math.floor((d - 1) / 2);\n return (int) d;\n\n }", "private double IntegerParseIn(double Precio) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public Fraction sub(Fraction f) {\n /** Denominators equal */\n if( f.getDenominator() == this.denominator )\n return new Fraction( this.numerator - f.getNumerator(), this.denominator);\n \n /** Denominators different */\n \n /** The least common multiple found between both denominators. */\n int lcd = getLCD(this.denominator, f.getDenominator());\n\n /** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */\n return new Fraction( (lcd / this.denominator * this.numerator) - (lcd / f.getDenominator() * f.getNumerator()), lcd);\n }", "public static Fraction toFraction (double f, int d) {\n if (d > 0)\n return new Fraction ((int)(Math.round (f*d)), d);\n else\n throw new ArithmeticException (\" illegal denominator \");\n }", "public Fraction(int numerator, int denominator){\n \n\t\tsetFraction(numerator, denominator);\n }" ]
[ "0.6699341", "0.6492069", "0.6459511", "0.6432813", "0.6381435", "0.6287398", "0.6245742", "0.62435764", "0.6211786", "0.61982024", "0.6178816", "0.6153206", "0.6112426", "0.6047947", "0.60400856", "0.6038618", "0.60210025", "0.60173887", "0.5997904", "0.59404945", "0.58755684", "0.5869877", "0.5867703", "0.5835522", "0.58338153", "0.5828044", "0.58014524", "0.57862025", "0.57714975", "0.5768528", "0.5768303", "0.5761759", "0.57517946", "0.57363343", "0.573014", "0.5721945", "0.5706493", "0.5701432", "0.56729084", "0.5635368", "0.5628284", "0.5609986", "0.56053513", "0.56009644", "0.55888796", "0.5567871", "0.55521303", "0.5545791", "0.5513685", "0.5505901", "0.55043745", "0.5491634", "0.5490375", "0.548011", "0.5474874", "0.54739434", "0.5460823", "0.5456559", "0.54547125", "0.54520506", "0.5413257", "0.5389825", "0.5382597", "0.5377277", "0.53744876", "0.53657895", "0.5363071", "0.53630066", "0.53615946", "0.5360044", "0.53465444", "0.5345515", "0.534531", "0.5334407", "0.5324646", "0.5324586", "0.53165394", "0.53034455", "0.5294631", "0.52862877", "0.5285421", "0.5277051", "0.52454776", "0.52299833", "0.5222412", "0.5221395", "0.5212165", "0.52099735", "0.5207385", "0.5200243", "0.51895607", "0.5188893", "0.5183502", "0.51833767", "0.51799476", "0.5178279", "0.5178103", "0.51769274", "0.51760304", "0.51672024" ]
0.7329721
0
Extract fraction part of the (improper) fraction (a proper fraction without the integer part).
public Fraction fractionPart() { return new Fraction (numerator - denominator*integerPart(), denominator) .reduce(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String get_fraction_part();", "public static String parseExpressionForFirstFraction(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n return frac1;\n }", "public static int parseFractionForNumerator(String fraction) {\n int length = fraction.length();\n int underscore = fraction.indexOf(\"_\");\n int slash = fraction.indexOf(\"/\");\n String numerator = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n if (slash != -1) { // underscore and a slash ==> mixed number\n numerator = fraction.substring(underscore + 1, slash);\n }\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n numerator = fraction.substring(0, slash);\n } else { // no underscore and no slash ==> whole number\n numerator = \"0\";\n }\n }\n int numeratorNumber = Integer.parseInt(numerator);\n String whole = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n whole = fraction.substring(0, underscore);\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n whole = \"0\";\n } else { // no underscore and no slash ==> whole number\n whole = fraction.substring(0, length);\n }\n }\n int wholeNumber = Integer.parseInt(whole);\n if (wholeNumber < 0) {\n numeratorNumber = -numeratorNumber;\n }\n return numeratorNumber;\n }", "public static int findDenominator(String fraction) {\n \tif(fraction.contains(\"/\")) {\t//check to see if it has a /\r\n \t\tint denominator= Integer.parseInt(fraction.substring(fraction.indexOf(\"/\")+1,fraction.length( )));\t//use substring to get numbers from / to the frac length; make variable\r\n \t\treturn denominator;\t//return the number\r\n \t} else {\r\n \t\treturn 1; //else if it's a whole number return 1\r\n \t}\r\n }", "public abstract String getFraction();", "public String getFraction() {\n return fraction;\n }", "public static int parseFractionForWholeNumber(String fraction) {\n int length = fraction.length();\n int underscore = fraction.indexOf(\"_\");\n int slash = fraction.indexOf(\"/\");\n String whole = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n whole = fraction.substring(0, underscore);\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n whole = \"0\";\n } else { // no underscore and no slash ==> whole number\n whole = fraction.substring(0, length);\n }\n }\n int wholeNumber = Integer.parseInt(whole);\n return wholeNumber;\n }", "public static int findNumerator(String fraction) {\n \tif(fraction.contains(\"_\")) {\t//check if the frac has an _\r\n \t\tint numerator= Integer.parseInt(fraction.substring(fraction.indexOf(\"_\") +1, fraction.indexOf(\"/\")));\t//if so use substring from _ to the /; convert to int ant make variable for numerator\r\n \t\treturn numerator;\t//return the numerator\r\n \t} else {\r\n \t\tif(fraction.contains(\"/\")) {\t//check if the frac just had a /\r\n \t\t\tint numeratorSlash= Integer.parseInt(fraction.substring(0, fraction.indexOf(\"/\")));\t//use substring to get numbers from index 0 to / ; make variable and convert to int\r\n \t\t\treturn numeratorSlash;\t//return the number\r\n \t\t} \r\n \t}\r\n \treturn 0;\t//else if it doesnt apply to any of the conditionals above it's most likely a whole number so just return 0\r\n }", "private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}", "public static int findWhole(String fraction) {\t//method to find the whole #\r\n \tif(fraction.contains(\"_\")) {\t//check if the fraction has an _\r\n \t\tint whole= Integer.parseInt(fraction.substring(0, fraction.indexOf(\"_\"))); //if so use substring to get num from index 0 to the _ ; set as a variable\r\n \t\treturn whole;\t//return the number; use parseint to convert answer to an int\r\n \t} else {\r\n \t\tif(fraction.contains(\"/\")) { //else if it contains a /\r\n \t\t\treturn 0;\t//just return a 0\r\n \t\t} \r\n \t\treturn Integer.parseInt(fraction); //if it doesnt match any of conditionals then its probably just a whole num so just return it; convert to int\r\n \t}\t\t\r\n }", "public FractionImpl(String fraction) {\n\n //use the trim String method to remove white space before and after the fraction characters\n\n String trimmed = fraction.trim();\n\n //whole number procedure - if no \"/\" is present\n\n if (!trimmed.contains(\"/\")) {\n this.numerator = Integer.parseInt(trimmed);\n this.denominator = 1;\n }\n\n //fraction procedure - split on \"/\" then convert string numbers to int and pass to the normalise function\n\n else {\n String[] bits = trimmed.split(\"/\");\n\n this.numerator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[0];\n this.denominator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[1];\n }\n\n\n }", "public SortFractions(String fraction) {\n String[] fArray = fraction.split(\"/\");\n numerator = Integer.parseInt(fArray[0]);\n denominator = Integer.parseInt(fArray[1]);\n this.sol = numerator / denominator; \n }", "private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Divide by zero error: \" + numerator + \"/\" + denominator);\r\n\t\t}\r\n\t\tint gcd;\r\n\t\tif(numerator >= denominator)\r\n\t\t{\r\n\t\t\tgcd = gcd(numerator, denominator);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgcd = gcd(denominator, numerator);\r\n\t\t}\r\n\t\tnumerator /= gcd;\r\n\t\tdenominator /= gcd;\r\n\t\tif(denominator == 1)\r\n\t\t{\r\n\t\t\t//Quotient is integer\r\n\t\t\treturn new Rational(numerator);\r\n\t\t}\t\t\r\n\t\t//Negative denominator\r\n\t\tif(denominator < 0)\t\t\t\r\n\t\t{\r\n\t\t\tdenominator *= -1;\r\n\t\t\tnumerator *= -1;\r\n\t\t}\r\n\t\t//Quotient is fraction\r\n\t\treturn new FullExpression(new Rational(numerator), new Rational(denominator), Operator.QUOT);\r\n\t}", "public Fraction getFraction() {\n return fraction;\n }", "public static String reduceFraction(String mixedAnswer)\r\n {\r\n \tint underscore = mixedAnswer.indexOf('_');\r\n \tint slash = mixedAnswer.indexOf('/');\r\n \tint num = Integer.parseInt(mixedAnswer.substring(underscore + 1, slash));\r\n \tint denom = Integer.parseInt(mixedAnswer.substring(slash + 1, mixedAnswer.length()));\r\n \tint newNum = num / findGCF(num, denom);\r\n \tint newDenom = denom / findGCF(num, denom);\r\n \tString reducedFraction = newNum + \"/\" + newDenom;\r\n \treturn reducedFraction; \r\n }", "public String toFractionString() {\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "public String fractionAddition1(String expression) {\n Scanner s = new Scanner(expression).useDelimiter(\"/|(?=[-+])\");\n long num = 0, den = 1;\n while (s.hasNext()) {\n long a = s.nextLong(), b = s.nextLong();\n num = num * b + a * den;\n den *= b;\n }\n long gcd = gcd(num, den);\n return (num / gcd) + \"/\" + (den / gcd);\n }", "void milestone2(double num){\n System.out.println(\"Integer part: \" + (int)num);\n double fractionPart = num - (int)num;\n fractionPart *= 100;\n System.out.println(\"Fractional part: \" + (int)fractionPart);\n }", "public static int [] reduceFrac(int [] operand) {\r\n \tint [] simpleFrac = new int [3]; \r\n \tint whole = operand[0]/operand[1];\r\n \toperand[0] = (operand[0]%operand[1]);\r\n \tif (whole != 0) {\r\n \toperand[0] = Math.abs(operand[0]);\r\n \t}\r\n \r\n \tint factor = gcf(operand);\r\n \tint numerator = operand[0]/factor;\r\n \tint denominator = Math.abs(operand[1]/factor); \r\n \t\t\tsimpleFrac[0] = whole; \r\n \t\t\tsimpleFrac[1] = numerator;\r\n \t\t\tsimpleFrac[2] = denominator; \r\n \t\treturn simpleFrac; \r\n\r\n }", "public void setFraction(int fraction) {\n this.fraction = fraction;\n }", "public static int convertToImproperFractionNumerator(int whole, int numerator, int denominator) {\n numerator = (denominator * whole) + numerator;\n return numerator;\n }", "public static String convertMixedNumber(String originalFraction)\r\n {\r\n\t\tint slash = originalFraction.indexOf('/');\r\n \tint underscore = originalFraction.indexOf('_');\r\n\t\tif (originalFraction.contains(\"-\"))\r\n\t\t{\r\n\t\t\tint wholeNumber = Integer.parseInt(originalFraction.substring(1, underscore));\r\n\t\t\tint num = Integer.parseInt(originalFraction.substring(underscore + 1, slash));\r\n\t\t\tint denom = Integer.parseInt(originalFraction.substring(slash + 1, originalFraction.length()));\r\n\t\t\tint num1 = (denom * wholeNumber + num) * -1;\r\n\t\t\tString improperFraction = num1 + \"/\" + denom;\r\n\t\t\treturn improperFraction;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\tint wholeNumber = Integer.parseInt(originalFraction.substring(0, underscore));\r\n\t\tint num = Integer.parseInt(originalFraction.substring(underscore + 1, slash));\r\n\t\tint denom = Integer.parseInt(originalFraction.substring(slash + 1, originalFraction.length()));\r\n\t\tint num1 = (denom * wholeNumber) + num;\r\n\t\tString improperFraction = num1 + \"/\" + denom;\r\n\t\treturn improperFraction;\r\n\t\t}\r\n }", "private void simplify()\n\t{\n\t\tint gcd=1;\n\t\tint smallest= Math.min(numerator, denominator);\n\t\tfor(int i=2;i<=smallest;i++)\n\t\t{\n\t\t\tif(numerator%i==0 && denominator%i==0)\n\t\t\t{\n\t\t\t\tgcd=i;\n\t\t\t}\n\t\t}\n\t\t//To get the fraction into its simplest form we divide the numerator and denominator with their gcd\n\t\tnumerator= numerator/gcd;\n\t\tdenominator= denominator/gcd;\n\t}", "public abstract double getFractionMultiplier();", "public Fraction simplify(){\n long n = this.numerator;\n long d = this.denominator;\n for(long k = d; k >= 1; k--){\n if(n % k == 0 && d % k == 0) {\n n = n / k;\n d = d / k;\n break;\n }\n }\n return new Fraction(n,d);\n }", "public String fractionToDecimal(int numerator, int denominator) {\n if(numerator == 0) return \"0\";\n \n StringBuilder sb = new StringBuilder();\n //key is remainder, value is len of curr sb, which is starting index of this remainder \n HashMap<Long, Integer> hs = new HashMap<Long, Integer>();\n \n //convert to long to prevent overflow\n long n = (long) numerator;\n long d = (long) denominator;\n \n //catch negative sign\n if( (n < 0) ^ (d < 0) ){\n sb.append(\"-\");\n n = Math.abs(n);\n d = Math.abs(d);\n }\n \n sb.append(n/d);\n long remainder = n%d;\n \n if(remainder == 0) return sb.toString();\n \n sb.append(\".\");\n \n //we will process inputs until we face a visited remainder again\n //in case inputs are dividable, we will return result inside the loop\n while( !hs.containsKey(remainder) ){\n \t//each loop we will start with a new remainder from last loop\n \t\n //record curr remainder and its starting index\n hs.put( remainder, sb.length() );\n \n //update remainder like what we did in math division\n remainder *= 10;\n \n sb.append( remainder/d );\n \n //update remainder to get next remainder\n remainder %= d;\n \n //inputs are dividable\n if(remainder == 0) return sb.toString();\n }\n \n //we get here only when we have Recurring Decimal, add \"(\" based on hashMap value \n sb.insert( hs.get(remainder), \"(\" ).append(\")\");\n \n return sb.toString();\n }", "public void setFraction(String fraction) {\n this.fraction = fraction == null ? null : fraction.trim();\n }", "public static void displayFractionalUndIngeralFromDoubleNumber(){\n\t\tSystem.out.println(\"please enter a double number: \");\n\t\tScanner scann=new Scanner(System.in);\n\t\tdouble x=scann.nextDouble();\n\t\tdouble fractional_part=x%1;\n\t\tdouble integral_part=x-fractional_part;\n\t\tSystem.out.println(\"The integral part of (\" +x +\" ) is: \" +integral_part);\n\t\tSystem.out.println(\"The fractional part of ( \" +x +\" ) is: \" +fractional_part);\n\t}", "public Fraction div(Fraction f) {\n /** Accounts for the input of a negative fraction */\n if(f.getNumerator() < 0)\n return new Fraction( (-1) * (this.numerator * f.getDenominator()), Math.abs(this.denominator * f.getNumerator()));\n return new Fraction( (this.numerator * f.getDenominator()), (this.denominator * f.getNumerator()));\n }", "public static Fraction valueOf (String s) {\n StringTokenizer st = new StringTokenizer (s, \"/<>[](),\");\n int num = 0;\n int den = 1;\n if (st.hasMoreTokens()) {\n num = Integer.parseInt (st.nextToken().trim());\n } else {\n throw new IllegalArgumentException (\"not fraction \" + s);\n }\n if (st.hasMoreTokens()) {\n den = Integer.parseInt (st.nextToken());\n } else {\n // throw new IllegalArgumentException (\"not fraction \" + s);\n den = 1;\n }\n if (st.hasMoreTokens()) {\n throw new IllegalArgumentException (\"not fraction \" + s);\n }\n return new Fraction (num, den);\n }", "public Coord simplifyAsFraction() {\n int gcd = gcd();\n return new Coord(row / gcd, column / gcd);\n }", "public static String parseExpressionForSecondFraction(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n String operator = expression.substring(space + 1, space + 2);\n int length = expression.length();\n String frac2 = expression.substring(space + 3, length);\n return frac2;\n }", "public int getFractionsNumber() {\n return fractionsNumber;\n }", "private int getRemainder (int numerator, int denominator)\n {\n if (denominator >= numerator)\n return 0;\n\n int diff = numerator;\n while (diff >= denominator)\n {\n diff = diff - denominator;\n }\n\n return diff;\n }", "public Fraction sub(Fraction f) {\n /** Denominators equal */\n if( f.getDenominator() == this.denominator )\n return new Fraction( this.numerator - f.getNumerator(), this.denominator);\n \n /** Denominators different */\n \n /** The least common multiple found between both denominators. */\n int lcd = getLCD(this.denominator, f.getDenominator());\n\n /** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */\n return new Fraction( (lcd / this.denominator * this.numerator) - (lcd / f.getDenominator() * f.getNumerator()), lcd);\n }", "public String fractionToDecimal(int numerator, int denominator) {\n \n if (numerator == 0) return \"0\";\n\n StringBuilder fraction = new StringBuilder();\n // the use of ^\n if (numerator < 0 ^ denominator < 0) {\n fraction.append(\"-\");\n }\n\n // avoid over follow \n long dividend = Math.abs(Long.valueOf(numerator));\n long divisor = Math.abs(Long.valueOf(denominator));\n\n fraction.append(String.valueOf(dividend / divisor));\n long remainder = dividend % divisor;\n if (remainder == 0) {\n return fraction.toString();\n }\n\n fraction.append(\".\");\n Map<Long, Integer> map = new HashMap<>();\n while (remainder != 0) {\n\n // check if current remainder has repeat, if so, include () and stop\n if (map.containsKey(remainder)) {\n fraction.insert(map.get(remainder), \"(\");\n fraction.append(\")\");\n break;\n }\n\n map.put(remainder, fraction.length());\n remainder *= 10;\n fraction.append(String.valueOf(remainder / divisor));\n remainder %= divisor;\n }\n\n return fraction.toString();\n }", "public static String toMixedNum(int numerator, int denominator) {\n \tint whole=numerator/denominator;\t\t//make variable to store whole number by dividing num and denom\r\n\t\tint newnumerator=numerator%denominator;\t//get newnum by doing num mod denom\r\n\t\t\r\n\t\tif(whole<0) {\t\t\t//if whole number is negative and the new num is neg as well,\r\n\t\t\tnewnumerator *= -1;\t// make the new num positive\r\n\t\t}\r\n\t\tif(newnumerator==0 && whole==0) {\t//if the frac is 0 all-around\r\n\t\t\treturn \"0\";\t\t\t\t\t\t//return 0\r\n\t\t}\r\n\t\tif(newnumerator==0) {\t//if the num is 0 it's most likely\r\n\t\t\treturn whole + \"\";\t//just a whole number\r\n\t\t}\r\n\t\tif(newnumerator<0 && denominator<0) {\t//if the num and denom is both neg\r\n\t\t\tnewnumerator *= -1;\t\t\t\t\t//then the frac itself should be negative\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(denominator<0) {\t\t\t\t//if denom is negative \r\n\t\t\tnewnumerator *= -1;\t\t\t//multiply both num and denom by -1 to get a postitive denom and neg num\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(whole==0) {\t\t\t//if the whole num is 0\r\n\t\t\treturn simplify(newnumerator, denominator);\t//then it should just return num/denom\r\n\t\t}\r\n\t\treturn whole + \"_\"+ simplify(newnumerator, denominator); //return statement of the whole mixed frac\r\n }", "public static int [] toImproperFrac(int [] operand) { \r\n \tint [] newFrac = new int [2];\r\n \tif (operand[0] != 0) {\r\n \t if (operand[0] > 0 && operand.length != 2) {\r\n \tnewFrac[0] = (operand[0] * operand[2]) + operand[1]; \r\n \tnewFrac[1] = operand[2];\r\n \t//if the mixed number is positive, then multiply whole by denominator then add numerator\r\n \t} \r\n \telse if (operand[0] < 0 && operand.length != 2){\r\n \tnewFrac[0] = (operand[0] * operand[2]) - operand[1];\r\n \tnewFrac[1] = operand[2];\r\n \t}\r\n \telse {\r\n \t\tnewFrac = operand;\r\n \t}\r\n \t}\r\n \telse {\r\n \t\tnewFrac[0] = operand[1];\r\n \t\tnewFrac[1] = operand[2];\r\n \t}\r\n \treturn newFrac;\r\n }", "public Fraction dividedBy(Fraction other) {\n Fraction end = times(other.getReciprocal());\n\n return end;\n\n }", "public String simplify(){\n\n int simp = gcd(numerator, denominator);\n numerator = (numerator/simp);\n denominator = (denominator/simp);\n if (denominator == 1){\n return (numerator + \"\");\n }\n if (numerator > denominator){\n int first = (numerator/denominator);\n numerator = (numerator%denominator);\n return (first + \"_\" + numerator + \"/\" + denominator);\n }\n else {\n return (numerator + \"/\" + denominator);\n }\n\n }", "public Fraction(String s)\r\n {\r\n StringTokenizer st = new StringTokenizer(s, \"/\"); \r\n String p1 = st.nextToken();\r\n String p2 = st.nextToken();\r\n StringTokenizer noPara1 = new StringTokenizer(p1, \"(\");\r\n p1 = noPara1.nextToken();\r\n StringTokenizer noPara2 = new StringTokenizer(p2, \")\");\r\n p2 = noPara2.nextToken();\r\n this.numerator = Integer.parseInt(p1);\r\n this.denominator = Integer.parseInt(p2);\r\n this.reduce();\r\n }", "public static Fraction toFraction (double f, int d) {\n if (d > 0)\n return new Fraction ((int)(Math.round (f*d)), d);\n else\n throw new ArithmeticException (\" illegal denominator \");\n }", "public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator * f.numerator);\n }", "public static BigDecimal frac(BigDecimal bd)\n {\n return bd.remainder (BigDecimal.ONE);\n }", "public Fraction(String expression) throws NumberFormatExpression {\n String[] tokens = expression.split(\"/\");\n \n // two tokens - numerator and denominator\n if (tokens.length != 2) {\n throw new NumberFormatExpression(expression \n + \" is not a valid fraction.\");\n }\n \n // make sure numerator and denominator are numbers\n for (String t : tokens) {\n if (!t.matches(\"^[0-9]*$\")) {\n throw new NumberFormatException(t + \" is not a number.\");\n }\n }\n \n this.expression = expression;\n numerator = Double.parseDouble(tokens[0]);\n denominator = Double.parseDouble(tokens[1]);\n \n if (denominator == 0) {\n throw new ArithmeticException(expression \n + \" invalid. Cannot divide by 0.\");\n }\n }", "Rational divide(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n\n firstarg.numerator=firstarg.numerator*p.denominator;\n firstarg.denominator=p.numerator*firstarg.denominator;\n return firstarg;\n }", "private Fraction reduce() {\n Fraction f = null;\n try {\n f = (Fraction)clone();\n } catch (CloneNotSupportedException e) {};\n if (denominator == 0)\n throw new ArithmeticException (\" illegal denominator zero \");\n if (denominator < 0) {\n f.numerator = -numerator;\n f.denominator = -denominator;\n }\n if (numerator == 0)\n f.denominator = 1;\n else {\n int n = gcd (numerator, denominator);\n f.numerator = numerator / n;\n f.denominator = denominator / n;\n }\n return f;\n }", "public static int getWholeFromImproper(int improperNumerator, int denominator) {\n return improperNumerator/denominator;\n }", "Rational subtract(Rational p){\n\n Rational firstarg =new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n firstarg=firstarg.lowestform();\n p=p.lowestform();\n //need to get it in it's lowest form before you can work with it\n int tempgcd=gcd(firstarg.denominator,p.denominator);\n if(firstarg.denominator==p.denominator)\n {\n // if both denominators are the same just got to add the numerator\n p.numerator=firstarg.numerator-p.numerator;;\n return p;\n }\n else if(tempgcd==1)\n {\n int tempdenominator=p.denominator;\n\n p.denominator=firstarg.denominator*p.denominator;\n p.numerator=p.numerator*firstarg.denominator;\n\n //calculate the second fraction\n firstarg.numerator=firstarg.numerator*tempdenominator;\n firstarg.denominator=firstarg.denominator*tempdenominator;\n\n //now just add the numerators\n p.numerator=firstarg.numerator-p.numerator;;\n\n return p;\n }\n else if(tempgcd>1)\n {\n\n p.denominator=tempgcd*p.denominator;\n p.numerator=p.numerator*tempgcd;\n //calculate the second fraction by getting the gcd and multiplying it by the top and bottom of bot fractions\n firstarg.numerator=firstarg.numerator*tempgcd;\n firstarg.denominator=firstarg.denominator*tempgcd;\n //now just add the numerators\n p.numerator=firstarg.numerator-p.numerator;\n\n return p;\n }\n return null;\n\n }", "public static String convertWholeNumber(String originalNumber)\r\n {\r\n \tString finalFraction = originalNumber + \"/1\";\r\n \treturn finalFraction;\r\n }", "public static void main(String[] args) {\n\n double fraction = 1/2.0;\n System.out.println(fraction);\n\n //Modules is the remainder of a division problem\n //25 % 6 = 1\n //31 % 5 = 1\n //17 % 3 = 2\n //4 % 2 = 0\n //5 % 2 = 1\n //6 % 2 = 0\n //121 % 100 = 21\n // 47 % 15 = 2\n //55 % 15 =10\n\n //5 + 2 * 4 =\n //12 / 2 - 4 =\n //4 + 17 % 2 -1 =\n //4 + 5 * 2 / 2 + 1 =\n //4 * (6 + 3 * 2) + 7 =\n\n System.out.println(5 + 2 * 4);\n System.out.println (12 / 2 -4);\n System.out.println(4 + 17 % 2 - 1);\n System.out.println(4 + 5 * 2 / 2 + 1);\n System.out.println(4 * (6 + 3 *2) + 7);\n\n\n }", "com.google.protobuf.ByteString getSlashFractionDoubleSign();", "Set<String> getFractions();", "public static int part1(double num)\r\n {\r\n \r\n //Math.floor extract the integer part, then substract it from the original one \r\n int firstNum=(int)Math.floor(num);\r\n double secondNum=num-firstNum;\r\n return firstNum;\r\n \r\n }", "public static double divFraction(Fraction f1, Fraction f2) {\n\t\treturn (f1.getNumerator() * f2.getDenominator()) / (f1.getDenominator() * f2.getNumerator());\n\t}", "public void testGetFraction() {\n final float EXPECTED = TypedValue.complexToFraction(10, 1.1f, 2.1f) ;\n TypedValue tv = new TypedValue();\n tv.data = 10;\n assertEquals(EXPECTED, tv.getFraction(1.1f, 2.1f));\n }", "private String doDivision(String answer)\n\t{\n\t\tint signSpot;\n\t\tString stringToDelete;\n\t\tdouble number1;\n\t\tdouble number2;\n\t\tint minValue = 0;\n\t\tint maxValue = 0;\n\n\t\twhile (answer.contains(\"/\"))\n\t\t{\n\t\t\tsignSpot = answer.indexOf(\"/\");\n\n\t\t\t// start\n\t\t\tfor (int count = signSpot - 1; count >= 0; count -= 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count, count + 1)) == true\n\t\t\t\t\t\t|| answer.substring(count, count + 1).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tminValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// finish\n\t\t\tfor (int count = signSpot + 2; count <= answer.length(); count += 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count - 1, count)) == true\n\t\t\t\t\t\t|| answer.substring(count - 1, count).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tmaxValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstringToDelete = answer.substring(minValue, maxValue);\n\t\t\tString myString = answer.substring(minValue, signSpot);\n\t\t\tnumber1 = Double.parseDouble(myString);\n\t\t\tmyString = answer.substring(signSpot + 1, maxValue);\n\t\t\tnumber2 = Double.parseDouble(myString);\n\t\t\tDouble numberAnswer1 = number1 / number2;\n\t\t\tanswer = answer.replace(stringToDelete, \"\" + numberAnswer1);\n\t\t\tSystem.out.println(answer);\n\t\t}\n\t\treturn answer;\n\t}", "public static String randomFraction(){\r\n int denom = randomNumber();\r\n int numer = randomNumber();\r\n String fraction = \"\";\r\n \r\n if (numer>denom){\r\n fraction = numer+\"/\"+denom;\r\n }\r\n else {\r\n fraction = denom+\"/\"+numer;\r\n }\r\n \r\n return fraction;\r\n }", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "public Fraction subtract(Fraction f){\n return new Fraction(this.numerator * f.denominator - f.numerator * this.denominator, this.denominator * f.denominator);\n }", "public String toString() {\n String myFraction = \"\" + this.numerator + \"/\" + this.denominator;\n return myFraction;\n }", "Rational(int num, int denom){\r\n // If fraction is negative, the numerator is negative\r\n numerator = (denom < 0 ? -num : num);\r\n denominator = (denom < 0 ? -denom : denom);\r\n reduce();\r\n }", "@JsMethod\n public native Cartographic interpolateUsingFraction(double fraction);", "public Fraction divide(Fraction divisor)\n {\n Fraction flipDivisor = divisor.reciprocal();\n Fraction newFraction = new Fraction();\n newFraction = this.multiply(flipDivisor);\n return newFraction;\n }", "public Fraction reciprocal()\n {\n int newNumerator = this.getDenominator();\n int newDenominator = this.getNumerator();\n Fraction newFraction = new Fraction(newNumerator, newDenominator);\n return newFraction;\n }", "public int getMinuteFraction()\n {\n return (((int)(hours*100.0)%100)*60)/100;\n }", "public static int[] toImproperFrac(int whole, int numerator, int denominator){\n \tif(whole<0) {\t//check for negatives\r\n \t\tnumerator*=-1;\t//if it is neg multiply by -1 to make it positive\r\n \t}\r\n \tint newNum = (whole*denominator) + numerator;\t//to get the newnum multiply whole and denominator then add num\r\n\t\tint [] improperFracAnswer = {0, newNum, denominator};\t//make new int array that stores the improperfracanswer: 0, newnum, denom\r\n\t\treturn improperFracAnswer; \t//return the array\r\n }", "public Fraction(Fraction fraction) {\n if (fraction == null) {\n throw new PizzaException(\"fraction can't be null\");\n } else {\n this.NUMERATOR = fraction.NUMERATOR;\n this.DENOMINATOR = fraction.DENOMINATOR;\n }\n }", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "public static String fractionToDecimal(int numerator, int denominator) {\n\t\tif (numerator == 0)\n\t\t\treturn \"0\";\n\t\tStringBuilder sb = new StringBuilder();\n\t\t// \"+\" or \"-\"\n\t\tsb.append((numerator > 0) ^ (denominator > 0) ? \"-\" : \"\");\n\t\tlong num = Math.abs((long)numerator);\n\t\tlong den = Math.abs((long)denominator);\n\t\t\n\t\t// integral part\n\t\tsb.append(num / den);\n\t\tnum %= den;\n\t\tif (num == 0) return sb.toString();\n\t\t\n\t\t// fractional part\n\t\tsb.append('.');\n\t\tHashMap<Long, Integer> map = new HashMap<>();\n\t\tmap.put(num, sb.length());\n\t\twhile (num != 0) {\n\t\t\tnum *= 10;\n\t\t\tsb.append(num / den);\n\t\t\tnum %= den;\n\t\t\tif (map.containsKey(num)) {\n\t\t\t\tint index = map.get(num);\n\t\t\t\tsb.insert(index, \"(\");\n\t\t\t\tsb.append(')');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmap.put(num, sb.length());\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "private void reduce() {\n /** The fraction is equal to 0. The numerator is 0 in this case */\n if(this.numerator == 0)\n this.denominator = 1;\n /** The numerator and denominator are not equal */\n else if (this.numerator != this.denominator) {\n\n /** The greatest common divisor of the numerator and denominator of this fraction */\n int gcd = getGCD(Math.abs(this.numerator), Math.abs(this.denominator));\n\n /** There is a greatest common divisor greater than 1 */\n if (gcd > 1) {\n this.numerator /= gcd;\n this.denominator /= gcd;\n }\n } \n /** The fraction is equal to 1 */\n else {\n this.numerator = 1;\n this.denominator = 1;\n }\n }", "public static String extractPercentOrNumberStr(String str){\n return extract(str, percentOrNumberExtractPattern);\n }", "int getRemainder(int num, int divisor) {\n\t\treturn (num - divisor * (num/divisor));\n\t}", "public FractionInterface parseBruch(String bruchStr) throws RemoteException;", "public static String simplify(int numerator, int denominator) {\n \tint result = gcf(numerator, denominator);\t//use gcf to get the result and store it in an int variable\r\n \tint newNum = numerator/result;\t\t//make newnum equal to num/result\r\n \tint newDenom = denominator/result;\t\t//new denom equals denom/result\r\n \treturn newNum + \"/\" + newDenom;\t\t\t//return statement of num / newdenom\r\n }", "void unsetFractional();", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public static int fractionDigits(String percent) {\n\t return BCMath.numberPrecision(percent) + 8;\n }", "public static double frac(double d)\n {\n return frac( new BigDecimal(\"\" + d) ).doubleValue();\n }", "public List<Integer> getFractionIds() {\n return fractionIds;\n }", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "public void subtract(Fraction f)\r\n {\r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator - f.getNumerator();\r\n this.reduce();\r\n }", "public String toString() {\n if(denominator != 1)\n return \"\" + this.numerator + \"/\" + this.denominator;\n /** The fraction is a whole number */\n else \n return \"\" + this.numerator;\n }", "public Fraction getReciprocal() {\n return new Fraction(denominator, numerator);\n }", "public Fraction subtract(Fraction subtrahend)\n {\n int newDenominator = (this.getDenominator() * subtrahend.getDenominator());\n int convertedNumerator1 = (this.getNumerator() * subtrahend.getDenominator());\n int convertedNumerator2 = (subtrahend.getNumerator() * this.getDenominator());\n int newNumerator = convertedNumerator1 - convertedNumerator2;\n \n Fraction newFraction =new Fraction(newNumerator, newDenominator);\n return newFraction;\n }", "public Fraction getInvalidNumberAttribute();", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public static int [] subFrac(int [] operand1, int [] operand2) {\r\n \tif (operand2[0] == 0) {\r\n \toperand2[1] = -1 * operand2[1];\r\n \t}\r\n \telse {\r\n \toperand2[0] = -1 * operand2[0];\r\n \t}\r\n \tint [] newFrac = addFrac(operand1, operand2);\r\n \treturn newFrac;\r\n \t\r\n \t\r\n \t\r\n }", "BaseNumber divide(BaseNumber operand);", "public int getHourFraction()\n {\n return (int)Math.floor(hours);\n }", "java.math.BigDecimal getFractionalMinimum();", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "public void divide()\r\n {\r\n if (fractionDisplay)\r\n {\r\n result = Operations.fractionFormat(leftOperand, rightOperand);\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n divisionFormatResult = true;\r\n }\r\n else \r\n {\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n }\r\n resultResetHelper();\r\n }", "boolean getFractional();", "public static float ipart (double x) {\n\t\tFloat a;\r\n\t\tif (x != 0) {\r\n\t\ta = new Float(x/Math.abs(x) * Math.floor(Math.abs(x)));\r\n\t\t}\r\n\t\telse {\r\n\t\t a=new Float(0);\r\n\t\t}\r\n\t\treturn a.floatValue();\r\n\t}", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "public static int reduceDenominator(int numerator, int denominator) {\n int start;\n int greatestCommonFactor = 1;\n if (numerator > denominator) {\n start = numerator;\n } else {\n start = denominator;\n }\n if (start != 0) {\n while (greatestCommonFactor != start) {\n if (numerator % start == 0 && denominator % start == 0) {\n greatestCommonFactor = start;\n start++;\n }\n start--;\n }\n }\n return denominator / greatestCommonFactor;\n }", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "int getDefaultFractionCounter();", "private static void addFraction(int num1, int den1, int num2, int den2) {\n\t\tden=gcd(den1,den2);\n\t\tden=(den1*den2)/den;\n\t\tnum=((den/den1)*num1)+((den/den2)*num2);\n\t\t//reduce fraction to simplest form\n\t\treduceFraction();\n\t}" ]
[ "0.7969688", "0.6921883", "0.68760943", "0.68494093", "0.6845079", "0.6824622", "0.6750856", "0.66142666", "0.66121954", "0.6611573", "0.65689987", "0.65234435", "0.649026", "0.6278851", "0.62728274", "0.62106645", "0.613052", "0.6088342", "0.60628337", "0.598504", "0.59798765", "0.597831", "0.5951851", "0.5916363", "0.5913225", "0.5873181", "0.587107", "0.5865836", "0.5838596", "0.5829743", "0.5811227", "0.5804186", "0.5786929", "0.57732886", "0.572709", "0.57225096", "0.57215476", "0.5710944", "0.5709279", "0.5690198", "0.5686721", "0.5686668", "0.568306", "0.56811833", "0.5664698", "0.56460416", "0.5636437", "0.5611196", "0.56100047", "0.56098497", "0.55728245", "0.55439585", "0.5542517", "0.5537165", "0.5536694", "0.552837", "0.551747", "0.55136764", "0.55050826", "0.54911506", "0.5488105", "0.5444637", "0.54344624", "0.5378712", "0.53514385", "0.5347533", "0.5345365", "0.5328852", "0.5314242", "0.5313394", "0.5308415", "0.53041744", "0.530225", "0.5283609", "0.52747864", "0.5268429", "0.52629066", "0.5260333", "0.5251849", "0.52507645", "0.52499425", "0.5213713", "0.51900077", "0.5174052", "0.5174004", "0.5163831", "0.516162", "0.51567614", "0.5154273", "0.51523685", "0.5145312", "0.5140594", "0.51399434", "0.5137293", "0.511194", "0.5106069", "0.50996447", "0.50923616", "0.50782233", "0.5068192" ]
0.7289497
1
Approximate value of the fraction.
public double toDouble() { return ((double)numerator) / ((double)denominator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String get_fraction_part();", "public String getFraction() {\n return fraction;\n }", "public double value() {\n return ((double) this.numerator / this.denominator);\n }", "public double floatValue() {\n\treturn numerator/(double)denominator;\n }", "public Fraction getFraction() {\n return fraction;\n }", "public double getValue(){\n return (double) numerator / (double) denominator;\n }", "public abstract String getFraction();", "public double mean() {\n return StdStats.mean(fraction);\n }", "public double getValue() {\n return (numeratorValue * multiplier) / (denominatorValue * divisor);\n }", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "double doubleValue()\n {\n double top = 1.0 * numerator;\n double bottom=1.0*denominator;\n top=top/bottom;\n return top;\n\n }", "public abstract double getFractionMultiplier();", "public double getDoubleValue() {\n\t\treturn (this.numerator/1.0)/this.denominator;\n\t}", "public double getCurrentAlphaFraction() {\n return alphaFraction;\n }", "double getRatio();", "public void testGetFraction() {\n final float EXPECTED = TypedValue.complexToFraction(10, 1.1f, 2.1f) ;\n TypedValue tv = new TypedValue();\n tv.data = 10;\n assertEquals(EXPECTED, tv.getFraction(1.1f, 2.1f));\n }", "public int getDenominator() { \n return denominator; \n }", "org.hl7.fhir.Ratio getValueRatio();", "public int getFractionsNumber() {\n return fractionsNumber;\n }", "float getValue();", "float getValue();", "float getValue();", "public int getDenominator()\r\n {\r\n return denominator;\r\n }", "public int getDenominator()\n {\n return this.denominator;\n }", "public float toFloat() {\n return (float) numerator/(float) denominator;\n }", "public int healHealthFraction(double fraction) {\n return heal((int)Math.max(this.getMaxHP()*fraction, 1));\n }", "public String toFractionString() {\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "public double getPER() {\n\t\tint nq = q0.length;\n double sum = 0.0;\n for (int i=0; i<nq; i++) sum += q0[i];\n\t\treturn Math.min(1.0, 0.5*(1.0-(sum/(double)nq))/initPER); // 0.5 * proba erreur\t\t\n\t}", "public double doubleValue()\n\t\t{\n\t\t\t// Converts BigIntegers to doubles and then divides \n\t\t\treturn (numerator.doubleValue()*1)/denominator.doubleValue();\n\t\t}", "public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator * f.numerator);\n }", "public double getProgress()\n {\n return ((double)getCount() / (double)getGoal());\n }", "public double getAveragePrecursorIntensityPerFraction() {\n return AveragePrecursorIntensityPerFraction;\n }", "public String getSampleFractionForAUC() {\n return m_predFrac;\n }", "java.math.BigDecimal getFractionalMinimum();", "public void setFraction(int fraction) {\n this.fraction = fraction;\n }", "boolean getFractional();", "public int getDenominator() {\n return this.denominator;\n }", "public synchronized float getProgressFloat() {\n BigDecimal bigDecimal = BigDecimal.valueOf(mProgress);\n return bigDecimal.setScale(mScale, BigDecimal.ROUND_HALF_UP).floatValue();\n }", "public double getProgressFraction() {\n return (double) schedule.getSteps() / config.getSimulationIterations();\n }", "private double computeDifferentialPCT(double currentValue, double average) {\n return average <= Double.MIN_VALUE ? 0.0 : (currentValue / average - 1) * 100.0;\n }", "public double getFactor() {\n return ((double) multiplier) / ((double) divisor);\n }", "private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}", "public Double getProgressPercent();", "public double getNumeratorValue() {\n return numeratorValue;\n }", "double getValue();", "double getValue();", "double getValue();", "@FloatRange(from = 0, to = 1) float getProgress();", "public long getDenominator();", "private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Divide by zero error: \" + numerator + \"/\" + denominator);\r\n\t\t}\r\n\t\tint gcd;\r\n\t\tif(numerator >= denominator)\r\n\t\t{\r\n\t\t\tgcd = gcd(numerator, denominator);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgcd = gcd(denominator, numerator);\r\n\t\t}\r\n\t\tnumerator /= gcd;\r\n\t\tdenominator /= gcd;\r\n\t\tif(denominator == 1)\r\n\t\t{\r\n\t\t\t//Quotient is integer\r\n\t\t\treturn new Rational(numerator);\r\n\t\t}\t\t\r\n\t\t//Negative denominator\r\n\t\tif(denominator < 0)\t\t\t\r\n\t\t{\r\n\t\t\tdenominator *= -1;\r\n\t\t\tnumerator *= -1;\r\n\t\t}\r\n\t\t//Quotient is fraction\r\n\t\treturn new FullExpression(new Rational(numerator), new Rational(denominator), Operator.QUOT);\r\n\t}", "public double getValue() {\n return NUMERATOR / DENOMINATOR;\n }", "java.lang.String getPercentage();", "public float getPercentage() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn percentage;\r\n\t}", "public double toDouble(){\n return (double)this.numerator /(double)this.denominator;\n }", "org.apache.xmlbeans.XmlDecimal xgetFractionalMinimum();", "public abstract float calculateFraction(Parallax parallax);", "@JsMethod\n public native Cartographic interpolateUsingFraction(double fraction);", "public void divide()\r\n {\r\n if (fractionDisplay)\r\n {\r\n result = Operations.fractionFormat(leftOperand, rightOperand);\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n divisionFormatResult = true;\r\n }\r\n else \r\n {\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n }\r\n resultResetHelper();\r\n }", "public double getValue() {\n return 0.05;\n }", "public String toString() {\n String myFraction = \"\" + this.numerator + \"/\" + this.denominator;\n return myFraction;\n }", "public BigDecimal getVAT_CHARGE_INSUR_PERCENT() {\r\n return VAT_CHARGE_INSUR_PERCENT;\r\n }", "public static int findDenominator(String fraction) {\n \tif(fraction.contains(\"/\")) {\t//check to see if it has a /\r\n \t\tint denominator= Integer.parseInt(fraction.substring(fraction.indexOf(\"/\")+1,fraction.length( )));\t//use substring to get numbers from / to the frac length; make variable\r\n \t\treturn denominator;\t//return the number\r\n \t} else {\r\n \t\treturn 1; //else if it's a whole number return 1\r\n \t}\r\n }", "@Override\n public double calculate(double input)\n {\n return input/getValue();\n }", "public static Rational getApproximate(double val)\n {\n double e0 = val, p0 = 0.0, q0 = 1.0;\n double e1 = -1.0, p1 = 1.0, q1 = 0.0;\n\t\tdo\n {\n double r = Math.floor(e0/e1);\n double e00 = e0, p00 = p0, q00 = q0;\n\t\t\te0 = e1;\n p0 = p1;\n q0 = q1;\n e1 = e00 - r*e1;\n p1 = p00 - r*p1;\n q1 = q00 - r*q1;\n\t\t} while(Math.abs(p1/q1 - val) > DBL_EPSILON);\n return new Rational(BigInteger.valueOf((long)p1), BigInteger.valueOf((long)q1));\n }", "public float getPercent() {\n return percent;\n }", "public double getValue();", "public double getPauseFraction()\r\n {\r\n return pauseFraction;\r\n }", "public float getProgress() {\r\n if (start == end) {\r\n return 0.0f;\r\n } else {\r\n return Math.min(1.0f, (pos - start) / (float)(end - start));\r\n }\r\n }", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public int getDenominator(){\n\n\t\treturn myDenominator;\n }", "private void reduce() {\n /** The fraction is equal to 0. The numerator is 0 in this case */\n if(this.numerator == 0)\n this.denominator = 1;\n /** The numerator and denominator are not equal */\n else if (this.numerator != this.denominator) {\n\n /** The greatest common divisor of the numerator and denominator of this fraction */\n int gcd = getGCD(Math.abs(this.numerator), Math.abs(this.denominator));\n\n /** There is a greatest common divisor greater than 1 */\n if (gcd > 1) {\n this.numerator /= gcd;\n this.denominator /= gcd;\n }\n } \n /** The fraction is equal to 1 */\n else {\n this.numerator = 1;\n this.denominator = 1;\n }\n }", "Double getValue();", "public FractionImpl(String fraction) {\n\n //use the trim String method to remove white space before and after the fraction characters\n\n String trimmed = fraction.trim();\n\n //whole number procedure - if no \"/\" is present\n\n if (!trimmed.contains(\"/\")) {\n this.numerator = Integer.parseInt(trimmed);\n this.denominator = 1;\n }\n\n //fraction procedure - split on \"/\" then convert string numbers to int and pass to the normalise function\n\n else {\n String[] bits = trimmed.split(\"/\");\n\n this.numerator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[0];\n this.denominator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[1];\n }\n\n\n }", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "public Fraction div(Fraction f) {\n /** Accounts for the input of a negative fraction */\n if(f.getNumerator() < 0)\n return new Fraction( (-1) * (this.numerator * f.getDenominator()), Math.abs(this.denominator * f.getNumerator()));\n return new Fraction( (this.numerator * f.getDenominator()), (this.denominator * f.getNumerator()));\n }", "public int percent() {\n\t\tdouble meters = meters();\n\t\tif (meters < MIN_METERS) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn (int) (Math.pow((meters - MIN_METERS)\n\t\t\t\t/ (MAX_METERS - MIN_METERS) * Math.pow(100, CURVE),\n\t\t\t\t1.000d / CURVE));\n\t}", "public void reduce() {\n\tint g = this.gcd();\n\tif ( g != 0 ) {\n\t numerator /= g;\n\t denominator /= g;\n\t}\n }", "int getPercentageHeated();", "public double getPeRatio() throws ArithmeticException {\n\t\tdouble peRatio = Double.NEGATIVE_INFINITY;\n\t\t\n\t\tif (lastDividend > 0.0){\n\t\t\tpeRatio = sharePrice/lastDividend;\n\t\t}else if (lastDividend == 0){\n\t\t\tlogger.error(\"The last dividend should be greater than 0\");\n\t\t\tthrow new ArithmeticException();\n\t\t}\n\t\t\n\t\treturn peRatio;\n\t}", "public SimpleDoubleProperty getTotalAbsencePercentageProperty() {\n return totalAbsencePercentageProperty;\n }", "private float ratioToValue (float ratio){\n return ratio * (mMax - mMin) + mMin;\n }", "private Fraction reduce() {\n Fraction f = null;\n try {\n f = (Fraction)clone();\n } catch (CloneNotSupportedException e) {};\n if (denominator == 0)\n throw new ArithmeticException (\" illegal denominator zero \");\n if (denominator < 0) {\n f.numerator = -numerator;\n f.denominator = -denominator;\n }\n if (numerator == 0)\n f.denominator = 1;\n else {\n int n = gcd (numerator, denominator);\n f.numerator = numerator / n;\n f.denominator = denominator / n;\n }\n return f;\n }", "public DoubleExpression getProgress()\n {\n return progress;\n }", "Float getFedAnimalsPercentage();", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "public double getPercent() {\r\n\t\treturn percent;\r\n\t}", "private float valOf(SeekBar bar) {\n return (float) bar.getProgress() / bar.getMax();\n }", "public double getRatio() {\n return (double) vector.length / size;\n }", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "private double gradeQuiz() {\n int numCorrect = getNumberCorrect();\n double percentage = (numCorrect / numQuestions) * 100;\n return percentage;\n }", "public Float percentComplete() {\n return this.percentComplete;\n }", "private double denominator(int iter) {\n switch (DENOM) {\n case 0: return Math.pow((double) iter, 2.0);\n default: return (double) CONSTANT / Math.log(1+iter);\n }\n }", "public Integer getRatio() {\n return ratio;\n }", "private int getPercentageValue(String elem){\n String query = \"declare namespace a='http://schemas.openxmlformats.org/drawingml/2006/main' $this//a:\" + elem;\n\n XmlObject[] obj;\n\n // first ask the context color and if not found, ask the actual color bean\n if(_phClr != null){\n obj = _phClr.selectPath(query);\n if(obj.length == 1){\n Node attr = obj[0].getDomNode().getAttributes().getNamedItem(\"val\");\n if(attr != null) {\n return Integer.parseInt(attr.getNodeValue()) / 1000;\n }\n }\n }\n\n obj = _xmlObject.selectPath(query);\n if(obj.length == 1){\n Node attr = obj[0].getDomNode().getAttributes().getNamedItem(\"val\");\n if(attr != null) {\n return Integer.parseInt(attr.getNodeValue()) / 1000;\n }\n }\n\n\n return -1;\n }", "public void add(Fraction f)\r\n { \r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator + f.getNumerator();\r\n this.reduce();\r\n }", "public String fractionAddition1(String expression) {\n Scanner s = new Scanner(expression).useDelimiter(\"/|(?=[-+])\");\n long num = 0, den = 1;\n while (s.hasNext()) {\n long a = s.nextLong(), b = s.nextLong();\n num = num * b + a * den;\n den *= b;\n }\n long gcd = gcd(num, den);\n return (num / gcd) + \"/\" + (den / gcd);\n }", "public static String randomFraction(){\r\n int denom = randomNumber();\r\n int numer = randomNumber();\r\n String fraction = \"\";\r\n \r\n if (numer>denom){\r\n fraction = numer+\"/\"+denom;\r\n }\r\n else {\r\n fraction = denom+\"/\"+numer;\r\n }\r\n \r\n return fraction;\r\n }", "public double getPercent() { return this.percentage; }" ]
[ "0.70220125", "0.68476075", "0.6768631", "0.6768164", "0.6678871", "0.6624501", "0.64481276", "0.637029", "0.6345738", "0.6281887", "0.6274477", "0.6189347", "0.61205107", "0.6086534", "0.5993526", "0.5951215", "0.595039", "0.59403104", "0.59257406", "0.5901917", "0.5901917", "0.5901917", "0.58721715", "0.5856971", "0.58234227", "0.58110696", "0.58102256", "0.5806197", "0.5796635", "0.5792874", "0.5788852", "0.57860976", "0.5773171", "0.57708776", "0.5760046", "0.57525563", "0.5751227", "0.5751145", "0.5741275", "0.5715384", "0.5711694", "0.5704334", "0.56694335", "0.5645225", "0.56121844", "0.56121844", "0.56121844", "0.5607095", "0.56041926", "0.5597238", "0.55965906", "0.5590137", "0.558835", "0.55848265", "0.5581455", "0.5567898", "0.55671716", "0.5547864", "0.5541015", "0.55346966", "0.5512818", "0.55125445", "0.5510126", "0.55079484", "0.55073863", "0.55008644", "0.5492112", "0.5485473", "0.5481002", "0.54762405", "0.5476072", "0.5466423", "0.5465094", "0.5460667", "0.54483604", "0.54480076", "0.5445477", "0.54445875", "0.5425242", "0.5416456", "0.54124993", "0.5409921", "0.54086167", "0.5406254", "0.54061234", "0.54057646", "0.5402992", "0.5398738", "0.5397504", "0.5394015", "0.5393094", "0.53903526", "0.5388202", "0.5383736", "0.53821015", "0.5378572", "0.5378529", "0.5369691", "0.53696626", "0.536113" ]
0.5424779
79
Double value f presented as a fraction with denominator d > 0.
public static Fraction toFraction (double f, int d) { if (d > 0) return new Fraction ((int)(Math.round (f*d)), d); else throw new ArithmeticException (" illegal denominator "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double frac(double d)\n {\n return frac( new BigDecimal(\"\" + d) ).doubleValue();\n }", "public double floatValue() {\n\treturn numerator/(double)denominator;\n }", "public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator * f.numerator);\n }", "public Fraction div(Fraction f) {\n /** Accounts for the input of a negative fraction */\n if(f.getNumerator() < 0)\n return new Fraction( (-1) * (this.numerator * f.getDenominator()), Math.abs(this.denominator * f.getNumerator()));\n return new Fraction( (this.numerator * f.getDenominator()), (this.denominator * f.getNumerator()));\n }", "public String get_fraction_part();", "private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Divide by zero error: \" + numerator + \"/\" + denominator);\r\n\t\t}\r\n\t\tint gcd;\r\n\t\tif(numerator >= denominator)\r\n\t\t{\r\n\t\t\tgcd = gcd(numerator, denominator);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgcd = gcd(denominator, numerator);\r\n\t\t}\r\n\t\tnumerator /= gcd;\r\n\t\tdenominator /= gcd;\r\n\t\tif(denominator == 1)\r\n\t\t{\r\n\t\t\t//Quotient is integer\r\n\t\t\treturn new Rational(numerator);\r\n\t\t}\t\t\r\n\t\t//Negative denominator\r\n\t\tif(denominator < 0)\t\t\t\r\n\t\t{\r\n\t\t\tdenominator *= -1;\r\n\t\t\tnumerator *= -1;\r\n\t\t}\r\n\t\t//Quotient is fraction\r\n\t\treturn new FullExpression(new Rational(numerator), new Rational(denominator), Operator.QUOT);\r\n\t}", "public double getDoubleValue() {\n\t\treturn (this.numerator/1.0)/this.denominator;\n\t}", "public static double divFraction(Fraction f1, Fraction f2) {\n\t\treturn (f1.getNumerator() * f2.getDenominator()) / (f1.getDenominator() * f2.getNumerator());\n\t}", "public double toDouble() {\n return ((double)numerator) / ((double)denominator);\n }", "public double toDouble(){\n return (double)this.numerator /(double)this.denominator;\n }", "boolean getFractional();", "double doubleValue()\n {\n double top = 1.0 * numerator;\n double bottom=1.0*denominator;\n top=top/bottom;\n return top;\n\n }", "public double getValue(){\n return (double) numerator / (double) denominator;\n }", "public float toFloat() {\n return (float) numerator/(float) denominator;\n }", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "double d();", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "public Fraction fractionPart() {\n return new Fraction (numerator - denominator*integerPart(), denominator)\n .reduce();\n }", "double getFloatingPointField();", "private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}", "public Fraction sub(Fraction f) {\n /** Denominators equal */\n if( f.getDenominator() == this.denominator )\n return new Fraction( this.numerator - f.getNumerator(), this.denominator);\n \n /** Denominators different */\n \n /** The least common multiple found between both denominators. */\n int lcd = getLCD(this.denominator, f.getDenominator());\n\n /** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */\n return new Fraction( (lcd / this.denominator * this.numerator) - (lcd / f.getDenominator() * f.getNumerator()), lcd);\n }", "public String getFraction() {\n return fraction;\n }", "boolean isSetFractional();", "@Test\n\tpublic void testDFnumber(){\n\t\tdouble d1 = 0.05;\n\t\tdouble d2 = 0.01;\n\t\tSystem.out.println(d1+d2);\n System.out.println(1.0-0.42);\n System.out.println(4.015*100);\n System.out.println(123.3/100);\n\t}", "public void visitDDIV(DDIV o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tif (stack().peek(1) != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack next-to-top is not of type 'double', but of type '\"+stack().peek(1)+\"'.\");\n\t\t}\n\t}", "public static double division (double e, double f) {\n\t\tdouble divi = e / f;\n\t\treturn divi; \n\t}", "private double fd(double x) {\r\n if(x<0){\r\n double x1 = x*-1;\r\n return interpretadorD.getResultado(\"!\"+x1);\r\n }\r\n return interpretadorD.getResultado(x);\r\n }", "public void subtract(Fraction f)\r\n {\r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator - f.getNumerator();\r\n this.reduce();\r\n }", "private Fraction reduce() {\n Fraction f = null;\n try {\n f = (Fraction)clone();\n } catch (CloneNotSupportedException e) {};\n if (denominator == 0)\n throw new ArithmeticException (\" illegal denominator zero \");\n if (denominator < 0) {\n f.numerator = -numerator;\n f.denominator = -denominator;\n }\n if (numerator == 0)\n f.denominator = 1;\n else {\n int n = gcd (numerator, denominator);\n f.numerator = numerator / n;\n f.denominator = denominator / n;\n }\n return f;\n }", "float getD();", "public abstract double getFractionMultiplier();", "public void d(Float f) {\n ((b.b) this.b).d(f);\n }", "public Fraction(String expression) throws NumberFormatExpression {\n String[] tokens = expression.split(\"/\");\n \n // two tokens - numerator and denominator\n if (tokens.length != 2) {\n throw new NumberFormatExpression(expression \n + \" is not a valid fraction.\");\n }\n \n // make sure numerator and denominator are numbers\n for (String t : tokens) {\n if (!t.matches(\"^[0-9]*$\")) {\n throw new NumberFormatException(t + \" is not a number.\");\n }\n }\n \n this.expression = expression;\n numerator = Double.parseDouble(tokens[0]);\n denominator = Double.parseDouble(tokens[1]);\n \n if (denominator == 0) {\n throw new ArithmeticException(expression \n + \" invalid. Cannot divide by 0.\");\n }\n }", "private static double calcDiv(float f, float g) {\n\t\treturn f / g;\n\t}", "public double value() {\n return ((double) this.numerator / this.denominator);\n }", "public abstract String getFraction();", "@java.lang.Override\n public float getD() {\n return d_;\n }", "include<stdio.h>\nint main()\n{\n float d;\n \n scanf(\"%f\", &d);\n float r = d/2;\n float a;\n a = 3.14 * r * r;\n printf(\"%.2f\", a);\n return 0;\n}", "public double doubleValue()\n\t\t{\n\t\t\t// Converts BigIntegers to doubles and then divides \n\t\t\treturn (numerator.doubleValue()*1)/denominator.doubleValue();\n\t\t}", "public static void displayFractionalUndIngeralFromDoubleNumber(){\n\t\tSystem.out.println(\"please enter a double number: \");\n\t\tScanner scann=new Scanner(System.in);\n\t\tdouble x=scann.nextDouble();\n\t\tdouble fractional_part=x%1;\n\t\tdouble integral_part=x-fractional_part;\n\t\tSystem.out.println(\"The integral part of (\" +x +\" ) is: \" +integral_part);\n\t\tSystem.out.println(\"The fractional part of ( \" +x +\" ) is: \" +fractional_part);\n\t}", "public void add(Fraction f)\r\n { \r\n if(this.denominator != f.getDenominator())\r\n {\r\n int temp1 = this.denominator;\r\n int temp2 = f.getDenominator();\r\n this.denominator = this.denominator * temp2;\r\n this.numerator = this.numerator * temp2;\r\n f.setDenominator(f.getDenominator() * temp1);\r\n f.setNumerator(f.getNumerator() * temp1);\r\n }\r\n this.numerator = this.numerator + f.getNumerator();\r\n this.reduce();\r\n }", "@Override\r\n\tpublic Float halfOf(Float f) {\n\t\t\r\n\t\tFloat returnValue = (float) Math.half(f.doubleValue());\r\n\t\t\r\n\t\treturn returnValue;\r\n\t}", "@java.lang.Override\n public float getD() {\n return d_;\n }", "public Fraction getFraction() {\n return fraction;\n }", "private double denominator(int iter) {\n switch (DENOM) {\n case 0: return Math.pow((double) iter, 2.0);\n default: return (double) CONSTANT / Math.log(1+iter);\n }\n }", "public static BigDecimal frac(BigDecimal bd)\n {\n return bd.remainder (BigDecimal.ONE);\n }", "public Rational(int n, int d) {\n\tif ( d == 0 ) {\n\t System.out.println(\"Nope.\");\n\t numerator = 0;\n\t denominator = 1;\n\t}\n\telse {\n\t numerator = n;\n\t denominator = d;\n\t}\n }", "org.hl7.fhir.Ratio getValueRatio();", "public Fraction( int n, int d )\n\t{\tint gcd = gcd( n, d );\n\t\tsetNumer(n/gcd);\n\t\tsetDenom(d/gcd);\n\t}", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "public int getDenominator() { \n return denominator; \n }", "com.google.protobuf.ByteString getSlashFractionDoubleSign();", "public double getF();", "public long getDenominator();", "public int getDenominator()\r\n {\r\n return denominator;\r\n }", "private String applyFinite(final double d) {\n final ParsedDecimal n = ParsedDecimal.from(d);\n\n int roundExponent = Math.max(n.getExponent(), minDecimalExponent);\n if (maxPrecision > 0) {\n roundExponent = Math.max(n.getScientificExponent() - maxPrecision + 1, roundExponent);\n }\n n.round(roundExponent);\n\n return applyFiniteInternal(n);\n }", "public float getDCD();", "private float diffusitivity(float d) {\r\n return (1.0f / (1.0f + (d * d) / (lambda * lambda)));\r\n }", "private float deadBand(float f) {\r\n\t\t// The K joypad seems to need a little more dead band to prevent\r\n\t\t// creep.\r\n\t\tif (f > -0.01f && f < 0.01f) {\r\n\t\t\treturn 0.0f;\r\n\t\t}\r\n\t\treturn f;\r\n\t}", "public void testGetFraction() {\n final float EXPECTED = TypedValue.complexToFraction(10, 1.1f, 2.1f) ;\n TypedValue tv = new TypedValue();\n tv.data = 10;\n assertEquals(EXPECTED, tv.getFraction(1.1f, 2.1f));\n }", "Rational divide(Rational p){\n Rational firstarg=new Rational();\n firstarg.numerator=numerator;\n firstarg.denominator=denominator;\n\n\n firstarg.numerator=firstarg.numerator*p.denominator;\n firstarg.denominator=p.numerator*firstarg.denominator;\n return firstarg;\n }", "public void div(Fraction f1, Fraction f2) {\n\t\tnumerator = f1.getNumerator() * f2.getDenominator();\n\t\tdenominator = f1.getDenominator() * f2.getNumerator();\n\t\tint gcd = gcd(f1.getDenominator(), f2.getDenominator());\n\t\tnumerator /= gcd;\n\t\tdenominator /= gcd;\n\t}", "public void setDenominator(int dem)\r\n {\r\n this.denominator = dem;\r\n }", "public Fraction(int num,int den) {\n\t\t if (den ==0) {\n\t\t\tthrow new IllegalArgumentException(\"Cant have the Devisor to be zero\");\n\t\t}\n\t\t this.num=num;\n\t\t this.den=den;\n\t\t if (num ==0) {\n\t\t\tthis.den=1;\n\t\t\t\n\t\t}\n\t\t simplify();\n\t\t value = num/den;\n\t }", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "public Fraction subtract(Fraction f){\n return new Fraction(this.numerator * f.denominator - f.numerator * this.denominator, this.denominator * f.denominator);\n }", "public void allowFractional() {\n APIlib.getInstance().addJSLine(jsBase + \".allowFractional();\");\n }", "public int getDenominator()\n {\n return this.denominator;\n }", "public double divide(double n, double den) {\r\n\t\treturn n/den;\r\n\t}", "protected final byte signOf(double f) {\n return f > 0 ? (byte) 1 : (f == 0 ? (byte) 0 : (byte) -1);\n }", "double getRatio();", "public Fraction simplify(){\n long n = this.numerator;\n long d = this.denominator;\n for(long k = d; k >= 1; k--){\n if(n % k == 0 && d % k == 0) {\n n = n / k;\n d = d / k;\n break;\n }\n }\n return new Fraction(n,d);\n }", "public Builder setD(float value) {\n \n d_ = value;\n onChanged();\n return this;\n }", "void setFractional(boolean fractional);", "public String toFractionString() {\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "public Fraction reciprocal(){\n return new Fraction(this.denominator,this.numerator);\n }", "@Override\n\tdouble f(double x) {\n\t\treturn x;\n\t}", "public Fraction( int num, int den ) {\n if( den == 0 ) {\n throw new RuntimeException( \"0 is not a valid denominator!\");\n } else {\n this.value = num/den;\n this.numerator = num;\n this.denominator = den;\n // Mit der unteren Schleife kürzen wir.\n if( this.denominator > 1 ){\n for( int i = this.denominator; i >= 2; i-- ) {\n if( this.numerator % i == 0 && this.denominator % i == 0 ) {\n this.numerator /= i;\n this.denominator /= i;\n }\n }\n }\n }\n\n }", "public double value(){\n\t return (double) this.f;\n }", "public boolean is(Fraction f){\n return f.numerator == this.numerator && f.denominator == this.denominator;\n }", "public static <T extends Number> Probe<Double> asFraction(TimeSeries<T> series)\n\t{\n\t\treturn new ChangeAsFractionProbe<T, T>(series, ValueReaders.<T>same());\n\t}", "public int getDenominator() {\n return this.denominator;\n }", "public double getDoubleWert() {\n\t\treturn (double) p / (double) q;\n\t}", "public void divide(Rational s) {\n\tnumerator *= s.denominator;\n\tdenominator *= s.numerator;\n }", "java.math.BigDecimal getFractionalMinimum();", "public static Percentage calculate(double num, double den) throws IllegalArgumentException {\n if (num * den < 0) {\n throw new IllegalArgumentException(\"Numerator and denominator must have same sign\");\n } else {\n return new Percentage((int) Math.round(num / den * 100));\n }\n }", "public void divide()\r\n {\r\n if (fractionDisplay)\r\n {\r\n result = Operations.fractionFormat(leftOperand, rightOperand);\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n divisionFormatResult = true;\r\n }\r\n else \r\n {\r\n resultDoubles = Operations.divide(leftOperand, rightOperand);\r\n }\r\n resultResetHelper();\r\n }", "public Fraction(int numerator, int denominator) {\n\n //won't allow you to set the denominator equal to 0 because dividing by a 0 gives you an error\n if (denominator == 0) {\n throw new PizzaException(\"denominator can't be 0\");\n } else {\n //finding the GCD value depending on num and den\n int gcd = findGCD(numerator, denominator);\n\n //numerator/gcd and denominator/gcd give a reduced form and initialize them\n numerator = numerator / gcd;\n denominator = denominator / gcd;\n\n // if they both are negatives\n //Convert them to positive\n if (numerator < 0 && denominator < 0) {\n numerator = Math.abs(numerator);\n denominator = Math.abs(denominator);\n }\n //move the negative sign to the top for comparison reason\n else if (numerator > 0 && denominator < 0) {\n numerator = -numerator;\n denominator = Math.abs(denominator);\n }\n //set the final value for numerator and constructor\n this.NUMERATOR = numerator;\n this.DENOMINATOR = denominator;\n }\n\n }", "void unsetFractional();", "public Fraction(){\n\t\n\t\tsetFraction(0,1);\n }", "public Fraction add(Fraction f) {\n /** Equal denominators */\n if( f.getDenominator() == this.denominator )\n return new Fraction( f.getNumerator() + this.numerator, this.denominator);\n \n /** Unlike denominators */ \n \n /** The least common multiple found between both denominators. */\n int lcd = getLCD(this.denominator, f.getDenominator());\n\n /** Common algorithm to find new numerator with least common denominator(lcd): lcd / denominator * numerator */\n return new Fraction( (lcd / this.denominator * this.numerator) + (lcd / f.getDenominator() * f.getNumerator()), lcd);\n }", "public double get_dFdx( double x )\n {\n if ( domain.contains( (float)x ) )\n {\n double sum = 0.0;\n for ( int i = parameters.length - 2; i >= 0; i-- )\n sum = x * sum + (i+1) * parameters[i+1];\n return sum;\n }\n else\n return 0;\n }", "public Double getFixedDividend() {\n\t\treturn fixedDividend;\n\t}", "public static int findDenominator(String fraction) {\n \tif(fraction.contains(\"/\")) {\t//check to see if it has a /\r\n \t\tint denominator= Integer.parseInt(fraction.substring(fraction.indexOf(\"/\")+1,fraction.length( )));\t//use substring to get numbers from / to the frac length; make variable\r\n \t\treturn denominator;\t//return the number\r\n \t} else {\r\n \t\treturn 1; //else if it's a whole number return 1\r\n \t}\r\n }", "public static String getPercent(int numerator, int denominator, Locale locale) {\n //http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html\n NumberFormat nf = NumberFormat.getNumberInstance(locale); //Locale.US, .....\n DecimalFormat df = (DecimalFormat) nf;\n df.applyPattern(\"###.#\");\n if (denominator == 0) {\n return df.format(0) + \"%\";\n }\n float percent = (numerator / (float) denominator) * 100;\n return df.format(percent) + \"%\";\n }", "public void setValue(double d) {\r\n\t\t\tif (isValidValue(d)) {\r\n\t\t\t\tthis.value = (double) Math.round(d * 100.00) / (double) 100.00;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "@Override\n public Float div(Float lhs, Float rhs) {\n\t\n\tassert(rhs != 0);\n\t\n\tfloat res = lhs/rhs;\n\treturn res;\n }", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "public Fraction getInvalidNumberAttribute();" ]
[ "0.7174674", "0.6509469", "0.63903856", "0.638533", "0.63475096", "0.62357193", "0.61596185", "0.610879", "0.6103089", "0.607933", "0.6041774", "0.59985477", "0.5913861", "0.5913195", "0.5896058", "0.58573985", "0.5845707", "0.5844652", "0.5814319", "0.5807584", "0.5799905", "0.5785346", "0.57820743", "0.57766134", "0.5740334", "0.5733996", "0.573158", "0.57260394", "0.57171094", "0.57027674", "0.56946844", "0.5694379", "0.5693628", "0.5683634", "0.5669886", "0.5650464", "0.56417197", "0.56355536", "0.563473", "0.56260324", "0.5622039", "0.561606", "0.56146836", "0.5610423", "0.56072825", "0.5603653", "0.5599877", "0.55965245", "0.5591151", "0.55839723", "0.5558416", "0.55553454", "0.5554284", "0.5545939", "0.55428636", "0.5541124", "0.5518922", "0.5515256", "0.5514352", "0.5509126", "0.55045", "0.55016744", "0.5466498", "0.5462079", "0.5461445", "0.5459136", "0.54589796", "0.5458626", "0.5452571", "0.54506886", "0.54416406", "0.54342735", "0.54240024", "0.541514", "0.5414987", "0.54098356", "0.5405899", "0.54010403", "0.5399516", "0.53900766", "0.5386921", "0.5385805", "0.5384638", "0.53816074", "0.5381258", "0.53810406", "0.53709203", "0.5369918", "0.5360865", "0.53582263", "0.53573585", "0.5341", "0.5340761", "0.53338933", "0.53235406", "0.5323493", "0.53207105", "0.53130686", "0.5299669", "0.5297967" ]
0.7606457
0
Conversion from string to the fraction. Accepts strings of form that is defined by the toString method.
public static Fraction valueOf (String s) { StringTokenizer st = new StringTokenizer (s, "/<>[](),"); int num = 0; int den = 1; if (st.hasMoreTokens()) { num = Integer.parseInt (st.nextToken().trim()); } else { throw new IllegalArgumentException ("not fraction " + s); } if (st.hasMoreTokens()) { den = Integer.parseInt (st.nextToken()); } else { // throw new IllegalArgumentException ("not fraction " + s); den = 1; } if (st.hasMoreTokens()) { throw new IllegalArgumentException ("not fraction " + s); } return new Fraction (num, den); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FractionImpl(String fraction) {\n\n //use the trim String method to remove white space before and after the fraction characters\n\n String trimmed = fraction.trim();\n\n //whole number procedure - if no \"/\" is present\n\n if (!trimmed.contains(\"/\")) {\n this.numerator = Integer.parseInt(trimmed);\n this.denominator = 1;\n }\n\n //fraction procedure - split on \"/\" then convert string numbers to int and pass to the normalise function\n\n else {\n String[] bits = trimmed.split(\"/\");\n\n this.numerator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[0];\n this.denominator = normalise(Integer.parseInt(bits[0]), Integer.parseInt(bits[1]))[1];\n }\n\n\n }", "public Fraction(String s)\r\n {\r\n StringTokenizer st = new StringTokenizer(s, \"/\"); \r\n String p1 = st.nextToken();\r\n String p2 = st.nextToken();\r\n StringTokenizer noPara1 = new StringTokenizer(p1, \"(\");\r\n p1 = noPara1.nextToken();\r\n StringTokenizer noPara2 = new StringTokenizer(p2, \")\");\r\n p2 = noPara2.nextToken();\r\n this.numerator = Integer.parseInt(p1);\r\n this.denominator = Integer.parseInt(p2);\r\n this.reduce();\r\n }", "public FractionInterface parseBruch(String bruchStr) throws RemoteException;", "public Fraction(String expression) throws NumberFormatExpression {\n String[] tokens = expression.split(\"/\");\n \n // two tokens - numerator and denominator\n if (tokens.length != 2) {\n throw new NumberFormatExpression(expression \n + \" is not a valid fraction.\");\n }\n \n // make sure numerator and denominator are numbers\n for (String t : tokens) {\n if (!t.matches(\"^[0-9]*$\")) {\n throw new NumberFormatException(t + \" is not a number.\");\n }\n }\n \n this.expression = expression;\n numerator = Double.parseDouble(tokens[0]);\n denominator = Double.parseDouble(tokens[1]);\n \n if (denominator == 0) {\n throw new ArithmeticException(expression \n + \" invalid. Cannot divide by 0.\");\n }\n }", "@FromString\n public static Percentage parse(String str) {\n ArgChecker.notNull(str, \"str\");\n if (str.endsWith(\"%\")) {\n return of(Decimal.of(str.substring(0, str.length() - 1).trim()));\n } else if (str.endsWith(\"pct\")) {\n return of(Decimal.of(str.substring(0, str.length() - 3).trim()));\n } else {\n return of(Decimal.of(str.trim()));\n }\n }", "public SortFractions(String fraction) {\n String[] fArray = fraction.split(\"/\");\n numerator = Integer.parseInt(fArray[0]);\n denominator = Integer.parseInt(fArray[1]);\n this.sol = numerator / denominator; \n }", "public static int parseFractionForNumerator(String fraction) {\n int length = fraction.length();\n int underscore = fraction.indexOf(\"_\");\n int slash = fraction.indexOf(\"/\");\n String numerator = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n if (slash != -1) { // underscore and a slash ==> mixed number\n numerator = fraction.substring(underscore + 1, slash);\n }\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n numerator = fraction.substring(0, slash);\n } else { // no underscore and no slash ==> whole number\n numerator = \"0\";\n }\n }\n int numeratorNumber = Integer.parseInt(numerator);\n String whole = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n whole = fraction.substring(0, underscore);\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n whole = \"0\";\n } else { // no underscore and no slash ==> whole number\n whole = fraction.substring(0, length);\n }\n }\n int wholeNumber = Integer.parseInt(whole);\n if (wholeNumber < 0) {\n numeratorNumber = -numeratorNumber;\n }\n return numeratorNumber;\n }", "public String toFractionString() {\n\t\treturn this.numerator + \"/\" + this.denominator;\n\t}", "public abstract String getFraction();", "public static String parseExpressionForFirstFraction(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n return frac1;\n }", "@Override\n\t\tpublic java.math.BigDecimal convert(String s) {\n\t\t\treturn new java.math.BigDecimal(s);\n\t\t}", "public void setFraction(String fraction) {\n this.fraction = fraction == null ? null : fraction.trim();\n }", "public void read(Scanner sc){\n\n\t\tString fract = sc.next(); // \"3/4\"\n\t\tStringTokenizer parser = new StringTokenizer(fract, \"/\");\n\t\tif(parser.countTokens() != 2)\n\t \tthrow new IllegalArgumentException(\"Bad format for fraction!\");\n\t\tString first = parser.nextToken();\n\t\tint num = Integer.parseInt(first);\n\t\tString second = parser.nextToken();\n\t\tint denom = Integer.parseInt(second);\n\t\tsetFraction(num, denom);\n }", "public String fractionAddition1(String expression) {\n Scanner s = new Scanner(expression).useDelimiter(\"/|(?=[-+])\");\n long num = 0, den = 1;\n while (s.hasNext()) {\n long a = s.nextLong(), b = s.nextLong();\n num = num * b + a * den;\n den *= b;\n }\n long gcd = gcd(num, den);\n return (num / gcd) + \"/\" + (den / gcd);\n }", "public String get_fraction_part();", "private static float toFloat (String string) {\n return Float.valueOf(string).floatValue();\n }", "public String fractionToDecimal(int numerator, int denominator) {\n if(numerator == 0) return \"0\";\n \n StringBuilder sb = new StringBuilder();\n //key is remainder, value is len of curr sb, which is starting index of this remainder \n HashMap<Long, Integer> hs = new HashMap<Long, Integer>();\n \n //convert to long to prevent overflow\n long n = (long) numerator;\n long d = (long) denominator;\n \n //catch negative sign\n if( (n < 0) ^ (d < 0) ){\n sb.append(\"-\");\n n = Math.abs(n);\n d = Math.abs(d);\n }\n \n sb.append(n/d);\n long remainder = n%d;\n \n if(remainder == 0) return sb.toString();\n \n sb.append(\".\");\n \n //we will process inputs until we face a visited remainder again\n //in case inputs are dividable, we will return result inside the loop\n while( !hs.containsKey(remainder) ){\n \t//each loop we will start with a new remainder from last loop\n \t\n //record curr remainder and its starting index\n hs.put( remainder, sb.length() );\n \n //update remainder like what we did in math division\n remainder *= 10;\n \n sb.append( remainder/d );\n \n //update remainder to get next remainder\n remainder %= d;\n \n //inputs are dividable\n if(remainder == 0) return sb.toString();\n }\n \n //we get here only when we have Recurring Decimal, add \"(\" based on hashMap value \n sb.insert( hs.get(remainder), \"(\" ).append(\")\");\n \n return sb.toString();\n }", "public static String convertMixedNumber(String originalFraction)\r\n {\r\n\t\tint slash = originalFraction.indexOf('/');\r\n \tint underscore = originalFraction.indexOf('_');\r\n\t\tif (originalFraction.contains(\"-\"))\r\n\t\t{\r\n\t\t\tint wholeNumber = Integer.parseInt(originalFraction.substring(1, underscore));\r\n\t\t\tint num = Integer.parseInt(originalFraction.substring(underscore + 1, slash));\r\n\t\t\tint denom = Integer.parseInt(originalFraction.substring(slash + 1, originalFraction.length()));\r\n\t\t\tint num1 = (denom * wholeNumber + num) * -1;\r\n\t\t\tString improperFraction = num1 + \"/\" + denom;\r\n\t\t\treturn improperFraction;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\tint wholeNumber = Integer.parseInt(originalFraction.substring(0, underscore));\r\n\t\tint num = Integer.parseInt(originalFraction.substring(underscore + 1, slash));\r\n\t\tint denom = Integer.parseInt(originalFraction.substring(slash + 1, originalFraction.length()));\r\n\t\tint num1 = (denom * wholeNumber) + num;\r\n\t\tString improperFraction = num1 + \"/\" + denom;\r\n\t\treturn improperFraction;\r\n\t\t}\r\n }", "public String getFraction() {\n return fraction;\n }", "protected float toFloat(String s){\n return Float.parseFloat(s);\n }", "@Override\n public Number fromString(String string) {\n return Double.valueOf(string).intValue();\n }", "public static int parseFractionForWholeNumber(String fraction) {\n int length = fraction.length();\n int underscore = fraction.indexOf(\"_\");\n int slash = fraction.indexOf(\"/\");\n String whole = \"0\"; // default\n if (underscore != -1) { // underscore will equal -1 if the String is not found, \n // so this tests that an underscore exists in the String\n whole = fraction.substring(0, underscore);\n } else {\n if (slash != -1) { // no underscore and a slash ==> fraction\n whole = \"0\";\n } else { // no underscore and no slash ==> whole number\n whole = fraction.substring(0, length);\n }\n }\n int wholeNumber = Integer.parseInt(whole);\n return wholeNumber;\n }", "@Test\n public void testStringFractionImplInvalidStrings() {\n assertThrows(NumberFormatException.class, () -> {\n new FractionImpl(\"9 9 0/2\");\n });\n //Input value which is not a number\n assertThrows(NumberFormatException.class, () -> {\n new FractionImpl(\"One\");\n });\n }", "private static float parse_number() {\n skip_spaces();\n\n if (i == l) {\n throw new Error(String.format(\"Unexpected end (s=%s)\", s));\n }\n\n int start = i;\n\n char c = s.charAt(i);\n\n // Consume sign.\n if (c == '-' || c == '+') {\n i += 1;\n c = s.charAt(i);\n }\n\n // Consume integer.\n if (c >= '0' && c <= '9') {\n skip_digits();\n if (i < l) {\n c = s.charAt(i);\n }\n } else if (c != '.') {\n throw new Error(\n String.format(\"Invalid number formating character '%c' (i=%d, s=%s)\", c, i, s));\n }\n\n // Consume fraction.\n if (c == '.') {\n i += 1;\n skip_digits();\n if (i < l) {\n c = s.charAt(i);\n }\n }\n\n if ((c == 'e' || c == 'E') && i + 1 < l) {\n char c2 = s.charAt(i + 1);\n // Check for `em`/`ex`.\n if (c2 != 'm' && c2 != 'x') {\n i += 1;\n c = s.charAt(i);\n\n if (c == '+' || c == '-') {\n i += 1;\n skip_digits();\n } else if (c >= '0' && c <= '9') {\n skip_digits();\n } else {\n throw new Error(\n String.format(\"Invalid number formating character '%c' (i=%d, s=%s)\", c, i, s));\n }\n }\n }\n\n String num = s.substring(start, i);\n float n = Float.parseFloat(num);\n\n // inf, nan, etc. are an error.\n if (Float.isInfinite(n) || Float.isNaN(n)) {\n throw new Error(\n String.format(\"Invalid number '%s' (start=%d, i=%d, s=%s)\", num, start, i, s));\n }\n\n return n;\n }", "public static double atof(String s)\n {\n int i = 0;\n int sign = 1;\n double r = 0; // integer part\n // double f = 0; // fractional part\n double p = 1; // exponent of fractional part\n int state = 0; // 0 = int part, 1 = frac part\n\n while ((i < s.length()) && Character.isWhitespace(s.charAt(i)))\n {\n i++;\n }\n\n if ((i < s.length()) && (s.charAt(i) == '-'))\n {\n sign = -1;\n i++;\n }\n else if ((i < s.length()) && (s.charAt(i) == '+'))\n {\n i++;\n }\n\n while (i < s.length())\n {\n char ch = s.charAt(i);\n\n if (('0' <= ch) && (ch <= '9'))\n {\n if (state == 0)\n {\n r = ((r * 10) + ch) - '0';\n }\n else if (state == 1)\n {\n p = p / 10;\n r = r + (p * (ch - '0'));\n }\n }\n else if (ch == '.')\n {\n if (state == 0)\n {\n state = 1;\n }\n else\n {\n return sign * r;\n }\n }\n else if ((ch == 'e') || (ch == 'E'))\n {\n long e = (int) parseLong(s.substring(i + 1), 10);\n\n return sign * r * Math.pow(10, e);\n }\n else\n {\n return sign * r;\n }\n\n i++;\n }\n\n return sign * r;\n }", "void setFractions(Set<String> fractions);", "public String fractionToDecimal(int numerator, int denominator) {\n \n if (numerator == 0) return \"0\";\n\n StringBuilder fraction = new StringBuilder();\n // the use of ^\n if (numerator < 0 ^ denominator < 0) {\n fraction.append(\"-\");\n }\n\n // avoid over follow \n long dividend = Math.abs(Long.valueOf(numerator));\n long divisor = Math.abs(Long.valueOf(denominator));\n\n fraction.append(String.valueOf(dividend / divisor));\n long remainder = dividend % divisor;\n if (remainder == 0) {\n return fraction.toString();\n }\n\n fraction.append(\".\");\n Map<Long, Integer> map = new HashMap<>();\n while (remainder != 0) {\n\n // check if current remainder has repeat, if so, include () and stop\n if (map.containsKey(remainder)) {\n fraction.insert(map.get(remainder), \"(\");\n fraction.append(\")\");\n break;\n }\n\n map.put(remainder, fraction.length());\n remainder *= 10;\n fraction.append(String.valueOf(remainder / divisor));\n remainder %= divisor;\n }\n\n return fraction.toString();\n }", "public Fraction(Fraction fraction) {\n if (fraction == null) {\n throw new PizzaException(\"fraction can't be null\");\n } else {\n this.NUMERATOR = fraction.NUMERATOR;\n this.DENOMINATOR = fraction.DENOMINATOR;\n }\n }", "public static int findDenominator(String fraction) {\n \tif(fraction.contains(\"/\")) {\t//check to see if it has a /\r\n \t\tint denominator= Integer.parseInt(fraction.substring(fraction.indexOf(\"/\")+1,fraction.length( )));\t//use substring to get numbers from / to the frac length; make variable\r\n \t\treturn denominator;\t//return the number\r\n \t} else {\r\n \t\treturn 1; //else if it's a whole number return 1\r\n \t}\r\n }", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "@Test\n\tpublic void testConstructors(){\n\t\tassertTrue(\"Didn't intialize correctly\", new Fraction().toString().equals(\"1/1\"));\n\t\tassertTrue(\"Didn't intialize correctly\",new Fraction(4,3).toString().equals(\"4/3\"));\n\t\tassertFalse(\"Didn't intialize correctly\",new Fraction(0,0).toString().equals(\"0/0\"));\n\t}", "public Float convertStringToFloat(String s ) {\n\t\t\treturn Float.valueOf(s);\n\t\t}", "public String toString() {\n String myFraction = \"\" + this.numerator + \"/\" + this.denominator;\n return myFraction;\n }", "public void setFraction(int fraction) {\n this.fraction = fraction;\n }", "@Override\n\t\tpublic Double convert(String s) {\n\t\t\treturn Double.parseDouble(s);\n\t\t}", "public static String reduceFraction(String mixedAnswer)\r\n {\r\n \tint underscore = mixedAnswer.indexOf('_');\r\n \tint slash = mixedAnswer.indexOf('/');\r\n \tint num = Integer.parseInt(mixedAnswer.substring(underscore + 1, slash));\r\n \tint denom = Integer.parseInt(mixedAnswer.substring(slash + 1, mixedAnswer.length()));\r\n \tint newNum = num / findGCF(num, denom);\r\n \tint newDenom = denom / findGCF(num, denom);\r\n \tString reducedFraction = newNum + \"/\" + newDenom;\r\n \treturn reducedFraction; \r\n }", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "public static void main(String[] args) {\n\t\tScanner console = new Scanner(System.in);\n\t\tSystem.out.println(\"Hey give me a number or a fraction.\");\n\t\tString oneNumber = console.nextLine();\n\t\tSystem.out.println(\"Hey give me another number or a fraction.\");\n\t\tString twoNumber = console.nextLine();\n\t\tSystem.out.println(\"hey give me a number 1-4. 1=+, 2=-, 3=* 4=/\");\n\t\tString simble = console.nextLine();\n\t\tSystem.out.println(oneNumber);\n\t\tint v = Integer.parseInt(simble);\n\t\tif (v == 1) {\n\t\t\tSystem.out.println(\"+\");\n\t\t} else if (v == 2) {\n\t\t\tSystem.out.println(\"-\");\n\t\t} else if (v == 3) {\n\t\t\tSystem.out.println(\"*\");\n\t\t} else if (v == 4) {\n\t\t\tSystem.out.println(\"/\");\n\t\t} else\n\t\t\tSystem.out.println(\"\\\\('_')/\");\n\n\t\tSystem.out.println(twoNumber);\n\t\tSystem.out.println(\"=\");\n\t\tint numerator1;\n\t\tint denominator1;\n\t\tif (oneNumber.contains(\"/\")) {\n\t\t\tString numbers[] = oneNumber.split(\"/\");\n\t\t\tnumerator1 = Integer.parseInt(numbers[0]);\n\t\t\tdenominator1 = Integer.parseInt(numbers[1]);\n\n\t\t} else {\n\t\t\tnumerator1 = Integer.parseInt(oneNumber);\n\t\t\tdenominator1 = 1;\n\t\t\t}\n\t\t\tint numerator2;\n\t\t\tint denominator2;\n\t\tif (twoNumber.contains(\"/\")) {\n\t\t\tString numbers[] = twoNumber.split(\"/\");\n\t\t\tnumerator2 = Integer.parseInt(numbers[0]);\n\t\t\tdenominator2 = Integer.parseInt(numbers[1]);\n\t\t\t\n\t\t} else {\n\t\t\tnumerator2 = Integer.parseInt(twoNumber);\n\t\tdenominator2 = 1;\n\t\t}\n\t\tif (v == 1) {\n\t\t\tint r_numerator =(numerator1 * denominator2) + (numerator2 * denominator1);\n\t\t\tint r_denominator = denominator1 * denominator2;\n\t\t\tfraction_boy(r_numerator, r_denominator);\n\t\t} else if (v == 2) {\n\t\t\tint r_numerator =(numerator1 * denominator2) - (numerator2 * denominator1);\n\t\t\tint r_denominator = denominator1 * denominator2;\n\t\t\tfraction_boy(r_numerator, r_denominator);\n\t\t} else if (v == 3) {\n\t\t\tint r_numerator = numerator1 * numerator2;\n\t\t\tint r_denominator = denominator1 * denominator2;\n\t\t\tfraction_boy(r_numerator, r_denominator);\n\t\t} else if (v == 4) {\n\t\t\tint r_numerator = numerator1 * denominator2;\n\t\t\tint r_denominator = numerator2 * denominator1;\n\t\t\tfraction_boy(r_numerator, r_denominator);\n\t\t} else\n\t\t\tSystem.out.println(\"sorry man this is'nt going to work.\");\n\n\n\t\t}", "public static String convertWholeNumber(String originalNumber)\r\n {\r\n \tString finalFraction = originalNumber + \"/1\";\r\n \treturn finalFraction;\r\n }", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public Fraction(){\n\t\n\t\tsetFraction(0,1);\n }", "public static Fraction toFraction (double f, int d) {\n if (d > 0)\n return new Fraction ((int)(Math.round (f*d)), d);\n else\n throw new ArithmeticException (\" illegal denominator \");\n }", "public static String fractionToDecimal(int numerator, int denominator) {\n\t\tif (numerator == 0)\n\t\t\treturn \"0\";\n\t\tStringBuilder sb = new StringBuilder();\n\t\t// \"+\" or \"-\"\n\t\tsb.append((numerator > 0) ^ (denominator > 0) ? \"-\" : \"\");\n\t\tlong num = Math.abs((long)numerator);\n\t\tlong den = Math.abs((long)denominator);\n\t\t\n\t\t// integral part\n\t\tsb.append(num / den);\n\t\tnum %= den;\n\t\tif (num == 0) return sb.toString();\n\t\t\n\t\t// fractional part\n\t\tsb.append('.');\n\t\tHashMap<Long, Integer> map = new HashMap<>();\n\t\tmap.put(num, sb.length());\n\t\twhile (num != 0) {\n\t\t\tnum *= 10;\n\t\t\tsb.append(num / den);\n\t\t\tnum %= den;\n\t\t\tif (map.containsKey(num)) {\n\t\t\t\tint index = map.get(num);\n\t\t\t\tsb.insert(index, \"(\");\n\t\t\t\tsb.append(')');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmap.put(num, sb.length());\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static float StringToFloat(String StringValue){\n Float floatee;\n floatee = Float.valueOf(StringValue);\n return floatee.floatValue(); \n }", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "private static Expression reduceFraction(int numerator, int denominator)\r\n\t{\r\n\t\tif(denominator == 0)\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Divide by zero error: \" + numerator + \"/\" + denominator);\r\n\t\t}\r\n\t\tint gcd;\r\n\t\tif(numerator >= denominator)\r\n\t\t{\r\n\t\t\tgcd = gcd(numerator, denominator);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tgcd = gcd(denominator, numerator);\r\n\t\t}\r\n\t\tnumerator /= gcd;\r\n\t\tdenominator /= gcd;\r\n\t\tif(denominator == 1)\r\n\t\t{\r\n\t\t\t//Quotient is integer\r\n\t\t\treturn new Rational(numerator);\r\n\t\t}\t\t\r\n\t\t//Negative denominator\r\n\t\tif(denominator < 0)\t\t\t\r\n\t\t{\r\n\t\t\tdenominator *= -1;\r\n\t\t\tnumerator *= -1;\r\n\t\t}\r\n\t\t//Quotient is fraction\r\n\t\treturn new FullExpression(new Rational(numerator), new Rational(denominator), Operator.QUOT);\r\n\t}", "public FloatLiteral(Range range, AstNode parent, String rawString) {\n super(range, parent, rawString);\n // this.isDouble = isDouble(rawString);\n // this.value = parseFloat(rawString);\n }", "public Fraction(int numerator, int denominator){\n this.numerator= numerator;\n this.denominator = denominator;\n }", "public static String parseExpressionForSecondFraction(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n String operator = expression.substring(space + 1, space + 2);\n int length = expression.length();\n String frac2 = expression.substring(space + 3, length);\n return frac2;\n }", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "Set<String> getFractions();", "public Fraction(int numerator, int denominator) {\n\n //won't allow you to set the denominator equal to 0 because dividing by a 0 gives you an error\n if (denominator == 0) {\n throw new PizzaException(\"denominator can't be 0\");\n } else {\n //finding the GCD value depending on num and den\n int gcd = findGCD(numerator, denominator);\n\n //numerator/gcd and denominator/gcd give a reduced form and initialize them\n numerator = numerator / gcd;\n denominator = denominator / gcd;\n\n // if they both are negatives\n //Convert them to positive\n if (numerator < 0 && denominator < 0) {\n numerator = Math.abs(numerator);\n denominator = Math.abs(denominator);\n }\n //move the negative sign to the top for comparison reason\n else if (numerator > 0 && denominator < 0) {\n numerator = -numerator;\n denominator = Math.abs(denominator);\n }\n //set the final value for numerator and constructor\n this.NUMERATOR = numerator;\n this.DENOMINATOR = denominator;\n }\n\n }", "float toFloat(String value, float divideBy) {\n value = value.trim();\n if (value.indexOf(\"9999\") > -1) {\n // .9999's were made floatnull - check for them!\n if (value.indexOf(\".9999\") == -1) value = \"\"; // ub01\n } // if (value.indexOf(\"9999\") > -1)s\n return (!\"\".equals(value)\n ? new Float(value).floatValue() / divideBy\n : Tables.FLOATNULL);\n }", "@Override\n\t\tpublic java.math.BigInteger convert(String s) {\n\t\t\treturn new java.math.BigInteger(s);\n\t\t}", "public Fraction()\n {\n }", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString fraction=br.readLine();\n\t\tString split[]=fraction.split(\"/\");\n\t\tint num1=Integer.parseInt(split[0]);\n\t\tint den1=Integer.parseInt(split[1]);\n\t\tfraction=br.readLine();\n\t\tsplit=fraction.split(\"/\");\n\t\tint num2=Integer.parseInt(split[0]);\n\t\tint den2=Integer.parseInt(split[1]);\n\t\taddFraction(num1,den1,num2,den2);\n\t\tSystem.out.println(num+\"/\"+den);\n\t}", "public static String extractPercentOrNumberStr(String str){\n return extract(str, percentOrNumberExtractPattern);\n }", "public static String toMixedNum(int numerator, int denominator) {\n \tint whole=numerator/denominator;\t\t//make variable to store whole number by dividing num and denom\r\n\t\tint newnumerator=numerator%denominator;\t//get newnum by doing num mod denom\r\n\t\t\r\n\t\tif(whole<0) {\t\t\t//if whole number is negative and the new num is neg as well,\r\n\t\t\tnewnumerator *= -1;\t// make the new num positive\r\n\t\t}\r\n\t\tif(newnumerator==0 && whole==0) {\t//if the frac is 0 all-around\r\n\t\t\treturn \"0\";\t\t\t\t\t\t//return 0\r\n\t\t}\r\n\t\tif(newnumerator==0) {\t//if the num is 0 it's most likely\r\n\t\t\treturn whole + \"\";\t//just a whole number\r\n\t\t}\r\n\t\tif(newnumerator<0 && denominator<0) {\t//if the num and denom is both neg\r\n\t\t\tnewnumerator *= -1;\t\t\t\t\t//then the frac itself should be negative\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(denominator<0) {\t\t\t\t//if denom is negative \r\n\t\t\tnewnumerator *= -1;\t\t\t//multiply both num and denom by -1 to get a postitive denom and neg num\r\n\t\t\tdenominator *= -1;\r\n\t\t}\r\n\t\tif(whole==0) {\t\t\t//if the whole num is 0\r\n\t\t\treturn simplify(newnumerator, denominator);\t//then it should just return num/denom\r\n\t\t}\r\n\t\treturn whole + \"_\"+ simplify(newnumerator, denominator); //return statement of the whole mixed frac\r\n }", "@Test\n\tpublic void testAddTo() {\n\t\t\n\t\tFraction testFrac1 = new Fraction(5,15);\n\t\t\n\t\ttestFrac1.addTo(new Fraction(20,15));\n\t\t\n\t\tassertTrue(\"Didn't add the fractions correctly\",testFrac1.toString().equals(\"25/15\"));\n\t\t\n\t\ttestFrac1.addTo(new Fraction());\n\t\t\n\t\tassertTrue(\"Didn't add the fractions correctly\",testFrac1.toString().equals(\"40/15\"));\n\t\t\n\t\t\n\t}", "public Fraction(int numerator, int denominator){\n \n\t\tsetFraction(numerator, denominator);\n }", "void mo9698a(String str, float f);", "@Override\r\n\tpublic float getFloat(String string) {\n\t\treturn 0;\r\n\t}", "public static int fractionDigits(String percent) {\n\t return BCMath.numberPrecision(percent) + 8;\n }", "public Fraction() {\n\t\tsetNumerator(0);\n\t\tsetDenominator(1);\n\t}", "public static ArthurString divide(ArthurString one, ArthurNumber two) {\n int x = Math.abs((int) Math.round(two.val));\n int lastPos = Math.max(0, one.str.length() - x);\n String cut = one.str.substring(lastPos);\n return new ArthurString(cut);\n }", "public String toString(){\r\n String str;\r\n if( this.denominator==1 ){\r\n str = String.valueOf(numerator);\r\n }else{\r\n str = String.valueOf(numerator) + \"/\" + String.valueOf(denominator);\r\n }\r\n return(str);\r\n }", "public void inputFraction() {\n\t\tSystem.out.println(\"Input Numerator\");\n\t\tint num = scan.nextInt();\n\t\tSystem.out.println(\"Input Denominator\");\t\n\t\tint deno = scan.nextInt();\n\t\tsetNumerator(num);\n\t\tsetDenominator(deno);\n\t}", "public Fraction(int numerator, int denominator)\n {\n setNumerator(numerator);\n setDenominator(denominator);\n }", "public static void main(String...strings) {\n\t\tboolean exitTriggered = false;\n\t\tScanner myKeyb= new Scanner(System.in);\n\t\tString fractionHolder = \"\";\n\t\tint choice=0;\n\t\tFraction fr1 =null,fr2=null;\n\t\twhile(!exitTriggered) {\n\t\t\tSystem.out.println(\"1-Enter one Fraction\\n2-Enter two Fractions\\n3-Exit\\n\");\n\t\t\t choice =myKeyb.nextInt();\n\t\t\t myKeyb.nextLine();\n\t\t\tif(choice ==3)\n\t\t\t\treturn;\n\t\t\tif (choice ==2) {\n\t\t\t\tSystem.out.println(\"\\nEnter Fraction 1:\\n\");\n\t\t\t\ttry {\n\t\t\t\tfractionHolder = myKeyb.nextLine();\n\t\t\t\tfr1 = new Fraction(Integer.parseInt(fractionHolder.substring(0,fractionHolder.indexOf(\"/\") )), Integer.parseInt(fractionHolder.substring(fractionHolder.indexOf(\"/\")+1)));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"An error has occured ... Exiting\"); return;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nEnter Fraction 2:\\n\");\n\t\t\t\ttry {\n\t\t\t\tfractionHolder = myKeyb.nextLine();\n\t\t\t\tfr2 = new Fraction(Integer.parseInt(fractionHolder.substring(0,fractionHolder.indexOf(\"/\") )), Integer.parseInt(fractionHolder.substring(fractionHolder.indexOf(\"/\")+1)));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"An error has occured ... Exiting\"); return;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"1-Display\\n2-Add\\n3-Subtract\\n4-Multiply\\n5-Devide\\n6-Exit\");\n\t\t\t\tchoice =myKeyb.nextInt();\n\t\t\t\tmyKeyb.nextLine();\n\t\t\t\tif(choice ==6) return;\n\t\t\t\tif(choice ==1) System.out.println(fr1+\" \"+fr2);\n\t\t\t\tif(choice ==2) System.out.println(fr1.add(fr2));\n\t\t\t\tif(choice ==3) System.out.println(fr2.subtract(fr2));\n\t\t\t\tif(choice ==4) System.out.println(fr1.multiply(fr2));\n\t\t\t\tif(choice ==5) System.out.println(fr1.devide(fr2));\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tif (choice ==1) {\n\t\t\t\tSystem.out.println(\"\\nEnter one Fraction:\\n\");\n\t\t\t\ttry {\n\t\t\t\tfractionHolder = myKeyb.nextLine();\n\t\t\t\tfr1 = new Fraction(Integer.parseInt(fractionHolder.substring(0,fractionHolder.indexOf(\"/\") )), Integer.parseInt(fractionHolder.substring(fractionHolder.indexOf(\"/\")+1)));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"An error has occured ... Exiting\"); return;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"1-Display Fraction\\n2-Exit\");\n\t\t\t\tchoice =myKeyb.nextInt();\n\t\t\t\tmyKeyb.nextLine();\n\t\t\t\tif(choice ==2) return;\n\t\t\t\tif(choice ==1) System.out.println(fr1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static double parseFloat(final Object self, final Object string) {\n final String str = JSType.trimLeft(JSType.toString(string));\n final int length = str.length();\n\n // empty string is not valid\n if (length == 0) {\n return Double.NaN;\n }\n\n int start = 0;\n boolean negative = false;\n char ch = str.charAt(0);\n\n if (ch == '-') {\n start++;\n negative = true;\n } else if (ch == '+') {\n start++;\n } else if (ch == 'N') {\n if (str.startsWith(\"NaN\")) {\n return Double.NaN;\n }\n }\n\n if (start == length) {\n // just the sign character\n return Double.NaN;\n }\n\n ch = str.charAt(start);\n if (ch == 'I') {\n if (str.substring(start).startsWith(\"Infinity\")) {\n return negative? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY;\n }\n }\n\n boolean dotSeen = false;\n boolean exponentOk = false;\n int exponentOffset = -1;\n int end;\n\nloop:\n for (end = start; end < length; end++) {\n ch = str.charAt(end);\n\n switch (ch) {\n case '.':\n // dot allowed only once\n if (exponentOffset != -1 || dotSeen) {\n break loop;\n }\n dotSeen = true;\n break;\n\n case 'e':\n case 'E':\n // 'e'/'E' allow only once\n if (exponentOffset != -1) {\n break loop;\n }\n exponentOffset = end;\n break;\n\n case '+':\n case '-':\n // Sign of the exponent. But allowed only if the\n // previous char in the string was 'e' or 'E'.\n if (exponentOffset != end - 1) {\n break loop;\n }\n break;\n\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n if (exponentOffset != -1) {\n // seeing digit after 'e' or 'E'\n exponentOk = true;\n }\n break;\n\n default: // ignore garbage at the end\n break loop;\n }\n }\n\n // ignore 'e'/'E' followed by '+/-' if not real exponent found\n if (exponentOffset != -1 && !exponentOk) {\n end = exponentOffset;\n }\n\n if (start == end) {\n return Double.NaN;\n }\n\n try {\n final double result = Double.valueOf(str.substring(start, end));\n return negative ? -result : result;\n } catch (final NumberFormatException e) {\n return Double.NaN;\n }\n }", "public static int findNumerator(String fraction) {\n \tif(fraction.contains(\"_\")) {\t//check if the frac has an _\r\n \t\tint numerator= Integer.parseInt(fraction.substring(fraction.indexOf(\"_\") +1, fraction.indexOf(\"/\")));\t//if so use substring from _ to the /; convert to int ant make variable for numerator\r\n \t\treturn numerator;\t//return the numerator\r\n \t} else {\r\n \t\tif(fraction.contains(\"/\")) {\t//check if the frac just had a /\r\n \t\t\tint numeratorSlash= Integer.parseInt(fraction.substring(0, fraction.indexOf(\"/\")));\t//use substring to get numbers from index 0 to / ; make variable and convert to int\r\n \t\t\treturn numeratorSlash;\t//return the number\r\n \t\t} \r\n \t}\r\n \treturn 0;\t//else if it doesnt apply to any of the conditionals above it's most likely a whole number so just return 0\r\n }", "public abstract float mo70722e(String str);", "public static String randomFraction(){\r\n int denom = randomNumber();\r\n int numer = randomNumber();\r\n String fraction = \"\";\r\n \r\n if (numer>denom){\r\n fraction = numer+\"/\"+denom;\r\n }\r\n else {\r\n fraction = denom+\"/\"+numer;\r\n }\r\n \r\n return fraction;\r\n }", "public void testGetFraction() {\n final float EXPECTED = TypedValue.complexToFraction(10, 1.1f, 2.1f) ;\n TypedValue tv = new TypedValue();\n tv.data = 10;\n assertEquals(EXPECTED, tv.getFraction(1.1f, 2.1f));\n }", "static Value<Float> parseFloat(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Float.parseFloat(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }", "public void parse(final String s) throws NumberFormatException {\r\n\t}", "public static double MyParseFloat(String s) throws Exception {\n\t\tStateFloat state;\n\n\t\tstate = StateFloat.SA;\n\n\t\tint i = 0;\n\t\tBoolean neg = false;\n\t\tBoolean nege = false;\n\t\tdouble divider = 10;\n\t\tdouble value = 0;\n\t\tint exponent = 0;\n\n\twhile (i < s.length() && (state != StateFloat.SC || state != StateFloat.SF || state != StateFloat.SH)) {\n\t\t\tchar ch = s.charAt(i);\n\t\t\tswitch (state) {\n\t\t\t\tcase SA:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tstate = StateFloat.SC;\n\t\t\t\t\t\tvalue = Character.getNumericValue(ch);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else if (ch == '.') {\n\t\t\t\t\t\tstate = StateFloat.SD;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else if (ch == '+' || ch == '-') {\n\t\t\t\t\t\tstate = StateFloat.SB;\n\t\t\t\t\t\tif (ch == '-') neg = true;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Bad Format\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SB:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tstate = StateFloat.SC;\n\t\t\t\t\t\tif (neg) value = 10*value - Character.getNumericValue(ch);\n\t\t\t\t\t\telse value = 10*value + Character.getNumericValue(ch);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else if (ch == '.') {\n\t\t\t\t\t\tstate = StateFloat.SD;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Bad Format\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SC:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tif (neg) value = 10*value - Character.getNumericValue(ch);\n\t\t\t\t\t\telse value = 10*value + Character.getNumericValue(ch);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else if (ch == '.') {\n\t\t\t\t\t\tstate = StateFloat.SD;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else if (ch == 'e' || ch == 'E') {\n\t\t\t\t\t\tstate = StateFloat.SE;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Bad Format\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SD:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tstate = StateFloat.SF;\n\t\t\t\t\t\tif (neg) value -= Character.getNumericValue(ch)/divider;\n\t\t\t\t\t\telse value += Character.getNumericValue(ch)/divider;\n\t\t\t\t\t\tdivider *= 10;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Bad Format\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SE:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tstate = StateFloat.SH;\n\t\t\t\t\t\tif (nege) exponent = 10*exponent - Character.getNumericValue(ch);\n\t\t\t\t\t\telse exponent = 10*exponent + Character.getNumericValue(ch);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else if (ch == '+' || ch == '-') {\n\t\t\t\t\t\tstate = StateFloat.SG;\n\t\t\t\t\t\tif (ch == '-') nege = true;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Bad Format\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SF:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\t//Divider comes here\n\t\t\t\t\t\tif (neg) value -= Character.getNumericValue(ch)/divider;\n\t\t\t\t\t\telse value += Character.getNumericValue(ch)/divider;\n\t\t\t\t\t\tdivider *= 10;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else if (ch == 'e' || ch == 'E') {\n\t\t\t\t\t\tstate = StateFloat.SE;\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Bad Format\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SG:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tstate = StateFloat.SH;\n\t\t\t\t\t\tif (nege) exponent = 10*exponent - Character.getNumericValue(ch);\n\t\t\t\t\t\telse exponent = 10*exponent + Character.getNumericValue(ch);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Bad Format\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SH:\n\t\t\t\t\tif (Character.isDigit(ch)) {\n\t\t\t\t\t\tif (nege) exponent = 10*exponent - Character.getNumericValue(ch);\n\t\t\t\t\t\telse exponent = 10*exponent + Character.getNumericValue(ch);\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"Bad Format\");\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (state != StateFloat.SC && state != StateFloat.SF && state != StateFloat.SH) throw new Exception(\"Bad Format\");\n\t\tvalue = value * Math.pow(10, exponent);\n\t\treturn value;\n\t}", "private String doDivision(String answer)\n\t{\n\t\tint signSpot;\n\t\tString stringToDelete;\n\t\tdouble number1;\n\t\tdouble number2;\n\t\tint minValue = 0;\n\t\tint maxValue = 0;\n\n\t\twhile (answer.contains(\"/\"))\n\t\t{\n\t\t\tsignSpot = answer.indexOf(\"/\");\n\n\t\t\t// start\n\t\t\tfor (int count = signSpot - 1; count >= 0; count -= 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count, count + 1)) == true\n\t\t\t\t\t\t|| answer.substring(count, count + 1).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tminValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// finish\n\t\t\tfor (int count = signSpot + 2; count <= answer.length(); count += 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count - 1, count)) == true\n\t\t\t\t\t\t|| answer.substring(count - 1, count).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tmaxValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstringToDelete = answer.substring(minValue, maxValue);\n\t\t\tString myString = answer.substring(minValue, signSpot);\n\t\t\tnumber1 = Double.parseDouble(myString);\n\t\t\tmyString = answer.substring(signSpot + 1, maxValue);\n\t\t\tnumber2 = Double.parseDouble(myString);\n\t\t\tDouble numberAnswer1 = number1 / number2;\n\t\t\tanswer = answer.replace(stringToDelete, \"\" + numberAnswer1);\n\t\t\tSystem.out.println(answer);\n\t\t}\n\t\treturn answer;\n\t}", "public Fraction(int numerator,int denominator)\n\t{\n\t\tthis.numerator=numerator;\n\t\tthis.denominator= denominator;\n\t\tsimplify();\n\t}", "com.google.protobuf.ByteString getSlashFractionDoubleSign();", "protected static String decodePercent(String str) {\n\t\tString decoded = null;\n\t\ttry {\n\t\t\tdecoded = URLDecoder.decode(str, \"UTF8\");\n\t\t} catch (UnsupportedEncodingException ignored) {\n\t\t\tNanoHTTPDSingleFile.LOG.log(Level.WARNING, \"Encoding not supported, ignored\", ignored);\n\t\t}\n\t\treturn decoded;\n\t}", "Fraction () {\n this (0, 1);\n }", "public DigitsValidator(int integer, int fraction) {\n this.integer = integer;\n this.fraction = fraction;\n }", "@Override\r\n public void updateValue(String s) {\r\n //Covert from string to float\r\n this.value = Float.valueOf(s);\r\n }", "public Number fromString(String s){\n\n return 0;\n }", "public Fraction(int numerator, int denominator)\n\t{\n\t\tmyNumerator = numerator;\n\t\tmyDenominator = denominator;\n\t}", "public double Convert(String from, String to, double input) {\n\n\t\tdouble deno = valuesMap.get(from);\n\t\tdouble nume = valuesMap.get(to);\n\t\tdouble ret = (nume / deno) * input;\n\t\treturn ret;\n\t}", "public double parse(String inputString){\n\t\tclear();\n\t\tinput = inputString;\n\t\treturn expr(true);\n\t}", "public static String produceAnswer(String input) {\n // TODO: Implement this function to produce the solution to the input\n \n // Parsing one line of input\n int space = input.indexOf(\" \"); // find the index of the first space\n String operandOne = input.substring(0, space); // substring of beginning to space before operator\n \n String newString1 = input.substring(space + 1, input.length());\n int space2 = newString1.indexOf(\" \"); // find the index of the second space\n String operator = newString1.substring(0, space2); // operator is between the first space and the second space\n \n String newString2 = newString1.substring(space2, newString1.length());\n String operandTwo = newString2.substring(space2, newString2.length()); // substring of space after operator to the end\n \n \n // Multiple operations\n while (operandTwo.indexOf(\" \") > 0) {\n int space3 = operandTwo.indexOf(\" \");\n String value = operandTwo.substring(0, space3);\n String new_String3 = operandTwo.substring(space3 + 1, operandTwo.length());\n int space4 = new_String3.indexOf(\" \");\n String operator2 = new_String3.substring(space4 - 1, space4);\n operandTwo = new_String3.substring(space4 + 1, new_String3.length());\n String new_equation = operandOne + \" \" + operator + \" \" + value;\n operandOne = produceAnswer(new_equation);\n operator = operator2;\n }\n \n // Parsing fractions: Operand 1\n String whole1 = operandOne; // hi_\n String num1 = \"\";\n String denom1 = \"\";\n int slash1 = operandOne.indexOf(\"/\");\n \n if (slash1 > 0) {\n int underscore1 = operandOne.indexOf(\"_\");\n if (underscore1 > 0) {\n whole1 = operandOne.substring(0, underscore1);\n num1 = operandOne.substring(underscore1 + 1, slash1);\n denom1 = operandOne.substring(slash1 + 1, operandOne.length());\n } else {\n whole1 = \"0\";\n num1 = operandOne.substring(underscore1 + 1, slash1);\n denom1 = operandOne.substring(slash1 + 1, operandOne.length());\n }\n \n } else {\n num1 = \"0\";\n denom1 = \"1\";\n }\n \n // Parsing fractions: Operand 2\n String whole2 = operandTwo;\n String num2 = \"\";\n String denom2 = \"\";\n int slash2 = operandTwo.indexOf(\"/\");\n \n if (slash2 > 0) {\n int underscore2 = operandTwo.indexOf(\"_\");\n if (underscore2 > 0) {\n whole2 = operandTwo.substring(0, underscore2);\n num2 = operandTwo.substring(underscore2 + 1, slash2);\n denom2 = operandTwo.substring(slash2 + 1, operandTwo.length());\n } else {\n whole2 = \"0\";\n num2 = operandTwo.substring(underscore2 + 1, slash2);\n denom2 = operandTwo.substring(slash2 + 1, operandTwo.length());\n }\n \n } else {\n num2 = \"0\";\n denom2 = \"1\";\n }\n \n \n // change strings to integers\n int intwhole1 = Integer.parseInt(whole1);\n int intnum1 = Integer.parseInt(num1);\n int intdenom1 = Integer.parseInt(denom1);\n \n int intwhole2 = Integer.parseInt(whole2);\n int intnum2 = Integer.parseInt(num2);\n int intdenom2 = Integer.parseInt(denom2);\n \n // convert to improper fraction\n intnum1 += intdenom1 * Math.abs(intwhole1);\n if (intwhole1 < 0) {\n intnum1 *= -1;\n }\n \n intnum2 += intdenom2 * Math.abs(intwhole2);\n if (intwhole2 < 0) {\n intnum2 *= -1;\n }\n \n int finalnum = 0;\n int finaldenom = 0;\n int finalwhole = 0;\n \n // if denominator equals 0, quit\n if (intdenom1 == 0 || intdenom2 == 0) {\n return \"Invalid\";\n }\n \n // if operator is incorrect, quit\n if (operator.length() > 1) {\n return \"Invalid\";\n }\n \n // addition calculation\n // multiply whole values to fraction to get a common denominator\n if (operator.equals(\"+\")) {\n intnum1 *= intdenom2;\n intnum2 *= intdenom1;\n finalnum = intnum1 + intnum2;\n finaldenom = intdenom1 * intdenom2;\n }\n \n // subtraction calculation\n if (operator.equals(\"-\")) {\n intnum1 *= intdenom2;\n intnum2 *= intdenom1;\n finalnum = intnum1 - intnum2;\n finaldenom = intdenom1 * intdenom2;\n }\n \n // multiplication calculation\n if (operator.equals(\"*\")) {\n finalnum = intnum1 * intnum2;\n finaldenom = intdenom1 * intdenom2;\n if (intnum1 == 0 || intnum2 == 0) {\n return 0 + \"\";\n }\n }\n \n // division calculation\n if (operator.equals(\"/\")) {\n finalnum = intnum1 * intdenom2;\n finaldenom = intdenom1 * intnum2;\n }\n \n // make numerator negative instead of the denominator\n if (finaldenom < 0 && finalnum > 0) {\n finaldenom *= -1;\n finalnum *= -1;\n }\n \n // convert to mixed fraction if numerator is positive\n while (finalnum / finaldenom >= 1) {\n finalnum -= finaldenom;\n finalwhole += 1;\n }\n \n // convert to mixed fraction if numerator is negative\n while (finalnum / finaldenom <= -1) {\n finalnum += finaldenom;\n finalwhole -= 1;\n }\n \n // remove signs from numerator and denominator if there is a whole number\n if (finalwhole != 0) {\n finalnum = Math.abs(finalnum);\n finaldenom = Math.abs(finaldenom);\n }\n \n // reduce fraction\n int gcd = 1;\n for (int i = 1; i <= Math.abs(finalnum) && i <= Math.abs(finaldenom); i++) {\n if (finalnum % i == 0 && finaldenom % i == 0)\n gcd = i;\n }\n finalnum /= gcd;\n finaldenom /= gcd;\n \n // final output\n if (finalwhole == 0) {\n if (finalnum == 0) {\n return \"0\";\n } else {\n return finalnum + \"/\" + finaldenom;\n }\n } else if (finalnum == 0 || finaldenom == 1) {\n return finalwhole + \"\";\n } else {\n return finalwhole + \"_\" + finalnum + \"/\" + finaldenom;\n }\n }", "public Fraction add(Fraction newFraction) {\n\t\tint newNumerator = numerator * newFraction.getDenominator() + newFraction.getNumerator() * denominator;\n\t\tint newDenominator = denominator * newFraction.getDenominator();\n\t\tint gcd = gcd(newNumerator, newDenominator);\n\t\tnewNumerator /= gcd;\n\t\tnewDenominator /= gcd;\n\t\treturn new Fraction(newNumerator, newDenominator);\n\t}", "public float toFloat(String stringItem) {\n Float floatItem = (float) 0.0;\n try {\n floatItem = Float.valueOf(stringItem);\n } // try\n catch (NumberFormatException ioError) {\n System.out.print(\"Error converting \" + stringItem);\n System.out.print(\" to a floating point number::\");\n System.out.println(\" Termio.ToFloat method.\");\n } // catch\n return floatItem;\n }", "private static void addFraction(int num1, int den1, int num2, int den2) {\n\t\tden=gcd(den1,den2);\n\t\tden=(den1*den2)/den;\n\t\tnum=((den/den1)*num1)+((den/den2)*num2);\n\t\t//reduce fraction to simplest form\n\t\treduceFraction();\n\t}", "public String toString(){\n\t\tfloat percent = (this.getNumer()/this.getDenom()) * (float)100;\n\t\tfloat dec = (this.getNumer()/this.getDenom());\n\t\tString words = this.getNumer() + \"/\" + this.getDenom();\n\t\treturn \"Fraction: \" + words + \", Percentage: \" + percent + \", Ratio: \" + dec;\n\t}", "public T getFromString(String str) throws NumberFormatException;", "int mo9691a(String str, String str2, float f);", "public NumberP(String input, ParseConfig config)\n\t{\n\t\tif (input == null || input.trim().length() < 1)\n\t\t{\n\t\t\tError = ErrorTypesNumber.InvalidInput;\n\t\t\treturn;\n\t\t}\n\n\t\tOriginalString = input;\n\t\tConfig = new ParseConfig(config);\n\n\t\t//NumberD is lighter than NumberP and contains all what matters here (i.e., Object-type Value and BaseTenExponent).\n\t\tNumberD tempVar = NumberPInternal.StartParse(new ParseInfo(this));\n\n\t\tif (!tempVar.getError().equals(ErrorTypesNumber.None))\n\t\t{\n\t\t\tError = tempVar.getError();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tBaseTenExponent = tempVar.getBaseTenExponent();\n\t\t\tValue = tempVar.getValue();\n\t\t}\n\t}", "public String toString() {\n if(denominator != 1)\n return \"\" + this.numerator + \"/\" + this.denominator;\n /** The fraction is a whole number */\n else \n return \"\" + this.numerator;\n }", "public Fraction(int numerator, int denominator) {\n if(denominator < 1)\n throw new IllegalArgumentException();\n this.numerator = numerator;\n this.denominator = denominator;\n this.reduce();\n }", "BigDecimal stringToBigDecimal(String str) {\n BigDecimal result = BigDecimal.ZERO;\n BigDecimal curPlace = ONE_PLACE; // start with 1/65536 to compute the first digit.\n\n int len = Math.min(str.length(), MAX_CHARS);\n\n for (int i = 0; i < len; i++) {\n int codePoint = str.codePointAt(i);\n result = result.add(tryDivide(new BigDecimal(codePoint), curPlace));\n // advance to the next less significant place. e.g., 1/(65536^2) for the second char.\n curPlace = curPlace.multiply(ONE_PLACE);\n }\n\n return result;\n }" ]
[ "0.7187001", "0.7118024", "0.64169496", "0.64033073", "0.6328769", "0.63016397", "0.62857866", "0.610337", "0.59234256", "0.5761333", "0.5734115", "0.5731001", "0.57280695", "0.5720665", "0.57027555", "0.5628856", "0.5622905", "0.5553084", "0.5539051", "0.55150527", "0.5512337", "0.5488532", "0.5484761", "0.5474329", "0.54738647", "0.5441226", "0.5434963", "0.53979236", "0.5368239", "0.53585273", "0.5330058", "0.5294186", "0.5287363", "0.5259376", "0.5231816", "0.5231361", "0.5213005", "0.5205791", "0.51887697", "0.5180401", "0.5142703", "0.5138531", "0.5125228", "0.51185006", "0.5116997", "0.50987035", "0.5075943", "0.50707746", "0.5060141", "0.5058563", "0.5030481", "0.49641407", "0.4929066", "0.49192765", "0.49128613", "0.49050254", "0.48834205", "0.48798317", "0.48759633", "0.48693743", "0.48641425", "0.48625186", "0.486071", "0.48412845", "0.48394895", "0.48225474", "0.48201486", "0.4813287", "0.48113495", "0.4802451", "0.47995862", "0.47951123", "0.4788958", "0.47630107", "0.47511536", "0.47463098", "0.47317073", "0.471072", "0.4703285", "0.4701982", "0.46985406", "0.46959266", "0.46934775", "0.46859562", "0.46817806", "0.46658656", "0.46537045", "0.46441427", "0.46429676", "0.4630459", "0.46183664", "0.4605425", "0.46003187", "0.45755297", "0.45704052", "0.45631415", "0.45580867", "0.4548277", "0.45477122", "0.45476967" ]
0.77018076
0
/ JADX INFO: super call moved to the top of the method (can break code semantics)
ah(ar arVar, i iVar, int i, i iVar2) { super(iVar); this.c = arVar; this.a = i; this.b = iVar2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_6349() {\r\n super.method_6349();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void method_6191() {\r\n super.method_6191();\r\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void dosomething2() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void c(int paramInt)\r\n/* 101: */ {\r\n/* 102:122 */ this.b = false;\r\n/* 103:123 */ super.c(paramInt);\r\n/* 104: */ }", "public int b()\r\n/* 45: */ {\r\n/* 46: 58 */ g();\r\n/* 47: */ \r\n/* 48: 60 */ return super.b();\r\n/* 49: */ }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public void avvia() {\n /** invoca il metodo sovrascritto della superclasse */\n super.avvia();\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void aaa() {\n\t\t\n\t}", "@Override\n public void b() {\n }", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "@Override\r\n public void salir() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void preorder() {\n\n\t}", "private stendhal() {\n\t}", "public void doSomething() {\n Outer.this.doSomething();\r\n // this stops the pretty printer and gives an\r\n //parser exception (stumbling over the .super)\r\n Outer.super.doSomething();\r\n }", "@Override\n\tpublic void deneme() {\n\t\tsuper.deneme();\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void preRun() {\n super.preRun();\n }", "public abstract void mo70713b();", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tpublic void imprimir() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "protected void h() {}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "public void method_4270() {}", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }", "public void callP(){\n super.walks(\"called parent method\");\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n protected void initialize() {\n\n \n }" ]
[ "0.7415644", "0.71204525", "0.71204525", "0.71204525", "0.7115328", "0.7021445", "0.7006679", "0.6958776", "0.69348174", "0.6828433", "0.6789479", "0.67588496", "0.6725944", "0.6725944", "0.66789997", "0.6669348", "0.6636827", "0.662735", "0.6619289", "0.6604606", "0.66032183", "0.65821075", "0.65818655", "0.6549125", "0.6542807", "0.65208626", "0.6502121", "0.64419574", "0.64175224", "0.64145404", "0.6401541", "0.63982177", "0.638603", "0.6379215", "0.6369887", "0.6364755", "0.6360062", "0.63524514", "0.635106", "0.63357264", "0.63191724", "0.63059807", "0.63059807", "0.6294309", "0.6292688", "0.6292688", "0.62848455", "0.6272934", "0.6263246", "0.62407345", "0.62230927", "0.62185264", "0.62035763", "0.6196222", "0.61766213", "0.6173301", "0.6171076", "0.6168375", "0.615968", "0.61296916", "0.61254627", "0.612198", "0.61021185", "0.6092425", "0.6091375", "0.6088283", "0.6084461", "0.60616386", "0.6060634", "0.60548645", "0.6044371", "0.60429484", "0.6041237", "0.60343677", "0.6031338", "0.6031338", "0.6031338", "0.6031338", "0.6031338", "0.6031338", "0.60309416", "0.60282135", "0.60265917", "0.6024224", "0.6023375", "0.6018149", "0.60131603", "0.60109144", "0.6008489", "0.60003585", "0.59983647", "0.5995382", "0.5994261", "0.5990019", "0.59885776", "0.5981363", "0.59708184", "0.59702456", "0.59659576", "0.59650904", "0.5960426" ]
0.0
-1
/ access modifiers changed from: protected
public final void a() { try { ((s) this.c.e.b()).c(this.c.c, ar.c(this.a), ar.c(), (u) new ak(this.c, this.b, (int[]) null)); } catch (RemoteException e) { ar.a.a((Throwable) e, "notifySessionFailed", new Object[0]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
this.total_moves = this.rand.nextInt(50) + 100;
public void start_game(String s) { if (s.equals("New")) { Long seed = Long.parseLong(this.input_seed); this.rand = new Random(seed); // not sure if this is correct way to approach this problem? Createworld cr = new Createworld(seed); this.tiles = cr.returnTile(); int[] start_location = generate_avatar_location(); ArrayList<int[]> start_food = generate_foods(); this.position = start_location; } String cont = "continue"; this.ter.renderFrame(this.tiles); InputSource inputSource = new KeyboardInputSource(); while (cont.equals("continue") && this.total_moves > 0 && this.number_of_foods > 0) { while (!StdDraw.hasNextKeyTyped()) { StdDraw.setPenColor(Color.BLACK); StdDraw.filledRectangle(this.tiles[0].length / 2 + 30, this.tiles[1].length - 2, 10, 2); StdDraw.filledRectangle(this.tiles[0].length / 2, this.tiles[1].length - 2, 10, 2); StdDraw.filledRectangle(this.tiles[0].length / 2 + 47, this.tiles[1].length - 2, 10, 2); TETile type = getTileat((int) StdDraw.mouseX(), (int) StdDraw.mouseY()); Font textfonttwo = new Font("sans serif", Font.BOLD, 25); StdDraw.setFont(textfonttwo); StdDraw.setPenColor(Color.WHITE); String descriptiontwo = "Description: " + type.description(); String description = "Moves: " + total_moves; String descriptionthree = "Foods Remaining: " + this.number_of_foods; StdDraw.text(this.tiles[0].length / 2 + 30, this.tiles[1].length - 2, description); StdDraw.text(this.tiles[0].length / 2, this.tiles[1].length - 2, descriptiontwo); StdDraw.text(this.tiles[0].length/2 + 47, this.tiles[1].length -2, descriptionthree); StdDraw.show(); StdDraw.enableDoubleBuffering(); } char c = inputSource.getNextKey(); move(c, "keyboard"); if (c == ':' && inputSource.getNextKey() == 'Q') { // Breaks it if we press Q saveEditor("seed", this.input_seed); saveEditor("movements", this.directions); System.out.println(this.directions); System.exit(0); break; } } if(this.total_moves == 0){ sorry(); } else if(this.number_of_foods == 0){ congrats(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int randomMove()\r\n {\r\n r = new Random();\r\n x = r.nextInt(7);\r\n return x;\r\n }", "public int decideRandomMove() {\n return (int) (Math.random() * 4);\n }", "private void randomMove() {\n }", "private int Rand_Move() {\n\t\tRandom r = new Random();\n\t\tint move = NO_MOVE;\n\t\tdo{\n\t\t\tmove = r.nextInt(9);\n\t\t}while(square_empty[move] == false);\n\t\treturn move;\n\t}", "private void moveRandomly()\r\n {\r\n if (Greenfoot.getRandomNumber (100) == 50)\r\n turn(Greenfoot.getRandomNumber(360));\r\n else\r\n move(speed);\r\n }", "void move()\n {\n Random rand = new Random();\n int moveOrNot = rand.nextInt(2);//50% chance\n if(moveOrNot == 1)\n super.move();\n }", "public int attackRoll(){\r\n\t\treturn (int) (Math.random() * 100);\r\n\t}", "public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }", "public abstract void randomMoves();", "public void roll(){\n currentValue = rand.nextInt(6)+1;\n }", "private int randomNum() {\r\n\t return((int)(Math.random() * 100));\r\n\t }", "private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }", "private void random() {\n GameState gs = cc.getGameState();\n ArrayList<int[]> moves = cc.getPlayerMoves(player);\n ArrayList<GameState> states = nextStates(moves, gs);\n for (int[] m : moves) {\n GameState next = checkMove(m, cc);\n states.add(next);\n }\n Random rand = new Random(System.nanoTime());\n int i = rand.nextInt(states.size());\n cc.setAIMove(states.get(i));\n }", "public int monsterAttack(){\n Random ran = new Random();\n return ran.nextInt(4);\n }", "private static int addRandomScore() {\n Random ran = new Random();\n return ran.nextInt(201) + 400;\n }", "public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}", "@Override\n public int orinar() {\n\n return (int) (Math.random() * 400) + 400;\n }", "public int eDmg(){\r\n eDmg = rand.nextInt(13);\r\n return eDmg;\r\n }", "@Override\n public int attack() {\n return new Random().nextInt(5);\n }", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public void newGame() {\n\t\ttheNumber = (int)(Math.random()* 100 + 1);\r\n\t\t\r\n\t}", "static int getRandomDelta() {\n int d = rand.nextInt(100);\n if (d < 50) {\n return -1;\n } else {\n return 1;\n }\n }", "public static int getRandomAmount(){\n return rand.nextInt(1000);\n }", "public void incrementMoves()\n {\n moves ++;\n }", "public void roll()\r\n\t{\r\n\t\tthis.value = rnd.nextInt(6) + 1;\r\n\t}", "private int rand() {\n return (int)(Math.random()*(RAND_MAX + 1));\n }", "public void setPlayerRoll20()\r\n {\r\n \r\n roll2 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE20 + LOWEST_DIE_VALUE20);\r\n \r\n }", "@Override\n //Movement of a smallMonster\n public void movement(Canvas canvas) {\n if(zero == 0){\n ammountOfRandom = (int)(Math.random() * 50 + 1);\n randomMove = (int )(Math.random() * 8 + 1);\n }\n zero++;\n if(zero > ammountOfRandom){\n zero = 0;\n }\n if(checkBounds(canvas)){\n switch (EnumMovement.values()[randomMove]){\n case UP:\n mY--;\n break;\n case DOWN:\n mY++;\n break;\n case LEFT:\n mX--;\n break;\n case RIGHT:\n mX++;\n break;\n case UPRIGHT:\n mY--;\n mX++;\n break;\n case UPLEFT:\n mY--;\n mX--;\n break;\n case DOWNRIGHT:\n mY++;\n mX++;\n break;\n case DOWNLEFT:\n mY++;\n mX--;\n break;\n case NONE:\n break;\n }\n }\n }", "private MoveAction wanderRandomly() {\n\t\tint intDir = rand.nextInt(8) + 1;\n\t\tDirection direction = Direction.fromInt(intDir);\n\t\treturn moveInDirection(direction);\n\t}", "public int roll() {\n return random.nextInt(6) + 1;\n }", "private void roll() {\n value = (int) (Math.random() * MAXVALUE) + 1;\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public int generateRandom(Random ran)\n {\n if(nums.size()<=0)\n {\n Log.i(\"test\",\"No Pokemon left\");\n return 0;\n }\n return nums.remove(ran.nextInt(nums.size()));\n }", "private int newSpeed() {\n //makes a random speed for the ball in (-50,-15)U(15,50)\n int n = r.nextInt(71) - 35;\n if (n < 0) {\n n = n - 15;\n } else {\n n = n + 15;\n }\n return n;\n }", "public int fight() {\r\n\t\treturn -this.randomObject.nextInt(50);\r\n\t}", "public int NewMonster(){\n int r = (int) (Math.random() * (9 - 2 + 1) + 2);\n return r;\n }", "public void randomMove() {\r\n\t\tRandom rand = new Random();\r\n\t\tint moveNum = rand.nextInt(100)+100;\r\n\t\tcheck++;\r\n\t\tif(check >= moveNum) {\r\n\t\t\tspeed = speed*-1;\r\n\t\t\tcheck =0;\r\n\r\n\t\t}\r\n\r\n\t\tif(speed > 0) {\r\n\t\t\tsetIcon(rightImage);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetIcon(leftImage);\r\n\t\t}\r\n\t\tx += speed; setLocation(x,y); repaint();\r\n\t}", "public static int randomNext() { return 0; }", "@Override\r\n\tpublic int attack() {\r\n\t\treturn rnd.nextInt(MAX_MONSTER_ATTACK_DAMAGE);\r\n\t}", "int RollDice ()\n {\n\tint roll = (int) (Math.random () * 6) + 1;\n\treturn roll;\n }", "public double generateMoneyGoal() {\n\t\tdouble moneyGoal = Math.random()*(10000 -100)+100; \n\t\t\n\t\treturn moneyGoal;\n\t}", "public void move() {\n health -= 2; //health decrement\n age++; //age increment\n if (yPos > 300) {\n speed += 3;\n }\n boolean canMove = false;\n int distancex = (int) (Math.random() * speed);\n int distancey = (int) (Math.random() * speed);\n int counterx = r.nextInt(2);\n int countery = r.nextInt(2);\n while (!canMove) {\n distancex = (int) (Math.random() * speed);\n distancey = (int) (Math.random() * speed);\n counterx = r.nextInt(2);\n countery = r.nextInt(2);\n if (counterx == 0 && this.xPos - distancex > 0\n && countery == 0 && this.yPos - distancey > 0) {\n canMove = true;\n } else if (counterx == 1 && this.xPos + distancex < 510\n && countery == 1 && this.yPos + distancey < 530) {\n canMove = true;\n }\n }\n if (counterx == 0 && countery == 0) {\n xPos -= distancex;\n yPos -= distancey;\n } else if (counterx == 0 && countery == 1) {\n xPos -= distancex;\n yPos += distancey;\n } else if (counterx == 1 && countery == 0) {\n xPos += distancex;\n yPos -= distancey;\n } else if (counterx == 1 && countery == 1) {\n xPos += distancex;\n yPos += distancey;\n }\n }", "public int rollAttack()\n {\n Random random2 = new Random();\n int atk = random2.nextInt(20) +1 + attackBonus;\n return atk;\n }", "public void makeRandomMove() {\n\t\ttry{\r\n\t\t\tif (playerId == game.getState().getTurn()){\r\n\t\t\t\tgame.execute(randPlayer.requestAction(game.getState()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e){\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void setPlayerRoll10()\r\n {\r\n \r\n roll1 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE10 + LOWEST_DIE_VALUE10);\r\n }", "@Test\n\tpublic void testRandInt() {\n\t\tGameState test = new GameState();\n\t\tassertTrue(test.randInt() < 25);\n\t}", "private int getRandomPiece() {\r\n return new Random().nextInt(Constants.NUM_PIECES);\r\n }", "private int randomPiece() {\n return (int)(Math.random()*N_PIECES);\n }", "public int performDuel(){\n Random rand = new Random();\n int intRand;\n intRand = rand(6);\n while(this.engine.getGameInformation().cards[intRand][intRand] == 0 ){\n intRand = rand(6);\n }\n return intRand;\n }", "public int compete() {\r\n\t\tint max = 20;\r\n\t\tint min = 10;\r\n\t\tRandom Rand = new Random();\r\n\t\tint ranNum = Rand.nextInt(max - min) + min;\r\n\t\treturn ranNum;\r\n\t}", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "public static int randomNumber50(){\r\n int max = 50;\r\n int min = 0;\r\n int range = max-min+1;\r\n \r\n int randNum = (int)(Math.random()*range) + min;\r\n \r\n return randNum;\r\n }", "public int randomDP() {\n\t\treturn(getRandomInteger(10,250));\n\t}", "@Override\n public int damage(){\n int damage = 0;\n Random rand = new Random();\n int x = rand.nextInt(20) + 1;\n if (x == 1)\n damage = 50;\n return damage; \n }", "public int generateRoll() {\n\t\tint something = (int) (Math.random() * 100) + 1;\n\t\tif (something <= 80) {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2 - 1;\n\t\t\treturn roll;\n\t\t} else {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2;\t\t\n\t\t\treturn roll;\n\t\t}\n\t}", "public static int getRandomBalance(){\n return rand.nextInt(1000000);\n }", "private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}", "private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }", "private int getRandomMove(char[] boardConfig) {\n ArrayList<Integer> emptySpaces = getEmptySpaces(boardConfig);\n\n int random = (int) (Math.random() * emptySpaces.size());\n int randomSpace = emptySpaces.get(random);\n char currentPlayer = (game.getPlayer() == 0) ? 'X' : 'O';\n char[] tempBoard = boardConfig.clone();\n\n tempBoard[randomSpace] = currentPlayer;\n shortTermMemory.add(boardToString(tempBoard));\n\n return randomSpace;\n }", "public static int rollDice(){\n return (int)(Math.random()*6) + 1;\n // Math.random returns a double number >=0.0 and <1.0\n }", "private int evaluate() {\n return (int) (Math.random() * 8);\n }", "@Override\r\n\tpublic void makeRandonMove() {\r\n\t\tif (randPlayer.getPlayerNumber() == game.getState().getTurn() && !game.getState().isFinished()) game.execute(randPlayer.requestAction(game.getState()));\r\n\t}", "public PositionInTheGameBoard()\r\n\t{\r\n\t\tthis.X = new Random().nextInt(PositionInTheGameBoard.max_X);\r\n\t\tthis.Y = new Random().nextInt(PositionInTheGameBoard.max_Y);\r\n\t}", "private int generatePiece()\n\t{\n\t\tint toReturn = 0;\n\t\tint max = 1;\n\t\tint min = -1;\n\t\t\n\t\twhile(toReturn == 0)\n\t\t{\n\t\t\ttoReturn = r.nextInt((max - min) + 1) + min;\n\t\t}\n\t\tSystem.out.println(toReturn);\n\t\treturn toReturn;\n\t}", "public int getMoves(){\n return moves;\n }", "int moves() {\n return moves;\n }", "public void move() {\n\t\tif (isLuck) {\n\t\t\tif (rand.nextBoolean()) {\n\t\t\t\txPos++;\n\t\t\t}\n\t\t} else {\n\t\t\tif (rightCount < skill) {\n\t\t\t\trightCount++;\n\t\t\t\txPos++;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n if (random.nextInt(10) == 0)\n addPowerUp(random.nextInt(256));\n }", "public void randomMove(Random choiceGen){\n\tint choice = choiceGen.nextInt(4);\n\tswitch(choice){\n case 0:\n\tif(position[0] < worldEdge[0]){\n\t position[0] += 1;\n\t break;\n\t}\n\t\n\tcase 1:\n\t if(position[0] > 0){\n\t\tposition[0] -= 1;\n\t }\n\t else{\n\t position[0] += 1;\n\t }\n\t break;\n\tcase 2:\n\t if(position[1] < worldEdge[1]){\n\t\tposition[1] += 1;\n\t\tbreak;\n\t}\n\tcase 3:\n\t if(position[1] > 0){\n\t\tposition[1] -= 1;\n\t }\n\t else{\n\t\tposition[1] += 1;\n\t }\n\t break;\n\t}\n }", "static void randomMove() {\n int directionNum; // Randomly set to 0, 1, 2, or 3 to choose direction.\n directionNum = ( int )( Math.random() * 4 );\n\n switch ( directionNum ) {\n case 0: // Move up.\n currentRow--;\n if ( currentRow < 0 )\n currentRow = ROWS - 1;\n break;\n case 1 : // Move right.\n currentColumn++;\n if ( currentColumn >= COLUMNS )\n currentColumn = 0;\n break;\n case 2 : // Move down.\n currentRow++;\n if ( currentRow >= ROWS )\n currentRow = 0;\n break;\n case 3 : // Move left.\n currentColumn--;\n if ( currentColumn < 0 )\n currentColumn = COLUMNS - 1;\n break;\n\n }\n }", "private int randomWeight()\n {\n return dice.nextInt(1000000);\n }", "public void updateMoves(){\r\n\t\tthis.moves = getMoves() + 1;\r\n\t}", "public int moves()\n {\n return numberOfMoves;\n }", "int random(int m)\n {\n return (int) (1 + Math.random()%m);\n }", "private static int randomCycleCap() {\n int newValue = 0;\n int iterations = 3;\n Random bombRandGen = new Random();\n\n for (int i = 0; i <= iterations; i++) {\n newValue += bombRandGen.nextInt(4);\n }\n\n return newValue;\n }", "public int roll_the_dice() {\n Random r = new Random();\n int number = r.nextInt(6) + 1;\n\n return number;\n }", "public double getRandom() {\n return 20*Math.random() - 10;\n }", "public int getPlayerMoveAmount() {\n return 3;\n }", "public static int CPUTurn(){\n\t\t// Create the int variable turn and set it equal to a casted int random number.\n\t\tint turn = (int) Math.floor(Math.random()*3)+1;\n\t\t// Make a while loop that runs while turn is not equal to 1 and the count and turn variables are added to be greater than 20.\n\t\twhile(turn!=1 && count+turn>20) {\n\t\t\t// Set the turn variable equal to a casted int random number.\n\t\t\tturn = (int) Math.floor(Math.random()*3)+1;\n\t\t}\n\t\t// Have the system show what the CPU counts.\n\t\tSystem.out.println(\"CPU counts \"+turn+\".\");\n\t\treturn turn;\n\t}", "public int roll() {\n int result = ThreadLocalRandom.current().nextInt(SIDES+1) + 1;// standard 1-7\n if(result == 7){ //LoadedDie 6 occurs twice as often\n return 6;\n } else{\n return result;\n }\n }", "public int dmg(){\r\n dmg = rand.nextInt(att);\r\n if(att == 1)\r\n dmg = 1;\r\n return dmg;\r\n }", "public void roll() { \n this.value = (int)(Math.random() * this.faces()) + 1; \n }", "public void incrementWin(){wins += 1;}", "public void move() {\n super.move(DIRECTION.getRandom());\n }", "public int tossDice(){\n\t\tRandom r = new Random();\n\t\tdiceValue = r.nextInt(6)+1;\n\t\tdiceTossed = true;\n\t\treturn diceValue;\n\t}", "private void random() {\n\n\t}", "public int getMoves(){\r\n return moves;\r\n }", "public int roll(){\r\n myFaceValue = (int)(Math.random() * myNumSides) + 1;\r\n return myFaceValue;\r\n }", "public int getNumberOfMoves();", "public int moves()\n {\n return moves;\n }", "public int randomNum()\r\n {\r\n Random rand = new Random();\r\n int n = rand.nextInt(52)+1;\r\n return n;\r\n }", "public int drawpseudocard(){\n Random random = new Random();\n return random.nextInt(9)+1;\n }", "public int randomAmount() {\n return Util.random(getMinAmount(), getMaxAmount());\n }", "private static void move() {\r\n\t\ttry {\r\n\t\t\tThread.sleep(timer);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\trunTime += timer;\r\n\t\tif (runTime > stepUp) {\r\n\t\t\ttimer *= 0.9;\r\n\t\t\tstepUp += 5000;\r\n\t\t}\r\n\r\n\t\tupdateSnake(lastMove);\r\n\t\t// updateField();\r\n\r\n\t\tif (score >= 10 && (r.nextInt(40) == 0)) {\r\n\t\t\taddFood(MOUSE);\r\n\t\t}\r\n\t\tif (score >= 30 && (r.nextInt(50) == 0)) {\r\n\t\t\taddFood(POISON);\r\n\t\t}\r\n\t}", "@Override\n public Integer pee() {\n return (int) (random() * 8);\n }", "public static int diceRoll() {\n Random roller = new Random();//Create a random number generator\r\n return roller.nextInt(6) + 1;//Generate a number between 0-5 and add 1 to it\r\n }", "private static int randomDirection() {\n return (int) (Math.random() * Direction.values().length);\n }", "public int rollDie() {\n\t\treturn (int) (Math.random()*6)+1;\n\t}", "public void randomMove(){\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n int holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n ArrayList<Korgool> korgools = availableHoles.get(holeIndex).getKoorgools();\n while(korgools.size() == 0){\n holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n korgools = availableHoles.get(holeIndex).getKoorgools();\n }\n redistribute(availableHoles.get(holeIndex).getHoleIndex());\n }", "private int randomMove(Box box) {\n if (box == null)\n throw new IllegalArgumentException(\"Error. Null pointer in randomMove(box).\");\n Random random = new Random();\n LinkedList<Integer> movements = new LinkedList<>();\n if (!isNextBoxUsed(box, 0))\n movements.addLast(0);\n if (!isNextBoxUsed(box, 1))\n movements.addLast(1);\n if (!isNextBoxUsed(box, 2))\n movements.addLast(2);\n if (!isNextBoxUsed(box, 3))\n movements.addLast(3);\n return movements.get(random.nextInt(movements.size()));\n }", "public static int rollDice()\n\t{\n\t\tint roll = (int)(Math.random()*6)+1;\n\t\t\n\t\treturn roll;\n\n\t}" ]
[ "0.7430996", "0.7401619", "0.7356492", "0.7278172", "0.70338523", "0.69479203", "0.6930171", "0.6830604", "0.6819488", "0.6817753", "0.67942226", "0.6789198", "0.67654574", "0.6748714", "0.672684", "0.66532654", "0.6621154", "0.6605213", "0.65938354", "0.657632", "0.65675175", "0.65517896", "0.6534658", "0.6513476", "0.6512563", "0.6510884", "0.648282", "0.64691335", "0.646793", "0.64457977", "0.6423186", "0.64219326", "0.6419258", "0.6415415", "0.6359305", "0.6359188", "0.63439405", "0.6341076", "0.633999", "0.6338867", "0.63373095", "0.63081396", "0.6302924", "0.62945443", "0.62857383", "0.62777096", "0.6268076", "0.62674", "0.62543935", "0.62365794", "0.6235304", "0.6222307", "0.62196964", "0.6210478", "0.6194639", "0.6182092", "0.61798996", "0.6178887", "0.6176232", "0.6174651", "0.6169354", "0.6167601", "0.6163663", "0.6162211", "0.6151988", "0.6128411", "0.61275744", "0.6125378", "0.61240745", "0.61218673", "0.61204094", "0.6107315", "0.6106752", "0.60986876", "0.6096203", "0.60951537", "0.6084867", "0.60789275", "0.60714686", "0.6061378", "0.60541946", "0.605052", "0.6047229", "0.60467595", "0.60462075", "0.6044013", "0.60394686", "0.6038604", "0.6038277", "0.60178196", "0.6013249", "0.6011558", "0.6009134", "0.6008812", "0.6008084", "0.60031545", "0.6001425", "0.5998849", "0.59952736", "0.598995", "0.5988833" ]
0.0
-1
Method used for exploring a fresh world. This method should handle all inputs, including inputs from the main menu.
public void interactWithKeyboard() { initialize_frame(); InputSource inputSource = new KeyboardInputSource(); char c = inputSource.getNextKey(); while(inputSource.possibleNextInput() && c != 'Q') { if (c == 'N') { // instructions_page(); draw_frame_seed(); start_game("New"); break; } else if (c == 'L') { File seed = new File("seed.txt"); File directions = new File("movements.txt"); String old_seed = loadEditor(seed); String old_directions = loadEditor(directions); load_and_move(old_seed, old_directions); start_game("Load"); } else if (c == 'I') { instructions_page(); if (inputSource.getNextKey() == 'B') { interactWithKeyboard(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void enterMain() {\n\t\tIsland island = game.getCurrentLocation();\n\t\tif (game.checkAccessibleIsland(island)) \n\t\t{\n\t\t\tboolean state = false;\n\t\t\twhile (state == false) {\n\t\t\t\tArrayList<Island> islands = game.getAvailableIslands();\n\t\t\t\tSystem.out.println(\"Your current money: \" + game.getMoney()+ \" coins.\");\n\t\t\t\tSystem.out.println(\"You have : \" + game.getRemainingDays() + \" days left.\");\n\t\t\t\tIsland currentLoc = game.getCurrentLocation();\n\t\t\t\tString islandName = currentLoc.getIslandName();\n\t\t\t\tSystem.out.println(\"Your current location is: \" + islandName + \" Island.\" + \"\\n\");\n\t\t\t\tSystem.out.println(\"What do you want to do? \");\n\t\t\t\tSystem.out.println(\"(1) See ship's specification\");\n\t\t\t\tSystem.out.println(\"(2) Go to other Island\");\n\t\t\t\tSystem.out.println(\"(3) Go to store in your current location\");\n\t\t\t\tSystem.out.println(\"(4) End game\");\n\t\t\t\ttry {\n\t\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\t\tif (selectedAction <= 4 && selectedAction > 0) {\n\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\t\tgame.seeShipSpec();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (selectedAction == 2) {\n\t\t\t\t\t\t\tprintAvailableIslands(islands);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (selectedAction == 3) {\n\t\t\t\t\t\t\tgame.goToStore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tgame.gameOver(\"You ended the game\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\t\tscanner.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tboolean state = false;\n\t\t\twhile (state == false)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Your current money: \" + game.getMoney()+ \" coins.\");\n\t\t\t\tSystem.out.println(\"You have : \" + game.getRemainingDays() + \" days left.\");\n\t\t\t\tIsland currentLoc = game.getCurrentLocation();\n\t\t\t\tString islandName = currentLoc.getIslandName();\n\t\t\t\tSystem.out.println(\"Your current location is: \" + islandName + \" Island.\" + \"\\n\");\n\t\t\t\tSystem.out.println(\"What do you want to do? \");\n\t\t\t\tSystem.out.println(\"(1) See ship's specification\");\n\t\t\t\tSystem.out.println(\"(2) Go to store in your current location\");\n\t\t\t\tSystem.out.println(\"(3) End Game\");\n\t\t\t\ttry {\n\t\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\t\tif (selectedAction <= 3 && selectedAction > 0) {\n\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\t\tgame.seeShipSpec();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (selectedAction == 2) {\n\t\t\t\t\t\t\tgame.goToStore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tgame.gameOver(\"You ended the game\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\t\tscanner.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void input(){\n\t\tboolean[] inputKeyArray = inputHandler.processKeys();\n\t\tint[] inputMouseArray = inputHandler.processMouse();\n\t\tcurrentLevel.userInput(inputKeyArray, inputMouseArray);\n\t}", "@Override\r\n public boolean doAction(String[] inputs) {\n String playersName = inputs[0];\r\n //player = savePlayer(playersName)\r\n Player player = GameControl.savePlayer(playersName);\r\n //IF player == null\r\n if (player == null) {\r\n System.out.println(\"Could not create the player.\"\r\n + \"Enter a different name.\");\r\n //RETURN false // Repeats the StartProgramView\r\n return false;\r\n } else {\r\n System.out.println(\"****************************************\"\r\n + \" Hello\" + playersName + \",\"\r\n + \" Welcome to Delirium. Good luck!\"\r\n + \"****************************************\");\r\n }\r\n //mainMenuView = Create a new MainMenuView object\r\n MainMenuView mainMenuView = new MainMenuView();\r\n mainMenuView.display();\r\n return true;\r\n }", "public static void main(String args[]) {\n\n if (args.length < 1) {\n System.err.println(USAGE_MSG);\n System.exit(1);\n }\n\n String command;\n Scanner commandLine = new Scanner(System.in);\n\n try {\n state = GameState.instance();\n if (args[0].endsWith(\".zork\")||args[0].endsWith(\".bork\")) {\n state.initialize(new Dungeon(args[0]));\n System.out.println(\"\\n\\n\\n\\n\\nWelcome to \" + \n state.getDungeon().getName() + \"!\");\n } else if (args[0].endsWith(\".sav\")) {\n state.restore(args[0]);\n System.out.println(\"\\nWelcome back to \" + \n state.getDungeon().getName() + \"!\");\n } else {\n System.err.println(USAGE_MSG);\n System.exit(2);\n }\n\n System.out.print(\"\\n\" + \n state.getAdventurersCurrentRoom().describe() + \"\\n\");\n\n command = promptUser(commandLine);\n\n while (!command.equals(\"q\")) {\n\t\tif(command.equals(\"EVENT\")){\n\t\t System.out.println(\"Welcome, hacker. These hacks may be gameBreaking and or dangerous to your health if typed wrong, be warned. Enter the Event name CAPS matters.\");\n\t\t command = promptUser(commandLine);\n\t\t System.out.print(EventFactory.instance().parse(command).execute());\n\t\t \n\t\t} else {\n\t\t//System.out.print(\"\\n\\n\\n\"); \t\t//Spacer that makes it look cleaner\n\t\tSystem.out.print(\n CommandFactory.instance().parse(command).execute());\n\n command = promptUser(commandLine);\n\t\t}\n\t }\n\n System.out.println(\"Bye!\");\n\n } catch(Exception e) { \n e.printStackTrace(); \n }\n }", "public void start_game(String s) {\n\n if (s.equals(\"New\")) {\n Long seed = Long.parseLong(this.input_seed);\n this.rand = new Random(seed); // not sure if this is correct way to approach this problem?\n Createworld cr = new Createworld(seed);\n this.tiles = cr.returnTile();\n int[] start_location = generate_avatar_location();\n ArrayList<int[]> start_food = generate_foods();\n this.position = start_location;\n }\n\n String cont = \"continue\";\n this.ter.renderFrame(this.tiles);\n InputSource inputSource = new KeyboardInputSource();\n\n\n\n\n while (cont.equals(\"continue\") && this.total_moves > 0 && this.number_of_foods > 0) {\n\n while (!StdDraw.hasNextKeyTyped()) {\n\n StdDraw.setPenColor(Color.BLACK);\n StdDraw.filledRectangle(this.tiles[0].length / 2 + 30, this.tiles[1].length - 2, 10, 2);\n StdDraw.filledRectangle(this.tiles[0].length / 2, this.tiles[1].length - 2, 10, 2);\n StdDraw.filledRectangle(this.tiles[0].length / 2 + 47, this.tiles[1].length - 2, 10, 2);\n TETile type = getTileat((int) StdDraw.mouseX(), (int) StdDraw.mouseY());\n Font textfonttwo = new Font(\"sans serif\", Font.BOLD, 25);\n StdDraw.setFont(textfonttwo);\n StdDraw.setPenColor(Color.WHITE);\n String descriptiontwo = \"Description: \" + type.description();\n String description = \"Moves: \" + total_moves;\n String descriptionthree = \"Foods Remaining: \" + this.number_of_foods;\n StdDraw.text(this.tiles[0].length / 2 + 30, this.tiles[1].length - 2, description);\n StdDraw.text(this.tiles[0].length / 2, this.tiles[1].length - 2, descriptiontwo);\n StdDraw.text(this.tiles[0].length/2 + 47, this.tiles[1].length -2, descriptionthree);\n StdDraw.show();\n StdDraw.enableDoubleBuffering();\n }\n\n\n char c = inputSource.getNextKey();\n move(c, \"keyboard\");\n\n\n if (c == ':' && inputSource.getNextKey() == 'Q') { // Breaks it if we press Q\n\n saveEditor(\"seed\", this.input_seed);\n saveEditor(\"movements\", this.directions);\n System.out.println(this.directions);\n System.exit(0);\n break;\n }\n }\n if(this.total_moves == 0){\n sorry();\n }\n else if(this.number_of_foods == 0){\n congrats();\n\n }\n }", "private void processInput() \n\t{\n\t\tif (keys.get(Keys.RIGHT))\n\t\t{\n\t\t\tworld.getHunter().move_right();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.UP))\n\t\t{\n\t\t\tworld.getHunter().move_up();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.LEFT))\n\t\t{\n\t\t\tworld.getHunter().move_left();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.DOWN))\n\t\t{\n\t\t\tworld.getHunter().move_down();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.STEALTH))\n\t\t{\n\t\t\tworld.getHunter().setNoisiness(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tworld.getHunter().setNoisiness(true);\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.RELOAD))\n\t\t{\n\t\t\tworld.getHunter().do_reload();\n\t\t}\n\t\t\n\t\tif (keys.get(Keys.FIRE))\n\t\t{\n\t\t\tworld.getHunter().do_fire();\n\t\t}\n\t}", "@Override\n\tpublic void show() {\n\t\tworld = new Worlds();\n\t\trenderer = new WorldRenderer(world, false);\n\t\tcontroller = new WorldController(world);\n\t\tGdx.input.setInputProcessor(this);\n\t}", "public void interactWithKeyboard() {\n StdDraw.setCanvasSize(WIDTH * 16, HEIGHT * 16);\n StdDraw.setXscale(0, WIDTH);\n StdDraw.setYscale(0, HEIGHT);\n createMenu();\n StdDraw.enableDoubleBuffering();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char input = Character.toUpperCase(StdDraw.nextKeyTyped());\n if (input == 'v' || input == 'V') {\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char next = StdDraw.nextKeyTyped();\n if (next == '#') {\n createMenu();\n break;\n } else {\n name += next;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n }\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1);\n interactWithInputString(toInsert);\n ter.renderFrame(world);\n startCommands();\n }\n if (input == 'n' || input == 'N') {\n toInsert += 'n';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n while (true) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n char c = StdDraw.nextKeyTyped();\n if (c == 's' || c == 'S') {\n toInsert += 's';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show(); interactWithInputString(toInsert);\n ter.renderFrame(world); mouseLocation(); startCommands();\n break;\n }\n if (c != 'n' || c != 'N') {\n toInsert += c;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1); interactWithInputString(toInsert);\n ter.renderFrame(world); startCommands();\n }\n }\n }\n }", "@Override\r\n public String[] getInputs() {\r\n // no inputs from this view it is the opening view that explains the game \r\n return null;\r\n }", "public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}", "public static void main(String[] args) throws Exception{\n locations = World.getInstance();\n player = Player.getInstance();\n\n startMessage();\n\n try(BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))){\n playerName = reader.readLine();\n printConstantMessage(Constants.HELLO_MSG, playerName);\n System.out.println();\n\n player.moveTo(locations.stream().findFirst().get());\n\n while(runGame){\n System.out.print(Constants.PRE_INPUT_TEXT);\n parseInput(reader.readLine());\n }\n }\n }", "private Environment handleInGameMenu(Point mouseClick) {\n\t\t\n\t\t// return to main menu\n\t\tif (view.clickInMenu(mouseClick, 0)) {\n\t\t\tdispose();\n\t\t\treturn new Menu();\n\t\t}\n\n\t\t// save game\n\t\tif (view.clickInMenu(mouseClick, 1)) {\n\t\t\tFileDialog fd = new FileDialog(this, \"Save Game...\", FileDialog.SAVE);\n\t\t\tfd.setVisible(true);\n\t\t\tif (fd.getFile() != null)\n\t\t\t\tgameModel.save(fd.getFiles()[0]);\n\t\t}\n\n\t\treturn null;\n\t}", "private static JMenu getInputMenu(final EnvironmentFrame frame) {\n\t\tfinal Environment environment = frame.getEnvironment();\n\t\tfinal JMenu menu = new JMenu(\"Input\");\n\t\tfinal Serializable object = environment.getObject();\n\t\tif (SimulateAction.isApplicable(object)) {\n\t\t\taddItem(menu, new SimulateAction((Automaton) object, environment));\n\t\t}\n\t\tif (BuildingBlockSimulateAction.isApplicable(object)) {\n\t\t\taddItem(menu, new BuildingBlockSimulateAction((Automaton) object, environment));\n\t\t}\n\t\tif (SimulateNoClosureAction.isApplicable(object)) {\n\t\t\taddItem(menu, new SimulateNoClosureAction((Automaton) object, environment));\n\t\t}\n\t\tif (SimulateAction.isApplicable(object)) {\n\t\t\taddItem(menu, new NoInteractionSimulateAction((Automaton) object, environment));\n\t\t}\n\t\tif (SimulateAction.isApplicable(object)) {\n\t\t\taddItem(menu, new MultipleSimulateAction((Automaton) object, environment));\n\t\t}\n\t\tif (MultipleOutputSimulateAction.isApplicable(object)) {\n\t\t\taddItem(menu, new MultipleOutputSimulateAction((Automaton) object, environment));\n\t\t\t/*\n\t\t\t * if (GrammarOutputAction.isApplicable(object)) addItem(menu, new\n\t\t\t * GrammarOutputAction ((gui.environment.GrammarEnvironment)\n\t\t\t * environment));\n\t\t\t */\n\t\t}\n\n\t\tfinal boolean isTuring = TuringChecker.check(object);\n\t\tif (isTuring) {\n\t\t\treturn getInputMenu(frame, 0);\n\t\t}\n\n\t\t// Grammar-y actions.\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu, new LLParseTableAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\t// addItem(\n\t\t\t// menu,\n\t\t\t// new LRParseTableAction(\n\t\t\t// (edu.duke.cs.jflap.gui.environment.GrammarEnvironment)\n\t\t\t// environment));\n\t\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\t\taddItem(menu, new BruteParseAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t\t}\n\t\t}\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew MultipleBruteParseAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\t\tif (UserControlParseAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew UserControlParseAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu, new CYKParseAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew MultipleCYKParseAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t\t// if (TuringBruteParseAction.isApplicable(object))\n\t\t\t// addItem(menu, new TuringBruteParseAction(\n\t\t\t// (gui.environment.GrammarEnvironment) environment));\n\t\t}\n\n\t\t// LSystem-y actions.\n\n\t\tif (LSystemAction.isApplicable(object)) {\n\t\t\taddItem(menu, new LSystemDisplay((edu.duke.cs.jflap.gui.environment.LSystemEnvironment) environment));\n\t\t}\n\n\t\treturn menu;\n\t}", "public static void main(String[] args) {\n DemoRepositoryCreator repositoryCreator = new DemoRepositoryCreator();\n\n WorldMapRepository worldMapRepository = repositoryCreator.getWorldMapRepository();\n MonsterRepository monsterRepository = repositoryCreator.getMonsterRepository();\n PlayerRepository playerRepository = new PlayerRepository();\n\n GameEngine gameEngine = new GameEngine(\n worldMapRepository.loadCurrentMap(),\n monsterRepository,\n playerRepository\n );\n\n CommandParser commandParser = new CommandParser();\n ScreenManager screenManager = new ScreenManager(System.in, System.out); // java.io.Console doesn't work on IDE!!!\n\n Player currentPlayer = null;\n\n boolean gameCompleted = false;\n do {\n\n screenManager.prompt(currentPlayer);\n String cmdLine = screenManager.nextLine();\n\n Optional<GameCommand> optionalGameCommand = commandParser.parseCommand(cmdLine, (currentPlayer == null));\n if (optionalGameCommand.isPresent()) {\n\n GameCommand currentGameCommand = optionalGameCommand.get();\n CommandResponseDTO cmdResult = gameEngine.enterCommand(currentPlayer, currentGameCommand);\n if (cmdResult.getCurrentPlayer() != null) {\n currentPlayer = cmdResult.getCurrentPlayer();\n }\n screenManager.printCommandResult(currentPlayer, monsterRepository, cmdResult);\n\n if (currentGameCommand instanceof ExitCommand) {\n gameCompleted = true;\n }\n\n } else {\n screenManager.printInvalidCommand(cmdLine);\n }\n\n } while(!gameCompleted);\n\n }", "public static void populate() {\n HomeView homeView = new HomeView();\n homeView.setOnKeyPressed(keyEvent -> {\n WorldView worldView = WorldController.getWorld();\n worldView.getChildren().add(new Player(homeView.getNameText()));\n scene = new Scene(worldView,600,900);\n primaryStage.setTitle(\"Frogger Arcade\");\n primaryStage.setScene(scene);\n });\n primaryStage.setTitle(\"Frogger Home\");\n primaryStage.setScene(new Scene(homeView));\n primaryStage.show();\n }", "private void buildWorld() {\r\n\t\tremoveAll();\r\n\t\tintro = null;\r\n\t\tfacingEast = true;\r\n\t\t\r\n\t\taddLevels();\r\n\t\taddCharacters();\r\n\t\taddLifeDisplay();\r\n\t}", "public static void STAGE4() {\r\n\t\t\tOverseer4.setLevel4True();\r\n\t\t\t_z = new Maze(3);\r\n\t\t\t_s = new StringMap4();\r\n\t\t\tfinal JFrame fram = new JFrame();\r\n\t\t\t_p = new Player(_z);\r\n\t\t\t_q = new Question2();\r\n\t\t\t_q.questionpickL4();\r\n\t\t\t\r\n\t \t/*\r\n\t\t\t *UPDATES THE MAP TO WORLD 4\r\n\t\t\t *Sets up the JFrame and JPanel and updates the Map layout\r\n\t\t\t *Perform the required actions when there are inputs from keyboard\r\n\t\t\t *Functions the same as Overseer's constructor but without the introductions and a different world layout\r\n\t\t\t */\r\n\t\t scene = _s.updateMap(_p, _z, \"\", _m, _r1, _r2, _r3, _sword, _q,_c, _ex);\r\n\t\t fram.setTitle(\"World 4\");\r\n\t\t fram.setVisible(true);\r\n\t\t fram.setSize(800,800);\r\n\t\t fram.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t fram.setResizable(false);\r\n\t\t fram.add(scene);\r\n\t\t fram.add(_s.getMap());\r\n\t\t fram.addKeyListener(new KeyListener() {\r\n\t\t \tpublic void keyTyped(KeyEvent e) {}\r\n\t\t \t\r\n\t\t \tpublic void keyReleased(KeyEvent e) { }\r\n\r\n\t\t \tpublic void keyPressed(KeyEvent e) { \r\n\t\t \t\tint input = e.getKeyCode();\r\n\t\t \t\t\r\n\t\t \t\t//W - UP\r\n\t\t \t\tif(input == KeyEvent.VK_W) {\r\n\t\t \t\t\tscene = _s.updateMap(_p, _z, \"NORTH\", _m, _r1, _r2, _r3, _sword, _q,_c, _ex);\r\n\t\t\t \t\tfram.add(scene);\r\n\t\t\t \t\tfram.revalidate();\r\n\t\t\t \t\t\r\n\t\t\t \t\t//used to dispose frame to start a new level/world\r\n\t\t\t \t\tif(Level4 == false) {\r\n\t\t\t \t\t\tfram.dispose();\r\n\t\t\t \t\t}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\t//S - DOWN\r\n\t\t \t\telse if(input == KeyEvent.VK_S) {\r\n\t\t \t\t\tscene = _s.updateMap(_p, _z, \"SOUTH\", _m, _r1, _r2, _r3, _sword, _q,_c, _ex);\r\n\t\t\t \t\tfram.add(scene);\r\n\t\t\t \t\tfram.revalidate();\r\n\t\t\t \t\t\r\n\t\t\t \t\t//used to dispose frame to start a new level/world\r\n\t\t\t \t\tif(Level4 == false) {\r\n\t\t\t \t\t\tfram.dispose();\r\n\t\t\t \t\t}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\t//D - RIGHT\r\n\t\t \t\telse if(input == KeyEvent.VK_D) {\r\n\t\t \t\t\tscene = _s.updateMap(_p, _z, \"EAST\", _m, _r1, _r2, _r3, _sword, _q,_c, _ex);\r\n\t\t\t \t\tfram.add(scene);\r\n\t\t\t \t\tfram.revalidate();\r\n\t\t\t \t\t\r\n\t\t\t \t\t//used to dispose frame to start a new level/world\r\n\t\t\t \t\tif(Level4 == false) {\r\n\t\t\t \t\t\tfram.dispose();\r\n\t\t\t \t\t}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\t//A - LEFT\r\n\t\t \t\telse if(input == KeyEvent.VK_A) {\r\n\t\t \t\t\tscene = _s.updateMap(_p, _z, \"WEST\", _m, _r1, _r2, _r3, _sword, _q,_c, _ex);\r\n\t\t\t \t\tfram.add(scene); \r\n\t\t\t \t\tfram.revalidate();\r\n\t\t\t \t\t\r\n\t\t\t \t\t//used to dispose frame to start a new level/world\r\n\t\t\t \t\tif(Level4 == false) {\r\n\t\t\t \t\t\tfram.dispose();\r\n\t\t\t \t\t}\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\t//EXIT BUTTON\r\n\t\t \t\telse if(input == KeyEvent.VK_E) {\r\n\t Window.msg(\"You left Princess Peach alone! \\nBowser has won, keeping Peach forever...\");\r\n\t\t \t\tSystem.exit(0);\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\t//HELP BUTTON\r\n\t\t \t\telse if(input == KeyEvent.VK_H) {\r\n\t\t \t\t\tWindow.msg(\"HELP:\"\r\n\t\t \t\t\t\t\t+ \"\\nUse W A S D keys to help you move around the maze.\"\r\n\t\t \t\t\t\t\t+ \"\\n Clicking E will exit the game, h will allow you to access help screen, and c for some neat credits.\"\r\n\t\t \t\t\t\t\t+ \"Your goal is to make it to princess peach by traveling through each world and staying alive.\"\r\n\t\t \t\t\t\t\t+ \"\\n\\n EXCLAMATION BLOCKS: Triggering it will either help you or give you an disadvantage....BEWARE!\"\r\n\t\t \t\t\t\t\t+ \"\\n\\n QUESTION BLOCKS: Not just any ordinary block with the traditional coins and power-ups.\" + \r\n\t\t \t\t\t\t\t\t\t\t\t\t \"\\n\t\t-These cause questions to pop up. Getting them correct gives you 20 extra turns,\" + \r\n\t\t \t\t\t\t\t\t\t\t\t\t \"\\n\t\t but getting them incorrect decreases the number of turns Mario has by 10.\" + \r\n\t\t \t\t\t\t\t\t\t\t\t\t \"\\n\t\t -Leaving the question block empty results in getting it automatically wrong!!\" + \r\n\t\t \t\t\t\t\t\t\t\t\t\t \"\\n *The whole Mushroom Kingdom depends on you...You got this Mario!!!*\");\r\n\t\t \t\t\t\t//\t+ \"Not answering a question correctly will lead to uncertain DOOM...\");\r\n\t\t \t\t}\r\n\t\t \t\t\r\n\t\t \t\t//CREDITS BUTTON\r\n\t\t \t\telse if(input == KeyEvent.VK_C) {\r\n\t\t \t\t\tWindow.msg(\"END CREDITS\"\r\n\t\t\t\t\t+ \"\\n Code Outline: Me\"\r\n\t\t\t\t\t+ \"\\n Game Ideas: Me\"\r\n\t\t\t\t\t+ \"\\n All Other Code: Nathan\"\r\n\t\t\t\t\t+ \"\\n And Mario and Peach Lived Happily Ever After!\"\r\n\t\t\t\t\t+ \"The End\");\r\n\t\t \t\t\t\r\n\t\t \t\t}\r\n\t\t \t};\r\n\t\t \t});\r\n\t\t \t//revalidates the frame\r\n\t\t \tfram.revalidate();\r\n\t\t \t//used to dispose frame to start a new level/world\r\n\t\t \tif(Level4 == false) {\r\n\t \t\t\tfram.dispose();\r\n\t \t\t}\r\n\t\t }", "public static void main(String[] args) {\r\n //Instalizing the gui and the keyboard sensor\r\n GUI guiGame = new GUI(\"Arkanoid\", 800, 600);\r\n //Initializing and running the gameLevel.\r\n List<LevelInformation> levels = new ArrayList<LevelInformation>();\r\n //When run without parameters, your program should read a default level-sets file\r\n String path = \"level_sets.txt\";\r\n //Get level sets from args.\r\n if (args.length > 0) {\r\n path = args[0];\r\n }\r\n\r\n try {\r\n //Reading the level.\r\n LevelSpecificationReader li = new LevelSpecificationReader();\r\n GameFlow gameFlow = new GameFlow(new AnimationRunner(guiGame), guiGame.getKeyboardSensor()\r\n , guiGame.getDialogManager());\r\n //Input stream to get in the resources folder.\r\n InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream(\"level_sets.txt\");\r\n InputStreamReader reader = new InputStreamReader(is);\r\n //Running the game.\r\n Map<String, String> map = LevelSetsReader.getLevelSetMap(reader);\r\n //Reset the reader to read again the file.\r\n is = ClassLoader.getSystemClassLoader().getResourceAsStream(\"level_sets.txt\");\r\n reader = new InputStreamReader(is);\r\n List<List<LevelInformation>> levelSets = LevelSetsReader.getLevels(reader);\r\n gameFlow.createMenu(levelSets, map);\r\n\r\n\r\n guiGame.close();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }", "public void returnToMainMenu() {\n AppStateManager stateManager = getStateManager();\n setEnabled(false);\n\n EnginePowerGraphState enginePowerGraphState\n = getState(EnginePowerGraphState.class);\n stateManager.detach(enginePowerGraphState);\n\n TireDataState tireDataState = getState(TireDataState.class);\n stateManager.detach(tireDataState);\n\n VehicleEditorState vehicleEditorState\n = getState(VehicleEditorState.class);\n stateManager.detach(vehicleEditorState);\n\n DebugTabState debugTabState = getState(DebugTabState.class);\n stateManager.detach(debugTabState);\n\n getState(DriverHud.class).setEnabled(false);\n\n Vehicle vehicle = MavDemo1.getVehicle();\n Vehicle newVehicle;\n try {\n Class<? extends Vehicle> clazz = vehicle.getClass();\n newVehicle = clazz.getDeclaredConstructor().newInstance();\n } catch (ReflectiveOperationException exception) {\n throw new RuntimeException(exception);\n }\n MavDemo1 main = MavDemo1.getApplication();\n AssetManager assetManager = main.getAssetManager();\n newVehicle.load(assetManager);\n MavDemo1.setVehicle(newVehicle);\n\n stateManager.attach(new MainMenu());\n getState(CameraInputMode.class).orbit();\n }", "private World initWorld(InputSource currSource) {\n boolean isReadingSequence = false;\n int currIndexOfSequence = 0;\n while (currSource.possibleNextInput()) {\n char currChar = currSource.getNextKey();\n\n if (currChar == 'L' || currChar == 'l') {\n StringInputDevice load = new StringInputDevice(getSaveData());\n sourceString = \"\";\n world = initWorld(load);\n startLoop(load);\n return world;\n }\n\n if (currChar == 'N' || currChar == 'n') {\n isReadingSequence = true;\n }\n\n if (isReadingSequence) {\n if (currChar != ' ') {\n sourceString += currChar;\n currIndexOfSequence += 1;\n }\n if (currChar == 'S' || currChar == 's') {\n String seedString = sourceString.substring(1, currIndexOfSequence - 1);\n try {\n Long seed = Long.parseLong(seedString);\n return new World(seed);\n } catch (NumberFormatException e) {\n System.out.println(\"Please type a valid world generation. \"\n + \"(One that starts wit N, contains a seed, and ends with S. \"\n + \"Note: We will have to edit this later to \"\n + \"work with the gui and not just the debugger.\");\n sourceString = \"\";\n return initWorld(currSource);\n }\n }\n }\n\n }\n throw new IllegalArgumentException(\"You are no longer able to \"\n + \"provide an input and have not provided a valid world.\");\n }", "public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void getInput() { \n\t\txMove = 0;\n\t\tyMove = 0;\n\t\tif(handler.getKeyManager().pause) {\n\t\t\tMenuState menu = new MenuState(handler);\n\t\t\tState.setState(menu);\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().pKey) {\n\t\t\tif(gear != 0)\n\t\t\t\tchangeGear(0);\n\t\t}\n\t\tif(handler.getKeyManager().oKey) {\n\t\t\tif(gear != 1 && vector[0] == 0)\n\t\t\t\tchangeGear(1);\n\t\t}\n\t\tif(handler.getKeyManager().iKey) {\n\t\t\tif(gear != 2)\n\t\t\t\tchangeGear(2);\n\t\t}\n\t\tif(handler.getKeyManager().uKey) {\n\t\t\tif(gear != 3 && vector[0] == 0)\n\t\t\t\tchangeGear(3);\n\t\t}\n\t\t\n\t\t\t\n\t\tif(handler.getKeyManager().gas) {\n\t\t\tif(GameState.getGameActive() == 0 || GameState.getGameActive() == 4) {\n\t\t\t\tif(vector[0] < topSpeed && gear != 2 && gear != 0)\n\t\t\t\t\tvector[0] += accel;\n\t\t\t} else if (GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector == 0) {\n\t\t\t\t\tConfigState config = new ConfigState(handler);\n\t\t\t\t\tState.setState(config);\n\t\t\t\t}else if(overSelector == 1) {\n\t\t\t\t\tMenuState menustate = new MenuState(handler);\n\t\t\t\t\tState.setState(menustate);\n\t\t\t\t}else if(overSelector == 2) {\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().gas || gear == 2) {\n\t\t\t\tif(vector[0] > accel)\n\t\t\t\t\tvector[0] -= accel;\n\t\t\t\telse if(vector[0] > 0 && vector [0] <= 5 * accel)\n\t\t\t\t\tvector[0] = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().brake || (gear == 0 && vector[0] > 0)) {\n\t\t\tif(vector[0] > 0 && vector[0] - 5 * accel > 0)\n\t\t\t\tvector[0] -= 5 * accel;\n\t\t\telse if(vector[0] > 0)\n\t\t\t\tvector[0] = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().left) {\n\t\t\tif((GameState.getGameActive() == 0 || GameState.getGameActive() == 4) && vector[0] > 0) {\n\t\t\t\tif(dTurn < 0.1)\n\t\t\t\t\tdTurn += 0.02;\n\t\t\t\tif(vector[1] - dTurn <= 0)\n\t\t\t\t\tvector[1] = (double)(2 * Math.PI);\n\t\t\t\tvector[1] -= dTurn;\n\t\t\t\tif(dTurn < 0.05)\n\t\t\t\t\tdTurn += 0.01;\n\t\t\t\t//System.out.println(\"R\");\n\t\t\t} else if(GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector > 0) {\n\t\t\t\t\toverSelector--;\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().left && dTurn > 0) {\n\t\t\tdTurn = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().right) {\n\t\t\tif((GameState.getGameActive() == 0 || GameState.getGameActive() == 4) && vector[0] > 0) {\n\t\t\t\tif(dTurn < 0.1)\n\t\t\t\t\tdTurn += 0.02;\n\t\t\t\tvector[1] += dTurn;\n\t\t\t\t//System.out.println(dTurn);\n\t\t\t\tif(vector[1] >= (double)(2 * Math.PI))\n\t\t\t\t\tvector[1] = 0;\n\t\t\t}else if(GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector < buttons.length - 1) {\n\t\t\t\t\toverSelector++;\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().right && dTurn > 0) {\n\t\t\tdTurn = 0;\n\t\t}\n\t\t\n\t\tif((gear == 3) || ((gear == 2 || gear== 0) && prevGear == 3)) {\n\t\t\txMove = (double)(vector[0] * Math.cos(vector[1]));\n\t\t\tyMove = (double)(vector[0] * Math.sin(vector[1]));\n\t\t}else if(gear == 1 || ((gear == 2 || gear == 0) && prevGear == 1)) {\n\t\t\txMove = (double)(-vector[0] * Math.cos(vector[1]));\n\t\t\tyMove = (double)(-vector[0] * Math.sin(vector[1]));\n\t\t}\n\t}", "@Override\n public void inputHandling() {\n if (input.clickedKeys.contains(InputHandle.DefinedKey.ESCAPE.getKeyCode())\n || input.clickedKeys.contains(InputHandle.DefinedKey.RIGHT.getKeyCode())) { \n if (sourceMenu != null) {\n exit();\n sourceMenu.activate(); \n return;\n }\n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.UP.getKeyCode())) { \n if (selection > 0) {\n selection--;\n }\n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.DOWN.getKeyCode())) { \n if (selection < choices.size() - 1) {\n selection++;\n } \n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.ENTER.getKeyCode())) {\n if (choices.size() > 0) {\n use();\n }\n exit(); \n }\n }", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "public static void main(String args[]) \n {\n\n \n \n \tNewFrame.introDialog();\n EvolutionGame game = new EvolutionGame();\n \n \n while(true)\n\n {\n Area nextArea = ioUtils.enterCommand(character);\n\n if(!character.fighting)\n {\n if(nextArea != character.currentArea)\n\n {\n\n character.moveToArea(nextArea);\n NewFrame.setAreaDescription();\n NewFrame.addCharacters();\n\n }\n }\n else\n {\n\n }\n \n\n }\n\n }", "public static void main (String [] args) {\n \n // Welcome message\n JOptionPane.showMessageDialog(null, \"Welcome to the EcoSystem Simulation!\");\n \n // Declare variables for getting user input and for the program to use\n boolean customize = false;\n String answer; // Get user input as a string\n int row, column;\n int plantSpawnRate;\n int plantHealth, sheepHealth, wolfHealth;\n int numSheepStart, numWolfStart, numPlantStart;\n int numTurns; // Keeps track of the number of turns\n int newX, newY; // Updates animal positions\n int [] keepRunning = new int [] {0, 0, 0}; // Keeping track of animal population to determine when the program should end\n \n // Get whether the user wants a custom map or not\n int customizable = JOptionPane.showConfirmDialog(null, \"Would you like to customize the map?\");\n if (customizable == 0) {\n customize = true;\n }\n \n // Get user inputs for a custom map\n if (customize == true) {\n answer = JOptionPane.showInputDialog(\"Number of rows and columns (side length, it will be a square): \");\n row = Integer.parseInt(answer);\n column = row;\n answer = JOptionPane.showInputDialog(\"Plant spawn rate (plants/turn): \");\n plantSpawnRate = Integer.parseInt(answer);\n \n answer = JOptionPane.showInputDialog(\"Sheep health: \");\n sheepHealth = Integer.parseInt(answer);\n answer = JOptionPane.showInputDialog(\"Wolf health: \");\n wolfHealth = Integer.parseInt(answer);\n answer = JOptionPane.showInputDialog(\"Plant nutrition: \");\n plantHealth = Integer.parseInt(answer);\n \n answer = JOptionPane.showInputDialog(\"Beginning number of sheep: \");\n numSheepStart = Integer.parseInt(answer);\n answer = JOptionPane.showInputDialog(\"Beginning number of wolves: \");\n numWolfStart = Integer.parseInt(answer);\n answer = JOptionPane.showInputDialog(\"Beginning number of plants: \");\n numPlantStart = Integer.parseInt(answer);\n \n // Initialise inputs for a non-custom map\n } else {\n row = 25;\n column = 25;\n plantSpawnRate = 3;\n plantHealth = 15;\n sheepHealth = 40;\n wolfHealth = 60;\n numPlantStart = 100;\n numSheepStart = 120;\n numWolfStart = 20;\n }\n \n // Initialise new map with the dimensions given \n map = new Species [row][column];\n \n // Make the initial grid\n makeGrid(map, numSheepStart, numWolfStart, numPlantStart, sheepHealth, plantHealth, wolfHealth, plantSpawnRate);\n DisplayGrid grid = new DisplayGrid(map);\n grid.refresh();\n \n // Get whether the user is ready or not to load in objects\n int ready = JOptionPane.showConfirmDialog(null, \"Are you ready?\");\n \n // While user is ready\n if (ready == 0) {\n \n numTurns = 0;\n \n // Run the simulation, updating every second\n do { \n try{ Thread.sleep(1000); }catch(Exception e) {};\n \n // Update the map each second with all actions\n EcoSystemSim.updateMap(map, plantHealth, sheepHealth, wolfHealth, plantSpawnRate); // Update grid each turn\n \n keepRunning = population(); // Check for the populations\n \n // If board is getting too full, kill off species\n if ((keepRunning[0] + keepRunning[1] + keepRunning[2]) >= ((row * column) - 5)) {\n \n // Count 5 to kill off species\n for (int j = 0; j <= 5; j++) {\n \n // Generate random coordinates\n int y = (int)(Math.random() * map[0].length);\n int x = (int)(Math.random() * map.length);\n \n // Kill species\n map[y][x] = null;\n \n }\n }\n \n numTurns += keepRunning[3]; // Updates number of turns\n \n grid.refresh(); // Refresh each turn\n \n } while ((keepRunning[0] != 0) && (keepRunning[1] != 0) && (keepRunning[2] != 0)); // Check for whether any population is extinct\n \n // Output final populations and number of turns\n JOptionPane.showMessageDialog(null, \"The number of plants left are: \" + keepRunning[0]);\n JOptionPane.showMessageDialog(null, \"The number of sheep left are: \" + keepRunning[1]);\n JOptionPane.showMessageDialog(null, \"The number of wolves left are: \" + keepRunning[2]);\n JOptionPane.showMessageDialog(null, \"The number of turns taken is: \" + numTurns);\n }\n\n }", "public void enter() {\n // get data from current level\n GameState gs = (GameState) getStateMachine().getStates().get(\"game\");\n currentLevel = gs.getCurrentLevel();\n\n // TODO: for testing\n currentLevel.getCurrentquardant().setCleared(true);\n currentLevel.getCurrentquardant().setVisited(true);\n\n // set layout and add different panels\n getGamePanel().setLayout(layout);\n getGamePanel().add(shopPanel, BorderLayout.PAGE_START);\n //getGamePanel().add(mapPanel, BorderLayout.CENTER);\n\n // play backgroundmusic and toggle sound\n SoundBoard.BACKGROUND.play();\n SoundBoard.ERROR.play();\n\n }", "@Override\n\tpublic void process() {\n\n\t\tInputCommand cmd = InputManager.nextCommandPreserveKeyData();\n\t\tif (cmd != null) {\n\t\t\tswitch (cmd) {\n\n\t\t\tcase NEW:\n\t\t\t\tsetNextScreen(new NewGameScreen(terminal));\n\t\t\t\tbreak;\n\n\t\t\tcase LOAD:\n\t\t\t\tsetNextScreen(new MainScreen(this.terminal, loadGame()), false);\n\t\t\t\tbreak;\n\n\t\t\tcase CANCEL:\n\t\t\t\tSystem.exit(0);\n\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t}", "public static void mainMenu() {\n\t\tSystem.out.println(\"1. Train the autocomplete algorithm with input text\");\r\n\t\tSystem.out.println(\"2. Test the algorithm by entering a word fragment\");\r\n\t\tSystem.out.println(\"3. Exit (The algorithm will be reset on subsequent runs of the program)\");\r\n\t\tint choice = getValidInt(1, 3); // get the user's selection\r\n\t\tSystem.out.println(\"\"); // for appearances\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t//evaluate the user's choice\r\n\t\tswitch (choice) {\r\n\t\tcase CONSTANTS.TRAIN:\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Enter a passage to train the algorithm (press enter to end the passage): \");\r\n\t\t\tString passage = scan.nextLine();\r\n\t\t\tprovider.train(passage);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase CONSTANTS.TEST:\r\n\t\t\t\r\n\t\t\tString prefix;\r\n\t\t\tdo { // keep asking for input until a valid alphabetical string is given\r\n\t\t\t\tSystem.out.print(\"Enter a prefix to test autocomplete (alphabetic characters only): \");\r\n\t\t\t\tprefix = scan.nextLine();\r\n\t\t\t} while (!prefix.matches(\"[a-zA-z]+\"));\r\n\t\t\tSystem.out.println(\"\"); // for appearances\r\n\t\t\tshowResults(provider.getWords(prefix.toLowerCase()));\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase CONSTANTS.EXIT:\r\n\t\t\t\r\n\t\t\tSystem.exit(0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tmainMenu();\r\n\t}", "@Override\n \tpublic void menu()\n \t{\n \t\tint random = PublicFunctions.getRandomNumberPiece();\n \n \t\twhile(true)\n \t\t{\t\t\t\n \t\t\tbuilder.setLength(0);\n \t\t\t\n \t\t\t//Print out the status\n \t\t\tif(random == 8)\n \t\t\t{\n \t\t\t\tbuilder.append(\"The new piece is mystery piece\").append(\"\\n\");\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tbuilder.append(\"The new piece is \").append(random).append(\"\\n\");\n \t\t\t}\n \t\t\tbuilder.append(board.toString());\n \t\t\tSystem.out.println(builder);\n \t\t\t\n \n \t\t\t//Prompt starts here\n \t\t\tSystem.out.println(\"Where do you want to place the piece?\");\n \t\t\t\n \t\t\tString position = scanner.nextLine();\n \t\t\t\n \t\t\tif(position.equalsIgnoreCase(\"exit\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Exiting...\");\n \t\t\t\t//dump stats here\n \t\t\t\tSystem.exit(0);\n \t\t\t}\n \t\t\telse if(position.equalsIgnoreCase(\"help\"))\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Help here!\");\n \t\t\t}\n \t\t\telse if(PublicFunctions.isValidPosition(position))\n \t\t\t{\n \t\t\t\tif(!board.insert(Integer.parseInt(position), random))\n \t\t\t\t{\n \t\t\t\t\tSystem.out.println(\"You lose\");\n \t\t\t\t\t//dump statistics here\n \t\t\t\t\tSystem.exit(0);\n \t\t\t\t}\n \t\t\t\tSystem.out.println(\"Inserting piece...\");\n \n \t\t\t\t//Generate random number for next interation\n \t\t\t\trandom = PublicFunctions.getRandomNumberPiece();\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tSystem.out.println(\"Invalid Entry\");\n \t\t\t}\n \t\t}\n \t}", "public static void main(String[] args) {\n String [] mainMenu = {\"Main Menu\", \"Search\", \"Stats\", \"Spells\", \"Bag\", \"Quests\", \"Shop\", \"Test\", \"Exit\"};\r\n //Array that stores the shop menu\r\n String [] shopMenu = {\"Shop Menu\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the battle menu\r\n String [] battleMenu = {\"Battle Menu\", \"Attack\", \"Run\"};\r\n //Array that stores the bag menu\r\n String [] bagMenu = {\"Bag Menu\", \"Equip\", \"Use\", \"Exit\"};\r\n //Array that stores the spell menu\r\n String [] spellMenu = {\"Spell Menu\", \"Exit\"};\r\n //Array that stores the stat menu\r\n String [] statMenu = {\"Stat Menu\", \"Allocate Stats\", \"Exit\"};\r\n //Array that stores the quest menu\r\n String [] questMenu = {\"Quest Menu\", \"Check\", \"Exit\"};\r\n //Array that stores the allocate stat menu\r\n String [] allocateStatMenu = {\"Allocate Stats Menu\", \"Strength\", \"Intelligence\", \"Vitality\", \"Cancel\"};\r\n //Array that stores the blue moon city menu\r\n String [] blueMoonMenu = {\"Blue Moon City\", \"General Goods\", \"Blacksmith\", \"Magic Shop\", \"Guild\", \"Exit\"};\r\n //Array that holds the blue moon general menu\r\n String [] blueMoonGeneralMenu = {\"Blue Moon General Goods\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the blue moon blacksmith menu\r\n String [] blueMoonBlacksmithMenu = {\"Blue Moon Blacksmith\", \"Buy\", \"Sell\", \"Exit\"};\r\n //Array that stores the blue moon guild menu\r\n String [] blueMoonGuildMenu = {\"Blue Moon Guild\", \"Accept\", \"Drop\", \"Turn-In\", \"Exit\"};\r\n \r\n //Variable for the user choice\r\n String userChoice;\r\n Random rand = new Random();\r\n //Variable to keep the program running\r\n Boolean done = false;\r\n //Instantiates the player\r\n player player1 = new player();\r\n //Gets the player's character name\r\n player1.setPlayerName(getUserName());\r\n //Loop that keeps the program running until exited\r\n while(!done){\r\n //Variable for the level up loop\r\n Boolean doneLevel = false;\r\n //Calculates the players defense\r\n player1.setTotalDefense(playerTotalDefense(player1.getPlayerHelmet(), player1.getPlayerChestPlate(), player1.getPlayerGloves(), player1.getPlayerBoots(), player1.getPlayerDefense()));\r\n //Calculates the players attack\r\n player1.setTotalAttack(playerTotalAttack(player1.getPlayerWeapon(), player1.getPlayerAttack(), player1.getStrength()));\r\n //Checks to see if they player has leveled up\r\n while(!doneLevel){\r\n if(player1.getPlayerExperience() > (player1.getPlayerLevel() * 100)){\r\n //Increases the player's level by 1\r\n player1.setPlayerLevel(levelUp(player1.getPlayerLevel()));\r\n //Subtracts the experience for the level up\r\n player1.setPlayerExperience((player1.getPlayerExperience() - ((player1.getPlayerLevel() - 1) * 100)));\r\n //Adds a stat point upon level up\r\n player1.setStatPoints(gainStatPoints(player1.getStatPoints()));\r\n //Fully heals the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //Fully restores the players mp\r\n player1.setCurrentMP(player1.getMaxMP());\r\n }else{\r\n doneLevel = true;\r\n }\r\n }\r\n //Array that stores the player's stats\r\n Object [] playerStats = {player1.getPlayerName(), player1.getPlayerLevel(), player1.getPlayerExperience(), player1.getPlayerCurrentHealth(), player1.getPlayerMaxHealth(),\r\n player1.getCurrentMP(), player1.getMaxMP(), player1.getTotalAttack(), player1.getTotalDefense(), player1.getStrength(),\r\n player1.getIntelligence(), player1.getVitality(), player1.getStatPoints(), player1.getPlayerGold()};\r\n //Displays the main menu and gets the user decision\r\n userChoice = getUserChoice(mainMenu);\r\n //Determines the next course of action\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Starts the battle sequence\r\n case \"1\":\r\n //Boolean for the battle sequence\r\n Boolean battle = true;\r\n //Variable to hold the item dropped after monster death\r\n String loot;\r\n //Variable to hold which encounter was picked\r\n String encounterHolder;\r\n //Holds the encounter\r\n encounterHolder = encounter(player1.getPlayerLevel());\r\n switch(encounterHolder){\r\n//******************************************************************************************************************************\r\n //Found a skeleton\r\n case \"Skeleton\":\r\n //Instantiates a skeleton\r\n skeleton Skeleton = new skeleton();\r\n //Scales skeleton max health based on player level\r\n Skeleton.setSkeletonMaxHealth(skeletonHealthScale(Skeleton.getSkeletonMaxHealth(), player1.getPlayerLevel()));\r\n //Puts the skeleton at full health\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonMaxHealth());\r\n //Scales skeleton attack based on player level\r\n Skeleton.setSkeletonAttack(skeletonAttackScale(Skeleton.getSkeletonAttack(), player1.getPlayerLevel()));\r\n //Starts the battle loop\r\n while(battle){\r\n //Displays the battle menu\r\n userChoice = getUserChoice(battleMenu);\r\n //Checks the user decision\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Attack option\r\n case \"1\":\r\n //Lists the potential attacks the player can make\r\n System.out.println(\"\\t1) Basic Attack\");\r\n for(int i = 0; i < player1.getSpellList().length; i++){\r\n if(player1.spellList[i].equals(\"\")){\r\n break;\r\n }else{\r\n System.out.println(\"\\t\" + (i + 2) + \") \" + player1.spellList[i]);\r\n }\r\n }\r\n //Gets the user decision\r\n userChoice = getUserInput(\"What attack do you want to do? \\n(Type the name of the attack)\");\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Basic Attack option\r\n case \"Basic Attack\":\r\n //Calculates the remaining health of the skeleton\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonCurrentHealth() - playerDamageDealt(player1.getTotalAttack(), Skeleton.getSkeletonDefense())); \r\n //Tells the user how much damage they dealt to the skeleton\r\n System.out.println(\"You dealt \" + playerDamageDealt(player1.getTotalAttack(), Skeleton.getSkeletonDefense()) + \" damage to the Skeleton!\"); \r\n //Tells the user how much health the skeleton has remaining\r\n System.out.println(\"The Skeleton has \" + Skeleton.getSkeletonCurrentHealth() + \"/\" + Skeleton.getSkeletonMaxHealth() + \" health left!\"); \r\n //Basic Attack break\r\n break;\r\n//******************************************************************************************************************************\r\n //Fireball option\r\n case \"Fireball\":\r\n //Creates fireball spell\r\n fireball Fireball = new fireball();\r\n //Calculates the fireball damage and calculates the skeleton health after taking damage\r\n Skeleton.setSkeletonCurrentHealth(Skeleton.getSkeletonCurrentHealth() - fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()));\r\n //Tells the player how much damage they dealt\r\n System.out.println(\"You dealt \" + fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()) + \" damage with Fireball to the Skeleton\");\r\n //Tells the user how much health the skeleton has remaining\r\n System.out.println(\"The Skeleton has \" + Skeleton.getSkeletonCurrentHealth() + \"/\" + Skeleton.getSkeletonMaxHealth() + \" health left!\"); \r\n //Reduces the players mp\r\n player1.setCurrentMP(player1.getCurrentMP() - fireballMPScale(Fireball.getMpCost(), player1.getPlayerLevel()));\r\n //Fireball break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n//******************************************************************************************************************************\r\n //Calculates the remaining health of the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() - monsterDamageDealt(Skeleton.getSkeletonAttack(), player1.getTotalDefense())); \r\n //Tells the player how much damage the skeleton dealto to the player\r\n System.out.println(\"The Skeleton dealt \" + monsterDamageDealt(Skeleton.getSkeletonAttack(), player1.getTotalDefense()) + \" damage to you!\"); \r\n //Tells the user how much health they have left\r\n System.out.println(\"You have \" + player1.getPlayerCurrentHealth() + \"/\" + player1.getPlayerMaxHealth() + \" health left!\");\r\n System.out.println(\"You have \" + player1.getCurrentMP() + \"/\" + player1.getMaxMP() + \" MP\");\r\n//******************************************************************************************************************************\r\n //Checks if skeleton is dead\r\n if(Skeleton.getSkeletonCurrentHealth() <= 0){\r\n //Ends the battle while loop\r\n battle = false;\r\n //Tells the user they have killed the enemy\r\n System.out.println(\"You have killed the Skeleton!\");\r\n //Tells the user how much gold they gained\r\n System.out.println(\"You gained \" + Skeleton.getSkeletonGoldDropped() + \" gold\");\r\n //Adds the gold to the users gold amount\r\n player1.setPlayerGold(player1.getPlayerGold() + skeletonGoldScale(Skeleton.getSkeletonGoldDropped(), player1.getPlayerLevel()));\r\n //Tells the user how much experience they have gained\r\n System.out.println(\"You gain \" + Skeleton.getSkeletonExperience() + \" experience!\");\r\n //Calculates the player's experience\r\n player1.setPlayerExperience (experienceTally(player1.getPlayerExperience(), Skeleton.getSkeletonExperience()));\r\n //Function is called to determine the item dropped and stores it in variable\r\n loot = itemDrop(rand.nextInt(5));\r\n //Checks to see if an item was actually dropped\r\n if(loot.equals(\"\")){\r\n //Tells the user that no item was dropped\r\n System.out.println(\"No item dropped.\");\r\n }else{ \r\n //Places the item in the first open space in the player's inventory\r\n player1.setPlayerBag(placeInBag(loot,player1.getPlayerBag()));\r\n //Tells the user which item they god\r\n System.out.println(\"You got: \" + loot + \"!\");\r\n }\r\n }\r\n//******************************************************************************************************************************\r\n //Checks if the player has died\r\n if(player1.getPlayerCurrentHealth() <= 0){\r\n System.out.println(\"You have died\");\r\n //Exits the battle sequence\r\n battle = false;\r\n //Ends the game\r\n done = true;\r\n }\r\n //Attack option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Run option\r\n case \"2\":\r\n //Runs from the battle and goes back to the main menu\r\n System.out.println(\"You have fled from the \" + encounterHolder);\r\n //Ends the battle sequence\r\n battle = false;\r\n //Run option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Skeleton encounter break\r\n break;\r\n//******************************************************************************************************************************\r\n //Devil encounter\r\n case \"Devil\":\r\n //Creates a devil\r\n devil Devil = new devil();\r\n //Scales skeleton max health based on player level\r\n Devil.setDevilMaxHealth(devilHealthScale(Devil.getDevilMaxHealth(), player1.getPlayerLevel()));\r\n //Puts the skeleton at full health\r\n Devil.setDevilCurrentHealth(Devil.getDevilMaxHealth());\r\n //Scales skeleton attack based on player level\r\n Devil.setDevilAttack(devilAttackScale(Devil.getDevilAttack(), player1.getPlayerLevel()));\r\n //Starts the battle loop\r\n while(battle){\r\n //Displays the battle menu\r\n userChoice = getUserChoice(battleMenu);\r\n //Checks the user decision\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Attack option\r\n case \"1\":\r\n //Lists the potential attacks the player can make\r\n System.out.println(\"\\t1) Basic Attack\");\r\n for(int i = 0; i < player1.getSpellList().length; i++){\r\n if(player1.spellList[i].equals(\"\")){\r\n break;\r\n }else{\r\n System.out.println(\"\\t\" + (i + 2) + \") \" + player1.spellList[i]);\r\n }\r\n }\r\n //Gets the user decision\r\n userChoice = getUserInput(\"What attack do you want to do? \\n(Type the name of the attack)\");\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Basic Attack option\r\n case \"Basic Attack\":\r\n //Calculates the remaining health of the devil\r\n Devil.setDevilCurrentHealth(Devil.getDevilCurrentHealth() - playerDamageDealt(player1.getTotalAttack(), Devil.getDevilDefense())); \r\n //Tells the user how much damage they dealt to the devil\r\n System.out.println(\"You dealt \" + playerDamageDealt(player1.getTotalAttack(), Devil.getDevilDefense()) + \" damage to the Devil!\"); \r\n //Tells the user how much health the devil has remaining\r\n System.out.println(\"The Devil has \" + Devil.getDevilCurrentHealth() + \"/\" + Devil.getDevilMaxHealth() + \" health left!\"); \r\n //Basic Attack break\r\n break;\r\n//******************************************************************************************************************************\r\n //Fireball option\r\n case \"Fireball\":\r\n //Creates fireball spell\r\n fireball Fireball = new fireball();\r\n //Calculates the fireball damage and calculates the devil health after taking damage\r\n Devil.setDevilCurrentHealth(Devil.getDevilCurrentHealth() - fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()));\r\n //Tells the user how much health the devil has remaining\r\n System.out.println(\"The Devil has \" + Devil.getDevilCurrentHealth() + \"/\" + Devil.getDevilMaxHealth() + \" health left!\"); \r\n //Tells the player how much damage they dealt\r\n System.out.println(\"You dealt \" + fireballDamageScale(Fireball.getBaseDamage(), player1.getPlayerLevel()) + \" damage with Fireball to the Devil\");\r\n //Reduces the players mp\r\n player1.setCurrentMP(player1.getCurrentMP() - fireballMPScale(Fireball.getMpCost(), player1.getPlayerLevel()));\r\n //Fireball break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n//******************************************************************************************************************************\r\n //Calculates the remaining health of the player\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() - monsterDamageDealt(Devil.getDevilAttack(), player1.getTotalDefense())); \r\n //Tells the player how much damage the devil dealt to the player\r\n System.out.println(\"The Devil dealt \" + monsterDamageDealt(Devil.getDevilAttack(), player1.getTotalDefense()) + \" damage to you!\"); \r\n //Tells the user how much health they have left\r\n System.out.println(\"You have \" + player1.getPlayerCurrentHealth() + \"/\" + player1.getPlayerMaxHealth() + \" health left!\");\r\n System.out.println(\"You have \" + player1.getCurrentMP() + \"/\" + player1.getMaxMP() + \" MP\");\r\n//******************************************************************************************************************************\r\n //Checks if the devil died\r\n if(Devil.getDevilCurrentHealth() <= 0){\r\n //Ends the battle while loop\r\n battle = false;\r\n //Tells the user they have killed the enemy\r\n System.out.println(\"You have killed the Devil!\");\r\n //Tells the user how much gold they gained\r\n System.out.println(\"You gained \" + Devil.getDevilGold() + \" gold\");\r\n //Adds the gold to the users gold amount\r\n player1.setPlayerGold(player1.getPlayerGold() + devilGoldScale(Devil.getDevilGold(), player1.getPlayerLevel()));\r\n //Tells the user how much experience they have gained\r\n System.out.println(\"You gain \" + Devil.getDevilExperience() + \" experience!\");\r\n //Calculates the player's experience\r\n player1.setPlayerExperience (experienceTally(player1.getPlayerExperience(), Devil.getDevilExperience()));\r\n //Function is called to determine the item dropped and stores it in variable\r\n loot = itemDrop(rand.nextInt(5));\r\n //Checks to see if an item was actually dropped\r\n if(loot.equals(\"\")){\r\n //Tells the user that no item was dropped\r\n System.out.println(\"No item dropped.\");\r\n }else{ \r\n //Places the item in the first open space in the player's inventory\r\n player1.setPlayerBag(placeInBag(loot,player1.getPlayerBag()));\r\n //Tells the user which item they god\r\n System.out.println(\"You got: \" + loot + \"!\");\r\n }\r\n }\r\n//******************************************************************************************************************************\r\n //Checks if the player has died\r\n if(player1.getPlayerCurrentHealth() <= 0){\r\n System.out.println(\"You have died\");\r\n //Exits the battle sequence\r\n battle = false;\r\n //Ends the game\r\n done = true;\r\n }\r\n //Attack option break\r\n break;\r\n//******************************************************************************************************************************\r\n //Run option\r\n case \"2\":\r\n //Runs from the battle and goes back to the main menu\r\n System.out.println(\"You have fled from the \" + encounterHolder);\r\n //Ends the battle sequence\r\n battle = false;\r\n //Run option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Devil encounter break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Blue Moon City\":\r\n Boolean visit = false;\r\n while(!visit){\r\n userChoice = getUserChoice(blueMoonMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //General Goods option\r\n case \"1\":\r\n blueMoonGeneralGoods BlueMoonGeneral = new blueMoonGeneralGoods();\r\n //Creates healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Creates greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonGeneral.setInventory(populateBlueMoonGeneral(BlueMoonGeneral.getInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n userChoice = getUserChoice(blueMoonGeneralMenu);\r\n //Variable for shop loop\r\n Boolean shopExit = false;\r\n while(!shopExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy Item\r\n case \"1\":\r\n //Diplays the shop keeper inventory\r\n displayShopInventory(BlueMoonGeneral.getInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buy Healing Potion\r\n case \"Healing Potion\":\r\n //Checks to see if the player has the gold to buy the healing potion\r\n if(player1.getPlayerGold() >= HealingPotion.getHealingPotionBuyPrice()){\r\n //Subtracts the price of the healing potion from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - HealingPotion.getHealingPotionBuyPrice());\r\n //Puts the healing potion in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a healing potion\r\n System.out.println(\"You bought Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n //If the player doesnt have the gold to buy a healing potino\r\n }else if(buyChoice.equals(\"Healing Potion\") && (player1.getPlayerGold() < HealingPotion.getHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a healing player\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buy Greater Healing Potion\r\n case \"Greater Healing Potion\":\r\n //Checks to see if the player has the gold to buy a greater healing potion\r\n if(player1.getPlayerGold() >= GreaterHealingPotion.getGreaterHealingPotionBuyPrice()){\r\n //Subtracts the price of the greater healing potino from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreaterHealingPotion.getGreaterHealingPotionBuyPrice());\r\n //Places the greater healing potion in the players bag\r\n player1.setPlayerBag(placeInBag(\"Greater Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a greater healing potion\r\n System.out.println(\"You bought Greater Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n //If they player doesnt have the gold to buy a greater healing potion\r\n }else if(buyChoice.equals(\"Greater Healing Potion\") && (player1.getPlayerGold() < GreaterHealingPotion.getGreaterHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a greater healing potion\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n }\r\n case \"Exit\":\r\n shopExit = true;\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Buy option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Sell Item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n shopExit = true;\r\n //Sell option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit Item\r\n case \"3\":\r\n shopExit = true;\r\n //Sell option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n shopExit = true;\r\n break;\r\n }\r\n }\r\n //Blue Moon General Goods option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Blacksmith option\r\n case \"2\":\r\n blueMoonBlacksmith BlueMoonBlacksmith = new blueMoonBlacksmith();\r\n //Creates iron helmet\r\n ironHelmet IronHelmet = new ironHelmet();\r\n //Creates iron chest plate\r\n ironChestPlate IronChestPlate = new ironChestPlate();\r\n //Creates iron gloves\r\n ironGloves IronGloves = new ironGloves();\r\n //Creates iron boots\r\n ironBoots IronBoots = new ironBoots();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonBlacksmith.setInventory(populateBlueMoonBlacksmith(BlueMoonBlacksmith.getInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n displayShopInventory(BlueMoonBlacksmith.getInventory());\r\n userChoice = getUserChoice(blueMoonBlacksmithMenu);\r\n //Variable for shop loop\r\n Boolean blacksmithExit = false;\r\n while(!blacksmithExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy Item\r\n case \"1\":\r\n //Diplays the blacksmith inventory\r\n displayShopInventory(BlueMoonBlacksmith.getInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buy Iron Helmet\r\n case \"Iron Helmet\":\r\n //Checks to see if the player has the gold to buy the iron helmet\r\n if(player1.getPlayerGold() >= IronHelmet.getBuyPrice()){\r\n //Subtracts the price of the iron helmet from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronHelmet.getBuyPrice());\r\n //Puts the iron helmet in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Iron Helmet\", player1.playerBag));\r\n //Tells the player they bought a iron helmet\r\n System.out.println(\"You bought Iron Helmet\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Helmet option break\r\n break;\r\n //If the player doesnt have the gold to buy a iron helmet\r\n }else if(buyChoice.equals(\"Iron Helmet\") && (player1.getPlayerGold() < IronHelmet.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron helmet\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buy Iron Chest Plate\r\n case \"Iron Chest Plate\":\r\n //Checks to see if the player has the gold to buy a iron boots\r\n if(player1.getPlayerGold() >= IronChestPlate.getBuyPrice()){\r\n //Subtracts the price of the iron chest plate from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronChestPlate.getBuyPrice());\r\n //Places the iron chest plate in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Chest Plate\", player1.playerBag));\r\n //Tells the player they bought a iron chest plate\r\n System.out.println(\"You bought Iron Chest Plate\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron chest plate\r\n }else if(buyChoice.equals(\"Iron Chest Plate\") && (player1.getPlayerGold() < IronChestPlate.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron chest plate\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Chest Plate option break\r\n break;\r\n }\r\n //Buy iron boots\r\n case \"Iron Boots\":\r\n //Checks to see if the player has the gold to buy a iron boots\r\n if(player1.getPlayerGold() >= IronBoots.getBuyPrice()){\r\n //Subtracts the price of the iron boots from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronBoots.getBuyPrice());\r\n //Places the iron boots in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Boots\", player1.playerBag));\r\n //Tells the player they bought a iron boots\r\n System.out.println(\"You bought Iron Boots\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron boots\r\n }else if(buyChoice.equals(\"Iron Boots\") && (player1.getPlayerGold() < IronBoots.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron boots\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Boots option break\r\n break;\r\n }\r\n case \"Iron Gloves\":\r\n //Checks to see if the player has the gold to buy a iron gloves\r\n if(player1.getPlayerGold() >= IronGloves.getBuyPrice()){\r\n //Subtracts the price of the iron gloves from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - IronGloves.getBuyPrice());\r\n //Places the iron gloves in the players bag\r\n player1.setPlayerBag(placeInBag(\"Iron Gloves\", player1.playerBag));\r\n //Tells the player they bought a iron gloves\r\n System.out.println(\"You bought Iron Gloves\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Gloves option break\r\n break;\r\n //If they player doesnt have the gold to buy a iron gloves\r\n }else if(buyChoice.equals(\"Iron Gloves\") && (player1.getPlayerGold() < IronGloves.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a iron gloves\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n blacksmithExit = true;\r\n //Iron Chest Plate option break\r\n break;\r\n }\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break; \r\n }\r\n //Buy option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Sell Item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n blacksmithExit = true;\r\n //Sell option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit Item\r\n case \"3\":\r\n blacksmithExit = true;\r\n //Sell option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n blacksmithExit = true;\r\n break;\r\n }\r\n }\r\n //Blue Moon Blacksmith option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Magic Shop option\r\n case \"3\":\r\n //Blue Moon Magic Shop option 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Guild option\r\n case \"4\":\r\n blueMoonGuild BlueMoonGuild = new blueMoonGuild();\r\n //Populates the shopkeeper's inventory with items\r\n BlueMoonGuild.setQuestList(populateBlueMoonGuild(BlueMoonGuild.getQuestList()));\r\n //Displays the guild menu and asks the player what they want to do\r\n userChoice = getUserChoice(blueMoonGuildMenu);\r\n //Variable for guild loop\r\n Boolean guildExit = false;\r\n while(!guildExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Accept Quest\r\n case \"1\":\r\n displayQuestList(BlueMoonGuild.getQuestList());\r\n String questChoice = getUserInput(\"What quest do you want to accept? Type in the name of the quest.\");\r\n switch(questChoice){\r\n case \"Kill Skeletons\":\r\n player1.setQuestList(placeQuest(player1.getQuestList(), \"Kill Skeletons\"));\r\n System.out.println(\"You have accepted the quest: Kill Skeletons\");\r\n guildExit = true;\r\n break;\r\n }\r\n //Accept quest option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Drop Quest\r\n case \"2\":\r\n //Drop quest option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Turn in quest option \r\n case \"3\":\r\n break;\r\n case \"4\":\r\n guildExit = true;\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break;\r\n }\r\n }\r\n //Blue Moon Magic Shop option 4 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit option\r\n case \"5\":\r\n visit = true;\r\n //Blue Moon Exit option 5 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Blue Moon Encounter break;\r\n break;\r\n default:\r\n //Encounter break\r\n break;\r\n }\r\n //Search option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Starts the stats sequence\r\n case \"2\":\r\n //Displays the player stats\r\n displayPlayerStats(playerStats, player1.getPlayerHelmet(), player1.getPlayerChestPlate(), player1.getPlayerWeapon(), player1.getPlayerGloves(), player1.getPlayerBoots());\r\n userChoice = getUserChoice(statMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Allocate Stats option\r\n case \"1\":\r\n userChoice = getUserChoice(allocateStatMenu);\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Add Strength\r\n case \"1\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases strength by 1\r\n player1.setStrength(gainStrength(player1.getStrength())); \r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Strength option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Add Intelligence\r\n case \"2\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases intelligence by 1\r\n player1.setIntelligence(gainIntelligence(player1.getIntelligence()));\r\n //Increases the players max mp based on intelligence\r\n player1.setMaxMP(maxMp(player1.getMaxMP()));\r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Intelligence option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Add Vitality\r\n case \"3\":\r\n //Checks to see if the player has a stat point to spend\r\n if(player1.getStatPoints() > 0){\r\n //Removes stat point\r\n player1.setStatPoints(removeStatPoints(player1.getStatPoints()));\r\n //Increases vitality by 1\r\n player1.setVitality(gainVitality(player1.getVitality()));\r\n //Increases the players max health base on vitality\r\n player1.setPlayerMaxHealth(maxHealth(player1.getPlayerMaxHealth()));\r\n }else{\r\n //Tells the player they dont have any stat points to spend\r\n System.out.println(\"You don't have any stat points to allocate.\");\r\n }\r\n //Vitality opion 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Cancel\r\n case \"4\":\r\n //Cancel option 4 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Allocate stats option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exits the stat menu\r\n case \"2\":\r\n //Exit option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n //Stats option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"3\":\r\n //Variable to store spell exit\r\n Boolean spellExit = false;\r\n //Loop to display spell list\r\n while(!spellExit){\r\n //Display spell list\r\n displayBag(player1.getSpellList());\r\n //Get user choice\r\n userChoice = getUserChoice(spellMenu);\r\n switch(userChoice){\r\n //Exit option\r\n case \"1\":\r\n spellExit = true;\r\n //Exit option 1 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n //Spells option 3 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Starts the bag sequence\r\n case \"4\":\r\n //Variable for the bag sequence\r\n Boolean bagExit = false;\r\n //Variable to hold which item to equip\r\n String itemChosen;\r\n //Variable to hold which item was in the equipment slot\r\n String previousItem;\r\n //Enters the bag sequence based on user response\r\n while(!bagExit){\r\n //Displays the player's bag\r\n displayBag(player1.getPlayerBag());\r\n //Displays the bag menu\r\n userChoice = getUserChoice(bagMenu);\r\n //Checks user choice\r\n switch(userChoice){\r\n //Equip an item sequence\r\n case \"1\":\r\n //Runs function to choose an item to equip\r\n itemChosen = displayItemFromBag(player1.playerBag, \"Equip\");\r\n //Checks which item was chosen to equip\r\n switch(itemChosen){\r\n//******************************************************************************************************************************\r\n //If helmet was chosen to equip\r\n case \"Leather Helmet\":\r\n //Checks to see if a helmet is already equipped\r\n if(!player1.playerHelmet[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerHelmet[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Leather Helmet\");\r\n //Helmet option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If chest player was chosen to equip\r\n case \"Leather Chest Plate\":\r\n //Checks to see if a chest plate is already equipped\r\n if(!player1.playerChestPlate[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerChestPlate[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Leather Chest Plate\");\r\n //Chest Plate option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If short sword was chosen to equip\r\n case \"Short Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the already equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Puts the previously equipped item into the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the newly equipped item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the item chosen\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Short Sword\");\r\n //Short Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If long sword was chosen to equip\r\n case \"Long Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped \r\n }else{\r\n //Equips the selected item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Long Sword\");\r\n //Long Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If great sword was selected\r\n case \"Great Sword\":\r\n //Checks to see if a weapon is already equipped\r\n if(!player1.playerWeapon[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerWeapon[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerWeapon[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped GreatSword\");\r\n //Great Sword option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron helmet was selected\r\n case \"Iron Helmet\":\r\n //Checks to see if a helmet is already equipped\r\n if(!player1.playerHelmet[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerHelmet[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerHelmet[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Helmet\");\r\n //Iron Helmet option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron chest plate was selected\r\n case \"Iron Chest Plate\":\r\n //Checks to see if a chest plate is already equipped\r\n if(!player1.playerChestPlate[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerChestPlate[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerChestPlate[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Chest Plate\");\r\n //Iron Chest Plate option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron boots was selected\r\n case \"Iron Boots\":\r\n //Checks to see if a boots is already equipped\r\n if(!player1.playerBoots[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerBoots[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerBoots[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerBoots[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Boots\");\r\n //Iron Boots option break\r\n break;\r\n//******************************************************************************************************************************\r\n //If iron gloves was selected\r\n case \"Iron Gloves\":\r\n //Checks to see if a gloves is already equipped\r\n if(!player1.playerGloves[0].equals(\"\")){\r\n //Puts the equipped item in a variable\r\n previousItem = player1.playerGloves[0];\r\n //Places the previous equipped item in the bag\r\n player1.setPlayerBag(placeInBag(previousItem, player1.getPlayerBag()));\r\n //Equips the new item\r\n player1.playerGloves[0] = itemChosen;\r\n //Removes the new item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If no item was already equipped\r\n }else{\r\n //Equips the selected item\r\n player1.playerGloves[0] = itemChosen;\r\n //Removes the selected item from the bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n }\r\n //Tells the player the item was equipped\r\n System.out.println(\"You equipped Iron Gloves\");\r\n //Iron Gloves option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Exit\":\r\n //Exit option break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\"); \r\n }\r\n //Equip option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Use Item\r\n case \"2\":\r\n //Displays the useable items from the bag\r\n itemChosen = displayItemFromBag(player1.playerBag, \"Use\");\r\n switch(itemChosen){\r\n//******************************************************************************************************************************\r\n //Use healing potion\r\n case \"Healing Potion\":\r\n //Creates a healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Checks to see if the player is injured\r\n if(player1.getPlayerCurrentHealth() < player1.getPlayerMaxHealth()){\r\n //Tells the player they used a healing potion\r\n System.out.println(\"You used \" + itemChosen);\r\n //Removes the healing potion from the players bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //Checks if the players missing health is less than the health restored by the healing potion\r\n if((player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth() < HealingPotion.getHealthGained())){\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + (player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth()) + \" health\");\r\n //Sets the players health to max\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //If the players missing health is greater than the health restored by the healing potion\r\n }else{\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + HealingPotion.getHealthGained() + \" health\");\r\n //Restores the players health by the amount given by the healing potion\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() + HealingPotion.getHealthGained());\r\n }\r\n //If you are not injured\r\n }else{\r\n //Tells the player they cannot use a healing potion\r\n System.out.println(\"You are at full health and cannot use that item\");\r\n }\r\n //Healing Potion option break\r\n break;\r\n//******************************************************************************************************************************\r\n //Use Greater Healing Potion\r\n case \"Greater Healing Potion\":\r\n //Creates a greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Checks to see if the player is injured\r\n if(player1.getPlayerCurrentHealth() < player1.getPlayerMaxHealth()){\r\n //Tells the player they used a greater healing potion\r\n System.out.println(\"You used \" + itemChosen);\r\n //Removes the greater healing potion from the players bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //If the players missing health is less than the health restored by the greater healing potion\r\n if((player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth() < GreaterHealingPotion.getHealthGained())){\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + (player1.getPlayerMaxHealth() - player1.getPlayerCurrentHealth()) + \" health\");\r\n //Restores the player to max health\r\n player1.setPlayerCurrentHealth(player1.getPlayerMaxHealth());\r\n //If they players missing health is greater than the health restored by the greater healing potion\r\n }else{\r\n //Tells the player how much health they gained\r\n System.out.println(\"You gained \" + GreaterHealingPotion.getHealthGained() + \" health\");\r\n //Restores the players health by the amount given by the greater healing potion\r\n player1.setPlayerCurrentHealth(player1.getPlayerCurrentHealth() + GreaterHealingPotion.getHealthGained());\r\n }\r\n //If the player is not injured\r\n }else{\r\n //Tells the player they cannot use a greater healing potion\r\n System.out.println(\"You are at full health and cannot use that item\");\r\n }\r\n //Greater Healing Potion option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Scroll of Fireball\":\r\n //Removes scroll of fireball from bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemChosen));\r\n //Tells the player they have learned the fireball spell\r\n System.out.println(\"You have learned: Fireball\");\r\n //Add fireball to spell list\r\n player1.setSpellList(placeInBag(\"Fireball\", player1.getSpellList()));\r\n //Scroll of Fireball option break\r\n break;\r\n//******************************************************************************************************************************\r\n case \"Exit\":\r\n //Exit option break\r\n break;\r\n default:\r\n System.out.println(\"Invalid Option. Try again.\");\r\n }//Use option 2 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit\r\n case \"3\":\r\n //Exits the bag sequence\r\n bagExit = true;\r\n //Exit option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }//Bag option 4 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Quests Menu\r\n case \"5\":\r\n Boolean questExit = false;\r\n while(!questExit){\r\n //Displays the bag menu\r\n userChoice = getUserChoice(questMenu);\r\n //Checks user choice\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Check quest option\r\n case \"1\":\r\n //Displays the player's bag\r\n displayQuest(player1.getQuestList());\r\n String questChoice = getUserInput(\"Which quest do you want to check? Type in the name of the quest.\");\r\n String[] questList = new String[16];\r\n questList = player1.getQuestList();\r\n switch(questChoice){\r\n /*case \"Kill Skeletons\":\r\n for(int i = 0; i < questList.length; i++){\r\n if(questList[1].getName().equals(\"Kill Skeletons\")){\r\n killSkeletonQuest kSQ = questList[1];\r\n if(kSQ.isQuestComplete().equals(\"false\")){\r\n System.out.println(\"Quest Status: Incomplete\");\r\n } else {\r\n System.out.println(\"Quest Status: Complete\");\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"\");\r\n break;*/\r\n }\r\n //Check quest option 1 break\r\n break;\r\n//******************************************************************************************************************************\r\n //Exit option\r\n case \"2\":\r\n questExit = true;\r\n //Exit option 2 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n break;\r\n }\r\n }\r\n break;\r\n//***************************************************************************************************************************\r\n //Starts the shop sequence\r\n case \"6\":\r\n //Creates the shopkeeper\r\n shopKeeper ShopKeeper = new shopKeeper();\r\n //Creates healing potion\r\n healingPotion HealingPotion = new healingPotion();\r\n //Creates greater healing potion\r\n greaterHealingPotion GreaterHealingPotion = new greaterHealingPotion();\r\n //Creates long sword\r\n longSword LongSword = new longSword();\r\n //Creates great sword\r\n greatSword GreatSword = new greatSword();\r\n //Populates the shopkeeper's inventory with items\r\n ShopKeeper.setShopKeeperInventory(populateShopKeeperInventory(ShopKeeper.getShopKeeperInventory()));\r\n //Displays the shop menu and asks the player what they want to do\r\n userChoice = getUserChoice(shopMenu);\r\n //Variable for shop loop\r\n Boolean shopExit = false;\r\n while(!shopExit){\r\n switch(userChoice){\r\n//******************************************************************************************************************************\r\n //Buy item\r\n case \"1\":\r\n //Diplays the shop keeper inventory\r\n displayShopInventory(ShopKeeper.getShopKeeperInventory());\r\n //Gets what item the user wants to buy\r\n String buyChoice = getUserInput(\"What item do you want to buy? \\n(Type the name of the item)\");\r\n switch(buyChoice){\r\n//******************************************************************************************************************************\r\n //Buys healing potion\r\n case \"Healing Potion\":\r\n //Checks to see if the player has the gold to buy the healing potion\r\n if(player1.getPlayerGold() >= HealingPotion.getHealingPotionBuyPrice()){\r\n //Subtracts the price of the healing potion from the player's gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - HealingPotion.getHealingPotionBuyPrice());\r\n //Puts the healing potion in the player's bag\r\n player1.setPlayerBag(placeInBag(\"Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a healing potion\r\n System.out.println(\"You bought Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n //If the player doesnt have the gold to buy a healing potino\r\n }else if(buyChoice.equals(\"Healing Potion\") && (player1.getPlayerGold() < HealingPotion.getHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a healing player\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Healing Potion option break\r\n break;\r\n } \r\n//******************************************************************************************************************************\r\n //Buys a greater healing potion\r\n case \"Greater Healing Potion\":\r\n //Checks to see if the player has the gold to buy a greater healing potion\r\n if(player1.getPlayerGold() >= GreaterHealingPotion.getGreaterHealingPotionBuyPrice()){\r\n //Subtracts the price of the greater healing potino from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreaterHealingPotion.getGreaterHealingPotionBuyPrice());\r\n //Places the greater healing potion in the players bag\r\n player1.setPlayerBag(placeInBag(\"Greater Healing Potion\", player1.playerBag));\r\n //Tells the player they bought a greater healing potion\r\n System.out.println(\"You bought Greater Healing Potion\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n //If they player doesnt have the gold to buy a greater healing potion\r\n }else if(buyChoice.equals(\"Greater Healing Potion\") && (player1.getPlayerGold() < GreaterHealingPotion.getGreaterHealingPotionBuyPrice())){\r\n //Tells the player they dont have the gold to buy a greater healing potion\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Greater Healing Potion option break\r\n break;\r\n }\r\n//***************************************************************************************************************************\r\n //Buys a long sword\r\n case \"Long Sword\":\r\n //Checks if the player has enough gold to buy a long sword\r\n if(player1.getPlayerGold() >= LongSword.getBuyPrice()){\r\n //Subtracts the price of the long sword from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - LongSword.getBuyPrice());\r\n //Places the long sword in the players bag\r\n player1.setPlayerBag(placeInBag(\"Long Sword\", player1.playerBag));\r\n //Tells the player they bought a long sword\r\n System.out.println(\"You bought Long Sword\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Long Sword option break\r\n break;\r\n //If the player doesnt have the gold to buy a long sword\r\n }else if(buyChoice.equals(\"Long Sword\") && (player1.getPlayerGold() < LongSword.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a long sword\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Long Sword option break\r\n break;\r\n }\r\n//****************************************************************************************************************************\r\n //Buys a great sword\r\n case \"Great Sword\":\r\n //Checks if teh player has enough gold to buy a great sword\r\n if(player1.getPlayerGold() >= GreatSword.getBuyPrice()){\r\n //Subtracts the price of the great sword from the players gold total\r\n player1.setPlayerGold(player1.getPlayerGold() - GreatSword.getBuyPrice());\r\n //Places the great sword in the players bag\r\n player1.setPlayerBag(placeInBag(\"Great Sword\", player1.playerBag));\r\n //Tells the player they bought a great sword\r\n System.out.println(\"You bought Great Sword\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Great Sword option break\r\n break;\r\n //If the player doesnt have the gold to buy a great sword\r\n }else if(buyChoice.equals(\"Great Sword\") && (player1.getPlayerGold() < GreatSword.getBuyPrice())){\r\n //Tells the player they dont have the gold to buy a great sword\r\n System.out.println(\"You do not have the gold to buy that item!\");\r\n //Quits the shop\r\n shopExit = true;\r\n //Great Sword option break\r\n break;\r\n }\r\n //If any other option is typed\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n shopExit = true;\r\n break;\r\n }\r\n //Buy option 1 break\r\n break;\r\n//****************************************************************************************************************************\r\n //Sell item\r\n case \"2\":\r\n //Variable to hold which item is being sold\r\n String itemSold;\r\n //Displays the items in the bag and asks for which item to sell\r\n itemSold = displayItemFromBag(player1.playerBag, \"Sell\");\r\n //Adds the value of the sold item to the player's gold\r\n player1.setPlayerGold(player1.getPlayerGold() + sellGold(itemSold));\r\n //Removes the sold item from the player's bag\r\n player1.setPlayerBag(removeFromBag(player1.getPlayerBag(), itemSold));\r\n //Tells the player which item they sold and how much gold they gained\r\n System.out.println(\"You sold: \" + itemSold);\r\n System.out.println(\"You gained: \" + sellGold(itemSold) + \" gold\");\r\n shopExit = true;\r\n //Sell option 2 break\r\n break;\r\n//***************************************************************************************************************************\r\n //Exit shop\r\n case \"3\":\r\n shopExit = true;\r\n //Exit option 3 break\r\n break;\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n break;\r\n//****************************************************************************************************************************\r\n //Starts the test sequence\r\n case \"7\":\r\n player1.setPlayerLevel(7);\r\n //Test option 6 break\r\n break;\r\n//****************************************************************************************************************************\r\n //Exits out of the game\r\n case \"8\":\r\n System.out.println(\"Exiting the game\");\r\n done = true;\r\n //Exit option 7 break\r\n break;\r\n //Tells the user to try again\r\n default:\r\n System.out.println(\"Invalid option. Try again.\");\r\n }\r\n }\r\n System.out.println(\"\\nProgram Complete\");\r\n }", "public void managerMenu() {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Manager Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Add an employee |\");\n System.out.println(\"| 2. Remove an employee |\");\n System.out.println(\"| 3. View all employees |\");\n System.out.println(\"| 4. View employees' total salary cost |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. View total rent profit |\");\n System.out.println(\"| 6. View most profitable item |\");\n System.out.println(\"| 7. View most frequent rented item |\");\n System.out.println(\"| 8. View best customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. Load user, product data file |\");\n System.out.println(\"| 10. Load rental history file |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 11. Save DART data file |\");\n System.out.println(\"| 12. Save Rental history file |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n\n DartController dart = new DartController();\n\n switch (userInput.toLowerCase()) {\n case \"1\" -> userController.addEmployee();\n case \"2\" -> userController.deleteEmployee();\n case \"3\" -> userController.displayEmployees(false);\n case \"4\" -> userController.calculateSalary();\n case \"5\" -> dart.viewRentalTotalProfit();\n case \"6\" -> dart.viewRentalProfitable();\n case \"7\" -> dart.viewRentalFrequency();\n case \"8\" -> dart.viewRentalBestCustomer();\n case \"9\" -> dart.loadProductData();\n case \"10\" -> dart.loadRentalData();\n case \"11\" -> dart.saveProductData();\n case \"12\" -> dart.saveRentalData();\n case \"13\" -> mainMenu();\n\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMainMenu\", String.valueOf(e));\n }\n }", "private void look() {\n try {\n Location playerPosition = FireSwamp.getPlayer().getPlayerPosition();\n Map gameMap = FireSwamp.getCurrentGame().getGameMap();\n this.console.println(MapControl.checkLook(playerPosition, gameMap));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void interactWithKeyboard() {\n renderMenu();\n Interaction interact = null;\n // open from the menu\n boolean wait = true;\n while (wait) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n String c = (\"\" + StdDraw.nextKeyTyped()).toUpperCase();\n System.out.println(c);\n switch (c) {\n case \"N\":\n // get the seed\n renderTypeString();\n long seed = getSeed();\n TETile[][] WorldFrame = null;\n WorldFrame = WorldGenerator.generate(seed, WorldFrame, WIDTH, HEIGHT);\n interact = new Interaction(WorldFrame, seed);\n wait = false;\n break;\n case \"L\":\n interact = loadInteraction();\n wait = false;\n break;\n case \"Q\":\n System.exit(0);\n break;\n default:\n System.exit(0);\n break;\n }\n }\n // start to play\n interact.initialize();\n char preKey = ',';\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char key = StdDraw.nextKeyTyped();\n // if a user enter ':' then 'Q', then save and exit the game\n if ((\"\" + preKey + key).toUpperCase().equals(\":Q\")) {\n saveInteraction(interact);\n System.exit(0);\n }\n // in case the player enter something else\n if (\"WSAD\".contains((\"\" + key).toUpperCase())) {\n interact.move((\"\" + key).toUpperCase());\n }\n preKey = key;\n }\n interact.show();\n }\n }", "public static void main(String[] args){\n boolean allGood;\n //create a new logic object so we can get the user information properly\n Logic logic = new Logic();\n //create a new menu object so we can display the correct options\n Menu menu = new Menu();\n\n //load the json information so we can use it later in the program\n allGood = logic.loadData();\n if(allGood){\n //ask the user for their information so we can use it later\n logic.Intro();\n\n\n do{\n //print the first menu and ask the user what they want to do\n menu.printMenu1();\n menu.askForOption();\n\n //if the user does not input a valid option\n while(!menu.validOption1()){\n System.out.println(\"Please Insert a valid option\");\n //re-print the menu and ask again\n menu.printMenu1();\n menu.askForOption();\n }\n\n //choose which function to run depending on what option the user chose\n logic.whichOptionM1(menu.getOption1());\n\n //if the user chose option 1, display the second menu\n if(menu.getOption1() == 1) {\n do {\n //display menu 2 and ask the user for their option\n menu.printMenu2();\n menu.askForOptionString();\n\n //if the user enters an invalid option\n while (!menu.validOption2()){\n //print an error message and ask for the option again\n System.out.println(\"Please Insert a valid option\");\n menu.printMenu2();\n menu.askForOptionString();\n }\n\n //choose which function to run depending on what the user inputs\n logic.whichOptionM2(menu.getOption2());\n\n }while (!menu.getOption2().equalsIgnoreCase(\"f\"));\n }\n }while(!menu.exitMenu1());\n\n }\n }", "public void managePlayOptions() {\n\n Object mySavedGameState = GameStateFileStore.ReadObjectFromFile(\"GameState.ser\");\n GameState castedGameState = GameState.class.cast(mySavedGameState);\n currentLocation = castedGameState.getSavedPlayerLocation();\n LocationData[][] storedGameStateMap = castedGameState.getMapState();\n descriptionText = storedGameStateMap[currentLocation.x][currentLocation.y].getDescriptionText();\n System.out.println(descriptionText);\n\n AvailableMovements myMoveSet = new AvailableMovements(currentLocation, storedGameStateMap);\n myMoveSet.printStringDirections();\n availableDirections = myMoveSet.getDirectionalMap();\n choice = sc.nextLine();\n if (availableDirections.containsKey(choice)) {\n currentLocation = availableDirections.get(choice); //refactor this into walkToNewLocation\n castedGameState.setSavedPlayerLocation(currentLocation);\n GameStateFileStore.WriteObjectToFile(castedGameState);\n managePlayOptions();\n } else {\n System.out.println(\"Invalid option\");\n managePlayOptions();\n }\n\n }", "public static void main(String[] args){\n ArrayList<Employee> newEmployee = new ArrayList<Employee>();\n \n //Scanner used for user input\n Scanner input = new Scanner(System.in);\n \n welcome();\n menu(input, newEmployee);\n \n }", "public void takeUserInput() {\n\t\t\r\n\t}", "static void mainmenu() {\n\t\t\n\t\tSystem.out.println(\"Welcome. This is a rogue-like text-based RPG game.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"You control your character by entering your desired action when prompted.\");\n\t\tEngine.sleep(1);\n\t\tSystem.out.println(\"Do you want to start your journey?\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" y: yes \t\tn: no\t\t\");\n\t\tresponse = Engine.request();\n\t\tif(response == false) {\n\t\t\tSystem.out.println(\"W-What are you doing here then? If you're not here to play the game then what do you even want to do?\");\n\t\t\tSystem.out.println(\"To start, write \\\"Y\\\" or \\\"y\\\" in the console \");\n\t\t\tSystem.out.println(\"I won't ask again. Do you want to start your journey?\");\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == false) {\n\t\t\t\tSystem.out.println(\"I am not here to judge your decision. Farewell.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Glad you came to your senses.\");\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Very well.\");\n\t\t}\n\t\tSystem.out.println();\t\t\n\t\tif(Engine.devmode == true) System.out.println(\"\tDebug: StartMenu passed\");\n\t\t\n\t\t\t// Cadet dungeon check\n\t\tif(Progresslog.cadetplaytime < 3) {\n\t\t\tSystem.out.println(\"You seem to be new at the game. Would you like to play through a more tailored experience,\\n\"\n\t\t\t\t\t+ \"which is designed for inexperienced players and introduces you to the game's mechanics?\");\n\t\t\tif(Engine.devmode == true) System.out.println(\"Cadet playtime: \" + Progresslog.cadetplaytime);\n\t\t\tresponse = Engine.request();\n\t\t\tif(response == true) {\n\t\t\t\tSystem.out.println(\"Alright then.\");\n\t\t\t\tDungeoncadet();\n\t\t\t} else DungeonGen();\t\t\t\n\t\t} else DungeonGen();\t\t\n\t}", "private static void openSKERestaurant() {\n\n System.out.println(\" _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ \");\n System.out.println(\"| __| | | __| __ | __| __|_ _| _ | | | __ | _ | | |_ _|\");\n System.out.println(\"|__ | -| __| -| __|__ | | | | | | | -| | | | | | |\");\n System.out.println(\"|_____|__|__|_____|__|__|_____|_____| |_| |__|__|_____|__|__|__|__|_|___| |_|\");\n\n String input = \"?\";\n while (true) {\n switch (input) {\n case \"p\":\n placeOrder();\n break;\n case \"c\":\n checkOrder();\n break;\n case \"d\":\n checkPromotion();\n break;\n case \"o\":\n double total = checkOut();\n RestaurantManager.recordOrder(RestaurantManager.getOrderNum(), menuOrder, total);\n System.out.println(\"Have a nice day!!\");\n System.exit(0);\n break;\n case \"m\":\n RestaurantManager.manage();\n load();\n break;\n case \"?\":\n printMenu();\n break;\n case \"s\":\n System.exit(0);\n default:\n System.out.println(\"Invalid menu\");\n break;\n }\n System.out.print(\"cmd> \");\n input = sc.nextLine().trim();\n }\n }", "public static void main(String[] args) {\n\t\tString input = JOptionPane.showInputDialog(\"input stuff here\");\n\t\t\n\t\tinput = input.toLowerCase();\n\t\tswitch(input) {\n\t\t\tcase \"aries\": {\n\t\t\t\tgiveHoroscope(Zodiac.ARIES);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"taurus\": {\n\t\t\t\tgiveHoroscope(Zodiac.TAURUS);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"gemini\": {\n\t\t\t\tgiveHoroscope(Zodiac.GEMINI);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"cancer\": {\n\t\t\t\tgiveHoroscope(Zodiac.CANCER);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"virgo\": {\n\t\t\t\tgiveHoroscope(Zodiac.VIRGO);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"leo\": {\n\t\t\t\tgiveHoroscope(Zodiac.LEO);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"libra\": {\n\t\t\t\tgiveHoroscope(Zodiac.LIBRA);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"scorpio\": {\n\t\t\t\tgiveHoroscope(Zodiac.SCORPIO);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"sagittarius\": {\n\t\t\t\tgiveHoroscope(Zodiac.SAGITTARIUS);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"capricorn\": {\n\t\t\t\tgiveHoroscope(Zodiac.CAPRICORN);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"aquarius\": {\n\t\t\t\tgiveHoroscope(Zodiac.AQUARIUS);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"pisces\": {\n\t\t\t\tgiveHoroscope(Zodiac.PISCES);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) throws IOException, CloneNotSupportedException {\n\r\n HashMap<String,user> database = new HashMap<>();\r\n Graph gr = new Graph(8);\r\n makegraph(gr);\r\n int mainmenu_choice = mainmenu();\r\n while(mainmenu_choice != 3){\r\n if(mainmenu_choice == 1){\r\n //New User\r\n user temp = createhero();\r\n database.put(temp.getUsername(),temp);\r\n }\r\n else if(mainmenu_choice == 2){\r\n //Existing User\r\n System.out.println(\"Enter Username: \");\r\n String name = br.readLine();\r\n if(database.containsKey(name)){\r\n //play game\r\n System.out.println(\"User Found. Logging in\");\r\n user current_user = database.get(name);\r\n playgame(current_user,gr);\r\n }\r\n else{\r\n //Wrong username\r\n System.out.println(\"Username Entered does not exist\");\r\n }\r\n }\r\n mainmenu_choice = mainmenu();\r\n }\r\n }", "public void expLocation() {\n\t\tif (!death) {\t// Geht nicht wenn Tod!\n\t\t\t\n\t\t\t// Beschreibungen anzeigen und boolean explored auf wahr setzen, außer der Raum wurde bereits untersucht\n\t\t\tif (location[this.currentLocation].isExplored()) { Tuna.setMessage(\"Dieser Raum wurde bereits untersucht!\");\n\t\t\t} else {\n\t\t\t\tTuna.addText(location[this.currentLocation].getDescriptions().getExploreDescription());\n\t\t\t\tlocation[this.currentLocation].setExplored(true);\n\t\t\t}\n\t\t\t\n\t\t\t// Items an Stelle null im Item-Array des Standortes sichtbar machen\n\t\t\tif ((currentLocation > 0 && currentLocation < 7 && currentLocation != 2) || currentLocation == 20) {\n\t\t\t\tlocation[this.currentLocation].getItem(0).setVisible(true);\n\t\t\t\t/* Im Korridor (1) der Kaffeelöscherkasten\n\t\t\t\t * Im Konferenzraum (3) der Ventilationsschacht\n\t\t\t\t * In der Kammer der Leere (4) die Notiz\n\t\t\t\t * Im Ventilationsraum (5) die Notiz\n\t\t\t\t * In der Damentoilette (6) das Skillboook\n\t\t\t\t * Im Fahrstuhlschacht (20) die Kaffeetasse\n\t\t\t\t */\n\t\t\t}\n\t\t\t\n\t\t\t// Items an Stelle eins im Item-Array des Standortes sichtbar machen\n\t\t\tif (currentLocation == 9) {\n\t\t\t\tlocation[this.currentLocation].getItem(1).setVisible(true);\n\t\t\t}\n\t\t} else if (death) {\n\t\t\tTuna.setMessage(\"Du bist tot!\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Enter the number of rows and columns on enemy site followed by position of Documents\");\n\t\tEnemySite s=new EnemySite(new EnemySiteDimensions(sc.nextInt(),sc.nextInt(),new Position(sc.nextInt(),sc.nextInt(),'\\u0000')));\n\t\ts.display();\n\t\tl:while(true) {\n\t\tSystem.out.println(\"Enter choice\\n1.Add INsect\\n2.Move Insect\\n3.Rename Insect\\n4.Remove Insect\\n5.exit\\n\");\t\n\t\tswitch(sc.nextInt()) {\n\t\tcase 1:\n\t\t\ts.addInsect();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\ts.moveInsect();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ts.renameInsect();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ts.removeInsect();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tbreak l;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Enter a valid choice\");\n\t\t\n\t\t}\n\t\ts.display();\n\t\tif(s.checkSuccess()) {\n\t\t\tSystem.out.println(\"Mission Accomplished\");\n\t\t\tbreak l;\n\t\t}\n\t\t}\n\t}", "public void init() {\n\n setBackground(Color.lightGray);\n\n x = xo = 10;\n y = yo = 10;\n // loading the first wold in the world table\n loadWorld();\n\n // registering listeners\n addKeyListener(this);\n addMouseListener(this);\n addMouseMotionListener(this);\n setFocusable(true);\n enableEvents(AWTEvent.FOCUS_EVENT_MASK);\n\n requestFocus();\n /*\n // building the popup menu\n menu = new PopupMenu();\n MenuItem start = new MenuItem(\"Start\");\n start.addActionListener(this);\n start.setActionCommand(\"start\");\n menu.add(start);\n MenuItem next = new MenuItem(\"Next\");\n next.addActionListener(this);\n next.setActionCommand(\"next\");\n menu.add(next);\n MenuItem previous = new MenuItem(\"Previous\");\n previous.addActionListener(this);\n previous.setActionCommand(\"previous\");\n menu.add(previous);\n\n menu.addSeparator();\n\n MenuItem undo = new MenuItem(\"Undo\");\n undo.addActionListener(this);\n undo.setActionCommand(\"undo\");\n menu.add(undo);\n MenuItem redo = new MenuItem(\"Redo\");\n redo.addActionListener(this);\n redo.setActionCommand(\"redo\");\n menu.add(redo);\n\n menu.addSeparator();\n\n beep = new CheckboxMenuItem(\"Beep\", beepOn);\n beep.addItemListener(this);\n beep.setActionCommand(\"beep\");\n menu.add(beep);\n\n add(menu);\n */\n }", "public adminmenu() throws IOException, ClassNotFoundException {\r\n this.input = new Scanner(System.in);\r\n this.adminPage(); // Calling the Mentioned Function\r\n }", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "@Override\n public void execute(Entity actor, World world) {\n if (isKeyPressed) {\n if (!GameScene.getRoot().getChildren().contains(GameScene.getGameMenu())) {\n HBox gameMenu = GameSettings.mainMenu();\n GameScene.addToRoot(gameMenu);\n }else {\n GameScene.removeGameMenu();\n }\n }\n \n }", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "@FXML\n public void handleKeyPress(KeyEvent event) {\n // TODO = handle additional key presses, e.g. for consuming a health potion\n switch (event.getCode()) {\n case SPACE:\n if (isPaused) {\n startTimer();\n } else {\n pause();\n }\n break;\n case H: // try to use health potion\n world.useHealthPotion();\n break;\n case M:\n world.showGameMode();\n break;\n // case R: // restart game\n // LoopManiaApplication a = new LoopManiaApplication();\n // Stage s = new Stage();\n // try {\n // a.start(s);\n // } catch (IOException e) {\n // // TODO Auto-generated catch block\n // e.printStackTrace();\n // }\n // break;\n case P: // generate potion for player (test usage)\n System.out.println(\"Lot of items & cards generated for Player......\");\n loadItem(\"Potion\");\n loadItem(\"Helmet\");\n loadItem(\"Armour\");\n loadItem(\"Shield\");\n loadItem(\"Sword\");\n loadItem(\"Stake\");\n loadItem(\"Staff\");\n loadCard(\"Tower\");\n loadCard(\"Barracks\");\n loadCard(\"Campfire\");\n loadCard(\"Trap\");\n loadCard(\"VampireCastle\");\n loadCard(\"ZombiePit\");\n loadCard(\"Village\");\n break;\n // case L: \n // System.out.println(\"++++++++++++++++++++++++++++++++++\");\n // System.out.println(\"Showing equiped items:\");\n // for (int i = 0; i < 4; i++) {\n // for (int j = 0; i < 4; i++) {\n // Boolean b = world.getEquippedInventoryItemEntityByCoordinates(i, j) != null;\n // System.out.print(\" \" + b + \" \");\n // }\n // System.out.println(\"\");\n // }\n // System.out.println(\"++++++++++++++++++++++++++++++++++\");\n // break;\n default:\n break;\n }\n }", "private void pollInput() {\n\t\t// check to see if the w key is down\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\t\t\twKeyDown = true;\n\t\t} else\n\t\t\twKeyDown = false;\n\t\t// check to see if the a key is down\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n\t\t\taKeyDown = true;\n\t\t} else\n\t\t\taKeyDown = false;\n\t\t// check to see if the s key is down\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_S)) {\n\t\t\tsKeyDown = true;\n\t\t} else\n\t\t\tsKeyDown = false;\n\t\t// check to see if the d key is down\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n\t\t\tdKeyDown = true;\n\t\t} else\n\t\t\tdKeyDown = false;\n\t\t// check to see if the left mouse button is down\n\t\tif (Mouse.isButtonDown(0)) {\n\t\t\tmouseDown = true;\n\t\t} else\n\t\t\tmouseDown = false;\n\t\t// check to see if the F button is pressed and shows the shop screen if so\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_F)) {\n\t\t\tshowShopScreen();\n\t\t}\n\t\t// check to see if the esc button is pressed; if so, go to title screen\n\t\tif (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) {\n\t\t\tshowTitleScreen();\n\t\t}\n\t}", "private void handleInput()\n {\n String instructions = \"Options:\\n<q> to disconnect\\n<s> to set a value to the current time\\n<p> to print the map contents\\n<?> to display this message\";\n System.out.println(instructions);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n while (true) {\n String line = br.readLine();\n if (line.equals(\"q\")) {\n System.out.println(\"Closing...\");\n break;\n } else if (line.equals(\"s\")) {\n System.out.println(\"setting value cli_app to current time\");\n collabMap.set(\"cli_app\", System.currentTimeMillis());\n } else if (line.equals(\"?\")) {\n System.out.println(instructions);\n } else if (line.equals(\"p\")) {\n System.out.println(\"Map contents:\");\n for (String key : collabMap.keys()) {\n System.out.println(key + \": \" + collabMap.get(key));\n }\n }\n }\n } catch (Exception ex) {\n }\n\n if (document != null)\n document.close();\n System.out.println(\"Closed\");\n }", "protected static void launchingMainMenu(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.print(\"\\n\\nSelect an option from the Menu.\\n\" +\n \"\\tC : To CONTINUE the Program (Run MongoDB MANUALLY beforeHand) \\n\" +\n \"\\tQ : To Quit the program\\n\" +\n \"\\n\\nEnter option letter to proceed : \");\n String text = formattingWhitespace(sc.nextLine());\n if (text.equalsIgnoreCase(\"c\")) {\n // Reading the Database from Train Booking to get the Waiting room.\n TrainStation.setWaitingRoom();\n // Running the program.\n GUI.main(args);\n } else if (text.equalsIgnoreCase(\"Q\")){\n System.out.println(\"Exiting program.\");\n } else {\n System.out.println(\"Error - Invalid Input.\\n\");\n launchingMainMenu(args);\n }\n }", "private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }", "void createWorld(Scanner console){\r\n\t\tRandom r = new Random();\r\n\t // System.out.println(\"Welcome to Sushi Time!\");\r\n\t\t//System.out.println(\"Number of fish: \"); \r\n\t\tint fish = r.nextInt(40)+1;\r\n\t\t//System.out.println(\"Number of sharks: \"); \r\n\t\tint shark = r.nextInt(10)+1;\r\n\t\t//create random int for creating random number of seaweed\r\n\t\tint seaweed=r.nextInt(3)+1;\r\n\t\t//create fish, sharks, seaweed, net and sushibar, add them to GameCollection\r\n\t\tSystem.out.println(\"Creating \"+fish+\" fish\");\r\n\t\tfor(int i=0; i<fish; i++){\r\n\t\t\tSystem.out.println(\"Creating fish\");\r\n\t\t\tFish f = new Fish(this);\r\n\t\t\taddToWorldList(f);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+shark+\" sharks\");\r\n\t\tfor(int i=0; i<shark; i++){\r\n\t\t\tSystem.out.println(\"Creating shark\");\r\n\t\t\tShark s = new Shark(this);\r\n\t\t\taddToWorldList(s);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+seaweed+\" seaweed\");\r\n\t\tfor(int i=0; i<seaweed; i++){\r\n\t\t\tSystem.out.println(\"Creating seaweed\");\r\n\t\t\tSeaweed sw=new Seaweed(this);\r\n\t\t\taddToWorldList(sw);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating net\");\r\n\t\t\tNet n = new Net();\r\n\t\t\taddToWorldList(n);\r\n\t\tSystem.out.println(\"Creating sushibar\");\r\n\t\t Sushibar sb = new Sushibar();\r\n\t\t\taddToWorldList(sb);\r\n\t }", "@Override\r\n public String[] getInputs() {\n String[] inputs = new String[1];\r\n\r\n // display the text of the main menu\r\n System.out.println(\"Main Menu\"\r\n + \"N - start new game\"\r\n + \"\\nS - Save Game\"\r\n + \"\\nG - Get and resume saved game\"\r\n + \"\\nH - Help\"\r\n + \"\\nQ - Quit\");\r\n \r\n // prompt for and get the menu input by the end user\r\n String value = this.getInput(\"Enter one of the menu options.\");\r\n \r\n // asssign the value input to the first position in the inputs array\r\n inputs[0] = value;\r\n return inputs;\r\n }", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "public void entryPanelProcess() {\n\t\tif (nmfkpinds.funKey03() || nmfkpinds.funKey12()) {\n\t\t\treturn;\n\t\t}\n\t\tstateVariable.setZmsage(blanks(78));\n\t\t// Action command keys\n\t\tif (nmfkpinds.pgmInd28()) {\n\t\t\tcmdkey();\n\t\t}\n\t\telse {\n\t\t\t// Else action selections\n\t\t\tzselec();\n\t\t}\n\t\tmainline0();\n\t\treturn;\n\t}", "public void newGame () throws IOException {\n\t\tMenuController.setTheme(selectedTheme);\n\t\tScene tableViewScene = FXMLLoader.load(Main.class.getResource(\"/views/menu.fxml\"));\n\t\tStage stage = (Stage)gameScene.getWindow();\n\t\tstage.setScene(tableViewScene);\n\t\t// Views dosen't update on Linux when you don't set size, until you move the view.\n\t\t// To fix that we need to update the view somehow. This was the solution...\n\t\tstage.setX(stage.getX());\n\t\tstage.show();\n\t}", "private static JMenu getInputMenu(final EnvironmentFrame frame, final int specialCaseForTuringConverted) {\n\t\tfinal Environment environment = frame.getEnvironment();\n\t\tfinal JMenu menu = new JMenu(\"Input\");\n\t\tfinal Serializable object = environment.getObject();\n\t\tif (UserControlParseAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew UserControlParseAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew TuringBruteParseAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\n\t\treturn menu;\n\t}", "static void mainMenu()\n {\n clrscr();\n System.out.print(\"\\n\"\n + title()\n + \"Go on, \" + Player.current.name + \", choose away ...\\n\"\n + \"1. Match time!\\n\"\n + \"2. Pokedex pls\\n\"\n + \"3. Show me my stats\\n\"\n + \"4. I suck at life and want to quit\\n\"\n + \"(1/2/3/4): \");\n\n // checks for int input, or routes back to mainMenu()\n int option = input.hasNextInt()? input.nextInt() : mainCallbacks.length - 1;\n\n // just defaults to quit if options > length of array of callbacks (here 5)\n mainCallbacks[Math.min(option, mainCallbacks.length - 1)].call();\n mainMenu();\n }", "public void helpMenu()\n {\n System.out.println(\"*********************************************Help Menue**************************************************************\");\n System.out.println(\"Each player starts the game with zero points.\");\n System.out.println(\"Each player is given the following set of five tiles. Each tile has a value and an associated score\");\n System.out.println(\"For each round, each player will play ONE tile, with the tile value adding to the game total for that round.\"); \n System.out.println(\"Provided the game total is less than or equal to 21, the player will get the score for using that tile.\");\n System.out.println(\"If the game total is greater than 21\");\n System.out.println(\"no score is allocated to the player who played the last tile causing the score to become greater than 21.\");\n System.out.println(\"Once the round ends, Each player will get their score based on the total of the tiles they have used during the round.\");\n System.out.println(\"Any player who has NOT used the tile with the value of 5, will get a penalty of -3 points.\");\n System.out.println(\"The player who, after all deductions, has the highest score, will be the winner of that round and will get 5 points.\"); \n System.out.println(\"At the end of all the rounds, the player who has won the most rounds is declared the winner of the game.\");\n System.out.println(\"**********************************************************************************************************************\");\n getUserStringInput(\"Please enter continue\");\n }", "public static void main(String[] args)\n {\n Pokeball pokeball = new Pokeball();\n Pokeball greatball = new Greatball();\n Pokeball ultraball = new Ultraball();\n Pokeball masterball = new Masterball();\n ArrayList<AbstractPokemon> ashPokemon = new ArrayList<AbstractPokemon>();\n ashPokemon.add(new Charmander());\n ashPokemon.add(new Squirtle());\n ashPokemon.add(new Bulbasaur());\n PokemonTrainer ash = new PokemonTrainer(\"Ash\", ashPokemon, AbstractPokemon.Type.ANY_TYPE, masterball);\n ActorWorld world = new ActorWorld();\n AbstractPokemon charmander = new Charmander();\n AbstractPokemon squirtle = new Squirtle();\n AbstractPokemon bulbasaur = new Bulbasaur();\n AbstractPokemon vulpix = new Vulpix();\n AbstractPokemon poliwhirl = new Poliwhirl();\n AbstractPokemon sunkern = new Sunkern();\n AbstractPokemon magby = new Magby();\n AbstractPokemon magikarp = new Magikarp();\n AbstractPokemon oddish = new Oddish();\n String[] worldChoices = {\"Randomly Generated\", \"Blank\", \"Cancel\"};\n int worldSelection = JOptionPane.showOptionDialog(null, \"Please select the world template:\", \"World Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, worldChoices, worldChoices[0]);\n if (worldSelection == 2)\n {\n JOptionPane.showMessageDialog(null, \"No world chosen. Program will terminate.\", \"World Selection\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (worldSelection == 0)\n {\n spawn(charmander, world);\n spawn(squirtle, world);\n spawn(bulbasaur, world);\n spawn(vulpix, world);\n spawn(poliwhirl, world);\n spawn(sunkern, world);\n spawn(magby, world);\n spawn(magikarp, world);\n spawn(oddish, world);\n spawn(ash, world);\n }\n world.show();\n }", "private void GetInput()\r\n {\r\n ///Implicit eroul nu trebuie sa se deplaseze daca nu este apasata o tasta\r\n xMove = 0;\r\n yMove = 0;\r\n\r\n ///Verificare apasare tasta \"sus\"\r\n if(refLink.GetKeyManager().up_arrow && !isJumping)\r\n {\r\n jumpDirection = -1;\r\n isJumping = true;\r\n jumpSpeed = 0;\r\n }\r\n /*\r\n ///Verificare apasare tasta \"jos\"\r\n if(refLink.GetKeyManager().down)\r\n {\r\n yMove = speed;\r\n }*/\r\n ///Verificare apasare tasta \"left\"\r\n if(refLink.GetKeyManager().left_arrow && x + xMove > 15)\r\n {\r\n xMove = -speed;\r\n }\r\n ///Verificare apasare tasta \"dreapta\"\r\n if(refLink.GetKeyManager().right_arrow && x + xMove < 900)\r\n {\r\n xMove = speed;\r\n }\r\n }", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}", "public void initAndSetWorld() {\n\t\tHashMap<String, Location> gameWorld = new HashMap<String, Location>();\r\n\t\tthis.world = gameWorld;\r\n\t\t\r\n\t\t// CREATING AND ADDING LOCATIONS, LOCATION AND ITEM HASHES ARE AUTOMATICALLY SET BY CALLING CONSTRUCTOR\r\n\t\tLocation valley = new Location(\"valley\", \"Evalon Valley. A green valley with fertile soil.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(valley);\r\n\t\tLocation plains = new Location(\"plains\", \"West Plains. A desolate plain.\",\r\n\t\t\t\t\"You cannot go in that direction. There is nothing but dust over there.\",true);\r\n\t\tthis.addLocation(plains);\r\n\t\tLocation mountain = new Location(\"mountain\", \"Northern Mountains. A labyrinth of razor sharp rocks.\",\r\n\t\t\t\t\"You cannot go in that direction. The Mountain is not so easily climbed.\",true);\r\n\t\tthis.addLocation(mountain);\r\n\t\tLocation shore = new Location(\"shore\", \"Western Shore. The water is calm.\",\r\n\t\t\t\t\"You cannot go in that direction. There might be dangerous beasts in the water.\",true);\r\n\t\tthis.addLocation(shore);\r\n\t\tLocation woods = new Location(\"woods\", \"King's Forest. A bright forest with high pines.\",\r\n\t\t\t\t\"You cannot go in that direction. Be careful not to get lost in the woods.\",true);\r\n\t\tthis.addLocation(woods);\r\n\t\tLocation hills = new Location(\"hills\", \"Evalon hills.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(hills);\r\n\t\tLocation cave = new Location(\"cave\", \"Blood Cave. Few of those who venture here ever return.\",\r\n\t\t\t\t\"The air smells foul over there, better not go in that direction.\",true);\r\n\t\tthis.addLocation(cave);\r\n\t\tLocation innercave = new Location(\"innercave\", \"Blood Cave. This path must lead somewhere.\",\r\n\t\t\t\t\"Better not go over there.\",true);\r\n\t\t\r\n\t\tLocation westhills = new Location(\"westhills\", \"Thornhills. A great many trees cover the steep hills.\",\r\n\t\t\t\t\"You cannot go in that direction. Watch out for the thorny bushes.\",true);\r\n\t\tthis.addLocation(westhills);\r\n\t\t\r\n\t\tLocation lake = new Location(\"lake\", \"Evalon Lake. A magnificent lake with a calm body of water.\",\r\n\t\t\t\t\"You cannot go in that direction, nothing but fish over there.\",true);\r\n\t\tthis.addLocation(lake);\r\n\t\t\r\n\t\tLocation laketown = new Location(\"laketown\", \"Messny village. A quiet village with wooden houses and a dirt road.\",\r\n\t\t\t\t\"You cannot go in that direction, probably nothing interesting over there.\",true);\r\n\t\t\r\n\t\tLocation inn = new Room(\"inn\", \"Messny Inn. A small but charming inn in the centre of the village.\",\r\n\t\t\t\t\"You cannot go in that direction.\",false);\r\n\t\t\r\n\t\t// CONNECTING LOCATIONS\r\n\t\t// IT DOES NOT MATTER ON WHICH LOCATION THE METHOD ADDPATHS IS CALLED\r\n\t\tvalley.addPaths(valley, \"east\", plains, \"west\");\r\n\t\tvalley.addPaths(valley, \"north\", mountain, \"south\");\r\n\t\tvalley.addPaths(valley, \"west\", shore, \"east\");\r\n\t\tvalley.addPaths(valley, \"south\", woods, \"north\");\r\n\t\twoods.addPaths(woods, \"east\", hills, \"west\");\r\n\t\thills.addPaths(hills, \"south\", westhills, \"north\");\r\n\t\twesthills.addPaths(westhills, \"west\", lake, \"east\");\r\n\t\tlake.addPaths(woods, \"south\", lake, \"north\");\r\n\t\tlake.addPaths(lake, \"west\", laketown, \"east\");\r\n\t\tmountain.addPaths(mountain, \"cave\", cave, \"exit\");\r\n\t\tlaketown.addPaths(laketown, \"inn\", inn, \"exit\");\r\n\t\t\r\n\r\n\t\t\r\n\t\t// CREATE EMPTY ARMOR SET FOR GAME START AND UNEQUIPS\r\n\t\tBodyArmor noBodyArmor = new BodyArmor(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBodyArmor(noBodyArmor);\r\n\t\tBoots noBoots = new Boots(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBoots(noBoots);\r\n\t\tHeadgear noHeadgear = new Headgear(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultHeadgear(noHeadgear);\r\n\t\tGloves noGloves = new Gloves(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultGloves(noGloves);\r\n\t\tWeapon noWeapon = new Weapon(\"unarmored\", 0, 0, true, 5, false);\r\n\t\tthis.setDefaultWeapon(noWeapon);\r\n\t\t\r\n\t\tthis.getPlayer().setBodyArmor(noBodyArmor);\r\n\t\tthis.getPlayer().setBoots(noBoots);\r\n\t\tthis.getPlayer().setGloves(noGloves);\r\n\t\tthis.getPlayer().setHeadgear(noHeadgear);\r\n\t\tthis.getPlayer().setWeapon(noWeapon);\r\n\t\t\r\n\t\t\r\n\t\t// CREATING AND ADDING ITEMS TO PLAYER INVENTORY \r\n\t\tItem potion = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tthis.getPlayer().addItem(potion);\r\n\t\tWeapon sword = new Weapon(\"sword\", 10, 200, true, 10, false);\r\n\t\tvalley.addItem(sword);\r\n\t\t\r\n\t\tWeapon swordEvalon = new Weapon(\"EvalonianSword\", 15, 400, true, 1, 15, false);\r\n\t\thills.addItem(swordEvalon);\r\n\t\t\r\n\t\tPotion potion2 = new Potion(\"largepotion\", 2, 200, true, 25);\r\n\t\tPotion potion3 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tPotion potion4 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tlake.addItem(potion3);\r\n\t\tinn.addItem(potion4);\r\n\t\t\r\n\t\tItem potion5 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion6 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\twoods.addItem(potion6);\r\n\t\t\r\n\t\tPurse purse = new Purse(\"purse\",0,0,true,100);\r\n\t\tvalley.addItem(purse);\r\n\t\t\r\n\t\tChest chest = new Chest(\"chest\", 50, 100, false, 50);\r\n\t\tvalley.addItem(chest);\r\n\t\tchest.addItem(potion2);\r\n\t\t\r\n\t\tChest chest2 = new Chest(\"chest\", 10, 10, false, 20);\r\n\t\tinn.addItem(chest2);\r\n\t\t\r\n\t\t// ENEMY LOOT\r\n\t\tBodyArmor chestplate = new BodyArmor(\"chestplate\", 20, 200, true, 20);\r\n\t\t\r\n\t\t// ADDING NPC TO WORLD\r\n\t\tNpc innkeeper = new Npc(\"Innkeeper\", false, \"Hello, we have rooms available if you want to stay over night.\",true,1000);\r\n\t\tinn.addNpc(innkeeper);\r\n\t\t\r\n\t\tItem potion7 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion8 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tinnkeeper.addItem(potion7);\r\n\t\tinnkeeper.addItem(potion8);\r\n\t\t\r\n\t\tNpc villager = new Npc(\"Lumberjack\", false, \"Gotta get those logs back to the mill soon, but first a few pints at the inn!\",false,0);\r\n\t\tlaketown.addNpc(villager);\r\n\t\t\r\n\t\tEnemy enemy1 = new Enemy(\"Enemy\", true, \"Come at me!\", 50, chestplate, 200, 10);\r\n\t\tmountain.addNpc(enemy1);\r\n\t\t\r\n\t\tEnemyGuardian guardian = new EnemyGuardian(\"Guardian\", true, \"I guard this cave.\", 100, potion5, 600, 15, innercave, \"An entrance reveals itself behind the fallen Guardian.\", \"inwards\", \"entrance\");\r\n\t\tcave.addNpc(guardian);\r\n\t\t\r\n\t\t// ADDING SPAWNER TO WORLD\r\n\t\tthis.setNpcSpawner(new BanditSpawner()); \r\n\t\t\r\n\t\t// ADDING PLAYER TO THE WORLD\r\n\t\tthis.getPlayer().setLocation(valley);\r\n\t\t\r\n\t\t// QUEST\r\n\t\tQuest noquest = new Quest(\"noquest\",\"nodesc\",\"nocomp\",false,true,1000,0,0,0);\r\n\t\tthis.setCurrentQuest(noquest);\r\n\t\t\r\n\t\t\r\n\t\tQuest firstquest = new Quest(\"A New Journey\",\"Find the lost sword of Evalon.\",\"You have found the lost sword of Evalon!\",false,false,1,400,0,1);\r\n\t\t\r\n\t\tScroll scroll = new Scroll(\"Questscroll\",1,1,true,firstquest);\r\n\t\tmountain.addItem(scroll);\r\n\t\t\r\n\t\tSystem.out.println(\"All set up.\");\r\n\t}", "@Override\n\tpublic void seeIsland(Island island) {\n\t\tString name = island.getIslandName();\n\t\tStore store = island.getStore();\n\t\tHashMap<Goods, Integer> sellGoods = store.getSellGoods();\n\t\tHashMap<Goods, Integer> interestedGoods = store.getInteresedGoods();\n\t\tEquipment sellEquipment = store.getEquipment();\n\t\tgame.setCurrentChosenIsland(island);\n\t\tSystem.out.println(\"Island's name: \" + name);\n\t\tprintGoods(sellGoods, \"The goods that the store in this Island sell: \");\n\t\tprintGoods(interestedGoods, \"The Goods that the store in this island want to buy:\");\n\t\tSystem.out.println(\"\\n\" + \"Equipment: \" + sellEquipment.getName() + \" Price : \" + sellEquipment.getSellingPrice() + \"\\n\");\t\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\tSystem.out.println(\"(2) See the routes to this Island\");\n\t\t\ttry \n\t\t\t{\n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\tstate = true;\n\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\tgame.backToMain(); \n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgame.showTheRoute();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\t\n\t}", "public static void main (String [] args) {\n\n \n // Enter the number of random walks \n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter the number of steps: \");\n int numberOfSteps = input.nextInt();\n \n // For invalid input print error message and request for new input\n while (numberOfSteps < 1)\n {\n System.out.println(\"ERROR: Number entered must be greater than 0.\");\n System.out.print(\"Enter the number of steps: \");\n numberOfSteps = input.nextInt();\n }\n\t\n //Create the Drunkard object for the random walk\n ImPoint initialLoc = new ImPoint(200,200);\n int STEPSIZE = 5;\n Drunkard drunk = new Drunkard(initialLoc, STEPSIZE);\n\n // Create the drawing of random walks by the Drunkard \n RandomWalkComponent component = new RandomWalkComponent(drunk, numberOfSteps);\n\n //Create and set properties of the display frame\n JFrame display = new JFrame();\n display.setSize(400,400);\n display.setTitle(\"Random Walk\");\n\n //Display the walk on the frame\n display.add(component);\n display.setVisible(true);\n display.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public static void main(String[] args) {\n\tStuyablo controller = new Stuyablo();\n\n\tcontroller.flush();\n\t\n\t//User input variable\n\tScanner user_input = new Scanner(System.in);\n\tPC[] playerList = new PC[4];\n\n\tcontroller.intro(playerList, user_input);\n\t\n\tWorld Stuy = new World();\n\n\tSystem.out.println(\"The four adventurers enter the town of \" + Stuy.getLocation());\n\n\tString[] options = Stuy.actionOptions();\n\tcontroller.printOptions(options);\n\tcontroller.userMovement(playerList, Stuy, user_input);\n }", "public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}", "public void recreateFromExistingWorld(WorldInfo original) {\n this.worldName = original.getWorldName();\n this.worldSeed = Long.toString(original.getSeed());\n WorldType worldtype = original.getGenerator() == WorldType.CUSTOMIZED ? WorldType.DEFAULT : original.getGenerator();\n this.selectedIndex = worldtype.getId();\n this.chunkProviderSettingsJson = original.getGeneratorOptions();\n this.generateStructuresEnabled = original.isMapFeaturesEnabled();\n this.allowCheats = original.areCommandsAllowed();\n if (original.isHardcore()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.HARDCORE;\n } else if (original.getGameType().isSurvivalOrAdventure()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.SURVIVAL;\n } else if (original.getGameType().isCreative()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.CREATIVE;\n }\n\n }", "public static void main(String[] args) {\n Map map = Experiment.getAverageMapManyHoles();\n ArrayList<AbstractAgent> agents = new ArrayList<>();\n JFrame frame = new JFrame();\n Floor floor = map.getFloors().iterator().next();\n\n MapViewPanel panel = new MapViewPanel(map, agents);\n KeyboardInputListener l = new KeyboardInputListener();\n frame.addKeyListener(l);\n\n MinimalPathOverseer overseer = new MinimalPathOverseer(map);\n panel.setMinimalPathOverseer(overseer);\n for(int i = 0 ; i < overseer.getAmountOfAgents(); i++)\n {\n agents.add(overseer.getAgent(i));\n }\n\n Engine simulationEngine = new Engine(map, agents, panel, 60);\n\n// CoordinatorEvaderKillKillKillEmAll hunter = new CoordinatorEvaderKillKillKillEmAll(simulationEngine,map, floor, map.getEvaderSpawnLocation(), Direction.SOUTH, 5,\n// EngineConstants.VISION_RANGE, EngineConstants.VISION_ANGLE, agents,false);\n// hunter.setViewPort(panel);\n\n //agents.add(new RandomAgent(map, floor, new Vector2D(200.0, 100.0), Direction.NORTH, 5, 100, 120));\n agents.add(new UserAgent(map, floor, new Vector2D(200.0, 320.0), Direction.NORTH, 5, EngineConstants.VISION_RANGE, EngineConstants.VISION_ANGLE, l, true));\n //agents.add(new RandomAgent(map, floor, new Vector2D(200.0, 320.0), Direction.NORTH, 5, EngineConstants.VISION_RANGE, EngineConstants.VISION_ANGLE, true));\n// agents.add(new DistanceAgent(map, floor, map.getEvaderSpawnLocation(), Direction.NORTH, EngineConstants.AGENT_RADIUS, EngineConstants.VISION_RANGE, EngineConstants.VISION_ANGLE));\n\n\n frame.getContentPane().add(panel);\n frame.pack();\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setVisible(true);\n Future<Integer> f = simulationEngine.start();\n while (!f.isDone()){\n try{\n Thread.sleep(1000);\n }\n catch (Exception e){\n // lol\n }\n }\n try{\n System.out.printf(\"iterations: %d\", f.get());\n }\n catch (Exception lol){\n lol.printStackTrace();\n }\n\n\n //drawFrame(frame, map, visibilityGraph, null);\n }", "public static void getCommand(int inputCommand){\n\t\t\n\t\t//Inputs for main menu\n\t\t//Note: I'm not exactly sure why there is a repeated boolean statement, but when it is removed, the program\n\t\t//fails to perform properly\n\t\tif (screenNumber == ID_MAIN_MENU){\n\t\t\tif (screenNumber == ID_MAIN_MENU){\n\t\t\t\tif (inputCommand == 0){\n\t\t\t\t\n\t\t\t\t\t//Prompting the user to create a new save\n\t\t\t\t\t/*\n\t\t\t\t\tSystem.out.println(\"Create new save? (Type 'y' to overwrite save)\");\n\t\t\t\t\t\n\t\t\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\t\tString input = sc.nextLine();\n\t\t\t\t\tif(input.length() > 0){\n\n\t\t\t\t\t\t\tchar inputChar = input.charAt(0);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (inputChar == 'y'){\n\t\t\t\t\t\t\t\t*/\n\t\t\t\t\t\tplayer = new Player();\n\t\t\t\t\t\tMainMenu.createSave(player);\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\t//If the player created a new save, then initialize the game\n\t\t\t\t\tif (player != null){\n\t\t\t\t\t\tshop = new Shop();\n\t\t\t\t\t\tshop.setCurLevelMemory(-1);\n\t\t\t\t\t\tscreenNumber = ID_PRE_BATTLE_CUTSCENE;\n\t\t\t\t\t\tCutscene.loadCutscene(player.getCurLevel(), true);\n\t\t\t\t\t\tgui.initializeCutscene();\n\t\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else if (inputCommand == 1){\n\t\t\t\t\tplayer = MainMenu.loadSave();\n\t\t\t\t\topenMenu(ID_SUB_MENU);\n\t\t\t\t\t\n\t\t\t\t}else if (inputCommand == 2){\n\t\t\t\t\tMainMenu.exitGame();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (player != null){\n\t\t\t\t\tshop = new Shop();\n\t\t\t\t\tscreenNumber = ID_PRE_BATTLE_CUTSCENE;\n\t\t\t\t\tCutscene.loadCutscene(player.getCurLevel(), true);\n\t\t\t\t\tgui.initializeCutscene();\n\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if (inputCommand == 1){\n\t\t\t\tplayer = MainMenu.loadSave();\n\t\t\t\topenMenu(ID_SUB_MENU);\n\t\t\t\t\n\t\t\t}else if (inputCommand == 2){\n\t\t\t\tMainMenu.exitGame();\n\t\t\t}\n\t\n\t\t//Inputs for sub menu\n\t\t}else if (screenNumber == ID_SUB_MENU){\n\t\t\t\n\t\t\tif (inputCommand == 0){\n\t\t\t\t\n\t\t\t\tscreenNumber = ID_BATTLE;\n\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t\n\t\t\t\tgui.setUnits(player.getCharacters(), map.getEnemies());\n\t\t\t\t\n\t\t\t\tgui.setBoard(board, mapWidth, mapHeight, map);\n\t\t\t\tplayer.resetAllHeroesForNewLevel();\n\t\t\t\t\n\t\t\t}else if (inputCommand == 1){\n\t\t\t\topenMenu(ID_INVENTORY_MENU);\n\t\t\t\tprevScreen = ID_SUB_MENU;\n\t\t\t}else if (inputCommand == 2){\n\t\t\t\t\n\t\t\t\t//Open character menu\n\t\t\t\topenMenu(ID_CHARACTER_MENU);\n\t\t\t}else if (inputCommand == 3){\n\t\t\t\t\n\t\t\t\t//Opening shop\n\t\t\t\topenMenu(ID_SHOP_MENU);\n\t\t\t}else if(inputCommand == 4){\n\t\t\t\tMainMenu.createSave(player);\n\t\t\t}\n\t\t\n\t\t//Inputs for intermediate menu\n\t\t}else if (screenNumber == ID_INTERMEDIATE_MENU){\n\t\t\n\t\t\tif(inputCommand == 0){\n\t\t\t\t\n\t\t\t\tif (player.getCurLevel() < NUM_LEVELS){\n\t\t\t\t\tscreenNumber = ID_PRE_BATTLE_CUTSCENE;\n\t\t\t\t\tCutscene.loadCutscene(player.getCurLevel(), true);\n\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t\tgui.initializeCutscene();\n\t\t\t\t}else{\n\t\t\t\t\topenMenu(ID_MAIN_MENU);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t//Inputs for cutscenes\n\t\t}else if (screenNumber == ID_PRE_BATTLE_CUTSCENE){\n\t\t\t\n\t\t\tif (inputCommand == 0){\n\t\t\t\topenMenu(ID_SUB_MENU);\n\t\t\t}\n\t\t\n\t\t//Inputs for the post battle cutscene\n\t\t}else if (screenNumber == ID_POST_BATTLE_CUTSCENE){\n\t\t\t\n\t\t\tif (inputCommand == 0 && !inBattle){\n\t\t\t\topenMenu(ID_INTERMEDIATE_MENU);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif (inBattle && !isEnemyAttacking){\n\t\t\t\t\tinBattle = false;\n\t\t\t\t\tscreenNumber = ID_BATTLE;\n\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t}else{\n\t\t\t\t\tboolean found = false;\n\t\t\t\t\tfor (int i = curEnemyAttacker + 1; i < enemyList.length && !found; i++){\n\t\t\t\t\t\tif (ai.getAttackCommands(i) != null){\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\tcurEnemyAttacker = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (curEnemyAttack <= totalEnemyAttacks){\n\t\t\t\t\t\tString message = ((Enemy)enemyList[curEnemyAttacker]).getEnemyType() + \" did \" + ai.getAttackCommandsDamage(curEnemyAttacker) + \" damage to \" + ((Hero)ai.getAttackCommands(curEnemyAttacker)).getName() + \"!\";\n\t\t\t\t\t\tCutscene.loadAttackCutscene(((Enemy)enemyList[curEnemyAttacker]).getEnemyID() * -1 - 1, ai.getAttackCommands(curEnemyAttacker).getUnitID(), message, map.getTileNumber(enemyList[curEnemyAttacker].getCoordinate()));\n\t\t\t\t\t\tgui.initializeCutscene();\n\t\t\t\t\t}\n\t\t\t\t\tcurEnemyAttack++;\n\t\t\t\t\t\n\t\t\t\t\tif (curEnemyAttack > totalEnemyAttacks){\n\t\t\t\t\t\tisEnemyAttacking = false;\n\t\t\t\t\t\tif (!checkDefeat()){\n\t\t\t\t\t\t\tinBattle = false;\n\t\t\t\t\t\t\topenMenu (ID_MAIN_MENU);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < player.getCharacters().length; i++){\n\t\t\t\t\t\t\t\tif (heroList[i].isAlive()){\n\t\t\t\t\t\t\t\t\tunitPositions[i] = heroList[i].getCoordinate();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tunitPositions[i] = null;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tAlgorithm.setUnitPositions(unitPositions);\n\t\t\t\t\t\t\tscreenNumber = ID_BATTLE;\n\t\t\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t\t\t\tplayer.resetAllHeroes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t//Inputs for the inventory\n\t\t}else if (screenNumber == ID_INVENTORY_MENU){\n\t\t\t\n\t\t\tif (inputCommand == -1){\n\t\t\t\t\n\t\t\t\tif (!recentlySearched){\n\t\t\t\t\t\n\t\t\t\t\tif (!inBattle){\n\t\t\t\t\t\t//Return to previous menu\n\t\t\t\t\t\topenMenu(ID_SUB_MENU);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tscreenNumber = ID_ACTION_MENU;\n\t\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t\t\tinBattle = false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\trecentlySearched = false;\n\t\t\t\t\tgui.setItemSelected(0);\n\t\t\t\t\tgui.setItemsToDisplay(player.getBag().getAllItems());\n\t\t\t\t}\n\t\t\t}else if(inputCommand == -2){\n\t\t\t\tSystem.out.println(\"Enter keyword to search (by name): \");\n\t\t\t\tString searchKeyword = sc.nextLine();\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\tsearchedItemList = Algorithm.searchItemName(searchKeyword, player.getBag().getAllItems());\n\t\t\t\tgui.setItemsToDisplay(searchedItemList);\n\t\t\t\tgui.setItemSelected(0);\n\t\t\t\trecentlySearched = true;\n\t\t\t}else if (inputCommand == -4){\n\t\t\t\tSystem.out.println(\"Enter keyword to search (by price): \");\n\t\t\t\ttry{\n\t\t\t\t\tint searchKeyword = sc.nextInt();\n\t\t\t\t\tsc.nextLine();\n\t\t\t\t\tsearchedItemList = Algorithm.searchItemSalePrice(searchKeyword, player.getBag().getAllItems());\n\t\t\t\t\tgui.setItemsToDisplay(searchedItemList);\n\t\t\t\t\tgui.setItemSelected(0);\n\t\t\t\t\trecentlySearched = true;\n\t\t\t\t}catch(InputMismatchException im){\n\t\t\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if (inputCommand == -3){\n\t\t\t\t\n\t\t\t\tItem[] items = player.getBag().getAllItems();\n\t\t\t\tgui.setItemSelected(0);\n\t\t\t\t\n\t\t\t\tif (menuSortType == 0){\n\t\t\t\t\tmenuSortType = 1;\n\t\t\t\t\t\n\t\t\t\t\tAlgorithm.sortItemsAlphabet(items);\n\t\t\t\t\t\n\t\t\t\t}else if (menuSortType == 1){\n\t\t\t\t\tmenuSortType = 2;\n\t\t\t\t\t\n\t\t\t\t\tAlgorithm.sortItemsPriceMinToMax(items);\n\t\t\t\t\t\n\t\t\t\t}else if (menuSortType == 2){\n\t\t\t\t\tmenuSortType = 0;\n\t\t\t\t\tAlgorithm.sortItemsPriceMaxToMin(items);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tgui.setItemsToDisplay(items);\n\t\t\t}else{\n\t\t\t\tif (recentlySearched){\n\t\t\t\t\titemSelected = searchedItemList[inputCommand];\n\t\t\t\t\topenMenu(ID_INVENTORY_ACTION_MENU);\n\t\t\t\t}else{\n\t\t\t\t\tif (player.getBag().getAllItems().length > 0){\n\t\t\t\t\t\titemSelected = player.getBag().getAllItems()[inputCommand];\n\t\t\t\t\t\topenMenu(ID_INVENTORY_ACTION_MENU);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t//Inputs for the inventory action menu\n\t\t}else if (screenNumber == ID_INVENTORY_ACTION_MENU){\n\t\t\t\n\t\t\tif (inputCommand == -1){\n\t\t\t\t//Return to inventory menu\n\t\t\t\topenMenu(ID_INVENTORY_MENU);\n\t\t\t\t\n\t\t\t\tif(recentlySearched){\n\t\t\t\t\tgui.setItemsToDisplay(searchedItemList);\n\t\t\t\t\trecentlySearched = false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif (inputCommand == 0){\n\t\t\t\t//System.out.println(\"char menu open\");\n\t\t\t\t\tif (!inBattle){\n\t\t\t\t\t\topenMenu(ID_CHARACTER_MENU);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (player.getCharacters()[recentUnitSelected].getOtherAction()){\t\n\t\t\t\t\t\t\tplayer.useItem(itemSelected, player.getCharacters()[recentUnitSelected]);\n\t\t\t\t\t\t\tgui.setItemsToDisplay(player.getBag().getAllItems());\n\t\t\t\t\t\t\tgui.setCharactersToDisplay(player.getCharacters());\n\t\t\t\t\t\t\tif (!player.getCharacters()[recentUnitSelected].getOtherAction()) {\n\t\t\t\t\t\t\t\tscreenNumber = ID_BATTLE;\n\t\t\t\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if (inputCommand == 1){\n\t\t\t\t\tplayer.setMoney(itemSelected.getSalePrice() + player.getMoney());\n\t\t\t\t\tplayer.getBag().removeItem(itemSelected);\n\t\t\t\t\t\n\t\t\t\t\topenMenu(ID_INVENTORY_MENU);\n\t\t\t\t\tgui.setMoney(player.getMoney());\n\t\t\t\t\tgui.setItemsToDisplay(player.getBag().getAllItems());\n\t\t\t\t\t\n\t\t\t\t\tif (player.getBag().getAllItems().length > 0){\n\t\t\t\t\t\tgui.setItemSelected(0);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(!inBattle){\n\t\t\t\t\t\t\topenMenu(ID_SUB_MENU);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tscreenNumber = ID_BATTLE;\n\t\t\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t//Inputs for the battle screen\n\t\t}else if (screenNumber == ID_BATTLE){\n\t\t\tinBattle = true;\n\t\t\tcheckTurnEnd();\n\t\t\t//System.out.println(inBattle + \" \" + player.getCharacters()[recentUnitSelected].getOtherAction());\n\t\t\trecentUnitSelected = inputCommand;\n\t\t\t//Open action menu and set possible moves\n\t\t\t\n\t\t\tif (inBattle && player.getCharacters()[recentUnitSelected].getOtherAction()) {\n\t\t\t\topenMenu(ID_ACTION_MENU);\n\t\t\t}\n\t\t\t\t\t//Inputs for the action menu\n\t\t}else if (screenNumber == ID_ACTION_MENU){\n\t\t\t\n\t\t\tif (inputCommand == -1){\n\t\t\t\t//Return to battle screen\n\t\t\t\tscreenNumber = ID_BATTLE;\n\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t}else if(inputCommand == 0){\n\t\t\t\t\tscreenNumber = ID_ACTION_ATTACK_MENU;\n\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t}else if(inputCommand == 1){\n\t\t\t\tif (player.getCharacters()[recentUnitSelected].getMoveAction()) {\n\t\t\t\t\tgui.setPossibleMoves(player.getCharacters()[recentUnitSelected].getMovementArea(map, unitPositions));\n\t\t\t\t\tscreenNumber = ID_ACTION_MOVE_MENU;\n\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t}\n\t\t\t}else if (inputCommand == 2) {\n\t\t\t\t\tplayer.getCharacters()[recentUnitSelected].defend();\n\t\t\t\t\tscreenNumber = ID_BATTLE;\n\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t}else if (inputCommand == 3){\n\t\t\t\t\t//Open inventory menu\n\t\t\t\t\topenMenu(ID_INVENTORY_MENU);\n\t\t\t}\n\t\t\t\n\t\t//Inputs for the Action Move menu\n\t\t}else if (screenNumber == ID_ACTION_MOVE_MENU){\n\t\t\tif(inputCommand == -1){\n\t\t\t\tscreenNumber = ID_ACTION_MENU;\n\t\t\t\topenMenu(screenNumber);\n\t\t\t}else if (inputCommand == 0){\n\t\t\t\t\n\t\t\t\t//Moving the unit to the desired location using the designate path, if possible\n\t\t\t\tCoordinate[] path = player.getCharacters()[recentUnitSelected].move(gui.getCursorPosition());\n\t\t\t\tif (path != null){\n\t\t\t\t\tscreenNumber = ID_ACTION_MENU;\n\t\t\t\t\tgui.setPath(path);\n\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t//Inputs for the Action Attack menu\n\t\t}else if (screenNumber == ID_ACTION_ATTACK_MENU){\n\t\t\tif (inputCommand == -1){\n\t\t\t\tscreenNumber = ID_ACTION_MENU;\n\t\t\t\topenMenu(screenNumber);\n\t\t\t}else{\n\t\t\t\tUnit target;\n\t\t\t\tif ((target = getUnitOn(gui.getCursorPosition())) != null && Algorithm.showAttackRange(player.getCharacters()[recentUnitSelected])[gui.getCursorPosition().getX()][gui.getCursorPosition().getY()]) {\n\t\t\t\t\t\n\t\t\t\t\t//the message is displayed by Cutscene\n\t\t\t\t\tint damage = player.getCharacters()[recentUnitSelected].calculateDamage(target);\n\t\t\t\t\tString message = ((Hero)player.getCharacters()[recentUnitSelected]).getName() + \" did \" + damage + \" damage to \" + ((Enemy)target).getEnemyType() + \"!\";\n\t\t\t\t\t\n\t\t\t\t\tif (player.getCharacters()[recentUnitSelected].attack(target)) {\n\t\t\t\t\t\ttarget.kill();\n\t\t\t\t\t\tplayer.collectReward(((Enemy)target).getGold());\n\t\t\t\t\t\t\n\t\t\t\t\t\tmessage += \"\\n\" + ((Enemy)target).getGold() + \" gold was collected!\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tunitPositions = new Coordinate[heroList.length + enemyList.length];\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initializing the unit positions\n\t\t\t\t\t\tfor (int i = 0; i < heroList.length; i++){\n\t\t\t\t\t\t\tif (heroList[i].isAlive()){\n\t\t\t\t\t\t\t\tunitPositions[i] = heroList[i].getCoordinate();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tunitPositions[i] = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tfor (int i = 0; i < enemyList.length; i++){\n\t\t\t\t\t\t\tif (enemyList[i].isAlive()){\n\t\t\t\t\t\t\t\tunitPositions[i + heroList.length] = enemyList[i].getCoordinate();\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tunitPositions[i + heroList.length] = null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tAlgorithm.setUnitPositions(unitPositions);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tscreenNumber = ID_POST_BATTLE_CUTSCENE;\n\t\t\t\t\t//Playing attacking cutscene\n\t\t\t\t\tCutscene.loadAttackCutscene(player.getCharacters()[recentUnitSelected].getUnitID(), ((Enemy)target).getEnemyID() * -1 - 1, message, map.getTileNumber(player.getCharacters()[recentUnitSelected].getCoordinate()));\n\t\t\t\t\tgui.initializeCutscene();\n\t\t\t\t\tgui.setScreenID(screenNumber);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t//Inputs for the Shop menu\n\t\t}else if (screenNumber == ID_SHOP_MENU){\n\t\t\tif (inputCommand == -1){\n\t\t\t\tif (!recentlySearched){\n\t\t\t\t\t//Return to previous menu\n\t\t\t\t\topenMenu(ID_SUB_MENU);\n\t\t\t\t}else{\n\t\t\t\t\trecentlySearched = false;\n\t\t\t\t\tgui.setItemSelected(0);\n\t\t\t\t\tgui.setItemsToDisplay(shopItems);\n\t\t\t\t}\n\t\t\t}else if (inputCommand == -2){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Enter keyword to search: \");\n\t\t\t\tString searchKeyword = sc.nextLine();\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\tsearchedItemList = Algorithm.searchItemName(searchKeyword, shopItems);\n\t\t\t\tgui.setItemsToDisplay(searchedItemList);\n\t\t\t\tgui.setItemSelected(0);\n\t\t\t\trecentlySearched = true;\n\t\t\t\t\n\t\t\t}else if (inputCommand == -4){\n\t\t\t\tSystem.out.println(\"Enter keyword to search (by price): \");\n\t\t\t\t\n\t\t\t\t//try catch structure here to ensure that the user's input is valid\n\t\t\t\ttry{\n\t\t\t\t\tint searchKeyword = sc.nextInt();\n\t\t\t\t\tsc.nextLine();\n\t\t\t\t\tsearchedItemList = Algorithm.searchItemShopPrice(searchKeyword, shopItems);\n\t\t\t\t\tgui.setItemsToDisplay(searchedItemList);\n\t\t\t\t\tgui.setItemSelected(0);\n\t\t\t\t\trecentlySearched = true;\n\t\t\t\t}catch(InputMismatchException im){\n\t\t\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if (inputCommand == -3){\n\t\t\t\t\n\t\t\t\tgui.setItemSelected(0);\n\t\t\t\t\n\t\t\t\tif (menuSortType == 0){\n\t\t\t\t\tmenuSortType = 1;\n\t\t\t\t\t\n\t\t\t\t\tAlgorithm.sortItemsAlphabet(shopItems);\n\t\t\t\t\t\n\t\t\t\t}else if (menuSortType == 1){\n\t\t\t\t\tmenuSortType = 2;\n\t\t\t\t\t\n\t\t\t\t\tAlgorithm.sortItemsPriceMinToMax(shopItems);\n\t\t\t\t\t\n\t\t\t\t}else if (menuSortType == 2){\n\t\t\t\t\tmenuSortType = 0;\n\t\t\t\t\t\n\t\t\t\t\tAlgorithm.sortItemsPriceMaxToMin(shopItems);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tgui.setItemsToDisplay(shopItems);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif (player.getMoney() >= shopItems[inputCommand].getPrice()){\n\t\t\t\t\tplayer.setMoney(player.getMoney() - shopItems[inputCommand].getPrice());\n\t\t\t\t\tplayer.getBag().addItem(shopItems[inputCommand]);\n\t\t\t\t\tshop.purchaseItem(shopItems[inputCommand]);\n\t\t\t\t\tshopItems = shop.getItemsInShop();\n\t\t\t\t\tgui.setItemsToDisplay(shopItems);\n\t\t\t\t\tgui.setMoney(player.getMoney());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t//Inputs for the Character menu\n\t\t}else if (screenNumber == ID_CHARACTER_MENU){\t\t\n\t\t\tif (inputCommand == -1){\n\t\t\t\t\tif (prevScreen == ID_SUB_MENU){\n\t\t\t\t\t\topenMenu(prevScreen);\n\t\t\t\t\t}else if (prevScreen == ID_INVENTORY_ACTION_MENU){\n\t\t\t\t\t\topenMenu(ID_INVENTORY_MENU);\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (prevScreen == ID_INVENTORY_ACTION_MENU) {\n\t\t\t\t\tplayer.useItem(itemSelected, player.getCharacters()[inputCommand]);\n\t\t\t\t\tgui.setItemsToDisplay(player.getBag().getAllItems());\n\t\t\t\t\tgui.setCharactersToDisplay(player.getCharacters());\n\t\t\t\t\topenMenu (ID_INVENTORY_MENU);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) \r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttree = new SceneTree();\r\n\t\t\tSystem.out.println(\"Creating a story...\");\r\n\t\t\tSystem.out.print(\"Please enter a title: \");\r\n\t\t\tScanner in = new Scanner(System.in);\r\n\t\t\tString title = in.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter a scene: \");\r\n\t\t\tString scene = in.nextLine();\r\n\t\t\ttree.addNewNode(title, scene);\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\"Scene #\" + tree.getCursor().getSceneID() + \" added.\");\r\n\t\t\tSystem.out.println();\r\n\t\t\tString choice = \"\";\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t try \r\n\t\t\t {\r\n\t\t\t\t printMenu();\r\n\t\t\t\t System.out.print(\"Please enter a selection: \");\r\n\t\t\t\t choice = in.next().toUpperCase();\r\n\t\t\t\t switch(choice)\r\n\t\t\t\t {\r\n\t\t\t\t \tcase \"A\": in.nextLine();\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t System.out.print(\"Please enter a title: \");\r\n\t\t\t\t \t\t\t String t = in.nextLine();\r\n\t\t\t\t \t\t\t System.out.print(\"Please enter a scene: \");\r\n\t\t\t\t \t\t\t String s = in.nextLine();\r\n\t\t\t\t \t\t\t tree.addNewNode(t,s);\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t System.out.println(\"Scene #\" + tree.getCursor().getNumScene() + \" added.\");\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t break;\r\n\t\t\t\t \tcase \"R\": System.out.println();\r\n\t\t\t\t \t\t System.out.print(\"Please enter an option: \");\r\n\t\t\t\t \t\t String remove = in.next();\r\n\t\t\t\t \t\t tree.removeScene(remove);\r\n\t\t\t\t \t\t System.out.println();\r\n\t\t\t\t \t\t\t break;\r\n\t\t\t\t \tcase \"S\": System.out.println();\r\n\t\t\t\t \t\t\t tree.getCursor().displayFullScene();\r\n\t\t\t\t \t\t System.out.println();\r\n\t\t\t\t \t\t\t break;\r\n\t\t\t\t \tcase \"P\": System.out.println();\r\n\t\t\t\t \t\t System.out.println(tree.toString());\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t break;\r\n\t\t\t\t \tcase \"B\": System.out.println();\r\n\t\t\t\t \t\t\t tree.moveCursorBackwards();\r\n\t\t\t\t \t\t\t System.out.println(\"Successfuly moved to \" + tree.getCursor().getTitle());\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t break;\r\n\t\t\t\t \tcase \"F\": System.out.println();\r\n\t\t\t\t \t\t\t System.out.print(\"Which option do you wish to go to: \");\r\n\t\t\t\t \t\t\t String forward = in.next();\r\n\t\t\t\t \t\t\t tree.moveCursorForward(forward);\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t System.out.println(\"Successfuly moved to \" + tree.getCursor().getTitle());\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t break;\r\n\t\t\t\t \tcase \"G\": playGame();\r\n\t\t\t\t \t\t\t break;\r\n\t\t\t\t \tcase \"N\": System.out.println();\r\n\t\t\t\t \t\t\t System.out.println(tree.getPathFromRoot());\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t break;\r\n\t\t\t\t \tcase \"M\": System.out.println();\r\n\t\t\t\t \t\t\t System.out.print(\"Move current scene to: \");\r\n\t\t\t\t \t\t\t int num = in.nextInt();\r\n\t\t\t\t \t\t\t tree.moveScene(num);\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t System.out.println(\"Successfully moved scene\");\r\n\t\t\t\t \t\t\t System.out.println();\r\n\t\t\t\t \t\t\t break;\t \t\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t catch(FullSceneException e)\r\n\t\t\t {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(\"You cannot add another scene!\");\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t }\r\n\t\t\t catch(NoSuchNodeException e)\r\n\t\t\t {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(\"That option does not exist.\");\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\twhile(!choice.equals(\"Q\"));\r\n\t\t}\r\n\t\tcatch(FullSceneException e)\r\n\t\t{\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\"Hey\");\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Program terminating normally...\");\r\n\t}", "private boolean processInput() {\r\n\r\n\t\tif (keys.get(Keys.ROOM_ONE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getRooms().size >= 1) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(0))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.ROOM_TWO)) {\r\n\t\t\t// If there are two defined room\r\n\t\t\tif (world.getRooms().size >= 2) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(1))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.ROOM_THREE)) {\r\n\t\t\t// If there are two defined room\r\n\t\t\tif (world.getRooms().size >= 3) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(2))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(2);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (keys.get(Keys.TRAP_ONE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 1) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(0);\r\n\t\t\t\t\ttrapOneReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.TRAP_TWO)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 2) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(1);\r\n\t\t\t\t\ttrapTwoReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.TRAP_THREE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 3) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(2);\r\n\t\t\t\t\ttrapThreeReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (keys.get(Keys.TRAP_FINAL)) {\r\n\t\t\tworld.getPlayer().setState(Player.State.DEAD);\r\n\t\t\tworld.getPlayer().setDeathType(Player.DeathType.BLOODY);\r\n\t\t\t\r\n\t\t\ttrapFinalReleased();\r\n\t\t}\r\n\t\t\r\n\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\tTrap trap = world.getCurrentRoom().getCurrentTrap();\r\n\t\t\tif (keys.get(Keys.TRAP_TOGGLE)) {\r\n\t\t\t\t// Trap activation and deactivation\r\n\t\t\t\tif (!trap.isActive()) {\r\n\t\t\t\t\ttrap.activate();\r\n\t\t\t\t\ttrapToggleReleased(); // To limit input triggering\r\n\t\t\t\t} else if (trap.isActive()) {\r\n\t\t\t\t\ttrap.deactivate();\r\n\t\t\t\t\ttrapToggleReleased(); // To limit input triggering\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (keys.get(Keys.TRAP_INCREASE)) {\r\n\t\t\t\tif (trap.isActive()) {\r\n\t\t\t\t\tif (trap instanceof FloodTrap) {\r\n\t\t\t\t\t\t((FloodTrap) trap).increaseWaterLevel();\r\n\t\t\t\t\t} else if (trap instanceof BloodTrap) {\r\n\t\t\t\t\t\t((BloodTrap) trap).increaseBloodLevel();\r\n\t\t\t\t\t} else if (trap instanceof GasTrap) {\r\n\t\t\t\t\t\t((GasTrap) trap).increaseGasLevel();\r\n\t\t\t\t\t} else if (trap instanceof FreezeTrap) {\r\n\t\t\t\t\t\t((FreezeTrap) trap).increaseFreezeLevel();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (trap instanceof ElectroTrap) {\r\n\t\t\t\t\t((ElectroTrap) trap).increase();\r\n\t\t\t\t} else if (trap instanceof SpikeTrap) {\r\n\t\t\t\t\t((SpikeTrap) trap).increase();\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttrapIncreaseReleased();\r\n\t\t\t} else if (keys.get(Keys.TRAP_DECREASE)) {\r\n\t\t\t\tif (trap.isActive()) {\r\n\t\t\t\t\tif (trap instanceof FloodTrap) {\r\n\t\t\t\t\t\t((FloodTrap) trap).decreaseWaterLevel();\r\n\t\t\t\t\t} else if (trap instanceof BloodTrap) {\r\n\t\t\t\t\t\t((BloodTrap) trap).decreaseBloodLevel();\r\n\t\t\t\t\t} else if (trap instanceof GasTrap) {\r\n\t\t\t\t\t\t((GasTrap) trap).decreaseGasLevel();\r\n\t\t\t\t\t} else if (trap instanceof FreezeTrap) {\r\n\t\t\t\t\t\t((FreezeTrap) trap).decreaseFreezeLevel();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (trap instanceof ElectroTrap) {\r\n\t\t\t\t\t((ElectroTrap) trap).decrease();\r\n\t\t\t\t} else if (trap instanceof SpikeTrap) {\r\n\t\t\t\t\t((SpikeTrap) trap).decrease();\r\n\t\t\t\t}\r\n\t\t\t\ttrapDecreaseReleased();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static void main(String args[]){\n Game game = new GameImpl(new TestFactory());\n WorldStrategy worldStrategy = new ThirdPartyWorldAdapter();\n worldStrategy.createWorld(game);\n\n // Print World as it is \"seen\" by the Game\n for ( int r = 0; r < GameConstants.WORLDSIZE; r++ ) {\n String line = \"\";\n for ( int c = 0; c < GameConstants.WORLDSIZE; c++ ) {\n String type = game.getTiles().get(new Position(r,c)).getTypeString();\n\n if (type.equals(GameConstants.OCEANS)){ line += '.';}\n if (type.equals(GameConstants.PLAINS)){ line += 'o';}\n if (type.equals(GameConstants.MOUNTAINS)){ line += 'M';}\n if (type.equals(GameConstants.FOREST)){ line += 'f';}\n if (type.equals(GameConstants.HILLS)){ line += 'h';}\n }\n System.out.println(line);\n }\n\n }", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "public TETile[][] interactWithInputString(String input) {\n\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n //String seedstring = input.substring(1, input.length() - 1);\n if (input.substring(0,1).equals(\"n\")) {\n String seed = \"\";\n String movements = \"\";\n for (int i = 0; i < input.length(); i++) {\n\n try { // I might be missing a step.\n int num = Integer.parseInt(input.substring(i, i + 1));\n seed += input.substring(i, i + 1);\n\n } catch (Exception e) {\n\n if ((input.substring(i, i+1).equals(\":\")) && input.substring(i, i+2).equals(\":q\")) {\n System.out.println(\"saved\");\n saveEditor(\"seed\", seed);\n saveEditor(\"movements\", movements);\n break;\n } else if (input.substring(i, i + 1).equals(\"w\") || input.substring(i, i + 1).equals(\"s\") || input.substring(i, i + 1).equals(\"a\")\n || input.substring(i, i + 1).equals(\"d\")) {\n movements += input.substring(i, i + 1);\n }\n }\n }\n\n\n load_and_move(seed,movements);\n ter.renderFrame(this.tiles);\n return this.tiles;\n }\n\n else if(input.substring(0, 1).equals(\"l\")) {\n File seed_file = new File(\"seed.txt\");\n File movements_file = new File(\"movements.txt\");\n String seed = loadEditor(seed_file);\n String movements = loadEditor(movements_file);\n this.rand = new Random(Long.parseLong(seed));\n for (int i = 0; i < input.length(); i++) {\n if ((input.substring(i, i+1).equals(\":\")) && input.substring(i, i+2).equals(\":q\")) {\n System.out.println(\"saved\");\n saveEditor( \"seed\", seed);\n saveEditor(\"movements\", movements);\n break;\n } else if (input.substring(i, i + 1).equals(\"w\") || input.substring(i, i + 1).equals(\"s\") || input.substring(i, i + 1).equals(\"a\")\n || input.substring(i, i + 1).equals(\"d\")) {\n movements += input.substring(i, i + 1);\n }\n }\n\n load_and_move(seed,movements);\n ter.renderFrame(this.tiles);\n return this.tiles;\n }\n else{\n return null;\n }\n\n }", "public void provideAccess() {\n\t\tint choice = View.NO_CHOICE;\n\t\twhile (choice != View.EXIT) {\n\t\t\tview.displayMenu();\n\t\t\tchoice = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\texecuteChoice(choice);\n\t\t}\n\t}", "private void Level1() {\n\t\tEngine eng = new Engine();\n\t\teng.Maingame();\n\t\tthis.setVisible(false);\n\t}", "public void actualShowWorldChest(){\n\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"WorldChest\");\n\t\tel.show();\n\t\tfor(Item it : screenManager.getInventoryManager().getOpenWorldChest()){\n\t\t\tif(it.getInventoryPosition() != null){\n\t\t\t\tElement toHide = nifty.getScreen(\"hud\").findElementByName(\"hoverstats-\"+it.getId());\n\t\t\t\tif(toHide!=null){\n\t\t\t\t\ttoHide.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n Map map=new Map();\n Actions actions=new Actions();\n Random rnd = new Random();\n int end = rnd.nextInt((110 - 70) + 1) + 70;\n System.out.println(\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\");\n System.out.println(\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\");\n System.out.println(\"\\033[36m\"+\" You wake up on a abandoned spaceship. Try to survive.\"+\"\\033[0m\");\n System.out.println(\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\");\n System.out.println(\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\");\n System.out.println(map.getMapObject(3,1).getDescriptionObject());\n while(actions.getMoves()<end&&!actions.getEscapePod()){\n if(actions.getMoves()%8==0)\n System.out.println(\"The ship is creeking!\");\n System.out.println(\"x: \"+actions.getX()+\"\\n\" +\n \"y: \"+actions.getY());\n map.printMap(actions.getX(), actions.getY());\n actions.input();\n }\n if(actions.getMoves()>20)\n {\n System.out.println(\"Game Over\");\n }\n else\n {\n System.out.println(\"Mission complete\");\n System.out.println(\"You beat the game in \"+actions.getMoves()+\" moves.\");\n }\n }", "public static void main(String[] args) {\n\t\tgenerateMenu();\n\t\toperations ao = new operations();\n\t\tint choice = getInput();\n\t\twhile(choice>0){\n\t\t\tswitch(choice){\n\t\t\tcase 1:\n\t\t\t\tao.create();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tao.delete();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tao.rotation();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tao.search();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tao.reverse();\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tao.display();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"!!!Invalid Choice!!!\");\n\t\t\t}\n\t\t\tgenerateMenu();\n\t\t\tchoice = getInput();\n\t\t}\n\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEnvironmentVariables.setWidth(Float.parseFloat(width.getText()));\r\n\t\t\t\tEnvironmentVariables.setHeight(Float.parseFloat(height.getText()));\r\n\t\t\t\tEnvironmentVariables.setTitle(title.getText());\r\n\t\t\t\tupdateGameWorld();\r\n\t\t\t\t//go to save function\r\n\t\t\t\tsaveGame();\r\n\t\t\t\t\r\n\t\t\t\tWindow.getFrame().setVisible(false);\r\n\t\t\t\tWindow.getFrame().dispose();\r\n\t\t\t\t\r\n\t\t\t\tHomePage.buildHomePage();\r\n\t\t\t}", "public static void main (String args[]) {\r\n\t\t\r\n\t\tinputScreen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tinputScreen.setSize(700,500);\r\n\t\tinputScreen.getContentPane();\r\n\t\tinputScreen.setVisible(true);\r\n\t\t\r\n\r\n\t\tEmployeeName();\r\n\t\tEmployeeAddress();\r\n\t\tEmployeePhoneNumber();\r\n\t\tEmployeeJob();\r\n\t\tEmployeeHoursWorked();\r\n\t\tEmployeePay();\r\n\t\tBottomRow();\r\n\t\tAction();\r\n\t\tAction2();\r\n\t\tAction3();\r\n\t\tSearchAction();\r\n\t\t\r\n\t\r\n\t\tinputScreen.getContentPane().add(GUI1Panel);\r\n\t\tGUI1Panel.setBorder(border1);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "private String printMainMenu() {\n System.out.println(\"Please make a selection:\");\n System.out.println(\"1: List all tools\");\n System.out.println(\"2: Search for tool by toolName\");\n System.out.println(\"3: Search for tool by toolID\");\n System.out.println(\"4: Check item quantity\");\n System.out.println(\"5: Decrease item quantity\");\n System.out.println(\"6: Make New Order/Append Today's Order\");\n System.out.println(\"7: View Current Orders\");\n System.out.println(\"8: View Supplier List\");\n System.out.println(\"9: Quit\");\n String selection = this.userInput.nextLine();\n return selection;\n }", "public static void processMainMenu() {\n\n\t\tString mainPrompt = \"[anon@root]: \";\n\t\tboolean execute = true;\n\n\t\twhile (execute) {\n\t\t\tString[] words = prompt(mainPrompt);\n\t\t\tCmd cmd = stringToCmd(words[0]);\n\n\t\t\tswitch (cmd) {\n\t\t\tcase AU:\n\t\t\t\tif (validateInput2(words)) {\n\t\t\t\t\tSystem.out.println(handleAddUser(words[1].trim()));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DU:\n\t\t\t\tif (validateInput2(words)) {\n\t\t\t\t\tSystem.out.println(handleDelUser(words[1].trim())); \n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LI:\n\t\t\t\tif (validateInput2(words)) {\n\t\t\t\t\tSystem.out.println(handleLogin(words[1].trim()));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase HE:\n\t\t\t\tif (validateInput1(words)) {\n\t\t\t\t\tdisplayMainMenu();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase QU:\n\t\t\t\tif (validateInput1(words)) {\n\t\t\t\t\texecute = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\t}\n\n\t\t}\n\t}", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "private static void welcomePage() {\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Welcome to the Shopping App, best Shopping App in 2021!\");\r\n\t\tSystem.out.println();\r\n\t\tscanner = new Scanner(System.in); // Create a Scanner object\r\n\t\t// 1. Search items 2. View items 3. View cart 4. Checkout Cart 0. Quit\r\n\t\tmakeMenuChoice();\r\n\t\tscanner.close();\r\n\t}", "public static void main(String[] args) {\n ICommand[] commandRegister = {\n new LeagueCmd(),\n new TeamCmd(),\n new MatchCmd(),\n new LoadCmd(),\n new SaveCmd()\n };\n if (Utils.initSaveFileLocation()) {\n final CommandHandler cmdHandler = new CommandHandler(commandRegister);\n Scanner scanner = new Scanner(System.in);\n boolean isExited = false;\n String userInput;\n String[] exitCmd = {\"exit\", \"quit\", \"close\"};\n\n System.out.println(\"# CompetitionManager.\\nAfin d'afficher la liste des commandes, entrez \\\"help\\\".\");\n Utils.displayBasePath();\n\n while (!isExited) {\n // Boucle de lecture des commandes\n System.out.printf(\"%s> \", renderSelected());\n userInput = scanner.nextLine();\n if (Arrays.asList(exitCmd).contains(userInput)) isExited = true;\n else cmdHandler.handleMessage(userInput);\n }\n } else {\n System.out.println(\"Une erreur est survenue lors de l'initialisation de l'application.\");\n }\n }", "public void menu() {\n System.out.println(\n \" Warehouse System\\n\"\n + \" Stage 3\\n\\n\"\n + \" +--------------------------------------+\\n\"\n + \" | \" + ADD_CLIENT + \")\\tAdd Client |\\n\"\n + \" | \" + ADD_PRODUCT + \")\\tAdd Product |\\n\"\n + \" | \" + ADD_SUPPLIER + \")\\tAdd Supplier |\\n\"\n + \" | \" + ACCEPT_SHIPMENT + \")\\tAccept Shipment from Supplier |\\n\"\n + \" | \" + ACCEPT_ORDER + \")\\tAccept Order from Client |\\n\"\n + \" | \" + PROCESS_ORDER + \")\\tProcess Order |\\n\"\n + \" | \" + CREATE_INVOICE + \")\\tInvoice from processed Order |\\n\"\n + \" | \" + PAYMENT + \")\\tMake a payment |\\n\"\n + \" | \" + ASSIGN_PRODUCT + \")\\tAssign Product to Supplier |\\n\"\n + \" | \" + UNASSIGN_PRODUCT + \")\\tUnssign Product to Supplier |\\n\"\n + \" | \" + SHOW_CLIENTS + \")\\tShow Clients |\\n\"\n + \" | \" + SHOW_PRODUCTS + \")\\tShow Products |\\n\"\n + \" | \" + SHOW_SUPPLIERS + \")\\tShow Suppliers |\\n\"\n + \" | \" + SHOW_ORDERS + \")\\tShow Orders |\\n\"\n + \" | \" + GET_TRANS + \")\\tGet Transaction of a Client |\\n\"\n + \" | \" + GET_INVOICE + \")\\tGet Invoices of a Client |\\n\"\n + \" | \" + SAVE + \")\\tSave State |\\n\"\n + \" | \" + MENU + \")\\tDisplay Menu |\\n\"\n + \" | \" + EXIT + \")\\tExit |\\n\"\n + \" +--------------------------------------+\\n\");\n }", "public void mainMenu(ActionEvent e) throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/FXML/SelectGameFXML.fxml\"));\n Parent root = loader.load();\n gameroot.getScene().setRoot(root);\n }", "private void processInputUntilRoomChange() {\n while (true) {\n // Get the user input\n System.out.print(\"> \");\n String input = scan.nextLine();\n\n // Determine which command they used and act accordingly\n if (input.startsWith(\"help\")) {\n this.displayCommands();\n } else if (input.startsWith(\"look\")) {\n this.displayDescription(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"get\")) {\n this.acquireItem(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"go\")) {\n if (this.movePlayer(input.substring(input.indexOf(\" \") + 1))) {\n break;\n }\n } else if (input.startsWith(\"use\")) {\n this.useItem(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"inventory\")) {\n System.out.print(player.listInventory());\n } // The player did not enter a valid command.\n else {\n System.out.println(\"I don't know how to \" + input);\n }\n }\n }", "@FXML\n\tvoid returnAdministratorMenu(ActionEvent event) throws IOException {\n\t\tTheWerewolvesOfMillersHollow.setScene(getClass().getResource(\"../view/AdministratorMenuView.fxml\"));\t\n\t}", "void askMenu();", "public void mainMenu() {\n Game.stage.setScene(mainMenuScene);\n Game.stage.show();\n }", "@Override\n public void handle(long currentNanoTime) {\n if (!game.checkExisting(\"wizard\") && game.getCurrentRoomId() == 13) {\n //write to highscore\n game.writeHighScore();\n //remove all the inputs\n input.removeAll(input);\n //stop this AnimationTimer\n this.stop();\n //clear the textarea\n infobox.clear();\n //remove the input\n menu_input.remove(\"E\");\n //set the menu as a scene instead.\n WizardOfTreldan.setFinishScene();\n\n }\n //request the focus back\n root.requestFocus();\n //get how many sec have passed\n double elapsedTime = (currentNanoTime - lastNanoTime) / 1000000000.0;\n //set the lastNanoTime to the nano time from parameter\n lastNanoTime = currentNanoTime;\n\n //set our initial direction standstill\n player.setDirection(PlayerSprite.Direction.STANDSTILL);\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" LEFT INPUT \">\n //now check for the users input\n //check if the user wants to walk left.\n if (input.contains(\"LEFT\")) {\n //check if the user walks into a world boundary\n if (player.intersects_left(worldBoundLeft)) {\n //Reset the velocity\n player.setVelocity(0, 0);\n //check if the player walks into a sprite\n } else if (game.checkExisting(\"wizard\") && player.intersects_left(spriteList_foreground.get(0))) {\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"minion1\") && player.intersects_left(spriteList_foreground.get(1))) {\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"minion2\") && player.intersects_left(spriteList_foreground.get(2))) {\n player.setVelocity(0, 0);\n } else if (player.intersects_left(spriteList_boundriesFIX.get(3))\n || player.intersects_left(spriteList_boundriesFIX.get(0))) {\n player.setVelocity(0, 0);\n } else {\n player.setVelocity(-100, 0);\n }\n //set the direction the player walks\n player.setDirection(PlayerSprite.Direction.WALK_LEFT);\n }\n\n // </editor-fold>\n // <editor-fold defaultstate=\"collapsed\" desc=\" RIGHT INPUT \">\n //check if the user wants to walk right.\n if (input.contains(\"RIGHT\")) {\n //check if the user walks into a world boundary\n if (player.intersects_right(worldBoundRight)) {\n //Reset the velocity\n player.setVelocity(0, 0);\n //check if the player walks into a sprite\n } else if (game.checkExisting(\"wizard\") && player.intersects_right(spriteList_foreground.get(0))) {\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"minion1\") && player.intersects_right(spriteList_foreground.get(1))) {\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"minion2\") && player.intersects_right(spriteList_foreground.get(2))) {\n player.setVelocity(0, 0);\n } else if (player.intersects_right(spriteList_boundriesFIX.get(2))\n || player.intersects_right(spriteList_boundriesFIX.get(1))) {\n player.setVelocity(0, 0);\n } else {\n player.setVelocity(100, 0);\n }\n //set the direction the player walks\n player.setDirection(PlayerSprite.Direction.WALK_RIGHT);\n }\n\n // </editor-fold>\n // <editor-fold defaultstate=\"collapsed\" desc=\" UP INPUT \">\n //check if the user wants to walk up.\n if (input.contains(\"UP\")) {\n //check if the user walks into a world boundary\n if (player.intersects_top(worldBoundTop)) {\n //Reset the velocity\n player.setVelocity(0, 0);\n //check if the player walks into a sprite\n } else if (game.checkExisting(\"wizard\") && player.intersects_top(spriteList_foreground.get(0))) {\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"minion1\") && player.intersects_top(spriteList_foreground.get(1))) {\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"minion2\") && player.intersects_top(spriteList_foreground.get(2))) {\n player.setVelocity(0, 0);\n } else {\n player.setVelocity(0, -100);\n }\n //set the direction the player walks\n player.setDirection(PlayerSprite.Direction.WALK_UP);\n }\n\n // </editor-fold>\n // <editor-fold defaultstate=\"collapsed\" desc=\" DOWN INPUT \">\n //check if the user wants to walk down.\n if (input.contains(\"DOWN\")) {\n //check if the user walks into a world boundary\n if (player.intersects_bottom(worldBoundBottom)) {\n //Reset the velocity\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"wizard\") && player.intersects_bottom(spriteList_foreground.get(0))) {\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"minion1\") && player.intersects_bottom(spriteList_foreground.get(1))) {\n player.setVelocity(0, 0);\n } else if (game.checkExisting(\"minion2\") && player.intersects_bottom(spriteList_foreground.get(2))) {\n player.setVelocity(0, 0);\n } else if (player.intersects_bottom(spriteList_boundriesFIX.get(0))\n || player.intersects_bottom(spriteList_boundriesFIX.get(1))) {\n player.setVelocity(0, 0);\n } else {\n player.setVelocity(0, 100);\n }\n //set the direction the player walks\n player.setDirection(PlayerSprite.Direction.WALK_DOWN);\n }\n\n // </editor-fold>\n //check if the user wants to interact\n if (menu_input.contains(\"E\")) {\n if (game.checkExisting(\"minion1\") && player.intersect(spriteList_foreground.get(1))) {\n for (String s : game.goTo(new Command(CommandWord.GO, \"minion1\"))) {\n infobox.appendText(\"\\n\" + s + \"\\n\");\n }\n playerinventory.update(game);\n }\n if (game.checkExisting(\"minion2\") && player.intersect(spriteList_foreground.get(2))) {\n for (String s : game.goTo(new Command(CommandWord.GO, \"minion2\"))) {\n infobox.appendText(\"\\n\" + s + \"\\n\");\n }\n playerinventory.update(game);\n }\n if (game.checkExisting(\"wizard\")) {\n if (player.intersect(spriteList_foreground.get(0))) {\n if (!game.checkExisting(\"minion2\") && !game.checkExisting(\"minion1\")) {\n for (String s : game.goTo(new Command(CommandWord.GO, \"wizard\"))) {\n infobox.appendText(\"\\n\" + s + \"\\n\");\n }\n playerinventory.update(game);\n } else if (player.intersect(spriteList_foreground.get(0))) {\n infobox.appendText(\"\\n\" + \"Foolish mortal! you need to get rid of my minions first in order to defeat me!\");\n }\n }\n }\n\n menu_input.remove(\"E\");\n }\n //check if the user wants to see a menu.\n if (menu_input.contains(\"ESCAPE\")) {\n if (!escmenu.isShown()) {\n root.getChildren().add(gameMenu);\n escmenu.setShown(true);\n }\n } else if (escmenu.isShown()) {\n root.getChildren().remove(gameMenu);\n escmenu.setShown(false);\n }\n //update the players velocity\n player.update(elapsedTime);\n //clear our player\n moveable_gc.clearRect(0, 0, 1024, 512);\n //render our new player\n player.render(moveable_gc);\n\n //check if the user wants to see a menu.\n if (menu_input.contains(\"I\")) {\n if (!playerinventory.isShown()) {\n root.getChildren().add(menu);\n playerinventory.setShown(true);\n }\n } else if (playerinventory.isShown()) {\n root.getChildren().remove(menu);\n playerinventory.setShown(false);\n }\n\n //render lava in each 50 frame\n if (lavaCounter != 50) {\n lavaCounter++;\n } else {\n lava_gc.clearRect(0, 0, 1024, 512);\n spriteList_lava.get(0).render(lava_gc);\n lavaCounter = 0;\n }\n\n //clear monsters\n monster_gc.clearRect(0, 0, 1024, 512);\n\n //render monsters\n if (game.checkExisting(\"wizard\")) {\n spriteList_foreground.get(0).render(monster_gc);\n }\n\n if (game.checkExisting(\"minion1\")) {\n spriteList_foreground.get(1).render(monster_gc);\n\n }\n if (game.checkExisting(\"minion2\")) {\n spriteList_foreground.get(2).render(monster_gc);\n\n }\n\n //update the player on the minimaps position\n miniMap.updateMiniMap_player(player.getPositionX(), player.getPositionY());\n }", "public static void setup(MC hero) \n { \n Scanner scan = new Scanner (System.in); \n String response;\n StoryLine.history();\n boolean nameLoop = false;\n while (!nameLoop) //while you do not choose or like the name you picked.\n {\n System.out.print(\"I see you are the chosen one. I am fate, the decider.\" + \"\\n\" + \"What is your name?\" + \"\\n\" + \"\\n\"\n + \"Name: \");\n hero.setName(scan.nextLine());\n System.out.println(\"Confirming \" + hero.getName() + \" as your name (Y / N)?\");\n response = scan.nextLine();\n nameLoop = (response.equalsIgnoreCase(\"Y\") || response.equalsIgnoreCase(\"Yes\"));\n }\n System.out.println(\"\\n\" + \"\\n\" +\"My \" + hero.getName() + \", your current attributes are - Health: \" + hero.getMaxHP() + \" Strength: \" + hero.getMaxHeal() + \" Strength: \" + hero.getStrength() + \" Agility: \"\n + hero.getAgility() + \" Defence: \"+ hero.getDefence() + \"\\n\\n<press any key to continue>\");\n scan.nextLine();\n System.out.println(\"\\n\" + \"Right now you have \" + hero.getPoints() + \" power-points in storage. You may add them to any of your stats. \\n\\n\"\n + \"Type in these options [health (h), heal (hl), strength (s), agility (a), defence (d), or None(N)]\" + \n \"\\n\" + \"The increase is as follows [health (+10), heal(+1), strength (+1), agility (+1), defence (+1), None(saves points)]\" +\n \"\\n\" + \"When you are complete, please type in done\" + \n \"\\n\" + \"Please choose wisely because you are unable to reset.\" + \"\\n\" + \"\\n\" + \"\\n<press any key to continue>\");\n scan.nextLine();\n boolean loop = true;\n while (loop) //while you still have points or want to use your points\n {\n System.out.print(\"Action: \");\n String action = scan.nextLine();\n loop = Methods.pointDistribute(action, hero);\n }\n System.out.println(\"You, \" + hero.getName() + \", now have \" + hero.getMaxHP() + \" hp, \" + hero.getMaxHeal() + \" max heal, \" + hero.getStrength() + \" strength, \"\n + hero.getAgility() + \" agility, \" + hero.getDefence() + \" defence.\" + \"\\n\"); \n System.out.println(\"\\n\" + \"Congratulations, you have leveled up!\" + \"\\n\");\n MC.levelUp(hero);\n System.out.println(\"As you progress with quests and battles, you will earn enough experience to 'level up' and become stronger.\\n<press any key to continue>\");\n scan.nextLine();\n System.out.println(\"Teleporting to town square...\\n**Note: This is the limited edition, the LITE version. You cannot save and have multiple accounts per game. \\nIf you want the full version, it is only accessible on BlueJ and Eclipse, which you can download both the game and the IDE online. \\n\\n\\nAlso, there may be extra spaces for Java's line eating fault\\nIf this happens, retype your action again.\\n\\nPlease refer to the manuals if you have any confusions before emailing questions.\" + \"\\n\" + \"\\n<press any key to continue>\");\n scan.nextLine();\n }" ]
[ "0.6346533", "0.6109726", "0.6080916", "0.59849274", "0.59499073", "0.5944411", "0.5939047", "0.58886003", "0.58709544", "0.58196884", "0.57995987", "0.5793531", "0.5765542", "0.5751859", "0.575026", "0.5698793", "0.56608117", "0.56600046", "0.5622397", "0.5609231", "0.55833375", "0.5578724", "0.5578662", "0.557728", "0.5573354", "0.55708694", "0.55697525", "0.55640703", "0.55595917", "0.55585873", "0.5536516", "0.5532365", "0.5523232", "0.55226684", "0.55091596", "0.550915", "0.55024654", "0.5495039", "0.5482975", "0.5482884", "0.54791456", "0.54746425", "0.5471433", "0.5470958", "0.5467638", "0.5457781", "0.5450757", "0.54484993", "0.5436431", "0.54310346", "0.5430494", "0.5429249", "0.542833", "0.54276586", "0.5424234", "0.54216915", "0.54198533", "0.5409121", "0.54055065", "0.539797", "0.5392798", "0.53876245", "0.53845567", "0.5381758", "0.53743976", "0.53621686", "0.5357034", "0.5356193", "0.5350588", "0.5350388", "0.5348293", "0.53455824", "0.5339907", "0.5339896", "0.53391176", "0.5336773", "0.53363353", "0.5331802", "0.5329341", "0.5328697", "0.5327526", "0.53235316", "0.5321625", "0.5301687", "0.52972144", "0.5292973", "0.5282542", "0.5281491", "0.5276875", "0.52726156", "0.5272542", "0.52697307", "0.52664405", "0.5264207", "0.5262793", "0.5259127", "0.52521104", "0.5251272", "0.52484214", "0.5247856", "0.52445155" ]
0.0
-1
Createworld jerod = new Createworld(5L);
public static void main(String[] args) { Engine ry = new Engine(); ry.interactWithKeyboard(); // ry.interactWithKeyboard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createWorld(){\n\n }", "public abstract World create(World world);", "public MyWorld()\n {\n super(600, 400, 1);\n }", "public GameWorld(){\r\n\t\t\r\n\t}", "public World()\n\t{\n\t\tinitWorld();\t\n\t}", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }", "public MyWorld()\n { \n super(1200, 600, 1); \n prepare();\n bienvenida();\n instrucciones();\n sonido();\n }", "World getWorld();", "private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }", "public MyAgent(World world)\n {\n w = world; \n }", "public WiuWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1xpixels.\n super(WIDTH_WORLD, HEIGHT_WORLD, 1); \n }", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "private static WorldDescription createWorld() {\r\n \t\tWorldDescription world = new WorldDescription();\t \r\n \t\tworld.setPlaneSize(100);\t\t\r\n \t \tObstacleGenerator generator = new ObstacleGenerator();\r\n \t generator.obstacalize(obstacleType, world); // activate to add obstacles\r\n \t // world.setPlaneTexture(WorldDescription.WHITE_GRID_TEXTURE);\r\n \t\treturn world;\r\n \t}", "public WorldGenGrassUnderbean()\n {\n }", "public OverWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(1024, 600, 1, false);\n Setup();\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1078, 672, 1); \n preparePlayer1();\n preparePlayer2();\n prepareTitle();\n //playmusic();\n }", "public WaterWorld()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(600, 400, 1); \r\n populateWorld();\r\n }", "public MyWorld()\n { \n // Create a new world with 600x550 cells with a cell size of 1x1 pixels.\n super(600, 550, 1);\n // Set the order in which Actors are drawn on the screen in this World\n setPaintOrder ( Counter.class, HighScore.class, Fader.class);\n // Counter\n counter = new Counter (\"Score: \");\n addObject (counter, 50, 30);\n // Initialize the player\n player = new Player ();\n addObject (player, 300, 530); \n platforms = new Platform[10]; \n startingPlatform = new Platform();\n addObject (startingPlatform, 300, 550);\n // Loop through as many Meteors as there are on this level\n for (int i = 0; i < platforms.length; i++)\n {\n // Initialize a new Platform object for each spot in the array\n platforms[i] = new Platform ();\n // Add each platform at a random position anywhere on the X axis and at intervals of 15 on the Y axis\n addObject (platforms[i], Greenfoot.getRandomNumber(600), platformCounter);\n platformCounter = platformCounter - 55;\n }\n }", "public RobotWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(800, 600, 1); \n prepare();\n }", "public WorldModel(){\t\n\t}", "public Ocean()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n BF bf = new BF();\n addObject(bf,500,300);\n SF sf = new SF();\n addObject(sf,100,300);\n }", "public salida()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(600, 400, 1); \r\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n \n Player player = new Player();\n Point point0 = new Point();\n Point point1 = new Point();\n Point point2 = new Point();\n Point point3 = new Point();\n Point point4 = new Point();\n Danger danger0 = new Danger();\n Danger danger1 = new Danger();\n addObject(player, getWidth()/2, getHeight()/2);\n \n addObject(point0,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point1,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point2,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point3,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(point4,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n \n addObject(danger0,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n addObject(danger1,Greenfoot.getRandomNumber(getWidth()),Greenfoot.getRandomNumber(getHeight()));\n }", "public static void main(String args[]) {\n BallWorld world = new BallWorld();\n }", "public static void main(String [] args)\n\t{\n\t\tWorld newWorld = new World();\n\n\t\t//Adding everything into the world\n\t\tnewWorld.treesShrubsToWorld();\n\t\tnewWorld.grassToWorld();\n\t\tnewWorld.caterpillarToWorld();\n\t\tnewWorld.grasshopperToWorld();\n\t\tnewWorld.deerToWorld();\n\t\tnewWorld.bluejayToWorld();\n\t\tnewWorld.squirrelToWorld();\n\t\tnewWorld.mouseToWorld();\n\t\tnewWorld.rabbitToWorld();\n\t\tnewWorld.hawkToWorld();\n\t\tnewWorld.foxToWorld();\n\t\tnewWorld.wolfToWorld();\n\n\t\t//Printing out the world onto the console\n\t\tnewWorld.printWorld();\n\t\t\n\t}", "public World getWorld();", "public DouaneHal(World firstWorld){\n super(800, 400, 1);\n this.firstWorld = firstWorld;\n \n addObject(new Bericht(3), 400, 200);\n }", "public HealthyWorld()\n { \n // Create a new wolrd with 800x400 cells and a cell size of 1x1 pixels\n super(800, 400, 1);\n healthLevel = 10;\n time = 2000;\n showHealthLevel();\n showTime();\n // Create a kid in the middle of the screen\n Kid theKid = new Kid();\n this.addObject(theKid, 400, 350);\n }", "public Minus(Background myWorld)\n {\n super(myWorld);\n }", "public Cenario1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(900, 600, 1);\n adicionar();\n \n }", "public World (){\n\t\tpattern = new ShapePattern (PATTERN_SIZE);\n\t\tscroll = new ShapeScroll (SCROLL_SIZE);\n\t}", "public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }", "public World(int width, int height)\n {\n this(width, height, AIR_EL);\n }", "public World getWorld(String worldName);", "public GameWorld()\n { super(3000, 1000, 1);\n planet[1][0]=new HomePlanet();\n planet[0][1]=new AlienPlanet();\n planet[0][2]=new AlienPlanet();\n planet[1][1]=new AlienPlanet();\n planet[1][2]=new AlienPlanet();\n prepare();\n \n }", "public HowToPlay()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(763, 578, 1); \n //HowToPlay play = new HowToPlay();\n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 800, 1); \n GreenfootImage bg = new GreenfootImage(\"background.jpg\");\n bg.scale(getWidth(), getHeight());\n setBackground(bg);\n initialize();\n \n }", "public MyWorld()\n { \n // Create a new world with 1600x1200 cells with a cell size of 1x1 pixels.\n super(1125, 1125, 1);\n //Adds the Cornucopia to the center of the Arena.\n int centerX = this.getWidth()/2;\n int centerY = this.getHeight()/2;\n this.addObject(new Cornucopia(), centerX, centerY);\n \n //The following adds the main character for the game.\n int CharacterX = 1125/2;\n int CharacterY = 770;\n this.addObject(new Character(), CharacterX, CharacterY);\n \n //The following code adds 6 \"Careers\" into the arena.\n int CareerX = 405;\n int CareerY = 328;\n this.addObject(new Careers(), CareerX, CareerY);\n this.addObject(new Careers(), CareerX+310, CareerY-5);\n this.addObject(new Careers(), CareerX+90, CareerY+430);\n this.addObject(new Careers(), CareerX+290, CareerY+405);\n this.addObject(new Careers(), CareerX+190, CareerY-60);\n \n //The following code add the remaining 17 Tributes to the arena.\n //Also, I cannot add like a normal person so there will only be twenty-three tributes. The Capitol goofed this year.\n int TribX = 660;\n int TribY = 288;\n this.addObject(new Tributes(), TribX, TribY);\n this.addObject(new Tributes(), TribX-200, TribY);\n this.addObject(new Tributes(), TribX-227, TribY+443);\n this.addObject(new Tributes(), TribX-280, TribY+400);\n this.addObject(new Tributes(), TribX-34, TribY+467);\n this.addObject(new Tributes(), TribX+86, TribY+397);\n this.addObject(new Tributes(), TribX-134, TribY-22);\n this.addObject(new Tributes(), TribX+103, TribY+82);\n this.addObject(new Tributes(), TribX+139, TribY+144);\n this.addObject(new Tributes(), TribX+150, TribY+210);\n this.addObject(new Tributes(), TribX+150, TribY+280);\n this.addObject(new Tributes(), TribX+120, TribY+342);\n this.addObject(new Tributes(), TribX-338, TribY+275);\n this.addObject(new Tributes(), TribX-319, TribY+343);\n this.addObject(new Tributes(), TribX-343, TribY+210);\n this.addObject(new Tributes(), TribX-330, TribY+150);\n this.addObject(new Tributes(), TribX-305, TribY+80);\n \n //The following code should add the forest onto the map.\n int ForX = this.getWidth()/2;\n int ForY = 900;\n this.addObject(new Forest(), ForX, ForY);\n \n //The following code should add the lake to the map.\n int LakX = 790;\n int LakY = 990;\n this.addObject(new Lake(), LakX, LakY);\n \n //The following should add the cave to the map.\n int CavX = 125;\n int CavY = 110;\n this.addObject(new Cave(), CavX, CavY);\n \n \n int actorCount = getObjects(Tributes.class).size();\n if(actorCount == 17) {\n int BeastX = 200;\n int BeastY = 200;\n this.addObject(new Beasts(), BeastX, BeastY);\n this.addObject(new Beasts(), BeastX+100, BeastY+100);\n }\n }", "public void addToWorld(World world);", "public World(){\r\n locations = new Location[3][3];\r\n for(int r=0; r<3; r+=1){\r\n for(int c=0; c<3; c+=1){\r\n locations[r][c] = new EmptyLocation(new Position(r,c), \"Nothing here to see.\");\r\n }\r\n }\r\n home = locations[0][0];\r\n players = new ArrayList<Player>();\r\n }", "public City(){\n this.x = (int)(Math.random()*200);\n this.y = (int)(Math.random()*200);\n }", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "City(){\n x_coordinate = (int)(Math.random()*200);\n y_coordinate = (int)(Math.random()*200);\n }", "public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }", "protected abstract void initializeWorld();", "public GameWon()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(550, 600, 1); \n addObject(b1,275,250);\n addObject(b2,275,380);\n }", "void createWorld(Scanner console){\r\n\t\tRandom r = new Random();\r\n\t // System.out.println(\"Welcome to Sushi Time!\");\r\n\t\t//System.out.println(\"Number of fish: \"); \r\n\t\tint fish = r.nextInt(40)+1;\r\n\t\t//System.out.println(\"Number of sharks: \"); \r\n\t\tint shark = r.nextInt(10)+1;\r\n\t\t//create random int for creating random number of seaweed\r\n\t\tint seaweed=r.nextInt(3)+1;\r\n\t\t//create fish, sharks, seaweed, net and sushibar, add them to GameCollection\r\n\t\tSystem.out.println(\"Creating \"+fish+\" fish\");\r\n\t\tfor(int i=0; i<fish; i++){\r\n\t\t\tSystem.out.println(\"Creating fish\");\r\n\t\t\tFish f = new Fish(this);\r\n\t\t\taddToWorldList(f);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+shark+\" sharks\");\r\n\t\tfor(int i=0; i<shark; i++){\r\n\t\t\tSystem.out.println(\"Creating shark\");\r\n\t\t\tShark s = new Shark(this);\r\n\t\t\taddToWorldList(s);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+seaweed+\" seaweed\");\r\n\t\tfor(int i=0; i<seaweed; i++){\r\n\t\t\tSystem.out.println(\"Creating seaweed\");\r\n\t\t\tSeaweed sw=new Seaweed(this);\r\n\t\t\taddToWorldList(sw);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating net\");\r\n\t\t\tNet n = new Net();\r\n\t\t\taddToWorldList(n);\r\n\t\tSystem.out.println(\"Creating sushibar\");\r\n\t\t Sushibar sb = new Sushibar();\r\n\t\t\taddToWorldList(sb);\r\n\t }", "public abstract LivingObject createLife(Cell locat);", "public static void createBodyAndType(World world) {\n\t\t\n\t}", "public CrabWorld()\n {\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n musica=new GreenfootSound(\"Ufo-t-balt.mp3\");\n super(560,560, 1);\n }", "public MyWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(800, 600, 1); \n\n //could have as many RideLines as capasity dictates\n rides = new RideLines[MAX_RIDES];\n\n currentRide=0; //initially, we have 0 prisoners\n \n //Create a Load button at the top of the screen\n load = new LoadButton();\n addObject(load, 250, 20);\n \n //Create a Merge button at the top of the screen\n MergeButton merge = new MergeButton();\n addObject(merge, 350, 20);\n \n //Create a Sort By Name button at the top of the screen\n SortByName sortName = new SortByName();\n addObject(sortName, 450, 20);\n \n //Create a Sort by queue length at the top of the screen\n SortByLength sortLength = new SortByLength();\n addObject(sortLength, 600, 20);\n \n\n }", "public static void main(String[] args) {\n World world = new World();\n Bug bug = new Bug();\n Bug bug2 = new Bug();\n Flower flower = new Flower();\n Flower flower2 = new Flower();\n Location location = new Location(3,4);\n \n Location location2 = world.getRandomEmptyLocation();\n Location left = location2.getAdjacentLocation(270);\n Location right = location2.getAdjacentLocation(90);\n\t world.show();\n\t world.add(left, flower);\n\t world.add(right, flower2);\n world.add(location,bug);\n world.add(location2,bug2);\n bug2.setColor(Color.BLUE);\n bug2.setDirection(90);\n for (int i = 0; i < world.getGrid().getNumCols()-1; i++) {\n\t\tfor (int j = 0; j <world.getGrid().getNumRows()-1 ; j++) {\n\t\tLocation current = new Location(i,j);\n\t\tworld.add(current, new Flower());\n\t\t}\n\t}\n\t}", "public lv3()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n //super(950, 600, 1); \n //prepare();\n prepare();\n stopped();\n started();\n }", "public VolcanoWorld() {\n this(DEFAULT_WIDTH, DEFAULT_HEIGHT);\n }", "public MineHard()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(16, 16, 32);\r\n addObject(new Person() , 1 , 14);\r\n addObject(new Rock() , 1 , 15);\r\n addObject(new Rock() , 8 , 15);\r\n addObject(new Rock() , 12 , 15);\r\n addObject(new Rock() , 5 , 14);\r\n addObject(new Rock() , 15 , 13);\r\n addObject(new Rock() , 9 , 13);\r\n addObject(new Rock() , 12 , 12);\r\n addObject(new Rock() , 10 , 11);\r\n addObject(new Rock() , 7 , 11);\r\n addObject(new Rock() , 2 , 11);\r\n addObject(new Rock() , 1 , 12);\r\n addObject(new Rock() , 15 , 10);\r\n addObject(new Rock() , 12 , 9);\r\n addObject(new Rock() , 4 , 9);\r\n addObject(new Rock() , 1 , 9);\r\n addObject(new Rock() , 11 , 8);\r\n addObject(new Rock() , 13 , 7);\r\n addObject(new Rock() , 10 , 7);\r\n addObject(new Rock() , 9 , 7);\r\n addObject(new Rock() , 8 , 7);\r\n addObject(new Rock() , 7 , 7);\r\n addObject(new Rock() , 2 , 6);\r\n addObject(new Rock() , 5 , 5);\r\n addObject(new Rock() , 12 , 5);\r\n addObject(new Rock() , 9 , 4);\r\n addObject(new Rock() , 13 , 2);\r\n addObject(new Rock() , 3 , 3);\r\n addObject(new Rock() , 4 , 2);\r\n addObject(new Rock() , 1 , 1);\r\n addObject(new Rock() , 9 , 1);\r\n addObject(new Rock() , 10 , 0);\r\n addObject(new Rock() , 0 , 0);\r\n addObject(new Rock() , 0 , 7);\r\n addObject(new Rock() , 5 , 0);\r\n addObject(new Rock() , 15 , 0);\r\n addObject(new Rock() , 15 , 8);\r\n \r\n addObject(new Goldbar() , 15 , 2);\r\n addObject(new Goldbar() , 12 , 8);\r\n addObject(new Goldbar() , 15 , 15);\r\n addObject(new Goldbar() , 3 , 2);\r\n addObject(new Goldbar() , 9 , 0);\r\n addObject(new Goldbar() , 2 , 9);\r\n \r\n addObject(new Zombie() , 13 , 13);\r\n addObject(new Zombie() , 12 , 6);\r\n addObject(new Zombie() , 6 , 0);\r\n addObject(new Zombie() , 1 , 4);\r\n addObject(new Zombie() , 7 , 9);\r\n addObject(new TryC() , 2 , 1);\r\n addObject(new MainMenu() , 12 , 1);\r\n }", "public static void main (String [] args)\n {\n\tWorld myWorld = new World (10, 10);\n\n\t// Create a red robot called \"Demo One\"\n\tRobot myRobot = new Robot (\"Demo One\", Color.RED);\n\tmyRobot.takeReallyBigSteps();\n\n\t// Add Demo to the world at position (0,0) facing South\n\tmyWorld.addRobot (myRobot, 0, 0, Direction.SOUTH);\n\n\t// Move and turn the robot\n\tmyRobot.move ();\n\tmyRobot.move ();\n\tmyRobot.move ();\n\tmyRobot.turnLeft ();\n\tmyRobot.move ();\n\tmyRobot.move ();\n\tmyRobot.turnRight ();\n\tmyRobot.move ();\n\tmyRobot.move ();\n\tmyRobot.move ();\n\n }", "public City() {\r\n\t\tthis.x = (int) (Math.random() * 200);\r\n\t\tthis.y = (int) (Math.random() * 200);\r\n\t}", "public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }", "public static void main(String args[]){\n Game game = new GameImpl(new TestFactory());\n WorldStrategy worldStrategy = new ThirdPartyWorldAdapter();\n worldStrategy.createWorld(game);\n\n // Print World as it is \"seen\" by the Game\n for ( int r = 0; r < GameConstants.WORLDSIZE; r++ ) {\n String line = \"\";\n for ( int c = 0; c < GameConstants.WORLDSIZE; c++ ) {\n String type = game.getTiles().get(new Position(r,c)).getTypeString();\n\n if (type.equals(GameConstants.OCEANS)){ line += '.';}\n if (type.equals(GameConstants.PLAINS)){ line += 'o';}\n if (type.equals(GameConstants.MOUNTAINS)){ line += 'M';}\n if (type.equals(GameConstants.FOREST)){ line += 'f';}\n if (type.equals(GameConstants.HILLS)){ line += 'h';}\n }\n System.out.println(line);\n }\n\n }", "WorldGenerator getForWorld(World world);", "public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n for( int i = 0; i < IMAGE_COUNT; i++)\n {\n images[i] = new GreenfootImage(\"frame_\" + i + \"_delay-0.06s.gif\");\n }\n \n setBackground(images [0]); \n \n }", "public Ship(int l){\n this.lifePoints=l;\n }", "public static void main(String[] args) {\n hello(\"Anna\");\n hello(\"Friend!\");\n\n int l = 6;\n int m = l * l;\n System.out.println(\"Ploschadj kvadrata so storonoj \" + l + \" = \" + m);\n\n Square s = new Square(5);\n //uzhe otdeljnoe opredelenie storony ne nuzhno, tak kak ispoljzuetsa konstruktor i teperj znachnija peredajutsa, kak parametry - s.l = 5;\n System.out.println(\"Ploschadj kvadrata so storonoj \" + s.l + \" = \" + s.area());\n\n Rectangle r = new Rectangle(6, 7);\n //r.a = 5;\n //r.b = 6;\n System.out.println(\"Ploschadj prjamougoljnika so storonami \" + r.a + \" i \"+ r.b + \" = \" + r.area());\n }", "public levelTwo()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n prepare();\n }", "public void newGameWorld()\r\n {\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n GameWorld gameWorld = new GameWorld();\r\n Greenfoot.setWorld(gameWorld);\r\n }", "public void setupWorld()\r\n\t{\r\n\t\t//build walls\r\n\t\twall1.add(new PointD(-500, 500));\r\n\t\twall1.add(new PointD(-490, 500));\r\n\t\twall1.add(new PointD(-490, -500));\r\n\t\twall1.add(new PointD(-500, -500));\r\n\r\n\t\twall2.add(new PointD(-500, 500));\r\n\t\twall2.add(new PointD(2000, 500));\r\n\t\twall2.add(new PointD(2000, 490));\r\n\t\twall2.add(new PointD(-500, 490));\r\n\t\t\r\n\t\twall3.add(new PointD(2000, 500));\r\n\t\twall3.add(new PointD(1990, 500));\r\n\t\twall3.add(new PointD(1990, -500));\r\n\t\twall3.add(new PointD(2000, -500));\r\n\r\n\t\twall4.add(new PointD(-500, -500));\r\n\t\twall4.add(new PointD(2000, -500));\r\n\t\twall4.add(new PointD(2000, -490));\r\n\t\twall4.add(new PointD(-500, -490));\r\n\r\n\t\tobjects.add(wall1);\r\n\t\tobjects.add(wall2);\r\n\t\tobjects.add(wall3);\r\n\t\tobjects.add(wall4);\r\n\t\t\r\n\t\t\r\n\t\t//add people\r\n\t\tGameVars.people = people;\r\n\t\tGameVars.aSquare = aSquare;\r\n\t\t\r\n\t\tobjects.add(grandson.boundary);\r\n\t\tpeople.add(grandson);\r\n\t\t\r\n\t\tobjects.add(son.boundary);\r\n\t\tpeople.add(son);\r\n\t\t\r\n\t\tobjects.add(triangle.boundary);\r\n\t\tpeople.add(triangle);\r\n\r\n\t\tobjects.add(wife.boundary);\r\n\t\tpeople.add(wife);\r\n\r\n\t\tobjects.add(runaway.boundary);\r\n\t\tpeople.add(runaway);\r\n\t\t\r\n\t\t\r\n\t\t//set aSquare's position\r\n\t\taSquare.rotate(220);\r\n\t\t\r\n\t}", "public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }", "@Override\n public void world() {\n super.world();\n }", "public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}", "public World(double width, double height) {\n this.width = width;\n this.height = height;\n\n\n shapes = new Shape[3]; // an array of references (change to non-zero size)\n // Create the actual Shape objects (sub types)\n // ....\n\n shapes[0] = new Line(50,100,50,50, Color.BLUE);\n shapes[1] = new Circle(75,75,30,Color.BLACK);\n shapes[2] = new Rectangle(40,50,40,40,Color.GREEN);\n\n\n }", "public static void main(String[] args) {\n\r\n House myHouse = new House(new Room(\"myBedroom\", 4, 2, false), 43);\r\n myHouse.wallsDetails();\r\n\r\n }", "private RandomLocationGen() {}", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }", "public Wall(float x, float y, float width, float height, World world)\n {\n super(x,y,width, height);\n this.world = world;\n }", "public static void setWorld(World aWorld)\r\n/* */ {\r\n\t \tlogger.info(count++ + \" About to setWotld : \" + \"Agent\");\r\n/* 43 */ \tworldForAgent = aWorld;\r\n/* */ }", "public void setWorld(World world) {\n this.world = world;\n }", "public static void main(String[] args) {\n\t\tJeloGuorl jg = new JeloGuorl(5);\n\t\t\n\t\t//JeloGuorl a = new JeloGuorl();\n\t\t//JeloGuorl b = new JeloGuorl(2);\n\t\tJeloGuorl c = new JeloGuorl(jg.s + \" Hello World\");\n\t}", "private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }", "public GameOfLifeTest()\n {\n }", "public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }", "public Bike createCityBike() {\n Wheels cityWheels = new Wheels(559,50f,10000); //Räder des Stadtrads erstellen\n Gears cityGears = new Gears(3,1,5000); //Gangschaltung des Stadtrads erstellen\n Bike newCityBike = new Bike(cityGears, cityWheels, \"Stahl\", \"CB105\", true, true, 30000); //Stadtrad erstellen\n return newCityBike; //Stadtrad zurückgeben\n}", "public RandomCoordinateWorldGenerator(int worldWidth, int worldHeight) {\n this.worldWidth = worldWidth;\n this.worldHeight = worldHeight;\n }", "public God() {}", "public House()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(480, 352, 1); \n addObject(new GravesHouse(),110,60);\n addObject(new Kid(),300,200);\n addObject(new Sofa(),190,270);\n addObject(new Piano(),275,100);\n }", "public Universe()\n\t{\n\t\tthis.dimension = 3;\n\t\tthis.particles = new ArrayList<Particle>();\n\t\tthis.timebase = DEF_TIMEBASE;\n\t}", "static void neighborhood()\r\n { \r\n // Puts the earth in a world and the three different color turtles in that world\r\n earth = new World();\r\n turtle1 = new Turtle(earth);\r\n turtle1.setColor(Color.BLUE);\r\n turtle2 = new Turtle(earth);\r\n turtle2.setColor(Color.RED);\r\n turtle3 = new Turtle(earth);\r\n turtle3.setColor(Color.GREEN);\r\n house(100, 100, turtle1);\r\n house(250, 100, turtle2);\r\n house(400, 100, turtle3);\r\n\r\n }", "public World(int width, int height, int maxRoomSize) {\r\n this.width = width;\r\n this.height = height;\r\n this.rooms = new ArrayList<>();\r\n this.characters = new ArrayList<>();\r\n this.bsp = new BSPTree(width, height, 24, maxRoomSize, 8);\r\n this.turn = 1;\r\n this.player = null;\r\n }", "@BeforeClass\n\tpublic static void setup() {\n\t\tbaseWorld = new BaseWorld(1000 ,1500);\n \tGameManager.get().setWorld(new BaseWorld(1000, 1500));\n\t}", "public static void main(String[] args) throws IOException {\n //Terrain \n \tterrain = LevelIO.load(new File(args[0]));\n World world = new World(terrain); \n \n // set parent for each object in world \n terrain.setParent(root);\n for (int i = 0; i < terrain.trees().size(); i++) // set each tree parent to root \n \tterrain.trees().get(i).setParent(root);\n for (int i = 0; i < terrain.roads().size(); i++) // set each road parent to root \n \tterrain.roads().get(i).setParent(root);\n \n //camera.getPerson().setTerrain(terrain);\n // person = new Person(root);\n //person = new Person(camera);\n //camera.addChild(person);\n world.start();\n }", "@Override\n\tpublic World getWorld() { return world; }", "private static void generateWorld(){\n for(int i = 0; i < SIZE*SIZE; i++){\n new Chunk();\n }\n }", "public static void main(String[] args) {\n\t Boy boy = new Boy(\"James\", \"男\", 36, 195,\"own\");\n\t// Wang wang = new Wang(1);\n\t System.out.println(boy.getX());\n\t System.out.println(boy.name);\n\t}", "public static void main(String[] args) {\n MarioGames smw = new MarioGames(\"Super Mario World\", 72, false);\n MarioGames sm64 = new MarioGames(\"Super Mario 64\", 120, true);\n // We can call functions just like before, but we have to \n // specify which instance we want to call the function on\n // In this case, we want to get the time for Super Mario World, so we\n // do smw.getTimeToComplete()\n smw.numberOfLevels = 12;\n System.out.println(smw.getTimeToComplete());\n }", "long getWorldid();", "long getWorldid();", "private GameWorld getGameWorld(){\n\t\tHashMap<String, Location> locations = new HashMap<String, Location>();\n\t\tHashMap<Avatar, Location> avatarLocations = new HashMap<Avatar, Location>();\n\t\tArrayList<Avatar> avatars = new ArrayList<Avatar>();\n\t\t\n\t\tLocation testLocation = new Location(\"Test Location\");\n\t\tAvatar testAvatar = new Avatar(\"Slim\", 1);\n\t\t\n\t\tlocations.put(\"testLocation\", testLocation);\n\t\tavatarLocations.put(testAvatar, testLocation);\n\t\tavatars.add(testAvatar);\n\t\t\n\t\treturn new GameWorld(locations, avatarLocations, avatars);\n\t}", "public static void main(String[] args) {\n\t\tPerson person=new Person();// 创建一个外部类对象\n\t\tperson.name=\"三\";\n\t\tperson.live=false;\n\t\tHeart heart=person.new Heart();\n\t\theart.jump();\n\t}" ]
[ "0.7869585", "0.75949997", "0.75927854", "0.745236", "0.7386166", "0.730855", "0.7275365", "0.7188638", "0.7128042", "0.7091683", "0.7089519", "0.70211446", "0.6983793", "0.696257", "0.6953506", "0.6948751", "0.6946784", "0.69301975", "0.6898479", "0.68926656", "0.68880117", "0.6849282", "0.67398095", "0.6719925", "0.6710228", "0.670993", "0.6636432", "0.6627852", "0.66158044", "0.6590917", "0.65685225", "0.6529404", "0.65217465", "0.651441", "0.651249", "0.6494703", "0.6483147", "0.6481552", "0.64745265", "0.6469663", "0.6458036", "0.64409333", "0.6408948", "0.6406578", "0.6401272", "0.6379837", "0.63722676", "0.6361946", "0.63547677", "0.6348054", "0.634651", "0.63448566", "0.63293666", "0.63282436", "0.63217264", "0.62896246", "0.6285985", "0.62716377", "0.626243", "0.62563413", "0.6214209", "0.62098116", "0.6200324", "0.61903393", "0.61890996", "0.61890763", "0.6188121", "0.6186233", "0.61819786", "0.61768395", "0.61713", "0.6150002", "0.6135646", "0.612976", "0.6115696", "0.61084044", "0.6099332", "0.60990494", "0.60944444", "0.60927373", "0.6085039", "0.6084222", "0.607997", "0.6078377", "0.60753363", "0.60672545", "0.60668725", "0.60612136", "0.60578203", "0.6057415", "0.6052788", "0.60410476", "0.60373664", "0.6034518", "0.60277396", "0.60193753", "0.59947526", "0.59928256", "0.59928256", "0.598201", "0.5950716" ]
0.0
-1
Method used for autograding and testing your code. The input string will be a series of characters (for example, "n123sswwdasdassadwas", "n123sss:q", "lwww". The engine should behave exactly as if the user typed these characters into the engine using interactWithKeyboard. Recall that strings ending in ":q" should cause the game to quite save. For example, if we do interactWithInputString("n123sss:q"), we expect the game to run the first 7 commands (n123sss) and then quit and save. If we then do interactWithInputString("l"), we should be back in the exact same state. In other words, both of these calls: interactWithInputString("n123sss:q") interactWithInputString("lww") should yield the exact same world state as: interactWithInputString("n123sssww")
public TETile[][] interactWithInputString(String input) { // passed in as an argument, and return a 2D tile representation of the // world that would have been drawn if the same inputs had been given // to interactWithKeyboard(). // // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface // that works for many different input types. //String seedstring = input.substring(1, input.length() - 1); if (input.substring(0,1).equals("n")) { String seed = ""; String movements = ""; for (int i = 0; i < input.length(); i++) { try { // I might be missing a step. int num = Integer.parseInt(input.substring(i, i + 1)); seed += input.substring(i, i + 1); } catch (Exception e) { if ((input.substring(i, i+1).equals(":")) && input.substring(i, i+2).equals(":q")) { System.out.println("saved"); saveEditor("seed", seed); saveEditor("movements", movements); break; } else if (input.substring(i, i + 1).equals("w") || input.substring(i, i + 1).equals("s") || input.substring(i, i + 1).equals("a") || input.substring(i, i + 1).equals("d")) { movements += input.substring(i, i + 1); } } } load_and_move(seed,movements); ter.renderFrame(this.tiles); return this.tiles; } else if(input.substring(0, 1).equals("l")) { File seed_file = new File("seed.txt"); File movements_file = new File("movements.txt"); String seed = loadEditor(seed_file); String movements = loadEditor(movements_file); this.rand = new Random(Long.parseLong(seed)); for (int i = 0; i < input.length(); i++) { if ((input.substring(i, i+1).equals(":")) && input.substring(i, i+2).equals(":q")) { System.out.println("saved"); saveEditor( "seed", seed); saveEditor("movements", movements); break; } else if (input.substring(i, i + 1).equals("w") || input.substring(i, i + 1).equals("s") || input.substring(i, i + 1).equals("a") || input.substring(i, i + 1).equals("d")) { movements += input.substring(i, i + 1); } } load_and_move(seed,movements); ter.renderFrame(this.tiles); return this.tiles; } else{ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TETile[][] interactWithInputString(String input) {\n // TODO: Fill out this method so that it run the engine using the input\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n \n TETile[][] WorldFrame = null;\n Interaction interact = null;\n input = input.toUpperCase();\n char firstLetter = input.charAt(0);\n int startIndex = 1;\n // get the seed or load the game\n switch (firstLetter) {\n case 'N':\n // get the seed\n int indexS = 0;\n for (int i = startIndex; i < input.length(); i++) {\n if (input.charAt(i) == 'S'){\n indexS = i;\n break;\n }\n }\n startIndex = 1;\n long seed = Long.valueOf(input.substring(startIndex, indexS));\n WorldFrame = WorldGenerator.generate(seed, WorldFrame, WIDTH, HEIGHT);\n interact = new Interaction(WorldFrame, seed);\n startIndex = indexS + 1;\n break;\n case 'L':\n interact = loadInteraction();\n startIndex = 1;\n break;\n default:\n System.exit(0);\n break;\n }\n System.out.println(\"here\");\n // start the interaction\n interact.initialize();\n char preKey = ',';\n for (int i = startIndex; i < input.length(); i++) {\n char key = input.charAt(i);\n if ((\"\" + preKey + key).toUpperCase().equals(\":Q\")) {\n saveInteraction(interact);\n System.exit(0);\n return interact.getTiles();\n }\n if (\"WSAD\".contains((\"\" + key).toUpperCase())) {\n interact.move((\"\" + key).toUpperCase());\n }\n preKey = key;\n interact.show();\n }\n return interact.getTiles();\n }", "public TETile[][] interactWithInputString(String input) {\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n// TERenderer ter = new TERenderer();\n// ter.initialize(WIDTH, HEIGHT);\n//\n// Long result = Long.parseLong(input);\n// long seed = result;\n// GameWorld world = new GameWorld(seed);\n// for (int x = 0; x < WIDTH; x += 1) {\n// for (int y = 0; y < HEIGHT; y += 1) {\n// world.world[x][y] = Tileset.NOTHING;\n// }\n// }\n// world.buildManyRandomSq();\n//// ter.renderFrame(world.world);\n// return world.world;\n return takeActionIS(input);\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to interactWithKeyboard().\n //\n // See proj3.byow.InputDemo for a demo of how you can make a nice clean interface\n // that works for many different input types.\n// TERenderer ter = new TERenderer();\n// ter.initialize(WIDTH, HEIGHT);\n// String str = input;\n// String[] arrofString = str.split(\"\", input.length());\n// String num = \"\";\n// for (int i = 0; i < arrofString.length; i++) {\n// if ((i == 0 && arrofString[i].equals(\"N\") || arrofString[i].equals(\"n\"))) {\n// continue;\n// } else if (i == arrofString.length - 1) {\n// if (arrofString[i].equals(\"S\") || arrofString[i].equals(\"s\")) {\n// continue;\n// }\n// } else {\n// num += arrofString[i];\n// }\n// }\n//\n// Long result = Long.parseLong(num);\n// long seed = result;\n// GameWorld world = new GameWorld(seed);\n// for (int x = 0; x < WIDTH; x += 1) {\n// for (int y = 0; y < HEIGHT; y += 1) {\n// world.world[x][y] = Tileset.NOTHING;\n// }\n// }\n// world.buildManyRandomSq();\n//// ter.renderFrame(world.world);\n// return world.world;\n\n }", "public int cmd_string(String input) {\n\t\tif (current_state == LEARN) {\r\n\t\t\t// By this point learn has hopefully been told its parent and how to send...\r\n\t\t\tcurrent_state = learningProgram.cmd_string(input);\r\n\t\t}\r\n\r\n\t\t// If we are still exploring the root menu...\r\n\t\tif (current_state == ROOT_MENU) {\r\n//\t\t\tSystem.out.print(\"\\\"\"+input+\"\\\" \\\"\"+Integer.toString(LEARN)+\"\\\"\\n\");\r\n\t\t\tif (input.equals(Integer.toString(LEARN))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tsendOutput(\"You have chosen to learn!\");\r\n\t\t\t\tlearningProgram.printMenu();\r\n\t\t\t\tcurrent_state = LEARN;\r\n\t\t\t\tmessage = null;\r\n\t\t\t} else if (input.equals(Integer.toString(GAME))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tif (gameProgram == null) {\r\n\t\t\t\t\tgameProgram = new GameProgram(this);\r\n\t\t\t\t\tSystem.out.println(\"New game created: \" + gameProgram);\r\n\t\t\t\t}\r\n//\t\t\t\tsend(\"You have chosen to play a game!\");\r\n\t\t\t\t// String newString = new String();\r\n\t\t\t\t// send(Integer.toString(newString.length()));\r\n\t\t\t\tsendOutput(gameProgram.getBoardString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(\"Score: \" + gameProgram.getScoreString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(gameProgram.getControlString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(gameProgram.getKeyString());\r\n\t\t\t\tcurrent_state = GAME;\r\n\t\t\t\tmessage = null;\r\n\t\t\t} else if (input.equals(Integer.toString(EXIT))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tsendOutput(\"You have chosen to quit!\");\r\n\t\t\t\tcurrent_state = EXIT;\r\n\t\t\t\tmessage = null;\r\n\t\t\t\t// Signal to quit\r\n\t\t\t\tinputSource.fireInputEvent(new InputEvent(this, \"quit\", InputEvent.SIGNAL));\r\n//\t\t\t\tmyFrame.quit();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (current_state == ROOT_MENU) {\r\n\t\t\tclearTerminal();\r\n\t\t\tif (message != null) {\r\n\t\t\t\tsendOutput(message);\r\n//\t\t\t\tmessage = null;\r\n\t\t\t}\r\n\t\t\tsendOutput(splashString);\r\n\r\n\t\t\tsendOutput(\"Version \" + versionNum);\r\n\t\t\tsendOutput(\"by \" + author);\r\n\r\n//\t\t\tsend(\"Main menu\");\r\n\t\t\tthis.printMenu();\r\n\t\t}\r\n\r\n\t\tif (current_state == EXIT) {\r\n\t\t\treturn this.EXIT;\r\n\t\t}\r\n\r\n\t\treturn this.ROOT_MENU;\r\n\r\n\t}", "private String stringKeyBoardInput() {\n\t\tString input = \"\";\n\t\tboolean tryAgain = true;\n\t\twhile (tryAgain) {\n\t\t\ttry {\n\t\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t\tinput = scanner.nextLine();\n\t\t\t\ttryAgain = false;\n\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}", "public static String inputStringFromKeyboard(String input){\n System.out.println(\"Input the String: \");\n //Scanner, save the inputted from keyboard\n Scanner scanner = new Scanner(System.in);\n //The value 'scanner' is assigned to 'input'\n input = scanner.next();\n return input;\n }", "public TETile[][] interactWithInputString(String input) {\n makeWorld();\n if (checkForLoad(input)) {\n String i = loadWorld();\n if (i.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n i = i.substring(1);\n\n }\n interactWithInputString(i + input.substring(1));\n } else {\n //inputSeed = input;\n\n String seed = input.substring(1, input.indexOf('s'));\n Long seedVal = Long.parseLong(seed);\n String commands = input.substring(input.indexOf('s') + 1);\n Random r = new Random(seedVal);\n int numOfRooms = r.nextInt(7 * HEIGHT / 8) + 1;\n create(numOfRooms, r);\n createWalls();\n world[listOfRooms.get(0).p.x + ((listOfRooms.get(0).width) / 2)][listOfRooms.get(0).p.y\n + ((listOfRooms.get(0).height) / 2)] = Tileset.AVATAR;\n //world[listOfRooms.get(listOfRooms.size() - 1).p.x]\n // [listOfRooms.get(listOfRooms.size() - 1).p.y] = Tileset.FLOWER;\n avatarLocation = new Point((listOfRooms.get(0).p.x + ((listOfRooms.get(0).width) / 2)),\n listOfRooms.get(0).p.y + ((listOfRooms.get(0).height) / 2));\n //flowerLocation = new Point(listOfRooms.get(listOfRooms.size() - 1).p.x,\n // listOfRooms.get(listOfRooms.size() - 1).p.y);\n moveCharacters(commands);\n if (floorTile == Tileset.GRASS) {\n input = 'k' + input;\n }\n saveWorld(input);\n }\n return world;\n }", "public void interactWithKeyboard() {\n StdDraw.setCanvasSize(WIDTH * 16, HEIGHT * 16);\n StdDraw.setXscale(0, WIDTH);\n StdDraw.setYscale(0, HEIGHT);\n createMenu();\n StdDraw.enableDoubleBuffering();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char input = Character.toUpperCase(StdDraw.nextKeyTyped());\n if (input == 'v' || input == 'V') {\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char next = StdDraw.nextKeyTyped();\n if (next == '#') {\n createMenu();\n break;\n } else {\n name += next;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n }\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1);\n interactWithInputString(toInsert);\n ter.renderFrame(world);\n startCommands();\n }\n if (input == 'n' || input == 'N') {\n toInsert += 'n';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n while (true) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n char c = StdDraw.nextKeyTyped();\n if (c == 's' || c == 'S') {\n toInsert += 's';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show(); interactWithInputString(toInsert);\n ter.renderFrame(world); mouseLocation(); startCommands();\n break;\n }\n if (c != 'n' || c != 'N') {\n toInsert += c;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1); interactWithInputString(toInsert);\n ter.renderFrame(world); startCommands();\n }\n }\n }\n }", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "String consoleInput();", "private static String inputString() {\n Scanner userInput = new Scanner(System.in);\n System.out.print(\"Insert text: \");\n String inputText = userInput.nextLine();\n return inputText;\n }", "public void interactWithKeyboard() {\n renderMenu();\n Interaction interact = null;\n // open from the menu\n boolean wait = true;\n while (wait) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n String c = (\"\" + StdDraw.nextKeyTyped()).toUpperCase();\n System.out.println(c);\n switch (c) {\n case \"N\":\n // get the seed\n renderTypeString();\n long seed = getSeed();\n TETile[][] WorldFrame = null;\n WorldFrame = WorldGenerator.generate(seed, WorldFrame, WIDTH, HEIGHT);\n interact = new Interaction(WorldFrame, seed);\n wait = false;\n break;\n case \"L\":\n interact = loadInteraction();\n wait = false;\n break;\n case \"Q\":\n System.exit(0);\n break;\n default:\n System.exit(0);\n break;\n }\n }\n // start to play\n interact.initialize();\n char preKey = ',';\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char key = StdDraw.nextKeyTyped();\n // if a user enter ':' then 'Q', then save and exit the game\n if ((\"\" + preKey + key).toUpperCase().equals(\":Q\")) {\n saveInteraction(interact);\n System.exit(0);\n }\n // in case the player enter something else\n if (\"WSAD\".contains((\"\" + key).toUpperCase())) {\n interact.move((\"\" + key).toUpperCase());\n }\n preKey = key;\n }\n interact.show();\n }\n }", "public static void main(String[] args) {\n char option;\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Welcome to MG's adventure world. Now your journey begins. Good luck!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n String input = getInput(scan, \"Cc\");\n System.out.println(\"You are in a dead valley.\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You walked and walked and walked and you saw a cave!\");\n cave();\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You entered a cave!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"Unfortunately, you ran into a GIANT!\");\n giant();\n System.out.println(\"Enter 'A' or 'a' to Attack, 'E' or 'E' to Escape, ANYTHING else is to YIELD\");\n input = getInput(scan, \"AaEe\", 10);\n System.out.println(\"Congratulations! You SURVIVED! Get your REWARD!\");\n System.out.println(\"There are three 3 tressure box in front of you! Enter the box number you want to open!\");\n box();\n input = getInput(scan);\n System.out.println(\"Hero! Have a good day!\");\n }", "String userInput(String question);", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "String getUserInput();", "public void setInputString(String inputString) {\r\n if (input != null) {\r\n throw new BuildException(\"The \\\"input\\\" and \\\"inputstring\\\" \" + \"attributes cannot both be specified\");\r\n }\r\n this.inputString = inputString;\r\n incompatibleWithSpawn = true;\r\n }", "private String edit(String input_from_user, char[] input_array) {\n\t\tSystem.out.println(\"Enter the number of positions you want to change the string\"+input_from_user);\n\t\tint user_input = in.nextInt();\n\t\tString result = null;\n\t\tfor(int i=0; i <user_input; i++){\n\t\t\tSystem.out.println(\"Enter the\"+i+\"th to edit in the \"+input_from_user +\" string\");\n\t\t\tSystem.out.println(\"Position?\");\n\t\t\tint pos = in.nextInt();\n\t\t\tchar input_char = in.next().charAt(0);\n\t\t\tchar get_user_char = input_array[pos];\n\t\t\tinput_from_user = input_from_user.replace(get_user_char, input_char);\n\t\t}\n\t\treturn input_from_user;\n\t}", "String getInput();", "public void setInput(String input) { this.input = input; }", "public void setInput(String input);", "public void interactWithKeyboard() {\n initialize_frame();\n InputSource inputSource = new KeyboardInputSource();\n char c = inputSource.getNextKey();\n while(inputSource.possibleNextInput() && c != 'Q') {\n if (c == 'N') {\n // instructions_page();\n draw_frame_seed();\n start_game(\"New\");\n break;\n } else if (c == 'L') {\n File seed = new File(\"seed.txt\");\n File directions = new File(\"movements.txt\");\n String old_seed = loadEditor(seed);\n String old_directions = loadEditor(directions);\n load_and_move(old_seed, old_directions);\n start_game(\"Load\");\n } else if (c == 'I') {\n instructions_page();\n if (inputSource.getNextKey() == 'B') {\n interactWithKeyboard();\n }\n }\n }\n\n }", "public void move(String input){\n for (int i = 0; i < input.length(); i++){\n if (input.charAt(i) == 'w'){\n if (moveY(-1)){\n moves--;\n }\n }\n else if (input.charAt(i) == 'a'){\n if (moveX(-1)){\n moves--;\n }\n }\n else if (input.charAt(i) == 's'){\n if (moveY(1)){\n moves--;\n }\n }\n else if (input.charAt(i) == 'd'){\n if (moveX(1)){\n moves--;\n }\n }\n }\n }", "public void input() {\n \n \t\tboolean aPressed = Keyboard.isKeyDown(Keyboard.KEY_A);\n \t\tboolean dPressed = Keyboard.isKeyDown(Keyboard.KEY_D);\n \t\tboolean wPressed = Keyboard.isKeyDown(Keyboard.KEY_W);\n \t\tboolean sPressed = Keyboard.isKeyDown(Keyboard.KEY_S);\n \n \t\tif ((aPressed) && (!dPressed)) {\n \t\t\ttryToMove(Keyboard.KEY_A);\n \t\t} else if ((dPressed) && (!aPressed)) {\n \t\t\ttryToMove(Keyboard.KEY_D);\n \t\t} else if ((wPressed) && (!sPressed)) {\n \t\t\ttryToMove(Keyboard.KEY_W);\n \t\t} else if ((sPressed) && (!wPressed)) {\n \t\t\ttryToMove(Keyboard.KEY_S);\n \t\t}\n \t}", "public static String getUserInput() {\n\t\tif (testType == null) {\n\t\t\tuserInput = inputScanner.nextLine();\n\t\t} else if (testType.equalsIgnoreCase(\"makeReady\")) {\n\t\t\tcreateEnterTestSet();\n\t\t\tif (enterTestCount < enterCount)\n\t\t\t\tuserInput = (String) makeReadyEnters.get(enterTestCount++);\n\t\t}else if (testType.equalsIgnoreCase(\"sequenceTest\")) {\n\t\t\tcreateWrongSequenceTestSet();\n\t\t\tif (sequenceTestCount<wrongSeqCount)\n\t\t\t\tuserInput = (String) wrongSequenceAnswers.get(sequenceTestCount++);\n\t\t}\n\t\telse if (testType.equalsIgnoreCase(\"randomKeyPress\")) {\n\t\t\tcreatePlayfulSet();\n\t\t\tif (randomTestCount<randomCount)\n\t\t\t\tuserInput = (String) randomKeys.get(randomTestCount++);\n\t\t}\n\n\t\treturn userInput;\n\t}", "void onInput(Terminal terminal, int numChars, String current);", "public void run() {\n Scanner reader = new Scanner(System.in);\n char input = reader.next().charAt(0);\n if(input == 'w'){\n robotMovement.forward();\n }\n else if(input == 's') {\n robotMovement.backward();\n }\n else if(input == 'a') {\n robotMovement.left();\n }\n else if(input == 'd') {\n robotMovement.right();\n }\n else {\n robotMovement.stop();\n }\n }", "public void parseInput(String s){\n\t\tif((sentence[counter]+\" \").contains(s)){\n\t\t\tString setTextStringAfterColor=\"\";\n\t\t\t\n\t\t\t//Logic for user that fixed mistake\n\t\t\tfor(int i=counter;i<sentence.length;i++){\n\t\t\t\tsetTextString+=sentence[i]+\" \";\n\t\t\t}\n\t\t\tfor(int i=counter+1;i<sentence.length;i++){\n\t\t\t\tsetTextStringAfterColor+=sentence[i]+\" \";\n\t\t\t}\n\t\t\tif(sentence.length-counter==1){\n\t\t\t\tprompt.getText().clear();\n\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\" -- Press Space to Submit</font>\"));\n\t\t\t}\n\t\t\telse if((sentence.length-counter>1)){\n\t\t\t\tprompt.getText().clear();\n\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\"</font> \"+setTextStringAfterColor));\n\t\t\t}\n\t\t\t\n\t\t\t//User submits correct word\n\t\t\tif(s.contains(\" \")&&!(s.equals(null)||s.equals(\" \"))){\n\t\t\t\tcounter++;\n\t\t\t\tfloat now = ((float)counter/(float)sentence.length);\n\t\t\t\tfloat before = (((float)counter-1)/(float)sentence.length);\n\t\t\t\tif (before<0){\n\t\t\t\t\tbefore=0;\n\t\t\t\t}\n\t\t\t\tif (now<0){\n\t\t\t\t\tnow=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Character animation\n\t\t\t\tTranslateAnimation moveLefttoRight = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, before, Animation.RELATIVE_TO_PARENT, now, Animation.RELATIVE_TO_PARENT, 0, Animation.RELATIVE_TO_PARENT, 0);\n\t\t\t moveLefttoRight.setDuration(1000);\n\t\t\t moveLefttoRight.setFillAfter(true);\t\n\t\t\t movingimage.startAnimation(moveLefttoRight);\n\t\t\t\t\n\t\t\t\tcorrectWords++;\n\t\t\t\tuser.increment(\"tokenCount\");\n\t\t\t\tsetTextString=\"\";\n\t\t\t\tsetTextStringAfterColor=\"\";\n\t\t\t\twords.setText((int)correctWords+\" Words\");\n\t\t\t\t//Toast.makeText(Race.this, (user.getInt(\"tokenCount\"))+\"\", Toast.LENGTH_SHORT).show();\n\t\t\t\ttokens.setText(user.getInt(\"tokenCount\")+\"\");\n\t\t\t\tdouble wps = (correctWords/elapsedseconds);\n\t\t\t\twpmcount = (int)(wps*60);\n\t\t\t\tif (wpmcount<150){\n\t\t\t\t\twpm.setText(wpmcount+\" WPM\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\twpm.setText(\"Max WPM\");\n\t\t\t\t}\n\t\t\t\tfor(int i=counter;i<sentence.length;i++){\n\t\t\t\t\tsetTextString+=sentence[i]+\" \";\n\t\t\t\t}\n\t\t\t\tfor(int i=counter+1;i<sentence.length;i++){\n\t\t\t\t\tsetTextStringAfterColor+=sentence[i]+\" \";\n\t\t\t\t}\n\t\t\t\tif(sentence.length-counter==1){\n\t\t\t\t\tprompt.getText().clear();\n\t\t\t\t\tinput.getText().clear();\n\t\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\" -- Press Space to Submit</font>\"));\n\t\t\t\t}\n\t\t\t\telse if((sentence.length-counter>1)){\n\t\t\t\t\tprompt.getText().clear();\n\t\t\t\t\tinput.getText().clear();\n\t\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\"</font> \"+setTextStringAfterColor));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttimerHandler.removeCallbacks(timerRunnable);\n\t\t\t\t\tIntent results = new Intent(Race.this, Results.class);\n\t\t\t\t\t\tresults.putExtra(\"level\",level);\n\t\t \t\tresults.putExtra(\"words\", (int)correctWords);\n\t\t \t\tresults.putExtra(\"wpm\", wpmcount);\n\t \tstartActivity(results);\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t//If word user typing is wrong\n\t\telse{\n\t\t\tString setTextStringAfterError=\"\";\n\t\t\tfor(int i=counter;i<sentence.length;i++){\n\t\t\t\tsetTextString+=sentence[i]+\" \";\n\t\t\t}\n\t\t\tfor(int i=counter+1;i<sentence.length;i++){\n\t\t\t\tsetTextStringAfterError+=sentence[i]+\" \";\n\t\t\t}\n\t\t\tif(sentence.length-counter==1){\n\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#ff0000'> \"+setTextString.split(\" \")[0].trim()+\" -- Press Space to Submit</font>\"));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#ff0000'> \"+setTextString.split(\" \")[0].trim()+\"</font> \"+setTextStringAfterError));\n\t\t\t}\n\t\t//If user submits, vibrate and refresh input box\n\t\t\tif(s.contains(\" \")){\n\t\t\t\tVibrator v = (Vibrator) this.getSystemService(Context.VIBRATOR_SERVICE);\n\t\t\t\t v.vibrate(500);\n\t\t\t\tif(sentence.length-counter==1){\n\t\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\" -- Press Space to Submit</font>\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tprompt.setText(Html.fromHtml(\"<font color='#0000ff'> \"+setTextString.split(\" \")[0].trim()+\"</font> \"+setTextStringAfterError));\n\t\t\t\t}\n\t\t\t\tinput.getText().clear();\n\t\t\t}\n\t\t}\n\t}", "public void Turn(String string){\r\n\t\t// if up or down is pressed, pacman will only turn if x position is divisibe by interval of blocks\r\n\t\tif(string.equals(\"up\")||string.equals(\"down\")){\r\n\t\t\twhile(pacman.xpos % interval != 0 || checkWallCollision(string)){\r\n\t\t\t\tif(!checkWallCollision()){\r\n\t\t\t\t\tpacman.move();\r\n\t\t\t\t\tchangeIcon();\r\n\t\t\t\t\tcheckGame();\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(10);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t//keep ghosts moving when an arrow key is pressed \r\n\t\t\t\tpacmansprite.setLocation(pacman.xpos, pacman.ypos);\r\n\t\t\t\tcheckFoodCollision();\r\n\t\t\t\tcheckGame();\r\n\t\t\t\tg1.move();\r\n\t\t\t\tg2.move();\r\n\t\t\t\tg3.move();\r\n\t\t\t\tg1.sprite.setLocation(g1.xpos, g1.ypos);\r\n\t\t\t\tg2.sprite.setLocation(g2.xpos, g2.ypos);\r\n\t\t\t\tg3.sprite.setLocation(g3.xpos, g3.ypos);\r\n\t\t\t}\r\n\t\t\tpacman.setdirection(string);\r\n\t\t}\r\n\t\t// if left or right is pressed, pacman will only turn if y position is divisibe by interval of blocks\r\n\t\telse if(string.equals(\"right\")||string.equals(\"left\")){\r\n\t\t\twhile(pacman.ypos % interval != 0 || checkWallCollision(string)){\r\n\t\t\t\tif(!checkWallCollision()){\r\n\t\t\t\t\tpacman.move();\r\n\t\t\t\t\tchangeIcon();\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(10);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tpacmansprite.setLocation(pacman.xpos, pacman.ypos);\r\n\t\t\t\tcheckFoodCollision();\r\n\t\t\t\tcheckGame();\r\n\t\t\t\tg1.move();\r\n\t\t\t\tg2.move();\r\n\t\t\t\tg3.move();\r\n\t\t\t\tg1.sprite.setLocation(g1.xpos, g1.ypos);\r\n\t\t\t\tg2.sprite.setLocation(g2.xpos, g2.ypos);\r\n\t\t\t\tg3.sprite.setLocation(g3.xpos, g3.ypos);\r\n\t\t\t}\r\n\t\t\tpacman.setdirection(string);\r\n\t\t}\r\n\t}", "private static void displayString () {\n Scanner userInput = new Scanner(System.in);\n String a = inputString();\n System.out.print(\"Insert string to test: \");\n String b = userInput.nextLine();\n System.out.println(a.endsWith(b));\n }", "public void parseInput(Map gameMap, Player player) {\n String[] splitInput = playerInput.split(\" \", 0); // Splits the input into an action and an object.\n String action; // Stores the action that the user input\n String predic; // Stores the predicate of the input\n String object; // Stores the object to do action on of the input\n String object2; // Stores extra words from the input\n String ANSI_RED = \"\\u001B[31m\"; // Red text color\n String ANSI_BLUE = \"\\u001B[34m\"; // Blue text color\n prevInputs.add(splitInput);\n\n // Parses single word inputs\n // Stores the action of the input\n if (splitInput.length == 1) {\n action = splitInput[0];\n switch (action.toLowerCase()) {\n case \"cheat\":\n System.out.println(player.getHint());\n break;\n case \"superbrief\":\n System.out.println(\"Dialogue length set to superbrief.\");\n player.changeDialogueState(\"superbrief\");\n break;\n case \"brief\":\n System.out.println(\"Dialogue length set to brief.\");\n player.changeDialogueState(\"brief\");\n break;\n case \"verbose\":\n System.out.println(\"Dialogue length set to verbose.\");\n player.changeDialogueState(\"verbose\");\n break;\n case \"autoplay\":\n case \"auto\":\n System.out.println(\"Turning on autoplay.\");\n player.changeDialogueState(\"autoplay\");\n break;\n case \"again\":\n case \"g\":\n prevInputs.remove(splitInput);\n playerInput = \"\";\n for (int i = 0; i < prevInputs.get(prevInputs.size() - 1).length; i++) {\n playerInput = playerInput.concat(prevInputs.get(prevInputs.size() - 1)[i]);\n playerInput = playerInput.concat(\" \");\n }\n parseInput(gameMap, player);\n return;\n case \"i\":\n case \"inventory\":\n case \"inv\":\n player.getInventory();\n break;\n case \"look\":\n case \"l\":\n player.checkArea();\n player.incrementTurn();\n break;\n case \"equipment\":\n player.getEquipment();\n break;\n case \"diagnose\":\n player.diagnose();\n player.incrementTurn();\n break;\n case \"hi\":\n case \"hello\":\n System.out.println(\"You said 'Hello'\");\n player.incrementTurn();\n break;\n case \"jump\":\n System.out.println(\"For whatever reason, you jumped in place.\");\n player.incrementTurn();\n break;\n case \"walk\":\n System.out.println(\"You walked around the area but you've already seen everything.\");\n player.incrementTurn();\n break;\n case \"save\":\n System.out.println(\"Saving Game...\");\n try {\n TimeUnit.SECONDS.sleep(1);\n }\n catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n player.save();\n break;\n case \"restore\":\n System.out.println(\"Loading Game...\");\n try {\n TimeUnit.SECONDS.sleep(1);\n }\n catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n player.load(gameMap);\n player.checkArea();\n break;\n case \"restart\":\n player.setHealth(0);\n break;\n case \"status\":\n player.getStatus();\n break;\n case \"score\":\n System.out.println(\"SCORE: \" + player.getScore());\n break;\n case \"quit\":\n case \"q\":\n System.out.print(\"Thank you for playing!\");\n System.exit(0);\n case \"wait\":\n case \"z\":\n case \"stay\":\n System.out.println(\"You stood in place.\");\n player.incrementTurn();\n break;\n case \"north\":\n case \"south\":\n case \"east\":\n case \"west\":\n case \"northeast\":\n case \"northwest\":\n case \"southeast\":\n case \"southwest\":\n case \"n\":\n case \"s\":\n case \"e\":\n case \"w\":\n case \"ne\":\n case \"nw\":\n case \"se\":\n case \"sw\":\n if (player.getLocation().getConnectedRoom(action.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(action.toLowerCase()));\n player.incrementTurn();\n break;\n case \"version\":\n System.out.println(\"Version: \" + VERSION);\n return;\n default:\n System.out.println(\"Invalid Command\");\n return;\n }\n }\n\n // Parses two word inputs\n if (splitInput.length == 2) {\n action = splitInput[0]; // Stores the action that the user inputs\n object = splitInput[1]; // Stores the object that the user inputs\n switch (action.toLowerCase()) {\n case \"attack\":\n if (player.getLocation().isCharaInRoom(object.toUpperCase())) {\n player.attack(player.getLocation().getChara(object.toUpperCase()));\n }\n else {\n System.out.println(\"There is no \" + ANSI_RED + object.toLowerCase() + ANSI_RESET + \" here.\");\n }\n player.incrementTurn();\n break;\n case \"go\":\n if (player.getLocation().getConnectedRoom(object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(object.toLowerCase()));\n else\n System.out.println(\"There is nothing in that direction.\");\n player.incrementTurn();\n break;\n case \"enter\":\n case \"exit\":\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()));\n player.incrementTurn();\n break;\n case \"break\":\n if (player.getLocation().getConnectedRoom(object.toLowerCase()) != null) {\n if (player.getLocation().getConnectedRoom(object.toLowerCase()).getLocked()) {\n player.getLocation().getConnectedRoom(object.toLowerCase()).unlock();\n System.out.println(\"You broke down the door.\");\n } else\n System.out.println(\"There is nothing to break down.\");\n }\n else\n System.out.println(\"There is nothing to break down.\");\n player.incrementTurn();\n break;\n case \"equip\":\n player.equipFromInv(object.toUpperCase());\n player.incrementTurn();\n break;\n case \"unequip\":\n player.equipToInv(object.toUpperCase());\n player.incrementTurn();\n break;\n case \"examine\":\n if (player.inInventory(object.toUpperCase()))\n player.examineInv(player.getItem(object.toUpperCase()));\n else if (player.inEquip(object.toUpperCase()))\n player.examineInv(player.getEquip(object.toUpperCase()));\n else\n System.out.println(\"You do not have: \" + ANSI_BLUE + object.toUpperCase() + ANSI_RESET);\n break;\n case \"read\":\n if (player.inInventory(object.toUpperCase()))\n player.examineInv(player.getItem(object.toUpperCase()));\n else\n System.out.println(\"You do not have: \" + ANSI_BLUE + object.toUpperCase() + ANSI_RESET);\n break;\n case \"get\":\n case \"take\":\n if (player.getLocation().isObjInRoom(object.toUpperCase())) {\n ZorkObj zorkObj = player.getLocation().getObj(object.toUpperCase());\n if (player.checkWeight(zorkObj))\n player.addItemToInventory(zorkObj);\n else {\n System.out.println(ANSI_BLUE + zorkObj.getName() + ANSI_RESET + \" is too heavy to pick up.\");\n player.getLocation().addObject(zorkObj);\n }\n }\n else if (object.toLowerCase().equals(\"all\")) {\n int objectsInRoom = player.getLocation().getObjLength();\n\n if (objectsInRoom == 0)\n System.out.println(\"There are no items in this room.\");\n\n for (int i = 0; i < objectsInRoom; i++) {\n ZorkObj zorkObj = player.getLocation().getObj();\n if (player.checkWeight(zorkObj) && player.checkInvSize()){\n player.addItemToInventory(zorkObj);\n }\n else if (!player.checkInvSize()) {\n System.out.println(\"Your inventory is too full.\");\n player.getLocation().addObject(zorkObj);\n }\n else {\n System.out.println(ANSI_BLUE + zorkObj.getName() + ANSI_RESET + \" is too heavy to pick up.\");\n player.getLocation().addObject(zorkObj);\n }\n }\n }\n else\n System.out.println(\"There is no item named \" + ANSI_BLUE + object + ANSI_RESET + \" in this area.\");\n player.incrementTurn();\n break;\n case \"drop\":\n player.removeItemFromChara(object.toUpperCase());\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command\");\n return;\n }\n }\n\n else if (splitInput.length == 3) {\n action = splitInput[0]; // Stores the action that the user inputs\n predic = splitInput[1]; // Stores the predicate of the input\n object = splitInput[2]; // Stores the object that the user inputs\n switch (action.toLowerCase()) {\n case \"attack\":\n if (player.getLocation().isCharaInRoom((predic + \" \" + object).toUpperCase())) {\n player.attack(player.getLocation().getChara((predic + \" \" + object).toUpperCase()));\n }\n else {\n System.out.println(\"There is no \" + ANSI_RED + (predic + \" \" + object).toLowerCase() + ANSI_RESET + \" here.\");\n }\n player.incrementTurn();\n break;\n case \"go\":\n switch (predic.toLowerCase()) {\n case \"down\":\n case \"up\":\n case \"in\":\n case \"out\":\n if (player.getLocation().getConnectedRoom(predic.toLowerCase(), object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(predic.toLowerCase(), object.toLowerCase()));\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command.\");\n break;\n }\n break;\n case \"look\":\n switch (predic.toLowerCase()) {\n case \"inside\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getInsideDesc());\n else if(player.getLocation().isCharaInRoom((object).toUpperCase()))\n System.out.println(player.getLocation().getChara((object).toUpperCase()).getInsideDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"under\":\n case \"below\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getUnderDesc());\n else if(player.getLocation().isCharaInRoom((object).toUpperCase()))\n System.out.println(player.getLocation().getChara((object).toUpperCase()).getUnderDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"behind\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getBehindDesc());\n else if(player.getLocation().isCharaInRoom((object).toUpperCase()))\n System.out.println(player.getLocation().getChara((object).toUpperCase()).getBehindDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"through\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getThroughDesc());\n else if(player.getLocation().isCharaInRoom((object).toUpperCase()))\n System.out.println(player.getLocation().getChara((object).toUpperCase()).getThroughDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"at\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getDescription());\n else if (player.getLocation().isCharaInRoom(object.toUpperCase()))\n player.examineChara(player.getLocation().getChara(object.toUpperCase()));\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command.\");\n return;\n }\n break;\n case \"talk\":\n case \"speak\":\n if (\"to\".equals(predic)) {\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getDialogue());\n else if (player.getLocation().isCharaInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getChara(object.toUpperCase()).getDialogue());\n else\n System.out.println(\"There is nothing to talk to.\");\n player.incrementTurn();\n } else {\n System.out.println(\"Invalid Command.\");\n }\n break;\n case \"in\":\n case \"enter\":\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()));\n else\n System.out.println(\"There is nothing to enter.\");\n player.incrementTurn();\n break;\n case \"out\":\n case \"exit\":\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()));\n else\n System.out.println(\"There is nothing to exit.\");\n player.incrementTurn();\n break;\n case \"get\":\n case \"take\":\n if (predic.toLowerCase().equals(\"off\")) {\n player.equipToInv(object.toUpperCase());\n player.incrementTurn();\n break;\n }\n else if (player.getLocation().getObj((predic + object).toUpperCase()) != null) {\n player.addItemToInventory(player.getLocation().getObj((predic + object).toUpperCase()));\n System.out.println(\"You have picked up: \" + predic + \" \" + object);\n }\n else\n System.out.println(\"There is no item named \" + predic + \" \" + object + \" in this area.\");\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command\");\n return;\n }\n }\n\n else if (splitInput.length == 4) {\n action = splitInput[0]; // Stores the action that the user inputs\n predic = splitInput[1]; // Stores the predicate of the input\n object = splitInput[2]; // Stores the object that the user inputs\n object2 = splitInput[3]; // Stores extra words that the user inputs\n switch (action.toLowerCase()) {\n case \"attack\":\n if (player.getLocation().isCharaInRoom((predic + \" \" + object + \" \" + object2).toUpperCase())) {\n player.attack(player.getLocation().getChara((predic + \" \" + object + \" \" + object2).toUpperCase()));\n }\n else {\n System.out.println(\"There is no \" + ANSI_RED + (predic + \" \" + object + \" \" + object2).toLowerCase() + ANSI_RESET + \" here.\");\n }\n player.incrementTurn();\n break;\n case \"look\":\n switch (predic.toLowerCase()) {\n case \"inside\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getInsideDesc());\n else if(player.getLocation().isCharaInRoom(((object + \" \" + object2)).toUpperCase()))\n System.out.println(player.getLocation().getChara(((object + \" \" + object2)).toUpperCase()).getInsideDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"under\":\n case \"below\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getUnderDesc());\n else if(player.getLocation().isCharaInRoom(((object + \" \" + object2)).toUpperCase()))\n System.out.println(player.getLocation().getChara(((object + \" \" + object2)).toUpperCase()).getUnderDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"behind\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getBehindDesc());\n else if(player.getLocation().isCharaInRoom(((object + \" \" + object2)).toUpperCase()))\n System.out.println(player.getLocation().getChara(((object + \" \" + object2)).toUpperCase()).getBehindDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"through\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getThroughDesc());\n else if(player.getLocation().isCharaInRoom(((object + \" \" + object2)).toUpperCase()))\n System.out.println(player.getLocation().getChara(((object + \" \" + object2)).toUpperCase()).getThroughDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"at\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getDescription());\n else if (player.getLocation().isCharaInRoom((object + \" \" + object2).toUpperCase()))\n player.examineChara(player.getLocation().getChara((object + \" \" + object2).toUpperCase()));\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command.\");\n break;\n }\n break;\n case \"talk\":\n case \"speak\":\n if (\"to\".equals(predic)) {\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getDialogue());\n else if (player.getLocation().isCharaInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getChara((object + \" \" + object2).toUpperCase()).getDialogue());\n else\n System.out.println(\"There is nothing to talk to.\");\n player.incrementTurn();\n } else {\n System.out.println(\"Invalid Command.\");\n }\n break;\n case \"use\":\n if (predic.toUpperCase().equals(\"KEY\")) {\n if (object.toUpperCase().equals(\"ON\")) {\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object2.toLowerCase()) != null) {\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object2.toLowerCase()).getLocked()) {\n player.getLocation().getConnectedRoom(action.toLowerCase(), object2.toLowerCase()).unlock();\n System.out.println(\"You unlocked the door.\");\n } else\n System.out.println(\"You do not have a key.\");\n } else {\n if (player.inInventory(\"KEY\"))\n System.out.println(\"There is nothing to use a key on.\");\n else\n System.out.println(\"You do not have a key.\");\n }\n }\n }\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command\");\n return;\n }\n }\n else if (splitInput.length > 4) {\n System.out.println(\"Invalid Command\");\n return;\n }\n\n // Makes the enemies that are in the 'aggressive' state in the same room as the player attack the player.\n ArrayList<Character> NPCsInRoom = player.getLocation().getCharacters();\n if (NPCsInRoom.size() > 0) {\n for (Character character : NPCsInRoom) {\n if (character.getHealth() > 0 && character.getState().getStateName().equals(\"agg\")) {\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n System.out.println(ANSI_RED + character.getName() + ANSI_RESET + \" is attacking!\");\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n character.attack(player);\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\tString str = \"\";\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\n\t\tSystem.out.println(\"Enter a string \");\n\t\tstr = input.next();\n\t\tbackwardChars(str);\n\t\tinput.close();\n\t\t\t\n\t}", "private String insert(String input_from_user) {\n\t\tSystem.out.println(\"Enter the position you want to insert a character in the string\"+input_from_user);\n\t\tint position = in.nextInt();\n\t\tchar get_char = in.next().charAt(0);\n\t\tString result = insertCharAt(input_from_user,get_char,position);\n\t\treturn result;\n\t}", "public void getInput() {\r\n System.out.print(\"Is the car silent when you turn the key? \");\r\n setAnswer1(in.nextLine());\r\n if(getAnswer1().equals(YES)) {\r\n System.out.print(\"Are the battery terminals corroded? \");\r\n setAnswer2(in.nextLine());\r\n if(getAnswer2().equals(YES)){\r\n printString(\"Clean the terminals and try again\");\r\n }\r\n else {\r\n printString(\"The battery may be damaged.\\nReplace the cables and try again\");\r\n }\r\n\r\n }\r\n else {\r\n System.out.print(\"Does the car make a slicking noise? \");\r\n setAnswer3(in.nextLine());\r\n if(getAnswer3().equals(YES)) {\r\n printString(\"Replace the battery\");\r\n }\r\n else {\r\n System.out.print(\"Does the car crank up but fail to start? \");\r\n setAnswer4(in.nextLine());\r\n if(getAnswer4().equals(YES)) {\r\n printString(\"Check spark plug connections.\");\r\n }\r\n else{\r\n System.out.print(\"Does the engine start and then die? \");\r\n setAnswer5(in.nextLine());\r\n if(getAnswer5().equals(YES)){\r\n System.out.print(\"Does your care have fuel injection? \");\r\n setAnswer6(in.nextLine());\r\n if(getAnswer6().equals(YES)){\r\n printString(\"Get it in for service\");\r\n }\r\n else{\r\n printString(\"Check to insure the chock is opening and closing\");\r\n }\r\n }\r\n else {\r\n printString(\"This should be impossible\");\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n }", "public static String getInput(Scanner scan, String string, int trial){\n int hits = 0;\n //create loop that runs until Giant is dead\n while(hits<trial){\n String fight = \"\";\n fight= scan.next();\n if(fight.equals(\"A\") || fight.equals(\"a\")){\n int hit = (int)(Math.random()*11);\n if (hit>=5){\n System.out.println(\"Critical Hit!\");\n hits++;\n }\n else{\n System.out.println(\"Gosh! How did you miss it!\");\n }\n }\n //if user chooses to run\n if (fight.equals(\"E\") || fight.equals(\"e\")){\n int flee = (int)(Math.random()*11);\n if (flee == 10){\n System.out.println(\"You successfully escaped!\");\n break;\n }\n else{\n System.out.println(\"You failed to escape\");\n }\n }\n if(!fight.equals(\"E\") || !fight.equals(\"e\") || !fight.equals(\"A\") || !fight.equals(\"a\")){\n System.out.println(\"Excecuted by the Giant, Game Over!\");\n System.exit(1);\n }\n if(hits<trial){\n System.out.println(\"Enter A or a to ATTACK, E or e to ESCAPE, anything else to YIELD\");\n \n }\n }\n return string;\n }", "public void setInput(String input){\n this.input = input;\n }", "public void getInputAndMove() {\n\t\tSystem.out.println(\"Where to move?\");\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tString input = keyboard.nextLine();\n\t\t\n\t\t\n\t\tAvatar testAvatar = new Avatar(avatar.getLocation());\n\t\ttestAvatar.move(input);\n\n\t\tif (wall.overlapsWith(testAvatar)) {\n\t\t\tSystem.out.println(\"\\nYou have hit a wall\");\n\t\t} \n\t\telse {\n\t\t\tavatar.move(input);\n\t\t\tSystem.out.println(\"\\nYou have moved\");\n\t\t}\n\t}", "protected void handleInput(String input) {}", "public abstract boolean guess(String guess);", "static void backtocheckpoint1_version2() {\n System.out.println(\"You arrived to the main entrance of challenge 1... Are you ready to restart this challenge?\");\n strings = responses.nextLine();\n if (strings.contains(\"n\")) {\n System.out.println(\"It's not an option\"); \n backtocheckpoint1_version2();\n }else if (strings.contains(\"y\")) { \n Door2challenge();\n }else {\n System.out.println(\"I don't understand...type it correctly\");\n backtocheckpoint1_version2();//in case the player types something else that the system can't read\n }\n \n \n \n }", "public static void hangMan(Scanner input, Questions thisSession){\n hangMan1();\n Random rand=new Random();\n int randomNumber=rand.nextInt(thisSession.getLength());\n String userInput;\n byte lives=6,givenLetterscontrol=0;\n boolean letterIsInAnswer=false,playerWon=false;\n System.out.println(\"Welcome. Please type just one letter and press enter. You have 5 lives to guess the sentence. The questions is:\\n\"+\n thisSession.getQuestion(randomNumber));\n String answerSentence=(thisSession.getAnswer(randomNumber));\n String[] sentence=new String[answerSentence.length()];\n String [] lowDiagonal=new String[answerSentence.length()], givenLetter=new String[lives];\n sentence=answerSentence.split(\"\");\n for (int i=0;i<sentence.length;i++){\n if (sentence[i].equals(\" \")){\n lowDiagonal[i]=\" \";\n }else{ \n lowDiagonal[i]=\"_\";\n }\n System.out.print(lowDiagonal[i]+ \" \");\n }\n do{\n System.out.println(\"\\nWrite a letter and press enter to send the letter\");\n userInput=input.nextLine();\n userInput=userInput.toLowerCase();\n letterIsInAnswer=false;\n if (givenLetterscontrol>0){ //checks if user input has already been given.\n for (int i=0;i<6;i++){\n if (givenLetter[i].equals(userInput)){\n do{\n System.out.println(\"That letter has already been given. Please write another one.\");\n userInput=input.nextLine();\n }while (givenLetter[i].equals(userInput));\n }\n }\n }\n givenLetter[givenLetterscontrol]=userInput;\n for (int i=0;i<sentence.length;i++){ //checks if the letter is in the answer.\n if (sentence[i].equals(userInput)){\n letterIsInAnswer=true;\n lowDiagonal[i]=userInput;\n }\n }\n if (letterIsInAnswer==false){ //If letter was not in the answer, a life is lost.\n lives--;\n switch(lives){\n case 5:\n hangMan2();\n break;\n case 4:\n hangMan3();\n break;\n case 3:\n hangMan4();\n break; \n case 2:\n hangMan5();\n break;\n case 1:\n hangMan6();\n break;\n case 0:\n hangMan7();\n youLost();\n lives=-1;\n break;\n }\n System.out.println(\"That letter is not in the answer.\");\n }\n if (letterIsInAnswer){\n if (Arrays.equals(lowDiagonal,sentence)){\n playerWon=true;\n for (int i=0;i<sentence.length;i++){ \n System.out.print(lowDiagonal[i]+ \" \");\n } \n youWon();\n }else{\n for (int i=0;i<sentence.length;i++){ \n System.out.print(lowDiagonal[i]+ \" \");\n } \n }\n }\n\n }while (lives>=0 && playerWon==false);\n System.out.println(\"Thanks for playing! Returning to main menu...\");\n }", "public synchronized void doStuff(String input) {\n\n\t\tif (input.equalsIgnoreCase(\"refresh\") || input.equalsIgnoreCase(\"\")) {\n\t\t\tgetSquare().refresh();\n\t\t} else if (input.equalsIgnoreCase(\"exit\")) {\n\t\t\tSystem.exit(0);\n\t\t} else if (input.equalsIgnoreCase(\"delete restaurants\")) {\n\t\t\tgetSquare().deleteAllPlaceblesOfType(Restaurant.class);\n\t\t\tSystem.out.println(\"All Restaurants deleted\");\n\t\t} else if (input.equalsIgnoreCase(\"delete hotels\")) {\n\t\t\tgetSquare().deleteAllPlaceblesOfType(Hotel.class);\n\t\t\tSystem.out.println(\"All Hotels deleted\");\n\t\t} else if (input.equalsIgnoreCase(\"delete fences\")) {\n\t\t\tgetSquare().deleteAllPlaceblesOfType(Fence.class);\n\t\t\tSystem.out.println(\"All Fences deleted\");\n\t\t} else if (input.equalsIgnoreCase(\"delete people\")) {\n\t\t\tgetSquare().deleteAllPlaceblesOfType(Person.class);\n\t\t\tSystem.out.println(\"All People deleted\");\n\t\t} else if (input.equalsIgnoreCase(\"clear\")) {\n\t\t\tgetSquare().clear();\n\t\t\tSystem.out.println(\"Square cleared\");\n\t\t} else if (input.startsWith(\"set sleep time to \")) {\n\t\t\ttry {\n\t\t\t\tchar[] sleepTimeStr = new char[input.length() - 18];\n\t\t\t\tinput.getChars(18, input.length(), sleepTimeStr, 0);\n\t\t\t\t\n\t\t\t\tint newSleepTime = Integer.parseInt(String.valueOf(sleepTimeStr));\n\t\t\t\tsetSleepTime(newSleepTime);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\t}\n\t\t}\n\n\t\tdrawer.setPlacebles(square.getPlacebles());\n\t\tdrawer.repaint();\n\n\t}", "boolean testOnKeyEventString(Tester t) {\n return t.checkExpect(new NBullets(20).onKeyEvent(\" \"),\n new NBullets(new ConsLoGamePiece(new Bullet(), new MtLoGamePiece()), new MtLoGamePiece(),\n 19, 0, 0))\n && t.checkExpect(new NBullets(0).onKeyEvent(\" \"), new NBullets(0))\n && t.checkExpect(new NBullets(10).onKeyEvent(\"hi\"), new NBullets(10))\n && t.checkExpect(new NBullets(0).onKeyEvent(\"hi\"), new NBullets(0));\n }", "public static String readString() {\n\t\twhile (true) {\n\t\t\tdraw();\n\t\t\tchar pressed = waitForKey();\n\t\t\tif (pressed == '\\n') {\n\t\t\t\tString result = textBeingEntered;\n\t\t\t\ttextBeingEntered = \"\";\n\t\t\t\treturn result;\n\t\t\t} else if ((pressed == '\\b') && (textBeingEntered.length() != 0) ) {\n\t\t\t\ttextBeingEntered = textBeingEntered.substring(0,\n\t\t\t\t\t\ttextBeingEntered.length() - 1);\n\t\t\t} else {\n\t\t\t\ttextBeingEntered += pressed;\n\t\t\t}\n\t\t}\n\t}", "protected static void playString (String in, FunctionalInterface functionalInterface)\n {\n try\n {\n SourceDataLine line = openLine();\n for (char c : in.toCharArray ())\n {\n functionalInterface.doForChar (c, line);\n }\n closeLine (line);\n }\n catch (Exception ignored)\n {\n }\n }", "public String readStringFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your String:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString string = null;\t\t\r\n\t\tstring = br.readLine();\r\n\t\treturn string;\r\n\t}", "public void setInput(String input) {\n\t\t\tthis.input = input;\n\t\t}", "public static String inString(String prompt) {\n inputFlush();\n printPrompt(prompt);\n return inString();\n }", "public String interact() {\n return \"Nguiikk!\";\n }", "@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tchar input = e.getKeyChar();\n\t\tString newAnswer = \"\";\n\t\tboolean correct = false;\n\t\t//Text = answer;\n\t\tif(lives > 0) {\n\t\tfor(int a = 0; a < answer.length(); a++) {\n\t\t\tif(answer.charAt(a) == input) {\n\t\t\t\t//System.out.println(answer.toCharArray()[a]);\n\t\t\t\t//Text.toCharArray()[a] = answer.charAt(a);\n\t\t\t\tnewAnswer += input;\n\t\t\t\tcorrect = true;\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnewAnswer += Text.charAt(a);\n\t\t\t\t\n\t\t\t}\n\t\t\t if(Text.charAt(a) != '-') {\n\t\t\t\t correctCharacters++;\n\t\t\t\t System.out.println(correctCharacters + \" correct characters\");\n\t\t\t\t System.out.println(length.length());\n\t\t\t\t \tif(correctCharacters > length.length() + 2) {\n\t\t\t\t \tframe.dispose();\n\t\t\t\t\tstack.clear();\n\t\t\t\t\tint reset = JOptionPane.showConfirmDialog(null, \"Congratulations! You guessed all your words! Play again?\");\n\t\t\t\t\tif(reset == 0) {\n\t\t\t\t\t\tRun();\n\t\t\t\t\t\ttext.setText(Text);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \telse if (lives <= 0) {\n\t\t\t\t \t\tframe.dispose();\n\t\t\t\t\t\tstack.clear();\n\t\t\t\t\t\tint reset = JOptionPane.showConfirmDialog(null, \"Game Over! Play again?\");\n\t\t\t\t\t\tif(reset == 0) {\n\t\t\t\t\t\t\tRun();\n\t\t\t\t\t\t\ttext.setText(Text);\n\t\t\t\t\t\t}\n\t\t\t\t \t}\n\t\t\t }\n\t\t}\n\t\tif(correct == false) {\n\t\t\tlives--;\n\t\t}\n\t\tText = newAnswer;\n\t\ttext.setText(Text);\n\t\tlifeDisplay.setText(\"Lives: \" + lives);\n\t\tcorrect = false;\n\t\t\n\t}\n\t\t\n\t\telse {\n\t\t\tframe.dispose();\n\t\t\tstack.clear();\n\t\t\tint reset = JOptionPane.showConfirmDialog(null, \"Game Over! Play again?\");\n\t\t\tif(reset == 0) {\n\t\t\t\tRun();\n\t\t\t}\n\t\t}\n\t}", "public void readInput()\n\t{\n\t\t//wrap input stream read input from user\n\t\tBufferedReader in = new BufferedReader( new InputStreamReader( System.in ));\n\t\t\n\t\t//prompt user for input\n\t\tSystem.out.println( \"Please enter a letter or type Quit to end.\");\n\t\t\n\t\ttry{\n\t\t\tString userGuess = in.readLine();\n\t\t\t\n\t\t\t//loop until the user types \"Quit\"\n\t\t\tdo{\n\t\t\t\t//invoke guessletter function with String input\n\t\t\t\thangmanGame.guessLetter(userGuess);\n\t\t\t\t//update currentGuessText\n\t\t\t\tcurrentGuessText = hangmanGame.getCurrentGuess();\n\t\t\t\t//trace out current guess\n\t\t\t\tSystem.out.println(\"Your current guess is: \" + currentGuessText);\n\t\t\t\t//update remainingStrikes\n\t\t\t\thangmanGame.numberOfRemainingStrikes();\n\t\t\t\t//trace out remaining number of strikes\n\t\t\t\tSystem.out.println(\"You currently have \" + hangmanGame);\n\t\t\t\t//invoke revealAnswer function to check over gameOver, gameWon, and getAnswer\n\t\t\t\trevealAnswer();\n\t\t\t}while ( userGuess != \"Quit\" );\n\t\t}\n\t\t//catch IOException ioe\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t//tell exception to print its error log\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "public void input(String key) {\n\n // Just one guess per change\n if(mHasInput) {\n return;\n }\n\n mHasInput = true;\n if(key.length() == 1) {\n\n key = key.toUpperCase();\n char in = key.charAt(0);\n\n if(in > 64 && in < 92) {\n mInput = in;\n\n // Check input against generated char\n if(mInput != mCurrent) {\n // Failed\n fail();\n }\n\n } else {\n fail();\n throw new IllegalArgumentException();\n }\n\n } else {\n fail();\n throw new IllegalArgumentException();\n }\n }", "public void takeUserInput() {\n\t\t\r\n\t}", "public static void handle ( String input, JTextPane console ) {\r\n GUI.commandHistory.add ( input ) ;\r\n GUI.commandHistoryLocation = GUI.commandHistory.size ( ) ;\r\n\r\n GUI.write ( \"Processing... [ \"\r\n + console.getText ( ).replaceAll ( \"\\r\", \"\" ).replaceAll ( \"\\n\", \"\" )\r\n + \" ]\" ) ;\r\n console.setText ( \"\" ) ;\r\n\r\n input = input.replaceAll ( \"\\r\", \"\" ).replaceAll ( \"\\n\", \"\" ) ;\r\n try {\r\n if ( input.equalsIgnoreCase ( \"quit\" )\r\n || input.equalsIgnoreCase ( \"exit\" )\r\n || input.equalsIgnoreCase ( \"close\" ) ) {\r\n Core.fileLogger.flush ( ) ;\r\n System.exit ( 0 ) ;\r\n } else {\r\n final String inp[] = input.split ( \"(\\\\s)+\" ) ;\r\n if ( inp.length == 0 ) { return ; }\r\n final Class<?> cmdClass = Class.forName ( \"net.mokon.scrabble.cmd.CMD_\"\r\n + inp[ 0 ].toLowerCase ( ) ) ;\r\n final Constructor<?> cmdConstructor = cmdClass\r\n .getDeclaredConstructors ( )[ 0 ] ;\r\n final Command toRun = (Command) cmdConstructor.newInstance ( inp,\r\n console, Core.scrabbleBoard, Core.main, Core.moves,\r\n Core.scrabbleBoard.bag ) ;\r\n if ( inp[ 0 ].equalsIgnoreCase ( \"word\" ) ) {\r\n final Method method = cmdClass.getMethod ( \"setFrame\", JFrame.class ) ;\r\n method.invoke ( toRun, Core.showWorkingScreen ( ) ) ;\r\n }\r\n toRun.start ( ) ;\r\n }\r\n } catch ( final ClassNotFoundException e ) {\r\n GUI.write ( \"Unknown Command - Valid are [ help, word, use, draw,\"\r\n + \" place, set, unset, grid, size, fill, lookup ]\" ) ;\r\n } catch ( final Throwable e ) {\r\n GUI.write ( \"An error has been enountered [ \" + e.toString ( )\r\n + \" ]. Attempting to continue...\" ) ;\r\n e.printStackTrace ( ) ;\r\n e.printStackTrace ( Core.fileLogger ) ;\r\n }\r\n }", "@Override\r\npublic void keyPressed(KeyEvent e) {\n\r\n\tif(e.getKeyCode()==KeyEvent.VK_ENTER) {\r\n\t\tinput.setEditable(false);\r\n\t\t//----Grab the quotes from the textArea\r\n\t\tString qoute=input.getText();\r\n\t\tinput.setText(\"\");\r\n\t\taddText(\"---> You:\\t\" + qoute);\r\n\t\tqoute=qoute.trim();\r\n\t\twhile(qoute.charAt(qoute.length()-1)== '!' ||\r\n\t\t\t\tqoute.charAt(qoute.length()-1)== '.' ||\r\n\t\t\t\tqoute.charAt(qoute.length()-1)== '?' \r\n\t\t\t\t) {\r\n\t\t\tqoute=qoute.substring(0,qoute.length()-1);\r\n\t\t}\r\n\t\tqoute=qoute.trim();\r\n\t\tbyte response=0;\r\n\t\t/*\r\n\t\t 0:we are searching through chatBot[][] for matches.\r\n\t\t 1: we didnt find anything chatBot [][]\r\n\t\t 2:we did find somethng in chtBot[]\t[]\r\n\t\t \t \t */\r\n\t\t//---Check for matches---\r\n\t\tint j=0; // which group we're searching\r\n\t\twhile(response==0) {\r\n\t\t\tif(inArray(qoute.toLowerCase(),chatBot[j*2])) {\r\n\t\t\t\tresponse=2;\r\n\t\t\t\tint r=(int)Math.floor(Math.random()*chatBot[(j*2)+1].length);\r\n\t\t\t\taddText(\"\\n-->Simanga\\t\"+chatBot[(j*2)+1][r]);\r\n\t\t\t\t}\r\n\t\t\tj++;\r\n\t\t\tif(j*2==chatBot.length-1 && response==0) {\r\n\t\t\t\tresponse=1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//---default\r\n\t\tif(response==1) {\r\n\t\t\tint r=(int)Math.floor(Math.random()*chatBot[chatBot.length-1].length);\r\n\t\t\taddText(\"\\n-->Simanga\\t\"+chatBot[chatBot.length-1][r]);\r\n\t\t}\r\n\t\t\r\n\t\taddText(\"\\n\");\r\n\t}\r\n\t\r\n}", "private void processInputUntilRoomChange() {\n while (true) {\n // Get the user input\n System.out.print(\"> \");\n String input = scan.nextLine();\n\n // Determine which command they used and act accordingly\n if (input.startsWith(\"help\")) {\n this.displayCommands();\n } else if (input.startsWith(\"look\")) {\n this.displayDescription(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"get\")) {\n this.acquireItem(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"go\")) {\n if (this.movePlayer(input.substring(input.indexOf(\" \") + 1))) {\n break;\n }\n } else if (input.startsWith(\"use\")) {\n this.useItem(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"inventory\")) {\n System.out.print(player.listInventory());\n } // The player did not enter a valid command.\n else {\n System.out.println(\"I don't know how to \" + input);\n }\n }\n }", "public void setUserinput(String userinput){\n String[] inputs = userinput.split(\" \");\n if(inputs.length > 1){\n this.userinput_var = inputs[1];\n }\n this.userinput_command = inputs[0];\n }", "public static String getString (String ask)\r\n {\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.print(ask + \" -> \");\r\n String input = keyboard.nextLine();\r\n return input;\r\n }", "@Override\n\tpublic void processCommand(String s)\n\t{\n\t\tif (s.contentEquals(\"atStart\"))\n\t\t{\n\t\t\tprinttest(s);\n\t\t\tSystem.out.println(isAtStart());\n\t\t}\n\t\telse if (s.contentEquals(\"atEnd\"))\n\t\t{\n\t\t\tprinttest(s);\n\t\t\tSystem.out.println(isAtEnd());\n\t\t}\n\t\telse if (s.contentEquals(\"moveToStart\"))\n\t\t{\n\t\t\tmoveToStart();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"moveToEnd\"))\n\t\t{\n\t\t\tmoveToEnd();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"toString\"))\n\t\t{\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.startsWith(\"toStringCursor\"))\n\t\t{\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"moveLeft\"))\n\t\t{\n\t\t\tmoveLeft();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"moveRight\"))\n\t\t{\n\t\t\tmoveRight();\n\t\t\tprinttest(s);\n\t\t}\n\t\t\n\t\t//ERROR CHECKING\n\t\telse if(left.isEmpty() && right.isEmpty())\n\t\t{\n\t\t\t//we have no inputted characters\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Now executing the command \" + s + \"...\");\n\t\t\tSystem.out.println(\"The Results of this command are:\");\n\t\t\tSystem.out.println(\"Sorry but you need to input something before using that command...\");\n\t\t}\n\t\telse if (s.startsWith(\"insertChar\"))\n\t\t{\n\t\t\tinsertChar(s.charAt(s.length() - 1));\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"backspace\"))\n\t\t{\n\t\t\tbackspace();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.contentEquals(\"delete\"))\n\t\t{\n\t\t\tdelete();\n\t\t\tprinttest(s);\n\t\t}\n\t\telse if (s.startsWith(\"search\"))\n\t\t{\n\t\t\tsearch(s.charAt(s.length() - 1));\n\t\t\tprinttest(s);\n\t\t}\n\t\t\n\t\t//ERORR CHECKING\n\t\telse\n\t\t{\n\t\t\t//it is an unaccepted command, doing it this way since we cant pass two strings to printtest\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Now executing the command \" + s + \"...\");\n\t\t\tSystem.out.println(\"The Results of this command are:\");\n\t\t\tSystem.out.println(\"Sorry but this is not valid command...\");\n\t\t}\n\n\t}", "private void handleInput() {\n\n // Get the input string and check if its not empty\n String text = textInput.getText().toString();\n if (text.equals(\"\\n\")) {\n textInput.setText(\"\");\n return;\n }\n // remove empty line\n if (text.length() >= 2 && text.endsWith(\"\\n\")) text = text.substring(0, text.length() - 1);\n\n if (TextUtils.isEmpty(text)) return;\n textInput.setText(\"\");\n\n myGame.onInputString(text);\n }", "String userInputFromTextArea();", "public static void main(String[] args) {\n\t\t\n\t\tint lengthOfCurrent = 0;\n\t\tSystem.out.println(\"Enter the string.\");\n\t\tString input = IO.readString();\n\t\tSystem.out.println(input);\n\t\tchar[] cArray = input.toCharArray();\n\t\tint uniqueCharacters = getNumUniqueCharacters(cArray);\n\t\tint index = 0;\n\t\tString[] letters = new String[uniqueCharacters];\n\t\t\n\t\tif(input.length() > 1){\n\t\t\tfor(int i = 0; i < input.length(); i++){\n\t\t\t\tif(i == 0){\n\t\t\t\t\tletters[index] = Character.toString(cArray[i]);\n\t\t\t\t\tindex++;\n\t\t\t\t\t//System.out.println(letters[index]);\n\t\t\t\t}\n\t\t\t\telse if(cArray[i] != cArray[i-1]){\n\t\t\t\t\tletters[index] = Character.toString(cArray[i]);\n\t\t\t\t\tindex++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < letters.length; i++){\n\t\t\tSystem.out.println(letters[i]);\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void acceptInput(String input) {\n\t\t\r\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "public String getUserStringInput(String tips)\n {\n Scanner console = new Scanner(System.in);\n System.out.println(tips);\n return console.nextLine();\n }", "public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }", "public String shiftKeyboard(String input){\n\t\tStringBuilder strBuilder = new StringBuilder();\n\t\tfor(int i = 0; i < input.length(); i++){\n\t\t\tint lowerLndex = lowerKeys.indexOf(input.charAt(i));\n\t\t\tint upperIndex = upperKeys.indexOf(input.charAt(i));\n\t\t\tif(lowerLndex > -1){\n\t\t\t\tstrBuilder.append(lowerKeys.charAt(lowerLndex - 1));\n\t\t\t}else if(upperIndex > -1){\n\t\t\t\tstrBuilder.append(upperKeys.charAt(upperIndex - 1));\n\t\t\t}else{\n\t\t\t\tstrBuilder.append(\" \");\n\t\t\t}\n\t\t}\n\t\treturn strBuilder.toString();\n\t}", "public static void userMover(){\n System.out.println(\"Where would you like to move? Please choose (R)ight, (L)eft, (U)p, or (D)own \");\n String move = input.next();\n\n while (!\"RLUD\".contains(move)) {\n System.out.println(\"Where would you like to move? Please choose (R)ight, (L)eft, (U)p, or (D)own \");\n move = input.next();\n }\n\n if (move.equals(\"R\") && (myMap.canIMoveRight())) {\n myMap.moveRight();\n } else if (move.equals(\"L\") && myMap.canIMoveLeft()) {\n myMap.moveLeft();\n } else if (move.equals(\"U\") && myMap.canIMoveUp()) {\n myMap.moveUp();\n } else if (move.equals(\"D\") && myMap.canIMoveDown()) {\n myMap.moveDown();\n } else if (myMap.isThereAPit(move)) {\n navigatePit(move);\n } else {\n System.out.println(\"Sorry, you’ve hit a wall.\");\n }\n\n myMap.printMap();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tif (machine.atStart())\n\t\t\t\t\tmachine.setInput(inputText.getText());\n\t\t\t\t\n\t\t\t\ttry { \n\t\t\t\t\tmachine.step(); // take a step\n\t\t\t\t\t\n\t\t\t\t\t// if there is input\n\t\t\t\t\tif (inputText.getText().length() > 0) {\n\t\t\t\t\t\tinputText.setEditable(false); // disable input edit\n\t\t\t\t\t\tbtnRun.setEnabled(false); // disable run\n\t\t\t\t\t\tbtnStepBack.setEnabled(true); // enable step back\n\n\t\t\t\t\t\t// report character just read\n\t\t\t\t\t\tlblCurrentInput.setText(\"Just read: \" + \n\t\t\t\t\t\t machine.getCurrentInput());\n\t\t\t\t\t}\n\n\t\t\t\t\t// if end of input, disable step forward\n\t\t\t\t\tif (! (machine.getStatus().equals(Automaton.READY) ||\n\t\t\t\t\t\t\tmachine.getStatus().equals(Automaton.RUN)))\n\t\t\t\t\t\tbtnStepForward.setEnabled(false);\n\t\t\t\t\t\n\t\t\t\t} catch (NoStartStateDefined e) {\n\t\t\t\t\treportException(e);\n\t\t\t\t} catch (NoTransitionDefined e) {\n\t\t\t\t\treportException(e);\n\t\t\t\t}\n\t\t\t\tupdate(); // update states, labels, text\n\t\t\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString userInput= in.nextLine();\n\t\tuserInput.intern();\n\t\tString first = \"anton\";\n\t\tSystem.out.println(first==userInput);\n\t\t\n\t}", "private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }", "public void processInput( String input ){\n\t\tString opponent;//holds either \"client\" or \"server\". Whichever is the opponent\n\t\tif( parent.whichPlayer.equals(\"server\") ) opponent = \"client\";\n\t\telse opponent = \"server\";\n\t\t\n\t\t//create a string array to hold the input split around spaces\n\t\tString[] split = input.split(\" \");\n\t\t\n\t\t//input was mouseclick\n\t\tif( split[0].equals(\"C\") ) {\n\t\t\t//If the line contains mouseClick information, then send it to handleMouseClick\n\t\t\tparent.handleMouseClick(Integer.parseInt(split[1]), Integer.parseInt(split[2]), opponent);\n\t\t}\n\n\t\t//input was name\n\t\telse if(split[0].equals(\"N\")) {\n\t\t\t//if this window is the server, set the recieved name to the client\n\t\t\tif( parent.serverRadio.isSelected() ) {\n\t\t\t\tparent.playerTwoTextField.setText(split[1]);\n\t\t\t}\n\t\t\t//if this window is the client, set the recieved name to the server\n\t\t\telse {\n\t\t\t\tparent.playerOneTextField.setText(split[1]);\n\t\t\t}\n\t\t}\n\t\t//if a quit flag was sent\n\t\telse if(split[0].equals(\"Q\")){\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t\tss.close();\n\t\t\t\tpw.close();\n\t\t\t\tsc.close();\n\t\t\t}catch(Exception e) {\n\t\t\t\tSystem.out.println(\"Unable to close the connection!\");\n\t\t\t}\n\t\t}\n\n\t}", "private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }", "public void setCurrentInput(String currentInput){\n\t\tthis.currentInput = currentInput;\n\t}", "public static String readString() {\n BufferedReader br\n = new BufferedReader(new InputStreamReader(System.in), 1);\n\n // Declare and initialize the string\n String string = \" \";\n\n // Get the string from the keyboard\n try {\n string = br.readLine();\n\n } catch (IOException ex) {\n System.out.println(ex);\n }\n\n // Return the string obtained from the keyboard\n return string;\n }", "public static boolean userInput(){\n String tempInput = \"y\"; //string to hold input for bulletproofing, default length is one character\n Scanner input = new Scanner(System.in);\n\n do { //bulletproofing input\n\n if (tempInput.length() != 1){ //if looping for second time, output error message\n System.out.println(\"Unaccepted input. Please reenter.\");\n }\n\n tempInput = input.nextLine(); //take input\n\n }while(tempInput.length() != 1); //loops again if input is not single character\n\n return tempInput.charAt(0) == 'y';\n }", "public static char getInput(Scanner x, String y, int z){ //adding method getInput #2\n String input2=x.next(); //accpeting user input\n int c=0; //declaring sentinel c \n while(c<z){ //while statement that only runs for 5 tries \n while(input2.length()!=1){//while loop that forces user to enter 1 int\n System.out.print(\"You should enter exactly one character- \"); //telling user they need to enter 1 character\n input2=x.next(); //accepting user input\n c++; //counter that limits the number of tries\n } //end of while loop that forces user to enter 1 int \n int i=0; //declaring in that will act as a sentinel \n char test; //declaring char \n while(i<y.length()){ //while loop that runs the number of times the length of the string is\n test=y.charAt(i); //making test equal to char method, to test each letter of string y \n if(test == input2.charAt(0)){//when the chars are finally equivalent\n return input2.charAt(0); //returns the value\n }//end of if statment \n i++; //counter to run the loop the length of the string \n }//end of while loop\n System.out.print(\"You should enter the right characters. Try again- \"); //telling user they need to enter the right character \n input2=x.next(); //accepting user input \n c++; //counter to limit the number of tries \n }\n System.out.println(\"You failed after 5 tries\"); //when the user fails after 5 tries \n return ' '; //terminating the program \n }", "private TETile[][] takeActionIS(String input) {\n String[] arrofString = input.split(\"\", input.length());\n String num = \"\";\n String moves = \"\";\n boolean seedComplete = false;\n boolean saveOrNot = false;\n String prevKey = null;\n String nextKey = null;\n\n for (int i = 0; i < arrofString.length; i++) {\n if (!(nextKey == null)) {\n prevKey = nextKey;\n }\n nextKey = arrofString[i];\n\n if (nextKey.equals(\"N\") || nextKey.equals(\"n\")) {\n System.out.println(\"\");\n } else if (nextKey.equals(\"S\") || nextKey.equals(\"s\") && (!seedComplete)) {\n seedComplete = true;\n\n } else if (nextKey.equals(\"L\") || nextKey.equals(\"l\")) {\n// load previous game and start listening for next movements\n seedComplete = true;\n String[] all = readFile().split(\"\");\n\n num = Long.toString(getSeedFromLoad(all));\n moves = getMoves(all);\n } else if (nextKey.equals(\"q\")\n || nextKey.equals(\"Q\") && prevKey.equals(\":\")) {\n //save the current game's moves by saveFile\n saveOrNot = true;\n return playGameIS(num, moves, saveOrNot);\n } else if (!seedComplete) {\n num += nextKey;\n } else if (nextKey.equals(\":\")) {\n continue;\n } else {\n moves += nextKey;\n }\n }\n return playGameIS(num, moves, saveOrNot);\n }", "public void userMessageInput() {\n //declaring and initializing new userScanner variable\n Scanner userScanner = new Scanner(System.in);\n //displayed message to the user with the updating replacedMovie variable\n System.out.println(\"You are guessing :\" + this.replacedMovie);\n //displaying message with total number of wrong trials (guessed letters) to the user ,\n // together with the wrong guessed letter/s.\n getAllWrongLetters(); // calls method to dispaly the whole list of wrong guessed letters.\n System.out.println(\"You have guessed \" + this.wrongLettersCount + \" wrong letter(s): \" + allWrongLetters);\n //displaying a message asking the user to enter a guessed letter\n System.out.println(\"Guess a Letter\");\n //storing the entered letter in userEnteredLetter variable\n this.setUserGuessedLetter(userScanner.next().charAt(0));\n\n //return userEnteredLetter; // returning userEnteredLetter variable\n\n }", "static void backtocheckpoint1() {\n System.out.println(\"You came back to the main entrance of challenge 1...Are you ready to restart this challenge?\");\n strings = responses.nextLine();\n Door1challenge();\n }", "@When(\"Enter pwd {string}\")\n\tpublic void enter_pwd(String string) {\n\t System.out.println(string);\n\t}", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public void sendInput(String input) throws IOException {\n\t\tmShell.sendCommand(\"INPUT:\" + mStag + \":\" + input + \":\");\n\t}", "String reverseMyInput(String input);", "public boolean checkAnswer(String userInput) {\n\n\t\tList<String> possibleAnswers = getAnswersAsList();\n\n\t\t// check if the first word is a or the and remove it from their answer.\n\t\tString output = \"\";\n\t\tString[] data = userInput.split(\" \");\n\t\tint length = data.length;\n\t\tif (data[0].contentEquals(\"the\") || data[0].equals(\"a\")) {\n\t\t\tfor (int i = 1; i < length; i++) {\n\t\t\t\toutput = output + data[i];\n\t\t\t}\n\t\t} else {\n\t\t\toutput = userInput;\n\t\t}\n\n\t\tuserInput = output.toLowerCase().trim();\n\n\t\tfor (String answer : possibleAnswers) {\n\t\t\tif (userInput.equals(answer.toLowerCase().trim())) {\n\t\t\t\t_attempted = true;\n\t\t\t\t_result = true;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t_attempted = true;\n\t\t_result = false;\n\t\treturn false;\n\t}", "private void interactive() {\r\n\t\tBufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.print(\"Enter Command: \");\r\n\t\t\ttry {\r\n\t\t\t\tprocessCommandSet(tokenizeInput(keyboard.readLine()));\r\n\t\t\t\tif (quit == true) {\r\n\t\t\t\t\tSystem.out.println(\"Terminated at users request.\");\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.err.println(\"An IO Error Occured. \" + e.getMessage());\r\n\t\t\t\tSystem.exit(1);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "private String selectString(String prompt) {\n System.out.println(\"\\n\" + prompt);\n return input.next();\n }", "public void Input() {\n wordArray.clear();\n try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {\n do {\n System.out.print(\"Please input program string, end with '.': \");\n line = in.readLine();\n } while (!line.endsWith(\".\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n\n int pos;\n if ((pos = line.indexOf(\".\")) != line.length() - 1)\n line = line.substring(0, pos + 1);\n\n }", "public static String userInput()\r\n {\r\n Scanner link = new Scanner(System.in);\r\n String word = link.next();\r\n char[] chars = word.toCharArray();\r\n boolean checkWord = false; \r\n for(int i = 0; i < chars.length; i++)\r\n {\r\n char c = chars[i];\r\n if((c < 97 || c > 122))\r\n {\r\n checkWord = true;\r\n }\r\n }\r\n link.close();\r\n if(!checkWord)\r\n {\r\n return word;\r\n } \r\n else \r\n System.out.println(\"Not a valid input\");\r\n return null;\r\n }", "public void processCommand(String userInput){\n if (userInput.contains(\" \")){ \n processSingleToken(userInput.split(\" \")); //Splits strings based on \" \" \n }\n \n else{\n List<String> tempStore = new ArrayList<String>();\n tempStore.add(userInput);\n String[] token = tempStore.toArray(new String[tempStore.size()]);\n processSingleToken(token);\n }\n }", "private void takeInUserInput(){\n\t\t// only take in input when it is in the ANSWERING phase\n\t\tif(spellList.status == QuizState.Answering){\n\t\t\tspellList.setAnswer(getAndClrInput());\n\t\t\tspellList.status = QuizState.Answered;\n\t\t\tansChecker=spellList.getAnswerChecker();\n\t\t\tansChecker.execute();\n\t\t}\t\n\n\t}", "public void getPlayerInput() {\n System.out.println(\"Enter a Command: \");\n playerInput = inputScanner.nextLine();\n }", "public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "String promptString();", "public static void tryAgain() {\n Input input = new Input(new Scanner(System.in));\n System.out.println(\"Do you want to choose another option? [ yes/no ]\");\n String more = input.getString();\n if (more.equalsIgnoreCase(\"yes\")) {\n askUser();\n } else {\n endGame();\n }\n }", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"Enter any string :\");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString stringInput=sc.nextLine();\r\n\t\t\r\n\t\tchar[] inputTemp=stringInput.toCharArray();\r\n\t\t\r\n\t\tint i=0;\r\n\t\tint j=inputTemp.length-1;\r\n\t\tfor(;i<j;i++,j--)\r\n\t\t{\r\n\t\t\tchar temp=inputTemp[i];\r\n\t\t\tinputTemp[i]=inputTemp[j];\r\n\t\t\tinputTemp[j]=temp;\r\n\t\t}\r\n\t\t\r\n\t\tfor (char c : inputTemp) {\r\n\t\t\tSystem.out.print(c);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void input(String s) {\n\t\to.parseInput(s);\r\n\t\tif (!Jframe.pr && !Jframe.nx && !Jframe.cu && !thisCurrent && !thisNext\r\n\t\t\t\t&& !thisPrevious) {\r\n\t\t\tp.track(s);\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\r\n\t\tthisCurrent = thisNext = thisPrevious = false;\r\n\t\t// System.out.println(\"here\");\r\n\r\n\t}", "@Override\n public void promotePawn(String input){\n super.promotePawn(input);\n sendMove(lastStartIndex, lastEndIndex, input);\n }", "public void setInputAnswer(String inputAnswer) {\n this.inputAnswer = inputAnswer;\n }", "static String parse(String input, User user)\n {\n if(input.length()==0 || input==null || input.matches(\"^[ \\t]*$\"))\n return LinSim.EMPTY_STRING;\n\n // set the base command\n StringTokenizer token=new StringTokenizer(input, \" \\t\");\n String baseCommand=token.nextToken();\n\n // Let's use some introspection magic...\n try\n {\n Class<?> cmdClass=Class.forName(\"org.linsim.Command\");\n // Note that ALL commands in the Command class must be public in order to be seen by getMethod() below\n Method method=cmdClass.getMethod(baseCommand, String.class);\n Object output=method.invoke(null, input, user);\n if(!LinSim.graphicalMode)\n java.lang.System.out.print(output.toString());\n // ToDo: use setText() for GUI later\n }\n catch(Throwable e)\n {\n return baseCommand + \": command not found.\\n\";\n }\n // after the command finishes execution, return to the input loop\n return LinSim.EMPTY_STRING;\n }", "public abstract void promptForInput(final String msg);" ]
[ "0.69860935", "0.64902765", "0.63886017", "0.62874806", "0.6195457", "0.61412424", "0.5942875", "0.58047104", "0.5802443", "0.5798058", "0.5770262", "0.57409865", "0.5727583", "0.57042277", "0.5694956", "0.5657937", "0.56021386", "0.558782", "0.5580072", "0.5566572", "0.5558309", "0.5556349", "0.55448407", "0.55134845", "0.5500297", "0.54835117", "0.5474233", "0.54632205", "0.5462952", "0.5458207", "0.5454144", "0.54479855", "0.54256475", "0.540851", "0.5373311", "0.53700024", "0.53515196", "0.5342898", "0.5339977", "0.53189665", "0.5301533", "0.52996063", "0.52859885", "0.5279479", "0.52777225", "0.5271489", "0.5257486", "0.52528274", "0.52412874", "0.5235425", "0.5234913", "0.5234788", "0.52317566", "0.5219122", "0.52162087", "0.52131724", "0.52028555", "0.51911104", "0.5177324", "0.5174914", "0.51724964", "0.51709414", "0.5162249", "0.51586163", "0.51522875", "0.5151387", "0.5120145", "0.5113191", "0.5096206", "0.50943214", "0.5064369", "0.5053591", "0.50514525", "0.50511974", "0.5046862", "0.50365394", "0.50218904", "0.5012681", "0.5006114", "0.5001238", "0.4996055", "0.49946097", "0.49884275", "0.4988003", "0.49827373", "0.49789754", "0.49764648", "0.4974098", "0.49740228", "0.49699438", "0.49682787", "0.49667662", "0.49617177", "0.49614865", "0.49611655", "0.49550933", "0.49541616", "0.4952003", "0.49514878", "0.49493837" ]
0.6644915
1
Creates a hallway from a hallway
private Hallway hallWayCreatorFromHallway(Hallway hallway) { int width; int height; if (hallway.orientation.equals("up") || hallway.orientation.equals("down")) { width = 3; height = hallway.length; } else { width = hallway.length; height = 3; } int randside = r.nextInt(hallway.sides.size()); String direction = hallway.sides.remove(randside); Hallway modifiedhallway = hallway; String before = hallway.previousobject; return hallWayCreator(modifiedhallway.bottomleft, width, height, direction, before, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createHallway(int len) {\n createRoom(len, 0, 0);\n }", "public Highway createHighway(RoadMap r) {\n\t\tHighway newHighway;\n\t\ttry {\n\t\t\tnewHighway = new Highway(roadID, length, maxVel, verifyJunction(r,\n\t\t\t\t\tini), verifyJunction(r, end), lanes);\n\n\t\t} catch (IllegalArgumentException | ObjectNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Error: Could not create Highway \" + roadID + \" at time \"\n\t\t\t\t\t\t\t+ getTime() + \".\\n\" + e.getMessage(), e);\n\t\t}\n\t\treturn newHighway;\n\t}", "private Room boxCreatorFromHallway(Hallway hallway) {\n int[] previous = hallway.bottomleft;\n int length = hallway.length;\n String pdirection = hallway.orientation;\n int width = r.nextInt(5) + 5;\n int height = r.nextInt(6) + 5;\n if (pdirection.equals(\"up\")) {\n int[] coordinates = new int[2];\n coordinates[0] = r.nextInt(width - 2) + previous[0] + 2 - width + 1;\n coordinates[1] = previous[1] + length;\n ArrayList<String> sidesavailable = arrayMaker(pdirection);\n String numberofrooms = \"Room \" + (this.numberofRooms + 1);\n String received = \"S\";\n Room room = new Room(1, width, height, coordinates,\n false, sidesavailable, numberofrooms, received);\n if (overlapRooms(room)) {\n return null;\n } else {\n this.numberofRooms += 1;\n boxCreator(coordinates, width, height);\n tiles[previous[0] + 1][previous[1] + length] = Tileset.FLOWER;\n this.rooms.put(this.numberofRooms, room);\n return room;\n }\n } else if (pdirection.equals(\"down\")) {\n int[] coordinates = new int[2];\n coordinates[0] = r.nextInt(width - 2) + previous[0] + 2 - width + 1;\n coordinates[1] = previous[1] - height;\n ArrayList<String> sidesavailable = arrayMaker(pdirection);\n String numberofrooms = \"Room \" + (this.numberofRooms + 1);\n String received = \"N\";\n Room room = new Room(1, width, height, coordinates,\n false, sidesavailable, numberofrooms, received);\n if (overlapRooms(room)) {\n return null;\n } else {\n this.numberofRooms += 1;\n boxCreator(coordinates, width, height);\n tiles[previous[0] + 1][previous[1]] = Tileset.FLOWER;\n this.rooms.put(this.numberofRooms, room);\n return room;\n }\n } else if (pdirection.equals(\"right\")) {\n int[] coordinates = new int[2];\n coordinates[0] = previous[0] + length;\n coordinates[1] = r.nextInt(height - 2) + previous[1] + 2 - height + 1;\n ArrayList<String> sidesavailable = arrayMaker(pdirection);\n String numberofrooms = \"Room\" + (this.numberofRooms + 1);\n String received = \"W\";\n Room room = new Room(1, width, height, coordinates,\n false, sidesavailable, numberofrooms, received);\n if (overlapRooms(room)) {\n return null;\n } else {\n this.numberofRooms += 1;\n boxCreator(coordinates, width, height);\n tiles[previous[0] + length][previous[1] + 1] = Tileset.FLOWER;\n this.rooms.put(numberofRooms, room);\n return room;\n }\n } else {\n int[] coordinates = new int[2];\n coordinates[0] = previous[0] - width;\n coordinates[1] = r.nextInt(height - 2) + previous[1] + 2 - height + 1;\n ArrayList<String> sidesavailable = arrayMaker(pdirection);\n String numberofrooms = \"Room\" + (this.numberofRooms + 1);\n String received = \"E\";\n Room room = new Room(1, width, height, coordinates,\n false, sidesavailable, numberofrooms, received);\n if (overlapRooms(room)) {\n return null;\n } else {\n this.numberofRooms += 1;\n boxCreator(coordinates, width, height);\n tiles[previous[0]][previous[1] + 1] = Tileset.FLOWER;\n this.rooms.put(this.numberofRooms, room);\n return room;\n }\n }\n }", "public static Hallway buildHallway(List<WallMeasurement> wallMeasurementList) {\n List<float[]> planPoints = new ArrayList<float[]>();\n WallMeasurement lastWallMeasurement = null;\n // Intersect every measurement with the previous one and add the result to the hallway.\n if (!wallMeasurementList.isEmpty()) {\n boolean first = true;\n float[] lastAddedPoint = null;\n for (WallMeasurement wallMeasurement : wallMeasurementList) {\n if (lastWallMeasurement != null) {\n if (!first) {\n planPoints.remove(lastAddedPoint);\n }\n planPoints.add(wallMeasurement.intersect(lastWallMeasurement));\n first = false;\n }\n float[] openGlWall = wallMeasurement.getPlaneTransform();\n float[] measurementPoint = new float[]{openGlWall[12], openGlWall[13], openGlWall[14]};\n planPoints.add(measurementPoint);\n lastWallMeasurement = wallMeasurement;\n lastAddedPoint = measurementPoint;\n }\n\n //closing the hallway, intersect the first and last measurements.\n planPoints.remove(lastAddedPoint);\n planPoints.add(lastWallMeasurement.intersect(wallMeasurementList.get(0)));\n planPoints.remove(planPoints.get(0));\n }\n return new Hallway(planPoints);\n }", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "Road(boolean h, MP m){\n\t\t time = m.getLifeTime();\n\t\t horizontal = h; \n\t\t _MP = m;\n\t\t endPosition = _MP.createRandom(_MP.getRoadLengthMin(), _MP.getRoadLengthMax());\n\t }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway addNewRoadway();", "void buildRoad(EdgeLocation edge, boolean free);", "FuelingStation createFuelingStation();", "Object moveHologramPacket(int id, Location to);", "Habit createHabit(Habit habit);", "private void constructHMap() {\n\t\tfor (int i = 0; i < hMap.length; i++) {\n\t\t\tfor (int j = 0; j < hMap[0].length; j++) {\n\t\t\t\tif (hMap[i][j] == 0) {\n\t\t\t\t\tSkiNode head = new SkiNode(map[i][j], i, j, null);\n\t\t\t\t\tbuildSkiTree(head);\n\t\t\t\t\tupdateSkiTreeLevel(head);\n\t\t\t\t\tif (goodHeads.isEmpty()) {\n\t\t\t\t\t\tgoodHeads.add(new SkiNode(head));\n\t\t\t\t\t} else if (goodHeads.getFirst().level == head.level) {\n\t\t\t\t\t\tgoodHeads.add(new SkiNode(head));\n\t\t\t\t\t} else if (goodHeads.getFirst().level < head.level) {\n\t\t\t\t\t\tgoodHeads.clear();\n\t\t\t\t\t\tgoodHeads.add(new SkiNode(head));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public CleanHallway(char symbol, int row, int column) {\n\t\tsuper(symbol, row, column);\n\n\t}", "public Hall(String d, String h, int id) {\n TicketsDB tdb = new TicketsDB();\n tdb.open();\n Sala = tdb.checkHall(d, h, id);\n this.id = id;\n tdb.close();\n }", "static void forwardL(Room one, Room two, WorldFrame world) {\n //built horizontal hallway part\n Random ran = world.rand();\n\n int yH = RandomUtils.uniform(ran, two.getY(), two.tEdge() + 1);\n int xH = RandomUtils.uniform(ran, one.getX(), one.rEdge() + 1);\n int lH = two.getX() - xH;\n\n if (lH > 0) {\n world.hallwaysSet().add(new Hallway(xH, yH, Direction.RIGHT, lH, world));\n }\n // built vertical part first\n\n\n int lV = one.getY() - yH;\n\n\n if (lV > 0) {\n world.hallwaysSet().add(new Hallway(xH, yH, Direction.UP, lV, world));\n }\n }", "@Override\n public void create_building(ArrayList bulding){\n House house = new House(Adress.RUE_DE_LA_PAIX);\n System.out.println(\"Vous venez de créer une maison\");\n bulding.add(house);\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Chassis createChassis();", "public HalfMarathon(String date, String startTime, int numOfWaterStations, Place place, String venueName,RunEntry entry) {\n super(date, startTime,entry);\n this.numOfWaterStations = numOfWaterStations;\n this.place = place;\n \n venue = new Town(venueName) {\n @Override\n public void place(Place place) {\n this.place = place;\n\n }\n };\n }", "public Journey createJourney(Journey journey) {\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(JourneySQLHelper.COLUMN_CAR_ID, journey.getCarID());\n\t\tvalues.put(JourneySQLHelper.COLUMN_USE_TYPE, journey.getUseType().toString());\n\t\tvalues.put(JourneySQLHelper.COLUMN_START_TIME, journey.getStartTime());\n\t\tvalues.put(JourneySQLHelper.COLUMN_START_ODOMETER, journey.getStartOdometer());\n values.put(JourneySQLHelper.COLUMN_STOP_TIME, journey.getStopTime());\n\t\tvalues.put(JourneySQLHelper.COLUMN_STOP_ODOMETER, journey.getStopOdometer());\n\t\tvalues.put(JourneySQLHelper.COLUMN_FUEL_AV_ECO, journey.getFuelAvgEconomy());\n\t\tvalues.put(JourneySQLHelper.COLUMN_FUEL_TOTAL_USED, journey.getFuelTotalUsed());\n values.put(JourneySQLHelper.COLUMN_TOTAL_DISTANCE, journey.getTotalDistance());\n values.put(JourneySQLHelper.COLUMN_AVG_SPEED, journey.getAvgSpeed());\n\t\t\n\t\tlong insertId = database.insert(JourneySQLHelper.TABLE_JOURNEYS, null, values);\n\t\t\n\t\tCursor cursor = database.query(JourneySQLHelper.TABLE_JOURNEYS, \n\t\t\t\t\t\tallColumns, JourneySQLHelper.COLUMN_ID + \" = \"\n\t\t\t\t\t\t+ insertId, null, null, null, null);\n\t\tcursor.moveToFirst(); // moves the cursor to the first row\n\t\tJourney newJourney = cursorToJourney(cursor);\n\t\tcursor.close();\n\t\treturn newJourney;\n\t}", "public BruceWayne()\n {\n GeneralPath leftSide = new GeneralPath();\n\tleftSide.moveTo(195,200);\n\tleftSide.lineTo(195,230);//neck\n\tleftSide.lineTo(150,230);//shoulder\n\tleftSide.lineTo(140,250);//shoulder slant\n\tleftSide.lineTo(140,340);//armleft\n\tleftSide.lineTo(165,340);//armbottom\n\tleftSide.lineTo(160,260);//armright\n\tleftSide.lineTo(170,270);//armpit\n\tleftSide.lineTo(170,350);//chest\n\tleftSide.lineTo(160,510);//legleft\n\tleftSide.lineTo(185,510);//legbottom\n\tleftSide.lineTo(200,360);//legright\n\tleftSide.lineTo(220,360);//middle\n\n Shape rightSide = ShapeTransforms.horizontallyFlippedCopyOf(leftSide);\n rightSide = ShapeTransforms.translatedCopyOf(rightSide, 140.0, 0.0);\n\tCircle head = new Circle(210,170,35);\n \n\twholeFigure = new GeneralPath();\n\twholeFigure.append(head,false);\n wholeFigure.append(leftSide, false);\n wholeFigure.append(rightSide, false);\n }", "TEdge createTEdge();", "Lehrkraft createLehrkraft();", "public void buildDiscreteWorld(int numOfRooms, int numOfHallways) {\n for (int i = 0; i < numOfRooms; i += 1) {\n randomBuildRoom();\n note.add(position);\n }\n\n for (int j = 0; j < numOfHallways; j += 1) {\n randomBuildHallway();\n note.add(position);\n }\n }", "SurfaceEntity createRoadEntity(Tile tile) {\r\n\t\tSurfaceEntity result = new SurfaceEntity();\r\n\t\tresult.tile = tile;\r\n\t\tresult.tile.alpha = alpha;\r\n\t\tresult.type = SurfaceEntityType.ROAD;\r\n\t\treturn result;\r\n\t}", "public Hallway01(Boolean gui){\n super(\n \"Hallway01\", \n \"Hallway connecting Personal, Laser and Net.\",\n new Exit('S', \"Personal\"),\n new Exit('E', \"Laser\"),\n new Exit('E', \"Net\"),\n null, \n \"hallway01Map.txt\");\n }", "static void builtVertical(Room one, Room two, WorldFrame world) {\n Random ran = world.rand();\n int len;\n int y;\n int smallestRWallX = Math.min(one.rEdge(), two.rEdge());\n int largestX = Math.max(one.getX(), two.getX());\n if (one.tWall() < two.getY()) {\n len = two.getY() - one.tWall();\n y = one.tWall();\n } else if (two.tWall() < one.getY()) { // two.TWall() < one.getY()\n len = one.getY() - two.tWall();\n y = two.tWall();\n } else {\n return;\n\n }\n int x = RandomUtils.uniform(ran, largestX, smallestRWallX + 1);\n\n\n if (len > 0) {\n world.hallwaysSet().add(new Hallway(x, y, Direction.UP, len, world));\n }\n }", "private static boolean makeHallway(int[][] board, int[] from, int[] to, float[] filled, Random random) {\n // ignore out of bounds attempts\n if (!(from[X] >= 0 && from[X] < board.length && from[Y] >= 0 && from[Y] < board[0].length)\n || !(to[X] >= 0 && to[X] < board.length && to[Y] >= 0 && to[Y] < board[0].length)) {\n return false;\n }\n\n int x1 = from[X];\n int x2 = to[X];\n int y1 = from[Y];\n int y2 = to[Y];\n\n board[x1][y1] = ROOM;\n board[x2][y2] = ROOM;\n\n filled[0] += 2;\n\n // keep track of directional motion\n int dirX, dirY;\n\n // find initial direction\n if (x2 > x1)\n dirX = 1; // east\n else\n dirX = -1; // west\n if (y2 > y1)\n dirY = 1; // north\n else\n dirY = -1; // south\n\n // move into random direction\n boolean firstHorizontal = random.nextBoolean();\n boolean secondHorizontal = random.nextBoolean();\n\n // making a corridor might take awhile, just continue this iterative\n // process\n while (true) {\n\n if (x1 != x2 && y1 != y2) {\n // adjust the first tile iterator\n if (firstHorizontal)\n x1 += dirX;\n else\n y1 += dirY;\n }\n\n if (x1 != x2 && y1 != y2)\n // still not equal\n {\n // adjust the second tile iterator\n if (secondHorizontal)\n x2 -= dirX;\n else\n y2 -= dirY;\n }\n\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n if (board[x2][y2] == NULL) {\n board[x2][y2] = HALL;\n filled[0]++;\n }\n // check once more if the iterators match after moving\n // if the iterators are on the same level, try connecting them\n if (x1 == x2) {\n while (y1 != y2) {\n // adjust y until we reach destination\n y1 += dirY;\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n }\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n // return that we've connected the hallway successfully\n return true;\n }\n // iterators are on the same level horizontally, so we must now\n // connect across\n if (y1 == y2) {\n while (x1 != x2) {\n // adjust y until we reach destination\n x1 += dirX;\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n }\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n return true;\n }\n }\n }", "private Room createCastle(){\n Room hallway = new Room(\"the hallway\");\n\n Room theStairs = new Room(\"the staircase\");\n Medic medic = new Medic(20, 3);\n theStairs.medic = medic;\n\n Room livingRoom = new Room(\"the living room\");\n Monster monster = new Monster(\"Grimeteeth\", 10, 100);\n livingRoom.monster = monster;\n\n Room firstFloor = new Room(\"first floor\");\n Room secondFloor = new Room(\"second floor\");\n Room thirdFloor = new Room(\"third floor\");\n monster = new Monster(\"Voodoobug\", 30, 100);\n thirdFloor.monster = monster;\n\n Room balcony = new Room(\"balcony\");\n balcony.endOfGameText = \"You fall out of the balcony, and die\";\n Room chamber = new Room(\"Chamber\");\n monster = new Monster (\"Smogstrike\", 50, 100);\n chamber.monster = monster;\n chamber.hasTreasure = true;\n chamber.endOfGameText = \"YEEES! You won the game, and found the treasure!\";\n\n Room bedchamber = new Room(\"bedchamber\");\n bedchamber.endOfGameText = \"You fall in a deep sleep, and will never wake up!\";\n\n\n /**\n * Options connecting to the rooms hallway,theStairs,sale,livingRoom variable\n */\n Connections[] hallwayConnections = new Connections[2];\n hallwayConnections[0] = new Connections(\"go left\",\"l\", theStairs);\n hallwayConnections[1] = new Connections(\"go right\",\"r\", livingRoom);\n hallway.connections = hallwayConnections;\n\n Connections[] stairsConnections = new Connections[3];\n stairsConnections[0] = new Connections(\"first floor\",\"1\", firstFloor);\n stairsConnections[1] = new Connections(\"second floor\",\"2\", secondFloor);\n stairsConnections[2] = new Connections(\"third floor\",\"3\", thirdFloor);\n theStairs.connections = stairsConnections;\n\n Connections[] firstFloorConnections = new Connections[3];\n firstFloorConnections[0] = new Connections(\"blue door\",\"b\",hallway);\n firstFloorConnections[1] = new Connections(\"red door\",\"r\",balcony);\n firstFloorConnections[2] = new Connections(\"yellow door\",\"y\",chamber);\n firstFloor.connections = firstFloorConnections;\n\n Connections[] secondFloorConnections = new Connections[1];\n secondFloorConnections[0] = new Connections(\"small door\",\"s\",chamber);\n secondFloor.connections = secondFloorConnections;\n\n Connections[] thridConnections = new Connections[2];\n thridConnections[0] = new Connections(\"big door\",\"bd\",balcony);\n thridConnections[1] = new Connections(\"elevator\",\"e\",firstFloor);\n thirdFloor.connections = thridConnections;\n\n Connections[] livingRoomConnections = new Connections[2];\n livingRoomConnections[0] = new Connections(\"iron door\",\"i\",hallway);\n livingRoomConnections[1] = new Connections(\"tree door\",\"t\",bedchamber);\n livingRoom.connections = livingRoomConnections;\n\n return hallway;\n }", "public DesiredDwellCanPayloadTranslator(ReadableCanMailbox payload, Hallway hallway) {\n super(payload, 4, MessageDictionary.DESIRED_DWELL_BASE_CAN_ID +\n ReplicationComputer.computeReplicationId(hallway));\n this.hallway = hallway;\n }", "org.landxml.schema.landXML11.RoadwayDocument.Roadway getRoadway();", "public Bike createCityBike() {\n Wheels cityWheels = new Wheels(559,50f,10000); //Räder des Stadtrads erstellen\n Gears cityGears = new Gears(3,1,5000); //Gangschaltung des Stadtrads erstellen\n Bike newCityBike = new Bike(cityGears, cityWheels, \"Stahl\", \"CB105\", true, true, 30000); //Stadtrad erstellen\n return newCityBike; //Stadtrad zurückgeben\n}", "public RailRoad() {}", "public static RedefinitionRule oneWayRule(GeoClass fromClass, GeoClass toClass) {\n\t\treturn new OneWayRule(fromClass, toClass);\n\t}", "public static TOHallOfFame getHallOfFame(int start, int end) throws InvalidInputException {\n\t\tString error = \"\";\n\t\tUserRole userRole = Block223Application.getCurrentUserRole();\n\t\tif(!(userRole instanceof Player)) {\n\t\t\terror = \"Player privileges are required to access a game's hall of fame.\";\n\t\t\tthrow new InvalidInputException(error.trim());\n\t\t}\n\t\tPlayedGame pgame = Block223Application.getCurrentPlayableGame();\n\t\tif(pgame == null) {\n\t\t\terror = \"A game must be selected to view its hall of fame.\";\n\t\t\tthrow new InvalidInputException(error.trim());\n\t\t}\n\t\tGame game = pgame.getGame();\n\t\tTOHallOfFame result = new TOHallOfFame(game.getName());\n\n\t\tif(start < 1) {\n\t\t\tstart = 1;\n\t\t}\n\t\tif(end > game.numberOfHallOfFameEntries()) {\n\t\t\tend = game.numberOfHallOfFameEntries();\n\t\t}\n\t\tstart = game.numberOfHallOfFameEntries() - start;\n\t\tend = game.numberOfHallOfFameEntries() - end;\n\n\t\tfor(int i = start; i >= end; i--) {\n\t\t\tnew TOHallOfFameEntry(i + 1, game.getHallOfFameEntry(i).getPlayername(), game. getHallOfFameEntry(i).getScore(), result);\n\t\t}\n\t\treturn result;\n\t}", "void addWay(Way w) {\n ways.put(w.id, w);\n }", "private void buildHorseRace(HorseRace hr) {\n if (hr != null && hr.getId() !=null ) {\n try {\n RaceDao raceDao = factory.createDao(RaceDao.class);\n HorseDao horseDao = factory.createDao(HorseDao.class);\n BreedDao breedDao = factory.createDao(BreedDao.class);\n\n hr.setRace(raceDao.read(hr.getRace().getId()));\n hr.setHorse(horseDao.read(hr.getHorse().getId()));\n Breed breed = breedDao.read(hr.getHorse().getBreed().getId());\n Horse horse = horseDao.read(hr.getHorse().getId());\n horse.setBreed(breed);\n hr.setHorse(horse);\n } catch (PersistentException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void buildRoad() {\n\t\t\r\n\t}", "public Lechuga(Hamburguesa h){\n this.hamburguesa = h;\n }", "private TbusRoadGraph() {}", "private IQueryBond createHSBond( IAtom translated1, IAtom translated2, IBond origBond, IBond hsBond ) {\n\t\t\n\t\tIQueryBond hsqBond = (IQueryBond) hsBond; // likely to be null\n\t\t\n\t\t\n\t\t\n\t\tIQueryBond newBond = null;\n\t\t\n\t\tboolean matches = true;\n\t\tString bondTopologyType = defineBondTopology(hsBond, origBond);\n\t\t\n\t\tif( hsBond != null ) {\n\t\t\tif( hsqBond.getProperty( origBondType ) != null )\n\t\t\t\thsBond = hsqBond.getProperty( origBondType );\n\t\t\t\n\t\t\tif( hsBond instanceof IQueryBond ) {\n\t\t\t\thsqBond = (IQueryBond) hsBond;\n\t\n\t\t\t\tmatches = hsqBond.matches(origBond);\n\t\t\t\tSystem.err.println(\"BLARG \" + hsBond.getAtom(0).getSymbol() + hsBond.getAtom(1).getSymbol() + hsBond.getOrder() + \" \" + origBond.getOrder() + matches + \" \" + hsBond + \" \" + origBond );\n\t\t\t} else {\n\t\t\t\tmatches = (hsBond.getOrder() == origBond.getOrder()) ;\n\t\t\t\tSystem.err.println(\"HECK \" + matches + \" \" + hsBond );\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//System.err.println(\"BLA2RG \" + matches + \" \" + hsBond );\n\t\t\n\t\tif( ringEnforcement ) {\n\t\t\t\n\t\t\tnewBond = createSMARTSRingChainBond( translated1, translated2, hsBond, origBond );\n\t\t\t\n\t\t} else {\n\t\t\tif( ConvenienceTools.isAromatic( translated1 ) && ConvenienceTools.isAromatic( translated2 ) && ConvenienceTools.isAromatic( origBond ) ) {\n\t\t\t\tnewBond = new AromaticQueryBond( (IQueryAtom) translated1, (IQueryAtom) translated2, origBond.getOrder(), hs.getBuilder() );\n\t\t\t\n\t\n\t\t\t\n\t\t\t/*} else if( ConvenienceTools.isAromatic( translated1 ) || ConvenienceTools.isAromatic( translated2 ) ) {\n\t\t\t\t//newBond = new AromaticOrSingleQueryBond( (IQueryAtom) translated1, (IQueryAtom) translated2, origBond.getOrder(), hs.getBuilder() );\n\t\t\t\tnewBond = new SingleOrAromaticBond(hs.getBuilder() );\n\t\t\t\tnewBond.setAtom(translated1, 0);\n\t\t\t\tnewBond.setAtom(translated2, 1);\n\t\t\t\tnewBond.setOrder(origBond.getOrder() );*/\n\t\t\t} else {\n\t\t\t\tif( matches ) {\n\t\t\t\t\t//newBond = new AnyOrderQueryBond( (IQueryAtom) translated1, (IQueryAtom) translated2, origBond.getOrder(), hs.getBuilder() );\n\t\t\t\t\t\n\t\t\t\t\t\tif( ! (origBond instanceof IQueryBond) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*if ( translated1 instanceof AtomicNumberAtom || translated2 instanceof AtomicNumberAtom ) {\n\t\t\t\t\t\t\t\tnewBond = new AnyOrderQueryBond( (IQueryAtom) translated1, (IQueryAtom) translated2, origBond.getOrder(), hs.getBuilder() );\n\t\t\t\t\t\t\t} else*/ if( ConvenienceTools.isAromatic(translated1) && ConvenienceTools.isAromatic(translated2) && ConvenienceTools.isAromatic( origBond ) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tnewBond = new AromaticQueryBond( hs.getBuilder() );\n\t\t\t\t\t\t\t\t\tnewBond.setAtom(translated1, 0);\n\t\t\t\t\t\t\t\t\tnewBond.setAtom(translated2, 1);\n\t\t\t\t\t\t\t\t\tnewBond.setOrder( Order.SINGLE );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Allow aromatic bonds to map in cases where only one atom in the bond is aromatic\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tSystem.err.println(\"ORDER1 \" + matches + \" \" + origBond + \" | \" + hsBond );\n\t\t\t\t\t\t\t\t\t//newBond = new AnyOrderQueryBond( (IQueryAtom) translated1, (IQueryAtom) translated2, origBond.getOrder(), hs.getBuilder() );\n\t\t\t\t\t\t\t\t\tboolean aromaticRing = ConvenienceTools.isAromatic(origBond) || ConvenienceTools.isAromatic(translated1) || ConvenienceTools.isAromatic(translated2);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif( aromaticRing ) {\n\t\t\t\t\t\t\t\t\t\tnewBond = new SingleOrAromaticBond( translated1.getBuilder() );\n\t\t\t\t\t\t\t\t\t\tnewBond.setOrder( Order.SINGLE );\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tnewBond = new OrderQueryBond( (IQueryAtom) translated1, (IQueryAtom) translated2, origBond.getOrder(), origBond.getBuilder() );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tnewBond.setAtom(translated1, 0);\n\t\t\t\t\t\t\t\tnewBond.setAtom(translated2, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\telse if( ConvenienceTools.isAromatic(translated1) ^ ConvenienceTools.isAromatic(translated2) ) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// if both are ring-enforced bonds, make sure the new bond is also ring-enforced - @&-,:\n\t\t\t\t\t\t\t\tif( bothRings ) {\n\t\t\t\t\t\t\t\t\tSystem.err.println(\"RING1 \" + matches + \" \" + hsBond );\n\t\n\t\t\t\t\t\t\t\t\tnewBond = createSMARTSRingChainBond(translated1, translated2, true, true, Order.SINGLE);\n\t\t\t\t\t\t\t\t} else if( chainOnly ) {\n\t\t\t\t\t\t\t\t\tSystem.err.println(\"CHAIN1 \" + matches + \" \" + hsBond );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tnewBond = createSMARTSRingChainBond(translated1, translated2, false, true, Order.SINGLE);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewBond = new SingleOrAromaticBond( hs.getBuilder() );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tnewBond.setAtom(translated1, 0);\n\t\t\t\t\t\t\t\tnewBond.setAtom(translated2, 1);\n\t\t\t\t\t\t\t\tnewBond.setOrder( Order.SINGLE );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// if both are in rings, change to generic ring bond\n\t\t\t\t\t\t\t\tif( bothRings ) {\n\t\t\t\t\t\t\t\t\tSystem.err.println(\"RING2 \" + matches + \" \" + hsBond );\n\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tnewBond.setAtom(translated1, 0);\n\t\t\t\t\t\t\t\t\tnewBond.setAtom(translated2, 1);\n\t\t\t\t\t\t\t\t\tnewBond.setOrder( Order.SINGLE );\n\t\t\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\tnewBond = createSMARTSRingChainBond(translated1, translated2, true, false, Order.SINGLE);\n\t\t\t\t\t\t\t\t} else if( chainOnly ) {\n\t\t\t\t\t\t\t\t\tSystem.err.println(\"CHAIN1 \" + matches + \" \" + hsBond );\n\t\t\t\t\t\t\t\t\tnewBond = createSMARTSRingChainBond(translated1, translated2, false, false, Order.SINGLE);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewBond = new AnyOrderQueryBond( (IQueryAtom) translated1, (IQueryAtom) translated2, origBond.getOrder(), hs.getBuilder() );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// clone the original Query Bond, though unlikely unless SMARTS queries are being mapped to the hyperstructure\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tnewBond = (IQueryBond) origBond.clone();\n\t\t\t\t\t\t\t\tnewBond.setAtom(translated1, 0);\n\t\t\t\t\t\t\t\tnewBond.setAtom(translated2, 1);\n\t\t\t\t\t\t\t\t//System.err.println(\"Blech\");\n\t\t\t\t\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.err.println(\"MATCHES NOT\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( hsBond instanceof AromaticQueryBond && origBond.getOrder() == Order.SINGLE && ! ConvenienceTools.isAromatic( origBond ) ) {\n\t\t\t\t\t\t\tSystem.out.println(\"asoidjsao\");\n\t\t\t\t\t\t\tnewBond = new SingleOrAromaticBond( DefaultChemObjectBuilder.getInstance() );\n\t\t\t\t\t\t\tnewBond.setAtom(translated1, 0);\n\t\t\t\t\t\t\tnewBond.setAtom(translated2, 1);\n\t\t\t\t\t\t\tnewBond.setOrder( Order.SINGLE );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tnewBond = new AnyOrderQueryBond( (IQueryAtom) translated1, (IQueryAtom) translated2, origBond.getOrder(), hs.getBuilder() );\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( bondFrequencies ) {\n\t\t\t\n\t\t\tsetBondFrequencyAttributes(hsBond, newBond, false);\n\t\t\t\n\t\t\tnewBond.setProperty( topologyType, bondTopologyType );\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn newBond;\n\t}", "public DesiredDwellCanPayloadTranslator(WriteableCanMailbox payload, Hallway hallway) {\n super(payload, 4, MessageDictionary.DESIRED_DWELL_BASE_CAN_ID + \n ReplicationComputer.computeReplicationId(hallway));\n this.hallway = hallway;\n }", "public HallwayGenerator(IRoomGenerationStrategy generator) {\n\t\tsetGenerationStrategy(generator);\n\t}", "public HanoiSolver(int start, int end, int depth) {\n\t\tthis.startingTower \t= start;\n\t\tthis.endingTower \t= end;\n\t\tthis.startingDepth \t= depth;\n\n\t\tthis.towerSet \t\t= new TowersOfHanoi(start,depth);\n\n\t\tthis.turnNumber \t= 0;\n\t}", "ShipmentGatewayDhl createShipmentGatewayDhl();", "private House(HouseBuilder builder) {\n\t\tthis.surface = builder.surface;\n\t\tthis.rooms = builder.rooms;\n\t\tthis.bathrooms = builder.bathrooms;\n\t\tthis.floors = builder.floors;\n\t\tthis.garage = builder.garage;\n\t\tthis.yard = builder.yard;\n\t}", "@Override\n\tvoid createNeighbourhood() {\n\t\t\n\t}", "public Checking(String n, String h, float min, float over, String route) {}", "public GeneralPath createArrowHeads() {\n return OMArrowHead.createArrowHeads(OMArrowHead.ARROWHEAD_DIRECTION_FORWARD,\n 100,\n this,\n OMArrowHead.DEFAULT_WINGTIP,\n OMArrowHead.DEFAULT_WINGLENGTH);\n }", "public static Hall newInstance(String param1, String param2) {\n Hall fragment = new Hall();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "private static void buildTunnels()\n {\n //Initialize necessary member variables\n totalCost = 0;\n connectedHills = 1;\n \n //Create a disjoint set for all of the hills on the current campus\n h = scan.nextInt();\n campus = new DisjointSet(h);\n \n //Read how many tunnels can be built\n t = scan.nextInt();\n \n //Create an array for all the possible tunnels\n edges = new edge[t];\n \n //Loop through all of the possible tunnels\n for (tunnel = 0; tunnel < t; tunnel++)\n {\n //Save all information for the current possible tunnel\n edges[tunnel] = new edge();\n }\n \n //Sort the array of tunnels by their costs\n Arrays.sort(edges);\n \n //Loop through all the possible tunnels again\n for (tunnel = 0; tunnel < t; tunnel++)\n {\n //Try to connect the hills with the current tunnel and check if it was successful\n if (campus.union(edges[tunnel].x - 1, edges[tunnel].y - 1))\n {\n //Add the cost to build that tunnel to the total cost\n totalCost += edges[tunnel].d;\n \n //Incrememnt the amount of total hills connected\n connectedHills++;\n }\n \n //Check if the tunnels have connected all of the hills\n if (connectedHills == h)\n {\n //Stop trying to build tunnels\n return;\n }\n }\n }", "private static void addWay(GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph,HashMap<Long, WayNodeOSM> osmNodes, OSMWay way) {\n \t\tfor (int j = 1; j < way.nodes.size(); ++j) {\n \t\t\t// get the star and end node of this segment of the way \n \t\t\tfinal Long startNodeId = way.nodes.get(j - 1);\n \t\t\tfinal Long endNodeId = way.nodes.get(j);\n \t\t\tNodeCppOSM node1 = createNodeIfNonexisting(osmGraph, startNodeId);\n \t\t\tnode1.lat = osmNodes.get(startNodeId).getLatitude();\n \t\t\tnode1.lon = osmNodes.get(startNodeId).getLongitude();\n \t\t\tNodeCppOSM node2 = createNodeIfNonexisting(osmGraph, endNodeId);\n \t\t\tnode2.lat = osmNodes.get(endNodeId).getLatitude();\n \t\t\tnode2.lon = osmNodes.get(endNodeId).getLongitude();\n \t\t\t// create the meta nodes for this segment\n \t\t\tfinal List<WayNodeOSM> metaNodes = new LinkedList<>();\n \t\t\tmetaNodes.add(osmNodes.get(startNodeId));\n \t\t\tmetaNodes.add(osmNodes.get(endNodeId));\n \t\t\t// for roundabouts use distance 0, so we can run around in circles at no cost\n //\t\t\tdouble distance = way.roundabout ? 0 : getDistance(osmNodes.get(startNodeId),osmNodes.get(endNodeId));\n \t\t\tdouble distance = getDistance(osmNodes.get(startNodeId),osmNodes.get(endNodeId));\n \t\t\tosmGraph.getNode(startNodeId).connectWithNodeWeigthAndMeta(osmGraph.getNode(endNodeId), distance,\n \t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, way.name, metaNodes));\n \t\t}\n \t}", "@Override\r\n public void onCreate(SQLiteDatabase db) {\n db.execSQL(\r\n \"create table HALL \" +\r\n \"(id integer primary key AUTOINCREMENT , hallName text,rent text,capacity text,floors text, location text)\"\r\n );\r\n }", "org.landxml.schema.landXML11.RoadsideDocument.Roadside addNewRoadside();", "public void createAppareil(Home h) {\n\t\tint numOfChauffages = manager.createQuery(\"Select p From Heater p\", Heater.class).getResultList().size();\n\n if (numOfChauffages == 0) {\n \tHeater e1 =new Heater(100);\n \th.getChauffages().add(e1);\n \te1.setHome(h);\n manager.persist(e1);\n \n Heater e2 =new Heater(120);\n \th.getChauffages().add(e2);\n \te2.setHome(h);\n manager.persist(e2);\n \n \tElectronicDevice e3 =new ElectronicDevice(80);\n \th.getEquipements().add(e3);\n \te3.setHome(h);\n manager.persist(e3);\n \n ElectronicDevice e4 =new ElectronicDevice(70);\n \th.getEquipements().add(e4);\n \te4.setHome(h);\n manager.persist(e4);\n }\n\t}", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "private static void addWay(GraphDirected<NodeCppOSMDirected, EdgeCppOSMDirected> osmGraph,HashMap<Long, WayNodeOSM> osmNodes, OSMWay way) {\n \t\tfor (int j = 1; j < way.nodes.size(); ++j) {\n \t\t\t// get the star and end node of this segment of the way \n \t\t\tfinal Long startNodeId = way.nodes.get(j - 1);\n \t\t\tfinal Long endNodeId = way.nodes.get(j);\n \t\t\tcreateNodeIfNonexisting(osmGraph, startNodeId);\n \t\t\tcreateNodeIfNonexisting(osmGraph, endNodeId);\n \t\t\t// create the meta nodes for this segment\n \t\t\tfinal List<WayNodeOSM> metaNodes = new LinkedList<>();\n \t\t\tmetaNodes.add(osmNodes.get(startNodeId));\n \t\t\tmetaNodes.add(osmNodes.get(endNodeId));\n \t\t\t// for roundabouts use distance 0, so we can run around in circles at no cost\n \t\t\tdouble distance = way.roundabout ? 0 : getDistance(osmNodes.get(startNodeId),osmNodes.get(endNodeId));\n \t\t\tosmGraph.getNode(startNodeId).connectWithNodeWeigthAndMeta(osmGraph.getNode(endNodeId), distance,\n \t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, way.name, metaNodes));\n \t\t\tif(!way.directed && (startNodeId != endNodeId)) {\n \t\t\t\t//a loop must not be doubled, no need for it\n \t\t\t\tosmGraph.getNode(endNodeId).connectWithNodeWeigthAndMeta(osmGraph.getNode(startNodeId), distance,\n \t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, way.name, metaNodes));\n \t\t\t}\n \t\t}\n \t}", "private void createBurgdorfRoutes(Scenario scenario, LeastCostPathCalculator router, int numOrigins) {\n\t\t// create to Burgdorf routes\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tRoute route;\n\t\t\tId<Link> fromLinkId = Id.create(startLinkIds[i], Link.class);\n\t\t\tId<Link> toLinkId = Id.create(endLinkIdBurgdorf, Link.class);\n\t\t\tLink fromLink = scenario.getNetwork().getLinks().get(fromLinkId);\n\t\t\tLink toLink = scenario.getNetwork().getLinks().get(toLinkId);\n\t\t\t\n\t\t\tPath path = router.calcLeastCostPath(fromLink.getToNode(), toLink.getFromNode(), 0.0, null, null);\n\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\n\t\t\tdouble distance = RouteUtils.calcDistance((NetworkRoute) route, scenario.getNetwork());\n\t\t\troute.setDistance(distance);\n\t\t\troute.setTravelTime(path.travelTime);\n\t\t\t\n\t\t\t((NetworkRoute) route).setLinkIds(fromLink.getId(), NetworkUtils.getLinkIds(path.links), toLink.getId());\n\t\t\t\n\t\t\troutes.put(startLinkIds[i] + \"_\" + endLinkIdBurgdorf, route);\n\t\t\t\n\t\t\tprintRoute(scenario, route, startLinkIds[i], endLinkIdBurgdorf);\n\t\t}\n\t\n\t\t// create from Burgdorf routes\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tRoute route;\n\t\t\tId<Link> fromLinkId = Id.create(startLinkIdBurgdorf, Link.class);\n\t\t\tId<Link> toLinkId = Id.create(endLinkIds[i], Link.class);\n\t\t\tLink fromLink = scenario.getNetwork().getLinks().get(fromLinkId);\n\t\t\tLink toLink = scenario.getNetwork().getLinks().get(toLinkId);\n\t\t\t\n\t\t\tPath path = router.calcLeastCostPath(fromLink.getToNode(), toLink.getFromNode(), 0.0, null, null);\n\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\n\t\t\tdouble distance = RouteUtils.calcDistance((NetworkRoute) route, scenario.getNetwork());\n\t\t\troute.setDistance(distance);\n\t\t\troute.setTravelTime(path.travelTime);\n\t\t\t\n\t\t\t((NetworkRoute) route).setLinkIds(fromLink.getId(), NetworkUtils.getLinkIds(path.links), toLink.getId());\n\t\t\t\n\t\t\troutes.put(startLinkIdBurgdorf + \"_\" + endLinkIds[i], route);\n\t\t\t\n\t\t\tprintRoute(scenario, route, startLinkIdBurgdorf, endLinkIds[i]);\n\t\t}\n\t}", "public StructureTownHallConfigRecord() {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG);\n\t}", "public static route createroute(routeparameter aRouteparameter) {\n Partitioner<Text> partitioner = aRouteparameter.getPartitioner();\n HashMap<Integer, Integer> hashBucketToPartition = aRouteparameter\n .getHashBucketToPartition();\n HashMap<Integer, Integer> rangeRouter = aRouteparameter.getRangeRouter();\n if (hashBucketToPartition == null) {\n if (rangeRouter == null) {\n return new HashRoute(partitioner);\n } else {\n return new RangeRoute(rangeRouter);\n }\n } else {\n return new BalancerHashRoute(partitioner, hashBucketToPartition);\n }\n }", "private void Create_Path() {\n lines = new Line[getPoints().size()];\n for (int i = 1; i < getLines().length; i++) {\n lines[i] = new Line(getPoints().get(way[i]).getX(), getPoints().get(way[i]).getY(), getPoints().get(way[i - 1]).getX(), getPoints().get(way[i - 1]).getY());\n }\n lines[0] = new Line(getPoints().get(way[getLines().length - 1]).getX(), getPoints().get(way[getLines().length - 1]).getY(), getPoints().get(way[0]).getX(), getPoints().get(way[0]).getY());\n\n }", "protected Entity createEntity()\n\t{\n\t\tLane lane = getLane();\n\t\t//sanity check\n\t\tif( lane instanceof PedestrianLane){\n\t\t\tPedestrianLane pLane = (PedestrianLane) lane;\n\t\t\t\n\t\t\t//create the pedestrian\n\t\t\t//Range of values within the lane a Pedestrian can be spawned at\n\t\t\tdouble rangeMin = Pedestrian.PEDESTRIAN_WIDTH/2;\n\t\t\tdouble rangeMax = PedestrianLane.LANE_WIDTH - Pedestrian.PEDESTRIAN_WIDTH/2;\n\t\t\t\n\t\t\tdouble randRange = rangeMin + (rangeMax - rangeMin)*Utils.random();\n\t\t\t\n\t\t\tdouble x = pLane.x() - randRange*Math.sin(pLane.dirRad());\n\t\t\tdouble y = pLane.y() + randRange*Math.cos(pLane.dirRad());\n\t\t\t\n\t\t\tif (x == pLane.x()) {\n\t\t\t\tx -= 7.5*Math.sin(pLane.dirRad());\n\t\t\t} else if (x == pLane.x() -PedestrianLane.LANE_WIDTH*Math.sin(pLane.dirRad())) {\n\t\t\t\tx += 7.5*Math.sin(pLane.dirRad());\n\t\t\t}\n\t\t\tif (y == pLane.y()) {\n\t\t\t\ty += 7.5*Math.cos(pLane.dirRad());\n\t\t\t} else if (y == pLane.y() +PedestrianLane.LANE_WIDTH*Math.cos(pLane.dirRad())) {\n\t\t\t\ty -= 7.5*Math.cos(pLane.dirRad());\n\t\t\t}\n\t\t\t\n\t\t\tPedestrian p = new Pedestrian(x, y, pLane.dirDeg(), pLane);\n\t\t\treturn p;\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"ERROR: Can't add a pedestrian to a non pedestrian lane\");\n\t\t\t\treturn null;\n\t\t\t}\n\n\t}", "private IEdge<S> createEdge(final S symbol_, final Integer state_)\n\t{\n\t\treturn new Edge<>(symbol_, state_);\n\t}", "public Triangle(int h, int b){\n if(h == b){\n height = h;\n base = b;\n }\n else{\n height = h;\n base = height;\n }\n }", "public void writeWay(long id, Way way) throws IOException;", "static void backwardL(Room one, Room two, WorldFrame world) {\n Random ran = world.rand();\n int yH = RandomUtils.uniform(ran, two.getY(), two.tWall());\n int xH = two.rWall();\n int lH = RandomUtils.uniform(ran, one.getX() - two.rWall(), one.rWall() - two.rWall());\n\n if (lH > 0) {\n\n\n world.hallwaysSet().add(new Hallway(xH, yH, Direction.RIGHT, lH, world));\n }\n // built vertical part first\n int xV = xH + lH;\n int lV = one.getY() - yH;\n\n\n if (lV > 0) {\n world.hallwaysSet().add(new Hallway(xV, yH, Direction.UP, lV, world));\n }\n }", "private static Lane newLaneConnection(Lane upLane, Lane downLane, boolean createCurve, Lane oldLane, boolean sameOutlink) {\n \t\tdouble laneWidth = downLane.getWidth();\r\n \t\tLane newLane = new Lane(null, null, null, 0, laneWidth, Lane.NOORIGIN, Lane.NODESTINATION);\r\n \t\tnewLane.addDownLane(downLane);\r\n \t\tnewLane.addUpLane(upLane);\t\t\t\t\t\t\t\r\n \t\tdownLane.addUpLane(newLane);\r\n \t\tupLane.addDownLane(newLane);\r\n \t\tif (null == upLane.getLaneVerticesCenter()) {\r\n \t\t\tSystem.err.println(\"newLaneConnection: linkPointList is null\");\r\n \t\t\tupLane.getLaneVerticesCenter();\r\n \t\t\treturn null;\r\n \t\t}\r\n \t\tif (null == downLane.getLaneVerticesCenter()) {\r\n \t\t\tSystem.err.println(\"newLaneConnection: linkPointList is null\");\r\n \t\t\treturn null;\r\n \t\t}\r\n \t\tif (createCurve) {\r\n \t\t\tArrayList<Vertex> up = upLane.getLaneVerticesCenter();\r\n \t\t\tArrayList<Vertex> down = downLane.getLaneVerticesCenter();\t\t\r\n \t\t\tPoint2D.Double ctrlPoint = \tCurves.createControlPoint(up, down);\r\n \t\t\tnewLane.setCtrlPointCenter(ctrlPoint);\r\n \t\t\tArrayList<Vertex> laneVerticesCenter = new ArrayList<Vertex>();\r\n \t\t\tlaneVerticesCenter = Curves.connectVerticesCurve(up, down, ctrlPoint, 0.3);\r\n \t\t\t// laneVerticesCenter.get(0).setPoint(up.get(up.size()-1).getX(), up.get(up.size()-1).getY(), up.get(up.size()-1).getZ());\r\n \t\t\t// laneVerticesCenter.get(laneVerticesCenter.size()-1).setPoint(down.get(0).getX(), down.get(0).getY(), down.get(0).getZ());\r\n \t\t\tnewLane.setDesignLine(laneVerticesCenter);\t\t\t\r\n \t\t\tnewLane.setLaneVerticesInner(Planar.createParallelVertices(laneVerticesCenter, - newLane.getLateralWidth() / 2));\r\n \t\t\tnewLane.setLaneVerticesOuter(Planar.createParallelVertices(laneVerticesCenter, + newLane.getLateralWidth() / 2));\r\n \t\t}\r\n \t\telse {\r\n \t\t\tboolean sameUp = false;\r\n \t\t\tboolean sameDown = false;\r\n \t\t\tArrayList<Vertex> laneVerticesCenter = new ArrayList<Vertex>();\r\n \t\t\tArrayList<Vertex> prevLaneVerticesCenter = oldLane.getUp().get(0).getLaneVerticesCenter();\r\n \t\t\tVertex oldUp = prevLaneVerticesCenter.get(prevLaneVerticesCenter.size()-1);\r\n \t\t\tprevLaneVerticesCenter = oldLane.getDown().get(0).getLaneVerticesCenter();\r\n \t\t\tVertex oldDown = prevLaneVerticesCenter.get(0);\r\n \t\t\tVertex up = upLane.getLaneVerticesCenter().get(upLane.getLaneVerticesCenter().size()-1);\r\n \t\t\tVertex down = downLane.getLaneVerticesCenter().get(0);\t\t\r\n \t\t\t\r\n \t\t\tif (up.equals(oldUp) && sameOutlink)\r\n \t\t\t\tsameUp = true;\r\n \t\t\tif (down.equals(oldDown))\r\n \t\t\t\tsameDown = true;\r\n \t\t\t// create parallel vertices\r\n \t\t\tprevLaneVerticesCenter = oldLane.getLaneVerticesCenter();\r\n \t\t\tlaneVerticesCenter = Planar.createParallelVertices(prevLaneVerticesCenter, -oldLane.getLateralWidth());\r\n \t\t\t// if same upLane: create weighted vertices inbetween\r\n \t\t\tif (sameUp == true) {\r\n \t\t\t\tlaneVerticesCenter = Planar.createPartlyParallelVertices(prevLaneVerticesCenter, laneVerticesCenter, sameUp, sameDown);\r\n \t\t\t}\r\n \t\t\tnewLane.setDesignLine(laneVerticesCenter);\r\n \t\t\tnewLane.setLaneVerticesInner(Planar.createParallelVertices(laneVerticesCenter, - newLane.getLateralWidth() / 2));\r\n \t\t\tnewLane.setLaneVerticesOuter(Planar.createParallelVertices(laneVerticesCenter, + newLane.getLateralWidth() / 2));\r\n \t\t}\r\n \t\treturn newLane; \t\r\n }", "public House()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(480, 352, 1); \n addObject(new GravesHouse(),110,60);\n addObject(new Kid(),300,200);\n addObject(new Sofa(),190,270);\n addObject(new Piano(),275,100);\n }", "@SubL(source = \"cycl/sbhl/sbhl-link-methods.lisp\", position = 12676) \n public static final SubLObject create_new_sbhl_link(SubLObject direction, SubLObject mt, SubLObject tv, SubLObject node, SubLObject module) {\n if ((module == UNPROVIDED)) {\n module = NIL;\n }\n if ((NIL != module)) {\n checkType(module, $sym4$SBHL_MODULE_P);\n }\n {\n SubLObject link = NIL;\n link = sbhl_links.create_sbhl_direction_link(direction, sbhl_links.create_sbhl_mt_links(mt, sbhl_links.create_sbhl_tv_links(tv, node)), module);\n return link;\n }\n }", "public void addHouse(House h) {\n\t\tObject[][] newContents = new Object[this.contents.length + 1][2];\n\n\t\tfor (int i = 0; i < this.contents.length; i++) {\n\t\t\tnewContents[i][0] = this.contents[i][0];\n\t\t\tnewContents[i][1] = this.contents[i][1];\n\t\t}\n\t\t\n\t\tnewContents[this.contents.length][0] = h.getZipCode();\n\t\tnewContents[this.contents.length][1] = h.getCity();\n\t\t\n\t\tHouse[] newHousesArray = new House[this.housesArray.length + 1];\n\t\tfor (int i = 0; i < this.housesArray.length; i++) {\n\t\t\tnewHousesArray[i] = this.housesArray[i];\n\t\t}\n\t\t\n\t\tnewHousesArray[this.housesArray.length] = h;\n\t\t\n\t\tthis.housesArray = newHousesArray;\n\t\t\n\t\tthis.contents = newContents;\n\t\t\n\t\tthis.fireTableDataChanged();\n\t}", "public HalfMarathon(String date, String startTime, int numOfWaterStations,int changingFacilities, Place place, String venueName,RunEntry entry) {\n super(date, startTime,entry);\n this.numOfWaterStations = numOfWaterStations; \n this.place = place; \n venue = new Park(venueName, changingFacilities) {\n @Override\n public void place(Place place) {\n this.place = place;\n\n }\n };\n }", "public CinemaHallRecord() {\n super(CinemaHall.CINEMA_HALL);\n }", "public void setTownHall(TownHallBean th){\r\n this.th = th;\r\n }", "HdbdtiModel createHdbdtiModel();", "void create(Node node) {\n if (node.table.negatives() == 0) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n if (node.table.positives() == 0) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n\r\n //If no test split the data, make it a leaf with the majoriti of the target atribute\r\n int atr;\r\n //Choose the best atribute\r\n atr = this.chooseBestAtrib(node);\r\n node.atribute = atr;\r\n\r\n //No atribute split the data, so make the node a leaf with the majoriti of the class (either positive or negative)\r\n if (node.atribute == -1) {\r\n //System.out.println(\"Atribute is -1 in TeeBuidler.create\");\r\n if (node.table.negatives() > node.table.positives()) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n if (node.table.positives() >= node.table.negatives()) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n }\r\n\r\n Table table_left = new Table(), table_right = new Table();\r\n node.table.splitByAtrib(node.atribute, table_left, table_right);\r\n\r\n //Create two children for the current node //parameters: identifier,parent_result,atribute of split,id_child1, id_child2, table\r\n node.child_left = new Node(node.id + node.id, \"1\", -1, -1, -1, table_left);\r\n node.child_right = new Node(node.id + node.id+1, \"0\", -1, -1, -1, table_right);\r\n node.id_child_left = node.id + node.id;\r\n node.id_child_right = node.id + node.id+1;\r\n\r\n\r\n TreeBuilder builder = new TreeBuilder();\r\n builder.create(node.child_left);\r\n builder.create(node.child_right);\r\n\r\n }", "private static void createPath(Path path) {\r\n\t\tString tempStr = \"\";\r\n\t\tint finished = 1;\r\n\t\tint tempId = -1;\r\n\t\tList<GeoCoordinate> polyline = new ArrayList<GeoCoordinate>();\r\n\t\tList<Place> placeList = new ArrayList<Place>();\r\n\t\tContainerNII pathNii = new ContainerNII();\r\n\t\tPlace place;\r\n\t\t\r\n\t\twhile (finished == 1){\r\n\t\t\t\r\n\t\t\tplace = new Place();\r\n\t\t\tcreatePlace(place);\r\n\t\t\tplaceList.add(place);\r\n\t\t\tfinished = checkContinue(\"place\");\r\n\t\t}\r\n\t\tpath.setPlaces(placeList);\r\n\t\t\r\n\t\tif ((tempId = insertInteger(\"path id: \")) != -1)\r\n\t\t\tpath.setId(tempId);\t\r\n\t\t\r\n\t\tinsertNIIValues(pathNii, \"path\");\r\n\t\tpath.setNii(pathNii);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path length: \")) != null)\r\n\t\t\tpath.setLength(tempStr);\r\n\t\t\r\n\t\tinsertPolyline(polyline, strPath);\r\n\t\tpath.setPolyline(polyline);\r\n\t\t\r\n\t\tif ((tempStr = insertString(\"path duration: \")) != null)\r\n\t\t\tpath.setDuration(tempStr);\r\n\t\t\r\n\t}", "Hazard createHazard();", "static String makeEdge(String id,\n String source,\n String target,\n String relationship,\n int causal) {\n return format(EDGE_FMT, id, source, target, relationship, causal);\n }", "public Board createBoard(Square[][] grid) {Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\");assert grid != null; Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1053\"); Board board = new Board(grid); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1079\"); int width = board.getWidth(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1115\"); int height = board.getHeight(); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1148\"); for (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tSquare square = grid[x][y];\n\t\t\t\tfor (Direction dir : Direction.values()) {\n\t\t\t\t\tint dirX = (width + x + dir.getDeltaX()) % width;\n\t\t\t\t\tint dirY = (height + y + dir.getDeltaY()) % height;\n\t\t\t\t\tSquare neighbour = grid[dirX][dirY];\n\t\t\t\t\tsquare.link(neighbour, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t} Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1183\"); Collect.Hit(\"BoardFactory.java\",\"createBoard(Square[][] grid)\", \"1552\");return board ; }", "H3 createH3();", "public void createEdges() {\n \tfor(String key : ways.keySet()) {\n \t Way way = ways.get(key);\n \t if(way.canDrive()) {\n \t\tArrayList<String> refs = way.getRefs();\n \t\t\t\n \t\tif(refs.size() > 0) {\n \t\t GPSNode prev = (GPSNode) this.getNode(refs.get(0));\n \t\t drivableNodes.add(prev);\n \t\t \n \t\t GPSNode curr = null;\n \t\t for(int i = 1; i <refs.size(); i++) {\n \t\t\tcurr = (GPSNode) this.getNode(refs.get(i));\n \t\t\tif(curr == null || prev == null)\n \t\t\t continue;\n \t\t\telse {\n \t\t\t double distance = calcDistance(curr.getLatitude(), curr.getLongitude(),\n \t\t\t\t prev.getLatitude(), prev.getLongitude());\n\n \t\t\t GraphEdge edge = new GraphEdge(prev, curr, distance, way.id);\n \t\t\t prev.addEdge(edge);\n \t\t\t curr.addEdge(edge);\n \t\t\t \n \t\t\t drivableNodes.add(curr);\n \t\t\t prev = curr;\n \t\t\t}\n \t\t }\t\n \t\t}\n \t }\n \t}\n }", "public HomePieceOfFurniture createHomePieceOfFurniture(PieceOfFurniture piece) {\n if (piece instanceof DoorOrWindow) {\n return new HomeDoorOrWindow((DoorOrWindow)piece);\n } else if (piece instanceof Light) {\n return new HomeLight((Light)piece);\n } else {\n return new HomePieceOfFurniture(piece);\n }\n }", "void setRoadway(org.landxml.schema.landXML11.RoadwayDocument.Roadway roadway);", "public UISnake(int startW, int startH) {\n\t\tsuper(startW, startH);\n\t\thead = new HeadTile(startW, startH, direction, this);\n\t\tlastTile = new BodyTile(800, 800, this);\n\t}", "FromTable createFromTable();", "public void makeEdge(char start,char end,int distance){\n\n Edge e = new Edge(start,end,distance);\n adjList[getIdx(start)].addFirst(e);\n //undirected graph add two edges in opposite direction\n e = new Edge(end,start,distance);\n adjList[getIdx(end)].addFirst(e);\n numEdges++;\n }", "public static com.services.model.BusRoute create(long brId) {\n\t\treturn getPersistence().create(brId);\n\t}", "public CinemaHallRecord(Long id, Integer hallNumber, Long cinemaId) {\n super(CinemaHall.CINEMA_HALL);\n\n set(0, id);\n set(1, hallNumber);\n set(2, cinemaId);\n }", "public HanoiTower(){\n\n }", "static void neighborhood()\r\n { \r\n // Puts the earth in a world and the three different color turtles in that world\r\n earth = new World();\r\n turtle1 = new Turtle(earth);\r\n turtle1.setColor(Color.BLUE);\r\n turtle2 = new Turtle(earth);\r\n turtle2.setColor(Color.RED);\r\n turtle3 = new Turtle(earth);\r\n turtle3.setColor(Color.GREEN);\r\n house(100, 100, turtle1);\r\n house(250, 100, turtle2);\r\n house(400, 100, turtle3);\r\n\r\n }", "public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected Path constructPath(DFNode node) {\n if (node == null) {\n return null;\n }\n\n Path result = new Path();\n result.cost = node.getCost();\n while (node.parent != null) {\n result.add(0, new ActionStatePair(node.action, node.state));\t//add state to the beginning of list\n node = node.parent;\n }\n result.head = node.state;\t//now node is the head of the path\n\n return result;\n }", "public Hole(Map map){\n //tree\n ModelLoader loader = new ObjLoader();\n model = loader.loadModel(Gdx.files.internal(\"hole/flagBlue.obj\"));\n hole = new ModelInstance(model);\n\n hole.transform.translate(map.getHolePosTranslV2().x, map.getHeight(map.getHolePosTranslV2(), -0.5f),map.getHolePosTranslV2().y ) ;\n hole.transform.scl(2f);\n }", "protected Arena makeGame(Arena one, Arena two){\n\t\tGameMap map = maps.get(random.nextInt(maps.size()));\n\t\tfinalBuilder.setArenas(one, two);\n\t\tArena arena = finalBuilder.newArena();\n\t\tarena.setGameMap(map);\n\t\tUser leader = null;\n\t\tfor(ArenaSlot slot:arena.getSlots()){\n\t\t\tif (slot.getUser()!=null){\n\t\t\t\tleader = slot.getUser();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassert leader != null;\n\t\tarena.getAttributes().put(\"hostID\", String.valueOf(leader.getId()));\n\t\tarena.setName(leader.getName() + \"的房间\");\n\t\treturn arena;\n\t}", "private Shape createPath(final Geometry geom) {\n return new LiteShape(geom, true, maxDistance);\n }", "H2 createH2();", "ShipmentRouteSegment createShipmentRouteSegment();", "public void constructGraph(){\r\n\t\tmyGraph = new Graph();\r\n\r\n\t\tfor(int i =0;i<=35;i++) {\r\n\t\t\tmyGraph.addVertex(allSpots[i]);\r\n\t\t}\r\n\r\n\t\tfor(int i =0;i<=35;i++) {\r\n\t\t\tint th = i;\r\n\t\t\twhile(th%6!=0) {\r\n\t\t\t\tth--;\r\n\t\t\t}\r\n\t\t\tfor(int h=th;h<=th+5;h++) {\r\n\t\t\t\tif(h!=i) {\r\n\t\t\t\t\tif(allSpots[i].equals(allSpots[h])) {\t\t\r\n\t\t\t\t\t\tmyGraph.addEdge(allSpots[i], allSpots[h]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tint tv=i;\r\n\t\t\twhile(tv-6>0) {\r\n\t\t\t\ttv=tv-6;\r\n\t\t\t}\r\n\t\t\tfor(int v=tv;v<36; v=v+6) {\r\n\t\t\t\tif(v!=i) {\r\n\t\t\t\t\tif(allSpots[i].equals(allSpots[v])) {\t\t\r\n\t\t\t\t\t\tmyGraph.addEdge(allSpots[i], allSpots[v]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Add verticies that store the Spot objects\r\n\t\t//Add edges to connect spots that share a property along an orthogonal direction\r\n\r\n\t\t//This is the ONLY time it is ok to iterate the array.\r\n\t\t\r\n\t\t//myGraph.addVert(...);\r\n\t\t//myGraph.addEdge(...);\r\n\t}", "void objectCreated (HyperEdge hedge);", "H4 createH4();", "boolean CanUseRoadBuilder(EdgeLocation spot1, EdgeLocation spot2);" ]
[ "0.7005917", "0.6838355", "0.65769523", "0.62302876", "0.590426", "0.5759096", "0.55600625", "0.55589175", "0.5315545", "0.5305329", "0.5279135", "0.5218562", "0.5217106", "0.5197105", "0.51597166", "0.5135517", "0.51275235", "0.510077", "0.5094231", "0.5093247", "0.5087535", "0.50847304", "0.50606287", "0.5059234", "0.5053909", "0.5017239", "0.50155413", "0.5015182", "0.4993216", "0.49632698", "0.4959962", "0.49534002", "0.49520662", "0.49486002", "0.4946675", "0.49292892", "0.49235985", "0.4920497", "0.49127743", "0.49058133", "0.49046585", "0.48870108", "0.4886524", "0.48741373", "0.48720264", "0.48432288", "0.48415774", "0.48162675", "0.4803947", "0.4796392", "0.47948247", "0.47925252", "0.47696584", "0.47626218", "0.47615674", "0.47575074", "0.47468233", "0.47391048", "0.4737365", "0.47360805", "0.47354814", "0.47347483", "0.47344384", "0.47336122", "0.47264737", "0.47114897", "0.4710003", "0.4709202", "0.46949568", "0.46864495", "0.46765673", "0.4673456", "0.4662447", "0.46587306", "0.46584436", "0.46575683", "0.46542168", "0.46495825", "0.46487048", "0.46484038", "0.46348667", "0.46309254", "0.46291474", "0.46180937", "0.46158415", "0.46140048", "0.46107548", "0.46107057", "0.46085778", "0.45977658", "0.45930538", "0.45920613", "0.45844138", "0.4581456", "0.45812812", "0.45809376", "0.45784512", "0.45671108", "0.45664936", "0.4565099" ]
0.81571174
0
Creates a box from a hallway
private Room boxCreatorFromHallway(Hallway hallway) { int[] previous = hallway.bottomleft; int length = hallway.length; String pdirection = hallway.orientation; int width = r.nextInt(5) + 5; int height = r.nextInt(6) + 5; if (pdirection.equals("up")) { int[] coordinates = new int[2]; coordinates[0] = r.nextInt(width - 2) + previous[0] + 2 - width + 1; coordinates[1] = previous[1] + length; ArrayList<String> sidesavailable = arrayMaker(pdirection); String numberofrooms = "Room " + (this.numberofRooms + 1); String received = "S"; Room room = new Room(1, width, height, coordinates, false, sidesavailable, numberofrooms, received); if (overlapRooms(room)) { return null; } else { this.numberofRooms += 1; boxCreator(coordinates, width, height); tiles[previous[0] + 1][previous[1] + length] = Tileset.FLOWER; this.rooms.put(this.numberofRooms, room); return room; } } else if (pdirection.equals("down")) { int[] coordinates = new int[2]; coordinates[0] = r.nextInt(width - 2) + previous[0] + 2 - width + 1; coordinates[1] = previous[1] - height; ArrayList<String> sidesavailable = arrayMaker(pdirection); String numberofrooms = "Room " + (this.numberofRooms + 1); String received = "N"; Room room = new Room(1, width, height, coordinates, false, sidesavailable, numberofrooms, received); if (overlapRooms(room)) { return null; } else { this.numberofRooms += 1; boxCreator(coordinates, width, height); tiles[previous[0] + 1][previous[1]] = Tileset.FLOWER; this.rooms.put(this.numberofRooms, room); return room; } } else if (pdirection.equals("right")) { int[] coordinates = new int[2]; coordinates[0] = previous[0] + length; coordinates[1] = r.nextInt(height - 2) + previous[1] + 2 - height + 1; ArrayList<String> sidesavailable = arrayMaker(pdirection); String numberofrooms = "Room" + (this.numberofRooms + 1); String received = "W"; Room room = new Room(1, width, height, coordinates, false, sidesavailable, numberofrooms, received); if (overlapRooms(room)) { return null; } else { this.numberofRooms += 1; boxCreator(coordinates, width, height); tiles[previous[0] + length][previous[1] + 1] = Tileset.FLOWER; this.rooms.put(numberofRooms, room); return room; } } else { int[] coordinates = new int[2]; coordinates[0] = previous[0] - width; coordinates[1] = r.nextInt(height - 2) + previous[1] + 2 - height + 1; ArrayList<String> sidesavailable = arrayMaker(pdirection); String numberofrooms = "Room" + (this.numberofRooms + 1); String received = "E"; Room room = new Room(1, width, height, coordinates, false, sidesavailable, numberofrooms, received); if (overlapRooms(room)) { return null; } else { this.numberofRooms += 1; boxCreator(coordinates, width, height); tiles[previous[0]][previous[1] + 1] = Tileset.FLOWER; this.rooms.put(this.numberofRooms, room); return room; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Hallway hallWayCreatorFromHallway(Hallway hallway) {\n int width;\n int height;\n if (hallway.orientation.equals(\"up\") || hallway.orientation.equals(\"down\")) {\n width = 3;\n height = hallway.length;\n } else {\n width = hallway.length;\n height = 3;\n }\n\n int randside = r.nextInt(hallway.sides.size());\n String direction = hallway.sides.remove(randside);\n Hallway modifiedhallway = hallway;\n String before = hallway.previousobject;\n\n\n return hallWayCreator(modifiedhallway.bottomleft, width, height, direction, before, true);\n }", "public void createHallway(int len) {\n createRoom(len, 0, 0);\n }", "Box(double w, double h, double d) {\n\n widgh =w;\n height =h;\n depth =d;\n\n}", "Box(double h, double w, Double d){\r\n\r\n Height = h;\r\n Width = w;\r\n Depth = d;\r\n }", "private void drawBox(Graphics window, int hsBtoRGB, int x, int y) {\n\t\t\n\t}", "public void addBox()\n {\n if(Student.sittingRia==false) {\n box = new BoxRia(\"chalkboard.png\",4,2);\n addObject(box,box.myRow,box.mySeat);\n chalk = new BoxRia(\"chalk.png\",0,0);\n addObject(chalk,2,3);\n }\n }", "private void drawBox(Graphics2D g2d, int y, int wid, int hei) {\n g2d.setColor(Dark_Gray);\n Triangle triangle1 = new Triangle(new Point(wid / 3, y), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle1.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle2 = new Triangle(new Point(2 * wid / 3, y + hei / 10), new Point(2 * wid / 3, y), new Point(wid / 3, y + hei / 10));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid / 3, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10), new Point(wid / 3 + 8, y + hei / 10 - 8));\n triangle3.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle4 = new Triangle(new Point(2 * wid / 3, y), new Point(2 * wid / 3 - 8, y), new Point(2 * wid / 3 - 8, y + 8));\n triangle4.fill(g2d);\n g2d.setColor(Color.BLACK);\n g2d.fillRect(wid / 3 + 4, y + 4, wid / 3 - 8, hei / 10 - 8);\n }", "private void generateBoxes(int height, int length) {\n\t\tint boxId;\n\t\t\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\tfor (int j=0; j<squares[i].length; j++) {\n\t\t\t\tboxId=j/length+((i/height)*height);\n\t\t\t\t\n\t\t\t\tif (boxes[boxId]==null)\n\t\t\t\t\tboxes[boxId]=new Box(height*length);\n\t\t\t\tboxes[boxId].add(squares[i][j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i=0; i<boxes.length; i++) {\n\t\t\tboxes[i].setInitials();\n\t\t}\n\t}", "Box(){\n System.out.println(\"constructing box\");\n width = 10;\n height = 10;\n depth = 10;\n}", "Box(double w, double h, double d)\n\t{\n\t\twidth = w;\n\t\theight = h;\n\t\tdepth = d;\n\t\t\n\t}", "Box(){\r\n Height = -1; // Used -1 to initiate an uninitialized Box. \r\n Width = -1;\r\n Depth = -1;\r\n }", "BigBox(float x, float y, float w, float h, float strokeWeight, Box... littleBoxes) {\r\n super(x, y, w, h, strokeWeight);\r\n boxes = littleBoxes;\r\n shadow = new Box(x + 2.5f, y + 2.5f, w, h, 0, Colour.GREY);\r\n group();\r\n }", "public HBox TableBottomBox()\n {\n HBox bottomBox = new HBox();\n bottomBox.setAlignment(Pos.BOTTOM_RIGHT);\n bottomBox.setSpacing(400);\n\n // add button to add to bottom box\n Button homeButton = new Button();\n homeButton.setPrefWidth(200);\n homeButton.setPrefHeight(50);\n homeButton.setText(\"Home\");\n \n homeButton.setOnMouseClicked((event -> {\n ui.goToScene(new HomeScene(ui));\n }));\n\n Button addNewButton = new Button();\n addNewButton.setPrefWidth(200);\n addNewButton.setPrefHeight(50);\n addNewButton.setText(\"Add New Hike\");\n \n addNewButton.setOnMouseClicked((event -> {\n ui.goToScene(new CreateHikeScene(ui));\n }));\n \n bottomBox.getChildren().addAll(addNewButton, homeButton);\n \n return bottomBox;\n }", "public void makeBottomBox() {\n if (timePanel == null) {\n Util.spew (\"makeBottomBox: null timePanel\");\n return;\n }\n bottomBox = new VBox(\"bottomBox\", VBox.Border.TWO_PIXELS_LEFT_RIGHT_BOTTOM_BORDER);\n BoxConstraints bc = new BoxConstraints(\n BoxConstraints.Stretch.SPRING, BoxConstraints.Align.FILL);\n\n // Put the time panel in an HBox and add to the bottom box\n timeBox = new HBox(\"timeBox\", HBox.Border.ONE_PIXEL_BELOW_BORDER);\n timeBox.setBackground(Color.white);\n bc.stretchType = BoxConstraints.Stretch.SPRING;\n timeBox.add(timePanel, bc);\n bc.stretchType = BoxConstraints.Stretch.INCOMPRESSIBLE;\n bottomBox.add(timeBox, bc);\n\n timeBox.setVisible(timePanel.isVisible());\n }", "private HBox addBottomBox() {\n HBox bottom = new HBox();\n bottom.setAlignment(Pos.CENTER_LEFT);\n bottom.setStyle(\"-fx-background-color: DAE6F3;\");\n\n HBox pB = new HBox();\n pB.setPrefWidth(300);\n TextField pT = getTextField(\"Plant\", \"Enter an Integer number for Plant <=30\", \"Enter a custom number for Plant quantity.\");\n pB.getChildren().add(pT);\n\n HBox tB = new HBox();\n TextField tT = getTextField(\"Yoshi\", \"Enter an Integer number for Yoshi <=30\", \"Enter a custom number for Yoshi quantity.\");\n tB.getChildren().add(tT);\n\n bottom.getChildren().addAll(pB, tB);\n return bottom;\n }", "public Box()\n\t{\n\t\t\n\t\ttopLeftX = 50;\n\t\ttopLeftY = 50;\n\t\twidth = 50;\n\t\theight = 25;\n\t\t\n\t}", "Box(Box ob)\n\t{\n\t\t//pass object to constructor\n\t\twidth = ob.width;\n\t\theight = ob.height;\n\t\tdepth = ob.depth;\n\t\t\n\t\t\n\t}", "private HBox createTopOrderBox() {\n\t\tHBox h = new HBox();\n\t\tHBox.setMargin(h, new Insets(4));\n\t\t\n\t\t//Create the labels for the current order\n\t\tLabel l1 = new Label(\"Order: \");\n\t\tint currOrder = noOfOrders+1;\n\t\tLabel l2 = new Label(\"\"+currOrder);\n\t\t\n\t\t//A divider for neatness\n\t\tRegion r = new Region();\n\t\tr.setPrefWidth(150);\n\t\t\n\t\t//Create the label and TextField for the ticks we want from the user\n\t\tLabel l3 = new Label(\"TicksToPack: \");\n\t\tTextField tf = new TextField();\n\t\ttf.setPromptText(\"value between 0-99\");\n\t\t//Assign the TextField to the currentOrder variable to reference later\n\t\tcurrentOrder.setTickNo(tf);\n\t\t\n\t\t//Add all this to the HBox and return it.\n\t\th.getChildren().addAll(l1,l2,r,l3,tf);\n\t\treturn h;\n\t}", "Box(Box ob){ //passing object to constructor\n\t\twidth = ob.width;\n\t\theight = ob.height;\n\t\tdepth = ob.depth;\n\t\t}", "Box(double len){\r\n Height = Width = Depth = len;\r\n\r\n }", "private BioMightBoundBox setupDefaultBoundBox(String parentID) \r\n\t{\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t\r\n\t\t//**********************************************************************\r\n\t\t// ARMS BOUND BOX\t\t\r\n\t\t//\r\n\t\t// Set up the Bounding Box for the Arms\r\n\t\t// For default model, length of arms is 4.5\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-15.0);\r\n\t\tzPos= new BigDecimal(-5.0);\r\n\t\r\n\t\txVector= new BigDecimal(11.5);\r\n\t\tyVector= new BigDecimal(6.0); \r\n\t\tzVector= new BigDecimal(5.0);\r\n\t\t\r\n\t\t// Setup the boundbox\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\t// Set up its connectors\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t//********************************************\r\n\t\t// ARM - ORGAN CONNECTORS\r\n\t\t//********************************************\r\n\t\r\n\t\t// EpitheliumTissue Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t//********************************************\t\r\n\t\t// ARMS - VASCULAR CONNECTORS \r\n\t\t//********************************************\r\n\t\r\n\t\t// InternalCarotidArteryEpithelium\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"InternalCarotidArteryEpithelium\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"InternalCarotidArteryEpithelium\", bioMightConnector);\r\n\t\r\n\t\t// ExternalCarotidArteryEpithelium \r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ExternalCarotidArteryEpithelium\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ExternalCarotidArteryEpithelium\", bioMightConnector);\r\n\t\r\n\t\t//********************************************\r\n\t\t// ARMS - MUSCULAR CONNECTORS\r\n\t\t//********************************************\r\n\r\n\t\r\n\t\t//********************************************\r\n\t\t// ARMS - SKELETAL CONNECTORS\r\n\t\t//********************************************\r\n\r\n\t\t// ThoracicVertebrae T6 \r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"CervicalVertebrae\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"CervicalVertebrae\", bioMightConnector);\r\n\t\t\r\n\t\t\r\n\t\t// Stuff the Connectors into the Bounding Box \r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\treturn (bioBoundBox);\t\r\n\t}", "void setBox();", "private void boxCreator(int[] pos, int width, int height) {\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1]] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height; y++) {\n tiles[pos[0]][y] = Tileset.WALL;\n }\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1] + height] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height + 1; y++) {\n tiles[pos[0] + width][y] = Tileset.WALL;\n }\n for (int y = pos[1] + 1; y < pos[1] + height; y++) {\n for (int x = pos[0] + 1; x < pos[0] + width; x++) {\n tiles[x][y] = Tileset.FLOWER;\n }\n }\n }", "public Box( Box alteBox ) {\n\t\tsetLaenge( alteBox.getLaenge() );\n\t\tsetBreite( alteBox.getBreite() );\n\t\tsetHoehe( alteBox.getHoehe() );\n\t}", "public House()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(480, 352, 1); \n addObject(new GravesHouse(),110,60);\n addObject(new Kid(),300,200);\n addObject(new Sofa(),190,270);\n addObject(new Piano(),275,100);\n }", "Box(float x, float y, float w, float h, float strokeWeight) {\r\n setDimensions(x, y, w, h);\r\n this.strokeWeight = strokeWeight;\r\n boxColour = Colour.WHITE;\r\n }", "public CollisionBox(int x, int y, int width, int height) \n\t{\n\t\tbox = new Rectangle(x, y, width, height);\n\t}", "public Box() {}", "Border createBorder();", "Box()\n\t{\n\t\twidth = -1; //use -1 to indicate an uninitialized box\n\t\theight = -1;\n\t\tdepth = -1;\n\t\t\n\t\t\n\t}", "public Box() {\n \tsuper();\n \tthis.max = new Point3d( 1, 1, 1 );\n \tthis.min = new Point3d( -1, -1, -1 );\n }", "void addBoxObject() {\n\t\tint boxObjectX = random.nextInt(ScreenManager.getWindowWidth());\n\t\tint boxObjectY = random.nextInt(ScreenManager.getWindowHeight());\n\t\tint boxObjectWidth = ScreenManager.getSizeFromPercentageOfWindowY((float) 24);\n\t\tint boxObjectHeight = ScreenManager.getSizeFromPercentageOfWindowY(18);\n\t\tint boxObjectHitsToDestroy = random.nextInt(9)+1;\n\t\t\n\t\tboxObjects.add(new BoxObject(boxObjectX, boxObjectY, boxObjectWidth, boxObjectHeight, boxObjectHitsToDestroy, true));\n\t}", "private void generateRunway(Group root, String runwayId, Integer helperHeight){\n Point pos = controller.getRunwayPos(runwayId);\n Dimension dim = controller.getRunwayDim(runwayId);\n\n //Creates a box of the right size and material.\n Box runwayBox = new Box(dim.height,helperHeight,dim.width);\n PhongMaterial runwayMaterial = new PhongMaterial(convertToJFXColour(RUNWAY_COLOUR));\n runwayBox.setMaterial(runwayMaterial);\n\n //Moves the box to the correct position, and elevates it so it's entirely above the x=0, z=0 plane.\n runwayBox.setTranslateX(pos.x);\n runwayBox.setTranslateZ(-pos.y + dim.width/2.0);\n runwayBox.setTranslateY(-helperHeight/2);\n\n //Rotates the box to match the rotation of the runway.\n Rotate r = new Rotate(controller.getBearing(runwayId), 0,0,-dim.width/2.0, Rotate.Y_AXIS);\n runwayBox.getTransforms().add(r);\n\n //Add the box to the root group.\n root.getChildren().add(runwayBox);\n }", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "ShipmentBoxType createShipmentBoxType();", "private void setBox(){\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 1;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 2;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 0 && this.row <= 2) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 3;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 4;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 5;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 3 && this.row <= 5) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 6;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 0 && this.column <= 2)){\n\t\t\t\t\tthis.box = 7;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 3 && this.column <= 5)){\n\t\t\t\t\tthis.box = 8;\n\t\t\t\t\treturn;\n\t\t}\n\t\tif((this.row >= 6 && this.row <= 8) && \n\t\t (this.column >= 6 && this.column <= 8)){\n\t\t\t\t\tthis.box = 9;\n\t\t\t\t\treturn;\n\t\t}\n\t}", "static void builtVertical(Room one, Room two, WorldFrame world) {\n Random ran = world.rand();\n int len;\n int y;\n int smallestRWallX = Math.min(one.rEdge(), two.rEdge());\n int largestX = Math.max(one.getX(), two.getX());\n if (one.tWall() < two.getY()) {\n len = two.getY() - one.tWall();\n y = one.tWall();\n } else if (two.tWall() < one.getY()) { // two.TWall() < one.getY()\n len = one.getY() - two.tWall();\n y = two.tWall();\n } else {\n return;\n\n }\n int x = RandomUtils.uniform(ran, largestX, smallestRWallX + 1);\n\n\n if (len > 0) {\n world.hallwaysSet().add(new Hallway(x, y, Direction.UP, len, world));\n }\n }", "public Bathroom(int size) {\n this.size = size;\n myBathtub = new Bathtub(100); //instantiate bathtub object during Bathroom object creation\n }", "public BoundingBox(Vector2 c, double w, double h)\n\t{\n\t\tcenter = c;\n\t\twidth = w;\n\t\theight = h;\n\t}", "private Ball createBall(Vektor v) {\n \t\tBall ball = new Ball(v, ballsize);\n \t\tball.color = Color.random();\n \t\tballs.add(ball);\n \t\treturn ball;\n \t}", "public Box() {\t\t\t\t\n\t\tCrayon box[] = {new Crayon(10,Color.RED),new Crayon(10,Color.ORANGE),new Crayon(10,Color.YELLOW),new Crayon(10,Color.GREEN),new Crayon(10,Color.BLUE),new Crayon(10,Color.VIOLET),new Crayon(10,Color.BROWN),new Crayon(10,Color.BLACK)};\n\t\tcrayons = box;\n\t}", "private NormalSquare createSquare(ColorOfFigure_Square color , boolean hasDoor, int row, int column){\n return new NormalSquare(color, hasDoor, row, column);\n }", "private HashMap setupBoundBoxes(BioMightBoundBox bioMightBoundBoxIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxMap = new HashMap();\r\n\t\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\r\n\t\t// Initialize the BoundBoxes. This is used for\r\n\t\t// collections such as arms, legs,lungs,etc\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t// Use the information in the incomiing Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxIn != null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Arm - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxIn.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getZPos());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Arm\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-12.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\t\r\n\t\txVector= new BigDecimal(9.0);\r\n\t\tyVector= new BigDecimal(8.0); \r\n\t\tzVector= new BigDecimal(4.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Arm Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -9.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ArmEpithelialCell\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ArmEpithelialCell\", bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\tboundingBoxMap.put(Constants.ArmEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// ARMS BOUND BOXES\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Left Arm\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftArmRef, bioBoundBox);\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightArmRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Bronchi \r\n\t\t// into the BoundingBoxMap \r\n\t\tboundingBoxMap.put(Constants.BronchiRef, bioBoundBoxes);\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn (boundingBoxMap);\r\n\t}", "public BugBox( Vector topLeft, Vector botRight ) {\n\t\tthis.topLeft = topLeft;\n\t\tthis.botRight = botRight;\n\t\tthis.topRight = new Vector( botRight.getX(), topLeft.getY() );\n\t\tthis.botLeft = new Vector( topLeft.getX(), botRight.getY() );\n\t\t\n\t\tthis.width = Math.abs( topLeft.getX() - botRight.getX() );\n\t\tthis.height = Math.abs( botRight.getY() - topLeft.getY() );\n\t}", "public HBox addHBox() {\n\n HBox hbox = new HBox();\n hbox.setPadding(new Insets(0, 0, 10, 0));\n hbox.setSpacing(0); // Gap between nodes\n// hbox.getChildren().addAll();\n\n return hbox;\n }", "private void createSquare(Block block) {\n\t\tSquare square = factory.createSquare();\n\t\tsquare.setName(block.getName());\n\t\tsquare.setBlock(block.getBlock());\n\t\tsquare.getInArrow().addAll(block.getInArrow());\n\t\tsquare.getOutArrow().addAll(block.getOutArrow());\n\t}", "public Box()\n\t{\n\t\tsuper();\n\t}", "private void createBoard() {\n\t// An array of rows containing rows with squares are made\n\t\tfor (int i = 0; i < squares.length; i++) {\n\t \trows[i] = new Row(squares[i]);\n\t\t}\n\n\n\t// An array of columns containing columns with squares are made\n\t\tSquare[] columnArray = new Square[size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t for (int row = 0; row < size; row++) {\n\t\t\t\tcolumnArray[row] = squares[row][i];\n\t\t }\n\t\t columns[i] = new Column(columnArray);\n\t\t columnArray = new Square[size];\n\t\t}\n\n\n\t\tSquare[] boxArray;\n\t\tint counter;\n\t\t// Box nr i\n\t\tfor (int i = 0; i < size; i = i + height) {\n\t\t // Box nr j\n\t\t for (int j = 0; j < size; j = j + length) {\n\t\t\t\tcounter = 0;\n\t\t\t\tboxArray = new Square[size];\n\t\t\t\tint rowIndex = (i / height) * height;\n\t\t\t\tint columnIndex = (j / length) * length;\n\t\t\t\t// Row nr k\n\t\t\t\tfor (int k = rowIndex; k < rowIndex + height; k++) {\n\t\t\t\t // Column nr l\n\t\t\t\t for (int l = columnIndex; l < columnIndex + length; l++) {\n\t\t\t\t\t\tboxArray[counter] = squares[k][l];\n\t\t\t\t\t\tcounter++;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tboxes[j/length][i/height] = new Box(boxArray);\n\t\t }\n\t\t}\t\n\t\tcreatePointers();\n }", "public Box getBox() {\n\t//we compute the coordinates of the top left square \n\t//of the box by integer division\n\treturn new Box((rowIndex/3)*3, (colIndex/3)*3); \n }", "public House(int length, int width, int lotLength, int lotWidth) {\r\n super(length, width, lotLength, lotWidth);\r\n }", "@Override\n\tpublic void add(final Obj prim) {\n\t\tbvhObjList.add(prim);\n\t\tif(bvhBox == null) {\n\t\t\tthis.bvhBox = prim.bbox();\n\t\t}else {\n\t\t\tPoint mm = prim.bbox().getMin();\n\t\t\tPoint mx = prim.bbox().getMax();\n\t\t\tfloat nex = Float.max(mx.x(),bvhBox.getMax().x());\n\t\t\tfloat ney = Float.max(mx.y(),bvhBox.getMax().y());\n\t\t\tfloat nez = Float.max(mx.z(),bvhBox.getMax().z());\n\t\t\tfloat nex1 = Float.min(mm.x(),bvhBox.getMin().x());\n\t\t\tfloat ney1 = Float.min(mm.y(),bvhBox.getMin().y());\n\t\t\tfloat nez1 = Float.min(mm.z(),bvhBox.getMin().z());\n\t\t\tPoint nemax = new Point(nex, ney, nez);\n\t\t\tPoint nemin = new Point(nex1,ney1,nez1);\n\t\t\tthis.bvhBox = BBox.create(nemax, nemin);\n\t\t\t\n\t\t}\n\t\t\n\t}", "private BioMightBoundBoxes setupDefaultBoundBoxes() \r\n\t{\r\n\t\t// Set up the collection to hold the Bounding Boxes\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize a BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize a Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftFootRef, bioBoundBox);\r\n\t\r\n\t\r\n\t\t//********************************************************************* er\r\n\t\t// RIGHT CNEMES BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Foot\r\n\t\t// On a porportioned human, the \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-14.0);\r\n\t\tzPos= new BigDecimal(-3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Foot Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightFootRef, bioBoundBox);\r\n\t\r\n\t\t// return the collection that holds both foot bound boxes\r\n\t\treturn (bioBoundBoxes);\r\n\t}", "private void createComponentBox() {\r\n\t\tthis.componentBox = new Vector<String>();\r\n\t\tthis.componentBox.add(\"Sword\");\r\n\t\tthis.componentBox.add(\"Two-handed Sword\");\r\n\t\tthis.componentBox.add(\"Staff\");\r\n\t\tthis.componentBox.add(\"Axe\");\r\n\t\tthis.componentBox.add(\"Hammer\");\r\n\t\tthis.componentBox.add(\"Bow\");\r\n\t\tthis.componentBox.add(\"Crossbow\");\r\n\t\tthis.componentBox.add(\"Wand\");\r\n\t\tthis.componentBox.add(\"Spear\");\r\n\t\tthis.componentBox.add(\"Bottle\");\r\n\t}", "Box(double len)\n\t{\n\t\t\n\t\twidth = height = depth = len;\n\t\t\n\t}", "private Geometry createRectangle(double x, double y, double w, double h) {\n Coordinate[] coords = {\n new Coordinate(x, y), new Coordinate(x, y + h),\n new Coordinate(x + w, y + h), new Coordinate(x + w, y),\n new Coordinate(x, y)\n };\n LinearRing lr = geometry.getFactory().createLinearRing(coords);\n\n return geometry.getFactory().createPolygon(lr, null);\n }", "Block create(int xpos, int ypos);", "public static HBox createTitleBox() {\n\t\tHBox logoTitleBox = new HBox();\n\t\tLabel title = new Label(\"KeyLocker\");\n\t\ttitle.setFont(Font.font(\"Arial\", FontWeight.BOLD, 40));\n\t\tlogoTitleBox.getChildren().add(title);\n\t\tlogoTitleBox.setAlignment(Pos.CENTER);\n\t\treturn logoTitleBox;\n\t}", "public BoxNode() {\n initProperties();\n }", "public void createBike(){\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "public Box(int x, int y)\n {\n initClassVBox();\n initVariablesVBox();\n initMethodsVBox();\n initLineConnectors();\n mainVBox = new VBox(classVBox, variablesVBox, methodsVBox);\n mainVBox.setTranslateX(x);\n mainVBox.setTranslateY(y);\n }", "private void createSalaryBox() {\n salaryField = new TextField();\n salaryField.setId(\"Salary\");\n HBox salaryFieldBox = new HBox(new Label(\"Salary: \"), salaryField);\n salaryFieldBox.setAlignment(Pos.CENTER);\n mainBox.getChildren().add(salaryFieldBox);\n\n }", "public void createBike() {\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "public void box() {\n\t\tSystem.out.println(\"NYStyleCheesePizza boxed\");\r\n\t}", "public static Goodie makeAsBox(float x, float y, float width, float height, String imgName) {\n Goodie g = new Goodie(width, height, imgName);\n g.setBoxPhysics(0, 0, 0, BodyType.StaticBody, false, x, y);\n g.setCollisionsEnabled(true);\n Lol.sGame.mCurrentLevel.addActor(g, 0);\n return g;\n }", "public static HBox createWinBtnBox() {\n int numWinBtns = 3;\n ToggleButton winBtn1 = createRoundWinBtn(5);\n ToggleButton winBtn2 = createRoundWinBtn(10);\n ToggleButton winBtn3 = createRoundWinBtn(20);\n\n //Only one map can be selected, hence the use of a toggling system\n final ToggleGroup group = new ToggleGroup();\n winBtn1.setToggleGroup(group);\n winBtn2.setToggleGroup(group);\n winBtn3.setToggleGroup(group);\n winBtn1.setSelected(true);\n endScore = 5; // default\n\n HBox hbox = new HBox(winBtn1, winBtn2, winBtn3);\n hbox.setLayoutX(MainGUI.WIDTH / 2.0 - winBtn1.getPrefWidth() * numWinBtns / 2.0);\n hbox.setLayoutY(MainGUI.HEIGHT / 2.0 + 40);\n return hbox;\n }", "private VBox createBottomOrderBox() {\n\t\tVBox v = new VBox();\n\t\tVBox.setMargin(v, new Insets(5));\n\t\tv.setStyle(\"-fx-border-color: black; \"\n\t\t\t\t+ \"-fx-background-color: gainsboro\");\n\t\tLabel l1 = new Label(\"Please Check Applicable Storage Shelves\");\n\t\tv.getChildren().add(l1);\n\t\t//Iterate into lines of 5 lables and checkboxes\n\t\tfor (int i = 0; i < cf.getShelf().size(); i += 5) {\n\t\t\t\n\t\t\t/*\n\t\t\t * Create the HBox to store up to 5\n\t\t\t * CheckBoxes. Align its contents to the center.\n\t\t\t */\n\t\t\tHBox h = new HBox();\n\t\t\th.setSpacing(10);\n\t\t\tHBox.setMargin(h, new Insets(5));\n\t\t\th.setPadding(new Insets(5));\n\t\t\th.setAlignment(Pos.CENTER);\n\t\t\t/*\n\t\t\t * Decide what to iterate on:\n\t\t\t * If there are >= 5 shelves remaining, \n\t\t\t * iterate against 5. If there are less than 5 \n\t\t\t * shelves, iterate against no.Shelves remaining.\n\t\t\t * This allows blocks of 5 checkboxes and a final\n\t\t\t * dynamicly sized block for the remaining amount.\n\t\t\t */\n\t\t\tif ((cf.getShelf().size()-i) >= 5) {\n\t\t\t\t//For the next 5 StorageShelves\n\t\t\t\tfor (int j = i; j < i+5; j++) {\n\t\t\t\t\tCheckBox cb = new CheckBox();\n\t\t\t\t\t//Set the CheckBox's text to the Shelf it represents.\n\t\t\t\t\tcb.setText(cf.getShelf().get(j).getuID());\n\n\t\t\t\t\t// Add the checkbox to currentOrder's array to be referenced later.\n\t\t\t\t\tcurrentOrder.addBox(cb);\n\t\t\t\t\t\n\t\t\t\t\t//Add checkbox to Hbox for displaying\n\t\t\t\t\th.getChildren().add(cb);\n\t\t\t\t}\n\t\t\t} else if ((cf.getShelf().size()-i) < 5) {\n\t\t\t\t//For the remaining number of shelves\n\t\t\t\tfor (int j = i; j < cf.getShelf().size(); j++) {\n\t\t\t\t\tCheckBox cb = new CheckBox();\n\t\t\t\t\t//Set the CheckBox's text to the Shelf it represents.\n\t\t\t\t\tcb.setText(cf.getShelf().get(j).getuID());\n\n\t\t\t\t\t// Add the checkbox to currentOrder's array to be referenced later.\n\t\t\t\t\tcurrentOrder.addBox(cb);\n\t\t\t\t\t//Add checkbox to Hbox for displaying\n\t\t\t\t\th.getChildren().add(cb);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"OrderBox Error Found!\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t//Add HBox and its contents into the VBox\n\t\t\tv.getChildren().add(h);\n\t\t}\n\t\treturn v;\n\t}", "public Vehicle(int x, int y, int w, int h)\n\t{\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\twidth = w;\n\t\theight = h;\n\t\tboundingBox = new Rectangle(x,y,width,height);\n\t\t//System.out.println(\"Cordinates pressed: \"+ x +\",\"+ y);\n\t}", "public BoundingBox()\n\t{\n\t\tcenter = new Vector2(0.0, 0.0);\n\t\twidth = 1.0;\n\t\theight = 1.0;\n\t}", "public Box(int x, int y) {\r\n\t\tsuper(x,y);\r\n\t\tloadImage(\"box.png\");\r\n\t\tgetImageDimensions();\r\n\t}", "public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }", "protected void boxOfMortys() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(-10, -10, 0);\n pos2 = new Triple(110, -10, 0);\n pos3 = new Triple(110, -10, 120);\n pos4 = new Triple(-10, -10, 120);\n pos5 = new Triple(-10, 110, 0);\n pos6 = new Triple(110, 110, 0);\n pos7 = new Triple(110, 110, 120);\n pos8 = new Triple(-10, 110, 120);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, 1, 0),\n new Vertex(pos3, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos5, 1, 0),\n new Vertex(pos8, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos3, 0, 1),\n new Vertex(pos2, 0, 0),\n 22 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos8, 0, 1),\n new Vertex(pos5, 0, 0),\n 22 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "protected GuiTestObject bungalow(TestObject anchor, long flags) \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"bungalow\"), anchor, flags);\n\t}", "@Override\r\n public void getBoxes(IPartCollisionHelper box) {\n box.addBox(4, 4, 12, 12, 12, 14);\r\n box.addBox(6, 6, 11, 10, 10, 12);\r\n }", "private void makeLeftBox() {\n\t\tgamePanel = new JPanel();\n\t\tgamePanel.setLayout(new BorderLayout());\n\t\tgamePanel.setBackground(Color.GRAY);\n\t\tgamePanel.setOpaque(true);\n\t\tleft = new JPanel();\n\t\tleft.setLayout(new GridLayout(1,1));\n\t\tleft.setBackground(Color.GRAY);\n\t\tbanner = new JLabel(\"Jeopardy\", SwingConstants.CENTER);\n\t\tbanner.setBorder(new EmptyBorder(10,10,10,10));\n\t\tbanner.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tbanner.setForeground(Color.GRAY);\n\t\tbanner.setBackground(lightRed);\n\t\tbanner.setFont(new Font(\"TimesRoman\", Font.BOLD, 30));\n\t\tbanner.setOpaque(true);\n\t\tmakeGameBoard();\n\t\t\n\t\tgamePanel.add(banner, BorderLayout.NORTH);\n\t\tgamePanel.add(board, BorderLayout.CENTER);\n\t\tleft.setOpaque(false);\n\t\tJPanel space = new JPanel();\n\t\tspace.setOpaque(false);\n\t\tgamePanel.add(space, BorderLayout.SOUTH);\n\t\tleft.add(gamePanel);\n\t\t\n\t}", "Ball create(int xpos, int ypos);", "private void createSnake() {\r\n int halfWidth = gridWidth / 2;\r\n int halfHeight = gridHeight / 2;\r\n \r\n snake = new Snake(new Coordinates(halfWidth, halfHeight), 5, Direction.WEST);\r\n }", "public BoundingBox(double centerX, double centerY, double w, double h)\n\t{\n\t\tcenter = new Vector2(centerX, centerY);\n\t\twidth = w;\n\t\theight = h;\n\t}", "void setRectHitbox(float w, float h) {\n _hitbox = new PVector[]{\n new PVector(-w/2, h/2),\n new PVector(-w/2, -h/2),\n new PVector(w/2, -h/2),\n new PVector(w/2, h/2)\n };\n }", "public Bike createCityBike() {\n Wheels cityWheels = new Wheels(559,50f,10000); //Räder des Stadtrads erstellen\n Gears cityGears = new Gears(3,1,5000); //Gangschaltung des Stadtrads erstellen\n Bike newCityBike = new Bike(cityGears, cityWheels, \"Stahl\", \"CB105\", true, true, 30000); //Stadtrad erstellen\n return newCityBike; //Stadtrad zurückgeben\n}", "public Ball(int x, int y, int radius, Color color, int xVelocity, int yVelocity, int xWall, int yWall){\n this.x=x;\n this.y=y;\n this.radius=radius;\n this.color=color;\n this.xVelocity=xVelocity;\n this.yVelocity=yVelocity;\n this.xWall=xWall;\n this.yWall=yWall;\n\n}", "@Override\n public void create_building(ArrayList bulding){\n House house = new House(Adress.RUE_DE_LA_PAIX);\n System.out.println(\"Vous venez de créer une maison\");\n bulding.add(house);\n }", "public abstract void constructHull();", "private Box(String[] arr) {\r\n name = arr[0];\r\n height = Integer.parseInt(arr[1]);\r\n width = Integer.parseInt(arr[2]);\r\n depth = Integer.parseInt(arr[3]);\r\n weight = Integer.parseInt(arr[4]);\r\n }", "public Box(float x, float y, float z)\n\t{\n\t\tsuper();\n\t\tupdateGeometry(Vector3f.ZERO, x, y, z);\n\t}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "Shape createShape(BorderType borderType);", "public Box(Point center, double width , double height) {\n\n\t\tthis.center = center;\n\n\t\tthis.width = width;\n\n\t\tthis.height = height;\n\n\t\tPoint[] verts = {new Point(this.center.getX() - (width/2), this.center.getY() - (height/2)),\n\t\t\t\t\t\t new Point(this.center.getX() + (width/2), this.center.getY() - (height/2)),\n\t\t\t\t\t\t new Point(this.center.getX() - (width/2), this.center.getY() + (height/2)),\n\t\t\t\t\t\t new Point(this.center.getX() + (width/2), this.center.getY() + (height/2))};\n\t\t\t\t \n\t}", "public static StrongBox clone(StrongBox sb){\n StrongBox clone = new StrongBox();\n\n clone.put(new PhysicalResource(ResType.COIN, sb.getNumberOf(ResType.COIN)));\n clone.put(new PhysicalResource(ResType.SERVANT, sb.getNumberOf(ResType.SERVANT)));\n clone.put(new PhysicalResource(ResType.SHIELD, sb.getNumberOf(ResType.SHIELD)));\n clone.put(new PhysicalResource(ResType.STONE, sb.getNumberOf(ResType.STONE)));\n\n return clone;\n }", "public BruceWayne()\n {\n GeneralPath leftSide = new GeneralPath();\n\tleftSide.moveTo(195,200);\n\tleftSide.lineTo(195,230);//neck\n\tleftSide.lineTo(150,230);//shoulder\n\tleftSide.lineTo(140,250);//shoulder slant\n\tleftSide.lineTo(140,340);//armleft\n\tleftSide.lineTo(165,340);//armbottom\n\tleftSide.lineTo(160,260);//armright\n\tleftSide.lineTo(170,270);//armpit\n\tleftSide.lineTo(170,350);//chest\n\tleftSide.lineTo(160,510);//legleft\n\tleftSide.lineTo(185,510);//legbottom\n\tleftSide.lineTo(200,360);//legright\n\tleftSide.lineTo(220,360);//middle\n\n Shape rightSide = ShapeTransforms.horizontallyFlippedCopyOf(leftSide);\n rightSide = ShapeTransforms.translatedCopyOf(rightSide, 140.0, 0.0);\n\tCircle head = new Circle(210,170,35);\n \n\twholeFigure = new GeneralPath();\n\twholeFigure.append(head,false);\n wholeFigure.append(leftSide, false);\n wholeFigure.append(rightSide, false);\n }", "public void setBox(int box) {\n this.box = box;\n }", "Snake(){\n T=new Text(String.valueOf(numBalls));\n body=new ArrayList<Circle>();\n setNumBalls(4);\n \n }", "static RenderBall[] make(Box box)\n\t{\n RenderBall[] rB = new RenderBall[box.nbBalls];\n\t\tfor (int i = 0; i < box.nbBalls; i++)\n\t\t{\n\t\t\trB[i] = new RenderBall();\n\t\t\trB[i].c.r = (int)(Math.random() * 195 + 30);\n\t\t\trB[i].c.v = (int)(Math.random() * 195 + 30);\n\t\t\trB[i].c.b = (int)(Math.random() * 195 + 30);\n\t\t\tif (i == box.nbBalls - 1)\n\t\t\t{\n\t\t\t\trB[i].c.r = 255;\n\t\t\t\trB[i].c.v = 255;\n\t\t\t\trB[i].c.b = 255;\n\t\t\t}\n\t\t}\n return rB;\n\t}", "public Ball(Binge game, int x, int y, int diameter){\n\t\tsuper(game,x,y);\n\t\tthis.xcenter = x + diameter/2;\n\t\tthis.ycenter = y + diameter/2;\n\t\tthis.diameter = diameter;\n\t\tthis.theball = new Ellipse2D.Double(x,y,diameter,diameter);\n\t}", "public Rectangle2D getBox(\n )\n {return box;}", "public Box(Vector3f min, Vector3f max)\n\t{\n\t\tsuper();\n\t\tupdateGeometry(min, max);\n\t}", "private HBox hboxFormat() {\n HBox hbox = new HBox(10); // 10 = spacing between elements\n return hbox;\n }", "public static Double boxSurfaceArea (double l, double w, double h) {\n\t\treturn 2 * (h * w) + 2 * (h * l) + 2 * (w * l);\n\t}", "private TransformGroup createBox(\n\t\tfloat x,\n\t\tfloat z,\n\t\tfloat size,\n\t\tfloat height,\n\t\tColor3f col) {\n\n\t\t//quadrilatere\n\t\tQuadArray quad =\n\t\t\tnew QuadArray(24, QuadArray.COORDINATES | QuadArray.COLOR_3);\n\t\tquad.setCoordinate(0, new Point3f(0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t1,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(2, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(3, new Point3f(0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(4, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t5,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t6,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t7,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\n\t\tquad.setCoordinate(8, new Point3f(0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(9, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t10,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(11, new Point3f(0.001f, height - 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(\n\t\t\t12,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t13,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t14,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(15, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(16, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t17,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(18, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(19, new Point3f(0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(20, new Point3f(0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t21,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t22,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t23,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\n\t\tfor (int i = 0; i < 24; i++)\n\t\t\tquad.setColor(i, col);\n\n\t\t//dessine les aretes\n\n\t\t//quadrilatere\n\t\tQuadArray aretes =\n\t\t\tnew QuadArray(24, QuadArray.COORDINATES | QuadArray.COLOR_3);\n\t\taretes.setCoordinate(0, new Point3f(0.0f, 0.0f, 0.0f));\n\t\taretes.setCoordinate(1, new Point3f(size, 0.0f, 0.0f));\n\t\taretes.setCoordinate(2, new Point3f(size, height, 0.0f));\n\t\taretes.setCoordinate(3, new Point3f(0.0f, height, 0.0f));\n\n\t\taretes.setCoordinate(4, new Point3f(0.0f, 0.0f, size));\n\t\taretes.setCoordinate(5, new Point3f(size, 0.0f, size));\n\t\taretes.setCoordinate(6, new Point3f(size, height, size));\n\t\taretes.setCoordinate(7, new Point3f(0.0f, height, size));\n\n\t\taretes.setCoordinate(8, new Point3f(0.0f, 0.0f, 0.0f));\n\t\taretes.setCoordinate(9, new Point3f(0.0f, 0.0f, size));\n\t\taretes.setCoordinate(10, new Point3f(0.0f, height, size));\n\t\taretes.setCoordinate(11, new Point3f(0.0f, height, 0.0f));\n\n\t\taretes.setCoordinate(12, new Point3f(size, 0.0f, 0.0f));\n\t\taretes.setCoordinate(13, new Point3f(size, 0.0f, size));\n\t\taretes.setCoordinate(14, new Point3f(size, height, size));\n\t\taretes.setCoordinate(15, new Point3f(size, height, 0.0f));\n\n\t\tfor (int i = 0; i < 24; i++)\n\t\t\taretes.setColor(i, new Color3f(1f, 1f, 1f));\n\n\t\t// move the box\n\t\tTransform3D translate = new Transform3D();\n\t\ttranslate.set(new Vector3f(x, 0.0f, z));\n\n\t\tTransformGroup tg = new TransformGroup(translate);\n\n\t\t// create the box\n\t\ttg.addChild(new Shape3D(quad));\n\t\ttg.addChild(new Shape3D(aretes, lineApp()));\n\t\treturn tg;\n\t}", "public Pj3dBox Box(int x)\r\n\t{\r\n\t\tPj3dBox b = new Pj3dBox(this, x);\r\n\t\treturn b;\r\n\t}", "private RectHV rectLb() {\n\n if (!horizontal) {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n p.x(),\n rect.ymax()\n );\n\n\n } else {\n return new RectHV(\n rect.xmin(),\n rect.ymin(),\n rect.xmax(),\n p.y()\n );\n }\n }" ]
[ "0.6779806", "0.62064976", "0.6188543", "0.6184353", "0.61143166", "0.6092298", "0.592592", "0.59211946", "0.5910279", "0.5898296", "0.5881146", "0.5865206", "0.58561313", "0.58105624", "0.5808023", "0.5802515", "0.576342", "0.56849974", "0.5669289", "0.5669191", "0.5661955", "0.5635374", "0.56282187", "0.5613109", "0.5610561", "0.56011516", "0.5595702", "0.5587125", "0.5574414", "0.55146694", "0.55130553", "0.5511364", "0.549396", "0.54716355", "0.5455915", "0.54509395", "0.5446703", "0.5442144", "0.5440026", "0.5437796", "0.54376644", "0.5431588", "0.54211265", "0.5417476", "0.54151016", "0.54095274", "0.5406433", "0.5398829", "0.53973836", "0.5392842", "0.53887504", "0.53844756", "0.53705615", "0.5366383", "0.53656435", "0.53644276", "0.5346152", "0.5341727", "0.53413206", "0.534103", "0.53392315", "0.53365093", "0.5318055", "0.5311406", "0.5309668", "0.53025836", "0.52946097", "0.528603", "0.52844137", "0.52670383", "0.525969", "0.525752", "0.5256113", "0.5234344", "0.52333534", "0.52268046", "0.5226629", "0.52212703", "0.52210027", "0.52049726", "0.5199915", "0.5187564", "0.51834095", "0.5181959", "0.5176824", "0.5172481", "0.51709974", "0.5165942", "0.5150299", "0.5150035", "0.5136472", "0.51339054", "0.5128342", "0.5125842", "0.5123448", "0.51200104", "0.51096606", "0.51015943", "0.5100492", "0.5098032" ]
0.73750883
0
Calculates parameters I have to go through this with you. Draws t
private void boxCreator(int[] pos, int width, int height) { for (int x = pos[0]; x < pos[0] + width; x++) { tiles[x][pos[1]] = Tileset.WALL; } for (int y = pos[1]; y < pos[1] + height; y++) { tiles[pos[0]][y] = Tileset.WALL; } for (int x = pos[0]; x < pos[0] + width; x++) { tiles[x][pos[1] + height] = Tileset.WALL; } for (int y = pos[1]; y < pos[1] + height + 1; y++) { tiles[pos[0] + width][y] = Tileset.WALL; } for (int y = pos[1] + 1; y < pos[1] + height; y++) { for (int x = pos[0] + 1; x < pos[0] + width; x++) { tiles[x][y] = Tileset.FLOWER; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Draw(Graphics g)\n/* */ {\n/* 55 */ g.setColor(this.m_color);\n/* */ \n/* 57 */ Point prevPt = new Point(0, 0);Point currPt = new Point(0, 0);\n/* */ \n/* 59 */ for (double t = 0.0D; t < 1.01D; t += this.m_tValue) {\n/* 60 */ ptFromTVal(t, currPt);\n/* */ \n/* 62 */ if (t == 0.0D) {\n/* 63 */ prevPt.x = currPt.x;\n/* 64 */ prevPt.y = currPt.y;\n/* */ }\n/* */ \n/* 67 */ g.drawLine(prevPt.x, prevPt.y, currPt.x, currPt.y);\n/* */ \n/* 69 */ if (this.m_showTPoints) {\n/* 70 */ g.fillOval(currPt.x - this.PT_RADIUS, currPt.y - this.PT_RADIUS, this.PT_DIAMETER, this.PT_DIAMETER);\n/* */ }\n/* */ \n/* 73 */ prevPt.x = currPt.x;\n/* 74 */ prevPt.y = currPt.y;\n/* */ }\n/* */ }", "public void updateParameters(){\n\t\tp = RunEnvironment.getInstance().getParameters();\n\t\tmaxFlowerNectar = (double)p.getValue(\"maxFlowerNectar\");\n\t\tlowMetabolicRate = (double)p.getValue(\"lowMetabolicRate\");\n\t\thighMetabolicRate = (double)p.getValue(\"highMetabolicRate\");\n\t\tcolonySize = (int)p.getValue(\"colonySize\");\n\t}", "@Override\r\n\tpublic void updateParam() {\n\t\tmFisrtPoint = mFisrtObject.getCenter();\r\n\t\tgetParam().setMargins(\r\n\t\t\t\t(int) ((mEdgeFist.x + mEdgeEnd.x) / 2 - getParam().width / 2),\r\n\t\t\t\t(int) ((mEdgeFist.y + mEdgeEnd.y) / 2 - getParam().height / 2),\r\n\t\t\t\tgetParam().rightMargin, getParam().bottomMargin);\r\n\t\t((Activity) mContext).runOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tmLayout.requestLayout();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmEndPoint = mEndObject.getCenter();\r\n\t\tgetEdge(mEdgeFist, mEdgeEnd, mFisrtPoint, mEndPoint);\r\n\t\tgetTriangle(0.02f);\r\n\t}", "private void correctParameter(){\n \tint ifObtuse;\r\n \tif(initialState.v0_direction>90)ifObtuse=1;\r\n \telse ifObtuse=0;\r\n \tdouble v0=initialState.v0_val;\r\n \tdouble r0=initialState.r0_val;\r\n \tdouble sintheta2=Math.sin(Math.toRadians(initialState.v0_direction))*Math.sin(Math.toRadians(initialState.v0_direction));\r\n \tdouble eccentricityMG=Math.sqrt(center.massG*center.massG-2*center.massG*v0*v0*r0*sintheta2+v0*v0*v0*v0*r0*r0*sintheta2);\r\n \tdouble cosmiu0=-(v0*v0*r0*sintheta2-center.massG)/eccentricityMG;\r\n \tpe=(v0*v0*r0*r0*sintheta2)/(center.massG+eccentricityMG);\r\n \tap=(v0*v0*r0*r0*sintheta2)/(center.massG-eccentricityMG);\r\n \tsemimajorAxis=(ap+pe)/2;\r\n \tsemiminorAxis=Math.sqrt(ap*pe);\r\n \tsemifocallength=(ap-pe)/2;\r\n \tSystem.out.println(semimajorAxis+\",\"+semiminorAxis+\",\"+semifocallength);\r\n \teccentricity=eccentricityMG/center.massG;\r\n \tperiod=2*Math.PI*Math.sqrt(semimajorAxis*semimajorAxis*semimajorAxis/(center.massG));\r\n \trotate=(360-Math.toDegrees(Math.acos(cosmiu0)));\r\n \torbitCalculator.angleDelta=(Math.toDegrees(Math.acos(cosmiu0))+360);\r\n \trotate=rotate+initialState.r0_direction;\r\n \t\r\n \tif(ifObtuse==1) {\r\n \t\tdouble rbuf=rotate;\r\n \t\trotate=initialState.r0_direction-rotate;\r\n \t\torbitCalculator.angleDelta+=(2*rbuf-initialState.r0_direction);\r\n \t}\r\n \tfor(;;) {\r\n \t\tif(rotate>360)rotate=rotate-360;\r\n \t\telse break;\r\n \t}\r\n \tfor(;;) {\r\n \t\tif(rotate<0)rotate=rotate+360;\r\n \t\telse break;\r\n \t}\r\n \t/*\r\n \tpe=initialState.r0_val;\r\n rotate=initialState.r0_direction;\r\n ap=(initialState.v0_val*initialState.v0_val*pe*pe)/(2*center.massG-initialState.v0_val*initialState.v0_val*pe);\r\n peSpeed=initialState.v0_val;\r\n apSpeed=(2*center.massG-initialState.v0_val*initialState.v0_val*pe)/(initialState.v0_val*pe);\r\n if(ap<pe){\r\n double lf=ap;ap=pe;pe=lf;\r\n lf=apSpeed;apSpeed=peSpeed;peSpeed=lf;\r\n }\r\n semimajorAxis=(ap+pe)/2;\r\n semifocallength=(ap-pe)/2;\r\n semiminorAxis=Math.sqrt(ap*pe);\r\n eccentricity=semifocallength/semimajorAxis;\r\n period=2*Math.PI*Math.sqrt(semimajorAxis*semimajorAxis*semimajorAxis/(center.massG));*/\r\n }", "protected void computeGridParameters() {\n float padding = 0.02f * overlay.getScalingValue();\n boolean flipX = x2 < x1;\n float xx1 = flipX ? (x1 + padding) : (x1 - padding);\n float xx2 = flipX ? (x2 - padding) : (x2 + padding);\n boolean flipY = y2 < y1;\n float yy1 = flipY ? (y1 + padding) : (y1 - padding);\n float yy2 = flipY ? (y2 - padding) : (y2 + padding);\n \n xGrid1 = xx1; yGrid1 = yy1;\n xGrid2 = xx2; yGrid2 = yy1;\n xGrid3 = xx1; yGrid3 = yy2;\n xGrid4 = xx2; yGrid4 = yy2;\n horizGridCount = 3; vertGridCount = 3;\n }", "public static void display() { System.err.println(\"Train parameters: smooth=\" + smoothing + \" PA=\" + PA + \" GPA=\" + gPA + \" selSplit=\" + selectiveSplit + \" (\" + selectiveSplitCutOff + (deleteSplitters != null ? \"; deleting \" + deleteSplitters : \"\") + \")\" + \" mUnary=\" + markUnary + \" mUnaryTags=\" + markUnaryTags + \" sPPT=\" + splitPrePreT + \" tagPA=\" + tagPA + \" tagSelSplit=\" + tagSelectiveSplit + \" (\" + tagSelectiveSplitCutOff + \")\" + \" rightRec=\" + rightRec + \" leftRec=\" + leftRec + \" xOverX=\" + xOverX + \" collinsPunc=\" + collinsPunc + \" markov=\" + markovFactor + \" mOrd=\" + markovOrder + \" hSelSplit=\" + hSelSplit + \" (\" + HSEL_CUT + \")\" + \" compactGrammar=\" + compactGrammar() + \" leaveItAll=\" + leaveItAll + \" postPA=\" + postPA + \" postGPA=\" + postGPA + \" selPSplit=\" + selectivePostSplit + \" (\" + selectivePostSplitCutOff + \")\" + \" tagSelPSplit=\" + tagSelectivePostSplit + \" (\" + tagSelectivePostSplitCutOff + \")\" + \" postSplitWithBase=\" + postSplitWithBaseCategory + \" fractionBeforeUnseenCounting=\" + fractionBeforeUnseenCounting + \" openClassTypesThreshold=\" + openClassTypesThreshold); }", "public void estimateParameter(){\r\n int endTime=o.length;\r\n int N=hmm.stateCount;\r\n double p[][][]=new double[endTime][N][N];\r\n for (int t=0;t<endTime;++t){\r\n double count=EPS;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]=fbManipulator.alpha[t][i]*hmm.a[i][j]*hmm.b[i][j][o[t]]*fbManipulator.beta[t+1][j];\r\n count +=p[t][j][j];\r\n }\r\n }\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n p[t][i][j]/=count;\r\n }\r\n }\r\n }\r\n double pSumThroughTime[][]=new double[N][N];\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]=EPS;\r\n }\r\n }\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n pSumThroughTime[i][j]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n //rebuild gamma\r\n for (int t=0;t<endTime;++t){\r\n for (int i=0;i<N;++i) fbManipulator.gamma[t][i]=0;\r\n for (int i=0;i<N;++i){\r\n for (int j=0;j<N;++j){\r\n fbManipulator.gamma[t][i]+=p[t][i][j];\r\n }\r\n }\r\n }\r\n\r\n double gammaCount=EPS;\r\n //maximum parameter\r\n for (int i=0;i<N;++i){\r\n gammaCount+=fbManipulator.gamma[0][i];\r\n hmm.pi[i]=fbManipulator.gamma[0][i];\r\n }\r\n for (int i=0;i<N;++i){\r\n hmm.pi[i]/=gammaCount;\r\n }\r\n\r\n for (int i=0;i<N;++i) {\r\n gammaCount = EPS;\r\n for (int t = 0; t < endTime; ++t) gammaCount += fbManipulator.gamma[t][i];\r\n for (int j = 0; j < N; ++j) {\r\n hmm.a[i][j] = pSumThroughTime[i][j] / gammaCount;\r\n }\r\n }\r\n for (int i=0;i<N;i++){\r\n for (int j=0;j<N;++j){\r\n double tmp[]=new double[hmm.observationCount];\r\n for (int t=0;t<endTime;++t){\r\n tmp[o[t]]+=p[t][i][j];\r\n }\r\n for (int k=0;k<hmm.observationCount;++k){\r\n hmm.b[i][j][k]=(tmp[k]+1e-8)/pSumThroughTime[i][j];\r\n }\r\n }\r\n }\r\n //rebuild fbManipulator\r\n fbManipulator=new HMMForwardBackwardManipulator(hmm,o);\r\n }", "private void TEMrunInfo(){\n\n int idummy;\n idummy=TEM.runcht.cht.getCd().getVegtype(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_VEGETATION, 1);\n idummy=TEM.runcht.cht.getCd().getDrgtype(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_DRAINAGE, 1);\n idummy=TEM.runcht.cht.getCd().getGrdid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_GRD, 1);\n idummy=TEM.runcht.cht.getCd().getEqchtid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_EQCHT, 1);\n idummy=TEM.runcht.cht.getCd().getSpchtid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_SPCHT, 1);\n idummy=TEM.runcht.cht.getCd().getTrchtid(); \t \n \t stateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_TRCHT, 1);\n \t \n float ddummy;\n ddummy=(float)TEM.runcht.initstate.getMossthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_MOSSTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getFibthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_FIBTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getHumthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_HUMTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getVegc(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_VEGC, 1);\n ddummy=(float)TEM.runcht.initstate.getVegn(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_VEGN, 1);\t\t\n ddummy=(float)TEM.runcht.initstate.getSoilc(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_SOILC, 1);\t \n ddummy=(float)TEM.runcht.initstate.getFibc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_FIBSOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getHumc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_HUMSOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getMinc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_MINESOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getAvln(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_AVAILN, 1);\n ddummy=(float)TEM.runcht.initstate.getOrgn(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_SOILN, 1);\n\n //\n \tvegpar_bgc vbpar = new vegpar_bgc();\n \tsoipar_bgc sbpar = new soipar_bgc();\n \tTEM.runcht.cht.getBgcPar(vbpar, sbpar);\n\n ddummy=vbpar.getM1(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m1, 1);\n ddummy=vbpar.getM2(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m2, 1);\n ddummy=vbpar.getM3(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m3, 1);\n ddummy=vbpar.getM4(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m4, 1);\n ddummy=sbpar.getFsoma(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsoma, 1);\n ddummy=sbpar.getFsompr(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsompr, 1);\n ddummy=sbpar.getFsomcr(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsomcr, 1); \t\t\n ddummy=sbpar.getSom2co2(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_som2co2, 1);\n \t\n //\n vegpar_cal vcpar = new vegpar_cal();\n soipar_cal scpar = new soipar_cal();\n TEM.runcht.cht.getCalPar(vcpar, scpar);\n\n ddummy=vcpar.getCmax(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_CMAX, 1);\n ddummy=vcpar.getNmax(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NMAX, 1);\n ddummy=vcpar.getKrb(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KRB, 1);\n ddummy=vcpar.getCfall(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_CFALL, 1);\n ddummy=vcpar.getNfall(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NFALL, 1);\n \t\n ddummy=scpar.getNup(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NUP, 1);\n ddummy=scpar.getKdcfib(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCFIB, 1);\n ddummy=scpar.getKdchum(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCHUM, 1);\n ddummy=scpar.getKdcmin(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCMIN, 1);\n ddummy=scpar.getKdcslow(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCSLOW, 1);\n\t \t\t\n }", "private void generateParameters(Group root, String runwayId){\n //Draw the stopway\n genStopway(root, runwayId, stopwayElevation);\n\n //Draw the clearway\n genClearway(root, runwayId, clearwayElevation);\n }", "public void setInfoParamsOfTurtleAndLine()\n\t{\n\t\tthis.myTurtleView.setTurtleInfo(\"Position: \\t\\t[\" + Math.floor(getTurtleLocation().getX()) + \", \" + Math.floor(getTurtleLocation().getY()) + \"]\"\n\t\t\t\t+ \" \\n\" + \"Heading: \\t\\t\" + this.getTurtleOrientation()\n\t\t\t\t+ \" \\n\" + \"Pen Status: \\t\" + myPenHandler.getPenStatus()\n\t\t\t\t);\n\t\t\n\t\tthis.myPenHandler.setThicknessParameter();\n\t}", "void drawCustomFormula(Graphics2D g2d){\r\n\t\tStaticVariableSet<Double> variables = new StaticVariableSet<Double>(); //javaluator junk\r\n\t\tArrayList<Point2D.Double> p_list= new ArrayList<Point2D.Double>();\r\n\t\tArrayList<Point3D> three_list=new ArrayList<Point3D>();\r\n\r\n\t\tfor(int i=0; i<pCanvas.iterations; i++){\r\n\r\n\t\t\tdouble theta=((double)i/1000)*2*Math.PI;\r\n\t\t\tvariables.set(\"x\", theta); //changes the variable xs value to be equal to theta\r\n\t\t\tdouble r=eval.evaluate(equation,variables); //evaluates the custom expression\r\n\t\t\tPoint3D next= new Point3D(r*Math.cos(theta), r*Math.sin(theta),0.0); //tells what point the cartesian coord is (z always zero since normally drawn on xy plane\r\n\t\t\tnext=pointRotate(next, theta); //rotates point around some axis\r\n\t\t\tthree_list.add(next);; //adds to pointlist\r\n\t\t}\r\n\t\tthree_list=CameraRotate(three_list); //rotates all points by some theta if camera is enabled\r\n\t\tutils.scalePoint3D(three_list, 100); //scales\r\n\t\tp_list=utils.convert3DPointsTo2DPoints(three_list, eye); //perspective transform\r\n\t\tdrawPointArr(g2d, p_list); //draws lines betweeen consecutive points\r\n\r\n\r\n\r\n\t}", "public void logParameters() {\n logWriter.add(\"Particle Swarm Optimization Algorithm\");\n logWriter.add(\"Parameters\");\n logWriter.add((String)(\"MAX_LENGTH/N: \"+MAX_LENGTH));\n logWriter.add((String)(\"STARTING_POPULATION: \"+pso.getParticleCount()));\n logWriter.add((String)(\"MAX_EPOCHS: \"+pso.getMaxEpoch()));\n logWriter.add((String)(\"MAX_VELOCITY: \"+pso.getVmax()));\n logWriter.add((String)(\"MINIMUM_SHUFFLES: \"+pso.getShuffleMin()));\n logWriter.add((String)(\"MAXIMUM_SHUFFLES: \"+pso.getShuffleMax()));\n logWriter.add(\"\");\n\t}", "public static void main (String[] args) {\n LinkedList<Double> yvalues = new LinkedList();\n Grapher grapher = new Grapher(StdDraw.BLACK, 50, 5000);\n\n double T = Double.parseDouble(args[0]);\n int rez = Integer.parseInt(args[1]);\n double base_radius = 1400;\n double base_speed = Math.PI / 64;\n \n //demos:\n Circle test = Circle.squareWave(base_radius, base_speed, rez);\n\n\n /*\n a = new Circle(base_radius, Math.PI / 64, 0, null);\n b = new Circle(base_radius / 3, 3 * base_speed, 0, a);\n c = new Circle(base_radius / 5, 5 * base_speed, 0, b);\n d = new Circle(base_radius / 7, 7 * base_speed, 0, c);\n e = new Circle(base_radius / 9, 9 * base_speed, 0, d);\n f = new Circle(base_radius / 11, 11 * base_speed, 0, e);\n \n /*\n a = new Circle(base_radius, base_speed, 0, null);\n b = new Circle(base_radius / 2, -2 * base_speed, 0, a);\n c = new Circle(base_radius / 3, 3 * base_speed, 0, b);\n d = new Circle(base_radius / 4, -4 * base_speed, 0, c);\n f = d;\n */\n \n\n //Standard Drawing section` 1\n StdDraw.enableDoubleBuffering();\n StdDraw.setCanvasSize(1400, 700);\n StdDraw.setXscale(-3000 , 11000);\n StdDraw.setYscale(-3500, 3500);\n \n\n Double time = 0.0;\n while (time < T) {\n if (yvalues.size() >= 199) {\n yvalues.removeLast();\n }\n yvalues.addFirst(test.end[1]);\n grapher.graph(yvalues, yvalues.size() - 1);\n test.takestep();\n test.draw();\n test.draw_line();\n //System.out.println(f.end[0] + \" \" + f.end[1]);\n time++;\n StdDraw.show();\n StdDraw.pause(20);\n StdDraw.clear();\n }\n }", "public void recalculateStats(){\n weight = .25f * (shaftMat.getParameter(\"Density\") * length + headMat.getParameter(\"Density\") * .4f);\n sharpness = headMat.getParameter(\"Malleability\") + 1f / headMat.getParameter(\"Durability\"); //Malleable objects can be sharp, as can fragile objects\n// fragility = 1f / (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n durability = (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n trueness = shaftMat.getParameter(\"Regularity\") + headMat.getParameter(\"Regularity\");\n// length = 2f;\n }", "public void update() {\n\n difT();\n difXY();\n solveFlow();\n //drawColorFlow();\n }", "public void setDefaultParameters() {\n\tsetParameterValue(\"genie.param.x\",\"genie.dfwx\");\n\tsetParameterValue(\"genie.param.x.begin\",\"-0.3\");\n\tsetParameterValue(\"genie.param.x.increment\",\"0.6\");\n\tsetParameterValue(\"genie.param.x.increment.type\",\"linear\");\n\tsetParameterValue(\"genie.param.x.end\",\"0.3\");\n\tsetParameterValue(\"genie.param.y\",\"genie.dfwy\");\n\tsetParameterValue(\"genie.param.y.begin\",\"-0.3\");\n\tsetParameterValue(\"genie.param.y.increment\",\"0.6\");\n\tsetParameterValue(\"genie.param.y.increment.type\",\"linear\");\n\tsetParameterValue(\"genie.param.y.end\",\"0.3\");\n\tsetParameterValue(\"genie.nsteps\",\"1001\");\n\tsetParameterValue(\"genie.npstp\",\"1000\");\n\tsetParameterValue(\"genie.iwstp\",\"1000\");\n\tsetParameterValue(\"genie.itstp\",\"10\");\n\tsetParameterValue(\"genie.restart\",\"n\");\n\tsetParameterValue(\"genie.tv\",\"3.65\");\n\tsetParameterValue(\"genie.ndta\",\"5\");\n\tsetParameterValue(\"genie.temp0\",\"5.0\");\n\tsetParameterValue(\"genie.temp1\",\"5.0\");\n\tsetParameterValue(\"genie.rel\",\"0.9\");\n\tsetParameterValue(\"genie.scf\",\"2.0\");\n\tsetParameterValue(\"genie.diff1\",\"2000.0\");\n\tsetParameterValue(\"genie.diff2\",\"1e-5\");\n\tsetParameterValue(\"genie.adrag\",\"2.5\");\n\tsetParameterValue(\"genie.diffamp1\",\"8111000\");\n\tsetParameterValue(\"genie.diffamp2\",\"79610\");\n\tsetParameterValue(\"genie.betaz1\",\"0.1111\");\n\tsetParameterValue(\"genie.betam1\",\"0.0\");\n\tsetParameterValue(\"genie.betaz2\",\"0.2626\");\n\tsetParameterValue(\"genie.betam2\",\"0.2626\");\n\tsetParameterValue(\"genie.scl_co2\",\"1.0\");\n\tsetParameterValue(\"genie.pc_co2_rise\",\"0.0\");\n\tsetParameterValue(\"genie.diffsic\",\"2000.0\");\n\tsetParameterValue(\"genie.tatm\",\"0.0\");\n\tsetParameterValue(\"genie.relh0_ocean\",\"0.0\");\n\tsetParameterValue(\"genie.relh0_land\",\"0.0\");\n\tsetParameterValue(\"genie.dfwx\",\"0.0\");\n\tsetParameterValue(\"genie.dfwy\",\"0.0\");\n\tsetParameterValue(\"genie.lout\",\"0000\");\n\tsetParameterValue(\"genie.lin\",\"0000.1\");\n }", "public void computeFractal(){\n\t\tint deltaX =p5.getX()-p1.getX();\n\t\tint deltaY =p5.getY()- p1.getY();\n\t\tint x2= p1.getX()+ (deltaX/3);\n\t\tint y2= p1.getY()+ (deltaY/3);\n\t\tdouble x3=((p1.getX()+p5.getX())/2)+( Math.sqrt(3)*\n\t\t\t\t(p1.getY()-p5.getY()))/6;\n\t\tdouble y3=((p1.getY()+p5.getY())/2)+( Math.sqrt(3)*\n\t\t\t\t(p5.getX()-p1.getX()))/6;\n\t\tint x4= p1.getX()+((2*deltaX)/3);\n\t\tint y4= p1.getY()+((2*deltaY)/3);\n\t\tthis.p2= new Point(x2,y2);\n\t\tthis.p3= new Point((int)x3,(int)y3);\n\t\tthis.p4= new Point(x4,y4);\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"huruf\", huruf);\n params.put(\"derajat_lengan_x\", drajatX);\n params.put(\"derajat lengan_y\", drajatY);\n params.put(\"gambar\", gambar);\n\n return params;\n }", "private void completeSimulation(double gravity, double initialSpeed, int angle, double maxHeight, double maxHeightTime, double reach){\r\n this.resultArea.setText(\"\");\r\n\t if (angle == 0){\r\n\t\t JOptionPane.showMessageDialog(this,\"Os parâmetros de velocidade inicial e alcance fornecidos são incompatíveis.\",\"Erro de parâmetros\",JOptionPane.ERROR_MESSAGE);\r\n\t } else {\r\n\t \tthis.resultArea.append(\"Dadas as informações iniciais para esta situação, o lançamento \"\r\n\t \t+\"do projétil alcançou uma altura máxima de \" + String.valueOf((float)maxHeight)\r\n\t \t+\" metros em \" + String.valueOf((float)maxHeightTime) + \" segundos, alcançando \"\r\n\t \t+ String.valueOf((float)reach) + \" metros em \"+2*maxHeightTime+ \" segundos.\");\r\n\t }\r\n\t this.reachField.setText(String.valueOf((double)reach));\r\n\t this.mHeightField.setText(String.valueOf((double)maxHeight));\r\n\t this.gravityField.setText(String.valueOf((double)gravity));\r\n\t this.speedField.setText(String.valueOf((double)initialSpeed));\r\n\t this.angleSlider.text.setText(String.valueOf((int)angle));\r\n \r\n Point point = new Point();\r\n this.graphPanel.reach = (int)reach;\r\n this.graphPanel.maxHeight = (int)maxHeight;\r\n this.graphPanel.points.clear();\r\n if (angle != 90){\r\n int lastX = 0;\r\n for (int x=0; x <= reach; x++){\r\n point = this.ball.getParablePoint(x);\r\n this.graphPanel.points.add(point);\r\n //this.resultArea.append(x+\"m = (\"+point.getX()+\" , \"+point.getY()+\")\\n\");\r\n lastX = (int)point.getX();\r\n }\r\n this.graphPanel.points.add(new Point(lastX,0));\r\n } else {\r\n for (int y=0; y <= 150; y++){\r\n point.setLocation(0,y);\r\n this.graphPanel.points.add(point);\r\n //this.resultArea.append(y+\"m = (\"+point.getX()+\" , \"+point.getY()+\")\\n\");\r\n }\r\n }\r\n if (angle != 0)this.graphPanel.startAnimation();\r\n //this.graphPanel.repaint();\r\n //this.resultArea.append(\"Quantidade de pontos = \"+this.graphPanel.points.size());\r\n }", "void drawFormula7(Graphics2D g2d){\r\n\t\tArrayList<Point2D.Double> p_list= new ArrayList<Point2D.Double>();\r\n\t\tArrayList<Point3D> three_list=new ArrayList<Point3D>();\r\n\r\n\t\tfor(int i=0; i<pCanvas.iterations; i++){\r\n\r\n\t\t\tdouble theta=((double)i/1000)*8*Math.PI;\r\n\t\t\tdouble r=Math.pow(Math.E, Math.cos(theta))-2*Math.cos(4*theta)+Math.pow(Math.cos(theta/4.0),3.0);\r\n\t\t\tPoint3D next= new Point3D(r*Math.cos(theta), r*Math.sin(theta),0.0);\r\n\t\t\tnext=pointRotate(next, theta);\r\n\t\t\tthree_list.add(next);;\r\n\t\t}\r\n\t\tthree_list=CameraRotate(three_list);\r\n\t\tutils.scalePoint3D(three_list, pCanvas.getWidth()/11);\r\n\t\tp_list=utils.convert3DPointsTo2DPoints(three_list, eye);\r\n\t\tdrawPointArr(g2d, p_list);\r\n\t\r\n\t}", "private void generateParameterValues()\n\t{\n\t\t/*\n\t\t * Initialize variables for storage of the actual parameter data and prepare the histogram bins aggregating them. \n\t\t */\n\t\t\n\t\t// Init storage.\n\t\tparameterValues.clear();\n\t\tparameterValues.put(\"alpha\", new ArrayList<Double>(numberOfDivisions));\n\t\tparameterValues.put(\"eta\", new ArrayList<Double>(numberOfDivisions));\n\t\tparameterValues.put(\"kappa\", new ArrayList<Double>(numberOfDivisions));\n\t\t\n\t\t// Init bins.\n\t\tfinal int numberOfBins \t\t\t\t\t= 50;\n\t\tMap<String, int[]> parameterBinLists\t= new HashMap<String, int[]>();\n\t\tparameterBinLists.put(\"alpha\", new int[numberOfBins]);\n\t\tparameterBinLists.put(\"eta\", new int[numberOfBins]);\n\t\tparameterBinLists.put(\"kappa\", new int[numberOfBins]);\n\t\t\n\t\t// Init random number generator.\n\t\tRandom randomGenerator\t= new Random();\n\t\t\n\t\t/*\n\t\t * Generate numberOfDivisions values for each parameter.\n\t\t */\n\t\t\n\t\tswitch (sampling_combobox.getValue())\n\t\t{\n\t\t\tcase \"Random\":\n\t\t\t\t// Generated values are allowed to be up to rangeSlider.getHighValue() and as low as rangeSlider.getLowValue().\n\t\t\t\tdouble intervalAlpha \t= rangeSliders.get(\"alpha\").getHighValue() - rangeSliders.get(\"alpha\").getLowValue();\n\t\t\t\tdouble intervalEta\t\t= rangeSliders.get(\"eta\").getHighValue() - rangeSliders.get(\"eta\").getLowValue();\n\t\t\t\tdouble intervalKappa\t= rangeSliders.get(\"kappa\").getHighValue() - rangeSliders.get(\"kappa\").getLowValue();\n\t\t\t\t\n\t\t\t\t// Generate random parameter values.\t\t\n\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\tparameterValues.get(\"alpha\").add(rangeSliders.get(\"alpha\").getLowValue() + randomGenerator.nextFloat() * intervalAlpha);\n\t\t\t\t\tparameterValues.get(\"eta\").add(rangeSliders.get(\"eta\").getLowValue() + randomGenerator.nextFloat() * intervalEta);\n\t\t\t\t\tparameterValues.get(\"kappa\").add(rangeSliders.get(\"kappa\").getLowValue() + randomGenerator.nextFloat() * intervalKappa);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"Cartesian\":\n\t\t\t\tfor (String param : LDAConfiguration.SUPPORTED_PARAMETERS) {\n\t\t\t\t\tfinal double interval = (rangeSliders.get(param).getHighValue() - rangeSliders.get(param).getLowValue()) / (numberOfDivisions);\n\t\t\t\t\t\n\t\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\t\tparameterValues.get(param).add(rangeSliders.get(param).getLowValue() + interval * i + interval / 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"Latin Hypercube\":\n\t\t\t\tfor (String param : LDAConfiguration.SUPPORTED_PARAMETERS) {\n\t\t\t\t\t// Calcualte bin interval.\n\t\t\t\t\tfinal double interval \t\t= (rangeSliders.get(param).getHighValue() - rangeSliders.get(param).getLowValue()) / (numberOfDivisions);\n\n\t\t\t\t\tfor (int i = 0; i < numberOfDivisions; i++) {\n\t\t\t\t\t\t// Minimal value allowed for current bin.\n\t\t\t\t\t\tfinal double currentBinMin = rangeSliders.get(param).getLowValue() + interval * i;\n\t\t\t\t\t\t// Generate value for this bin.\n\t\t\t\t\t\tparameterValues.get(param).add(currentBinMin + randomGenerator.nextFloat() * interval);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t//\t\t\t\t\tto do:\n\t//\t\t\t\t\t\t- test: check generate.txt.\n\t//\t\t\t\t\t\t- after that: START WRITING PAPER (SATURDAY!).\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t/*\n\t\t * Bin data for use in histograms/scented widgets.\n\t\t */\n\t\t\n\t\t// Bin data.\n\t\tfor (Map.Entry<String, ArrayList<Double>> entry : parameterValues.entrySet()) {\n\t\t\tdouble binInterval = (rangeSliders.get(entry.getKey()).getMax() - rangeSliders.get(entry.getKey()).getMin()) / numberOfBins;\n\t\t\t\n\t\t\t// Check every value and assign it to the correct bin.\n\t\t\tfor (double value : entry.getValue()) {\n\t\t\t\tint index_key = (int) ( (value - rangeSliders.get(entry.getKey()).getMin()) / binInterval);\n\t\t\t\t// Check if element is highest allowed entry.\n\t\t\t\tindex_key = index_key < numberOfBins ? index_key : numberOfBins - 1;\n\t\t\t\t\n\t\t\t\t// Increment content of corresponding bin.\n\t\t\t\tparameterBinLists.get(entry.getKey())[index_key]++;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * Transfer data to scented widgets.\n\t\t */\n\t\t\n\t\t// Clear old data.\n\t\talpha_barchart.getData().clear();\n\t\teta_barchart.getData().clear();\n\t\tkappa_barchart.getData().clear();\n\n\t\t// Add data series to barcharts.\n\t\talpha_barchart.getData().add(generateParameterHistogramDataSeries(\"alpha\", parameterBinLists, numberOfBins));\n\t\teta_barchart.getData().add(generateParameterHistogramDataSeries(\"eta\", parameterBinLists, numberOfBins));\n\t\tkappa_barchart.getData().add(generateParameterHistogramDataSeries(\"kappa\", parameterBinLists, numberOfBins));\n\t}", "private void DrawOval(GL gl, float x, float y, float size, float r, float g, float b) {\n\t\t// Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\t\tgl.glPushMatrix();\n\t\tfloat theta = (float) Math.toRadians(m_slope);\n\t\t// Draw our line:\n\t\tgl.glLineWidth(2.0f);\n\n\t\tif (Iteration != 0) {\n\t\t\tfor (int i = 0; i < Iteration; i++) {\n\n\n\t\t\t\tif ((m_slope >= 0 && m_slope <= 45) || (m_slope >= 315 && m_slope <= 360)) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), 100 + y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), 100 + y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + -20 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 20 + (40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t} else if ((m_slope >= 135 && m_slope < 225)) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 - 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 - 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t} else if (m_slope > 45 && m_slope < 135) {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 20 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + -20 + (40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t} else {\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (-50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\n\t\t\t\t\tgl.glEnd();\n\t\t\t\t\tgl.glBegin(gl.GL_QUAD_STRIP);\n\t\t\t\t\t// Draw x- and y-axes:\n\t\t\t\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (100 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (100 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 100 + (50 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (50 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 - 20 + (0 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (0 + i * 200) * ((float) Math.sin(theta)));\n\t\t\t\t\tgl.glVertex2d(x_Start * 100 + 20 + (-40 + i * 200) * ((float) Math.cos(theta)), y_Start * 100 + (-40 + i * 200) * ((float) Math.sin(theta)));\n\n\n\n\t\t\t\t\tgl.glEnd();\n\n\t\t\t\t}\n\n\t\t\t\tgl.glPopMatrix();\n\t\t\t}\n\t\t}\n\t}", "private void setPixelInfo(Stroke theStroke)\n\t{\n\t\t// get the data from the stroke in the required format\n\t\tVector ptList = theStroke.getM_ptList();\n\t\t//double [][] strokeMat = theStroke.getPointsAs2DMatrix_Double();\n\t\tint stkLen = ptList.size();\n\t\t// init local variables\n\t\tPixelInfo prevPixel = null;\n\t\tPixelInfo currPixel = null;\n\t\tint winSize_speed = 0;\n\t\tint winSize_slope = 0;\n\t\tdouble cummDist_speed = 0.0;\n\t\t\n\t\tIterator iter = ptList.iterator();\n\t\t// set the pixel properties for the first pixel of the stroke.\n\t\tif(iter.hasNext())\n\t\t{\n\t\t\t// init the curvature and curvature of first pixel, set them to 0\n\t\t\tprevPixel = (PixelInfo)iter.next();\n\t\t\tprevPixel.setCurvature(0);\n\t\t\tprevPixel.setSpeed(0);\n\t\t\tprevPixel.setSlope(0);\n\t\t\t// System.out.println(\"i = 0: \"+prevPixel);\n\t\t}\n\n\t\t// set the pixel property values for the remaining pixels\n\t\tint index=0;\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tindex++;\n\n\t\t\t// get the second pixel\n\t\t\tcurrPixel = (PixelInfo)iter.next();\n\n\t\t\t// increment the counter for speed\n\t\t\tif(winSize_speed < SpeedBasedDetection.DEF_WIN_SIZE_SPEED) \n\t\t\t{\n\t\t\t\twinSize_speed++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// remove the distance of the last pixel in the window\n\t\t\t\tPoint a = ((PixelInfo) ptList.get(index - winSize_speed -1));\n\t\t\t\tPoint b = ((PixelInfo)ptList.get(index - winSize_speed));\n\t\t\t\t// System.out.println(\"prev dist: \"+a.distance(b));\n\t\t\t\tcummDist_speed -= a.distance(b); \n\t\t\t}\n\t\t\t// System.out.println(\"Speed: \"+winSize_speed);\n\t\t\t\n\t\t\t// add the distance of current pixel in the window\n\t\t\tdouble thisDist = prevPixel.distance(currPixel);\n\t\t\t//System.out.println(\"this dist: \"+thisDist);\n\t\t\tcummDist_speed += thisDist;\n\t\t\t//System.out.println(\"summ distance: \"+cummDist_speed);\n\t\t\t\n\t\t\t// do speed calculations for this pixel\n\t\t\tPixelInfo a = (PixelInfo) ptList.get(index - winSize_speed);\n\t\t\tdouble cummTime_speed = currPixel.getTime() - a.getTime();\n\t\t\tcurrPixel.setSpeed(cummDist_speed/cummTime_speed);\n\t\t\t\n\t\t\t// set slope for the current pixel\n\t\t\tif(winSize_slope < CurvatureBasedDetection.DEF_WIN_SIZE_SLOPE)\n\t\t\t{\n\t\t\t\twinSize_slope++;\n\t\t\t}\n\n\t\t\t// calculate the actual window size\n\t\t\tint start = index - winSize_slope;\n\t\t\tint end = index + winSize_slope;\n\t\t\t\n\t\t\t// incase the window is running out of the stroke length, adjust the window size to fit the stroke\n\t\t\tif(end > (stkLen-1))\n\t\t\t{\n\t\t\t\tend = stkLen-1;\n\t\t\t\tstart = index - (end-index);\n\t\t\t}\n\t\t\t\n\t\t\t// TODO: check for this code\n\t\t\t//System.out.println(\"Slope :start: \"+start+\" end: \"+end);\n\t\t\tdouble[][] winElem = theStroke.getWindowElemAs2DMatrix_Double(start, end);\n\t\t\tif(winElem!=null)\n\t\t\t{\n\t\t\t\tdouble[] odr = Maths.performODR(winElem);\n\t\t\t\tcurrPixel.setSlope(odr[0]);\n\t\t\t\t\n\t\t\t\t//ISHWAR\n\t\t\t\t//System.out.println(Maths.angle(currPixel.getSlope(), 1) + \" \" + Maths.angle(prevPixel.getSlope(), 1) + \"\\n\");\n\t\t\t\t// calculate the curvature information\n\t\t\t\tdouble slopeChange = Maths.angle(currPixel.getSlope(), 1) - Maths.angle(prevPixel.getSlope(), 1);\n\t\t\t\t\n\t\t\t\t//ISHWAR\n/*\t\t\t\tif( (Maths.angle(currPixel.getSlope(), 1) < 0 && Maths.angle(prevPixel.getSlope(), 1) >0) || ( Maths.angle(currPixel.getSlope(), 1) > 0 && Maths.angle(prevPixel.getSlope(), 1) <0) )\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Slope Changed\");\n\t\t\t\t\tslopeChange=0.0001;\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// System.out.println(\"slopeChange \"+slopeChange);\n\t\t\t\tif(slopeChange == 0.0 && thisDist == 0.0){\n\t\t\t\t\tcurrPixel.setCurvature(prevPixel.getCurvature());\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\tcurrPixel.setCurvature(slopeChange/thisDist);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// NOTE: TODO this should not happen\n\t\t\t}\n\t\t\tSystem.out.println(\"i = \"+index+\": \"+currPixel);\n\t\t\t\n\t\t\tprevPixel = currPixel;\n\t\t\tcurrPixel = null;\n\t\t}\t\t\n/*\t\t\n\t\tif(iter.hasNext())\n\t\t{\n\t\t\t// get the second point\n\t\t\tcurrPixel = (PixelInfo)iter.next();\n\t\t\t\n\t\t\tprevCurrDist = prevPixel.distance(currPixel);\n\t\t\tprevCurrAngle = GlobalMethods.angle(prevPixel, currPixel);\n\t\t\t// System.out.println(prevCurrAngle);\n\t\t\t// no need to check for divide by zero error points are not sampled until the mouse moves \n\t\t\t// and when the mouse moves time will be different due to the sampling rate.\n\t\t\tdouble speed = prevCurrDist / (currPixel.getTime() - prevPixel.getTime());\n\t\t\t//System.out.println(\"speed: \"+ speed);\n\t\t\tcurrPixel.setSpeed(speed);\n\t\t}\n\n\t\twhile (iter.hasNext())\n\t\t{\n\t\t\tPixelInfo nextPixel = (PixelInfo) iter.next();\n\t\t\t\n\t\t\t// calculate curvature at this pixel\n\t\t\tdouble currNextDist = currPixel.distance(nextPixel);\n\t\t\tdouble currNextAngle = GlobalMethods.angle(currPixel, nextPixel);\n\t\t\t// System.out.println(currNextAngle);\n\t\t\t\n\t\t\t// no need to check for divide by zero error points are not sampled until the mouse moves \n\t\t\t// and when the mouse moves time will be different due to the sampling rate.\n\t\t\tdouble speed = currNextDist / (nextPixel.getTime() - currPixel.getTime());\n\t\t\t//System.out.println(\"speed: \"+ speed);\n\t\t\tnextPixel.setSpeed(speed);\n\t\t\t\n\t\t\t// curvature is the change of slope divided by change of distance \n\t\t\t// double curvature = (currNextAngle-prevCurrAngle)/(currNextDist+prevCurrDist);\n\t\t\tdouble curvature = (currNextAngle-prevCurrAngle)/prevCurrDist;\n\t \t\n\t \t// set the value of curvature for this pixel\n\t \tcurrPixel.setCurvature(Math.abs(curvature));\n\t \t\n\t \t// transfer values\n\t \tprevPixel = currPixel;\n\t \tcurrPixel = nextPixel;\n\t \tprevCurrDist = currNextDist;\n\t \tprevCurrAngle = currNextAngle;\n\t\t}\n*/\t\t\n\t\t// set the curvature of the last pixel to 0, the last pixel is stored in currPixel\n\t\tif(currPixel != null) currPixel.setCurvature(0);\n\t\t\n\t\tfor(int i=0;i<ptList.size();i++)\n\t\t{\n\t\t\tPixelInfo pi = (PixelInfo)ptList.get(i);\n//ISHWAR\t\t\tSystem.out.println(i + \". (\" + pi.x + \",\" + pi.y + \") \" +pi.getCurvature() + \" \" + pi.getTime() + \" \" + pi.getSpeed());\n\t\t}\n\t}", "public void setValuesForDisplay() {\n \tthis.trainModelGUI.tempLabel.setText(Integer.toString(this.temperature) + DEGREE + \"F\");\n\n //this.trainCars = this.trainModelGUI.numCars();\n this.trainWheels = this.trainCars * TRAIN_NUM_WHEELS;\n this.trainModelGUI.crewCountLabel.setText(Integer.toString(crew));\n this.trainModelGUI.heightVal.setText(Double.toString(truncateTo(this.trainHeight, 2)));\n this.trainModelGUI.widthVal.setText(Double.toString(truncateTo(this.trainWidth, 2)));\n this.trainModelGUI.lengthVal.setText(Double.toString(truncateTo(this.trainLength, 2)));\n this.trainModelGUI.weightVal.setText(Integer.toString(((int)this.trainWeight)));\n this.trainModelGUI.capacityVal.setText(Integer.toString(this.trainCapacity));\n this.trainModelGUI.powerVal.setText(Double.toString(truncateTo(this.powerIn/1000,2)));\n \n GPSAntenna = this.trainModelGUI.signalFailStatus();\n if(!GPSAntenna) {\n \tthis.trainModelGUI.gpsAntennaStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.gpsAntennaStatusLabel.setText(\"OFF\");\n }\n MBOAntenna = this.trainModelGUI.signalFailStatus();\n if(!MBOAntenna) {\n \tthis.trainModelGUI.mboAntennaStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.mboAntennaStatusLabel.setText(\"OFF\");\n }\n \t\n \tthis.trainModelGUI.timeVal.setText(trnMdl.currentTime.toString());\n \tthis.trainModelGUI.stationVal.setText(this.station);\n \t\n \tif(rightDoorIsOpen == true) {\n \tthis.trainModelGUI.rightDoorStatusLabel.setText(\"OPEN\");\n } else {\n \tthis.trainModelGUI.rightDoorStatusLabel.setText(\"CLOSED\");\n }\n \tif(leftDoorIsOpen == true) {\n \tthis.trainModelGUI.leftDoorStatusLabel.setText(\"OPEN\");\n } else {\n \tthis.trainModelGUI.leftDoorStatusLabel.setText(\"CLOSED\");\n }\n\n \tif(lightsAreOn == true) {\n \t\tthis.trainModelGUI.lightStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.lightStatusLabel.setText(\"OFF\");\n }\n \t\n \tthis.trainModelGUI.numPassengers.setText(Integer.toString(this.numPassengers));\n \tthis.trainModelGUI.numCarsSpinner.setText(Integer.toString(this.trainCars));\n \tthis.trainModelGUI.authorityVal.setText(Double.toString(truncateTo(this.CTCAuthority/METERS_PER_MILE,2)));\n \tthis.trainModelGUI.ctcSpeedLabel.setText(Double.toString(truncateTo(this.CTCSpeed*KPH_TO_MPH,2)));\n \t\n \tif(serviceBrake) {\n \t\tthis.trainModelGUI.serviceLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.serviceLabel.setText(\"OFF\");\n }\n \tif(emerBrake) {\n \t\tthis.trainModelGUI.emergencyLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.emergencyLabel.setText(\"OFF\");\n }\n \t\n \tif(this.arrivalStatus == ARRIVING) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"ARRIVING\");\n \t} else if (this.arrivalStatus == EN_ROUTE) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"EN ROUTE\");\n \t} else if (this.arrivalStatus == APPROACHING) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"APPROACHING\");\n \t} else {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"DEPARTING\");\n embarkingPassengersSet = false;\n \t}\n\n \tthis.trainModelGUI.currentSpeedLabel.setText(Double.toString(truncateTo((this.currentSpeed*MS_TO_MPH), 2)));\n \n \tif (this.lineColor.equals(\"GREEN\")) {\n \t\tthis.trainModelGUI.lblLine.setText(lineColor);\n \t\tthis.trainModelGUI.lblLine.setForeground(Color.GREEN);\n \t} else {\n \t\tthis.trainModelGUI.lblLine.setText(\"RED\");\n \t\tthis.trainModelGUI.lblLine.setForeground(Color.RED);\n }\n \t\n }", "public static void main(String[] args) {\n\t\tdouble T=Double.parseDouble(args[0]);\r\n\r\n double dt=Double.parseDouble(args[1]);\r\n\r\n String filename=args[2];\r\n\r\n double r=readRadius(filename);\r\n\r\n In in=new In(filename);\r\n\r\n int n=in.readInt();\r\n\r\n r=in.readDouble();\r\n\r\n\r\n //draw the background of the universe\r\n\r\n\r\n\r\n StdDraw.setCanvasSize(512,512);\r\n\r\n StdDraw.setXscale(-r,r);\r\n StdDraw.setYscale(-r,r);\r\n StdDraw.picture(0,0,\"./images/starfield.jpg\");\r\n\r\n \r\n //draw planets \r\n\r\n \r\n Planet[] p=new Planet[n];\r\n\r\n int i=1;\r\n\r\n //read all the data of the planets into the code;\r\n\r\n while(i<=n){\r\n\r\n p[i-1]=new Planet(in.readDouble(),in.readDouble(),in.readDouble(),\r\n in.readDouble(),in.readDouble(),in.readString());\r\n i++;\r\n\r\n }\r\n\r\n Planet.draw(p);\r\n\r\n\r\n StdDraw.enableDoubleBuffering();\r\n\r\n double t=0;\r\n while (t<=T){\r\n\r\n\r\n double[] xForces=new double[5];\r\n double[] yForces=new double[5];\r\n\r\n for(i=0;i<n;i++){\r\n\r\n xForces[i]=p[i].calcNetForceExertedByX(p);\r\n yForces[i]=p[i].calcNetForceExertedByY(p);\r\n\r\n p[i].update(dt,xForces[i],yForces[i]);\r\n StdDraw.picture(0,0,\"./images/starfield.jpg\");\r\n\r\n Planet.draw(p);\r\n\r\n StdDraw.show();\r\n\r\n StdDraw.pause(10);\r\n\r\n }\r\n t=t+dt;\r\n }\r\n\r\n\t}", "final void getParameters()\r\n {\r\n hostName=getParameter(\"hostname\");\r\n\tIPAddress=getParameter(\"IPAddress\");\r\n\tString num=getParameter(\"maxSearch\");\r\n\tString arg=getParameter(\"debug\");\r\n\tserver=getParameter(\"server\");\r\n\tindexName=getParameter(\"indexName\");\r\n\tString colour=getParameter(\"bgColour\");\r\n\r\n\tif(colour==null)\r\n\t{\r\n\t bgColour=Color.lightGray;\r\n }\r\n else\r\n\t{\r\n\t try\r\n\t {\r\n\t bgColour=new Color(Integer.parseInt(colour,16));\r\n\t }\r\n\t catch(NumberFormatException nfe)\r\n\t {\r\n\t bgColour=Color.lightGray;\r\n\t }\r\n\t}\r\n\t\r\n\tcolour=getParameter(\"fgColour\");\r\n\tif(colour==null)\r\n\t{\r\n\t fgColour=Color.black;\r\n\t}\r\n\telse\r\n\t{\r\n\t try\r\n\t {\r\n\t fgColour=new Color(Integer.parseInt(colour,16));\r\n\t }\r\n\t catch(NumberFormatException nfe)\r\n\t {\r\n\t fgColour=Color.black;\r\n\t }\r\n\t}\r\n\r\n\t//Check for missing parameters.\r\n\tif(hostName==null && server==null)\r\n\t{\r\n\t statusArea.setText(\"Error-no host/server\");\r\n\t hostName=\"none\";\r\n\t}\r\n\r\n\tmaxSearch=(num == null) ? MAX_NUMBER_PAGES : Integer.parseInt(num);\r\n }", "@Override\r\n\tpublic void updateParameterBlock() {\r\n\r\n\t\tpb.setParameter(\"Left\", ((Number) jSpinnerLeft.getValue()).intValue());\r\n\t\tpb.setParameter(\"Right\", ((Number) jSpinnerRight.getValue()).intValue());\r\n\t\tpb.setParameter(\"Top\", ((Number) jSpinnerTop.getValue()).intValue());\r\n\t\tpb.setParameter(\"Bottom\",((Number) jSpinnerBottom.getValue()).intValue());\r\n\t\tpb.setParameter(\"Const\", ((Number) jSpinnerConst.getValue()).intValue());\r\n\r\n\t\tpb.setParameter(\"NewWidth\", ((Number) jSpinnerNewWidth.getValue()).intValue());\r\n\t\tpb.setParameter(\"NewHeight\", ((Number) jSpinnerNewHeight.getValue()).intValue());\r\n\r\n\t\tif (buttZero.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.ZERO);\r\n\t\tif (buttConst.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.CONSTANT);\r\n\t\tif (buttCopy.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.COPY);\r\n\t\tif (buttReflect.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.REFLECT);\r\n\t\tif (buttWrap.isSelected()) pb.setParameter(\"Method\", IqmOpBorderDescriptor.WRAP);\r\n\t\t\r\n\t\tif (buttBorder.isSelected()) pb.setParameter(\"BorderOrSize\", IqmOpBorderDescriptor.PREFERENCE_BORDER);\r\n\t\tif (buttSize.isSelected()) pb.setParameter(\"BorderOrSize\", IqmOpBorderDescriptor.PREFERENCE_SIZE);\r\n\t}", "public String getParameters() {\r\n\t\t\r\n\t\tString strLength = String.valueOf(length);\r\n\t\tString strWidth = String.valueOf(width);\r\n\t\tString strHeight = String.valueOf(height);\r\n\t\t\r\n\t\treturn \"Length: \" + strLength + \"\\nWidth: \" + strWidth + \"\\nHeight: \" + strHeight;\r\n\t}", "public String paramString() {\n\t\tString tail = super.paramString();\n\t\ttail = tail.substring(tail.indexOf(')') + 1);\n\t\treturn \"points=\" + points + \", lineWidth=\" + getLineWidth() + tail;\n\t}", "private void updateOutputValues()\n {\n // TODO: You may place code here to update outputY and outputZ\n \t// Drawing code belongs in drawOnTheCanvas\n \t\n // example:\n outputY = inputA && inputC;\n }", "public void drawGrid(){\r\n gc.setLineWidth(0.5f);//this is how thick the 'pen' will be, 1 pixel for now\r\n gc.setStroke(divisionsColour);\r\n //this for loop will start at (canvas.widthProperty().intValue()/2)%pixelsPerDivision\r\n //this means that one line will pass through the center of the screen, for 0 which we need\r\n //canvas width and height properties are the width and height of the display of the waves only\r\n //then we draw a line every pixelsPerDivision pixels, this is so one division is pixelsPerDivision pixels.\r\n //the one directly below is for the time domain\r\n for (int x = (canvas.widthProperty().intValue() / 2) % pixelsPerDivision; x < canvas.widthProperty().intValue(); x += pixelsPerDivision) {\r\n //we begin to draw a line\r\n gc.beginPath();\r\n //starting at the top of the page\r\n gc.moveTo(x, 0);\r\n //going to the bottom\r\n gc.lineTo(x, canvas.heightProperty().intValue());\r\n //then finish this line\r\n gc.stroke();\r\n }\r\n\r\n\r\n //the one directly below is for the voltage domain\r\n //this one it is much more important that a line goes through the center as this is where the 0 mark for the waves is\r\n for (int y = (canvas.heightProperty().intValue() / 2) % pixelsPerDivision; y < canvas.heightProperty().intValue(); y += pixelsPerDivision) {\r\n gc.beginPath();\r\n gc.moveTo(0, y);\r\n gc.lineTo(canvas.widthProperty().intValue(), y);\r\n gc.stroke();\r\n }\r\n gc.setStroke(voltageTextColour);\r\n int numberOfPositiveDivisions = (canvas.heightProperty().intValue() / 2) / pixelsPerDivision;\r\n\r\n\r\n\r\n\r\n for (int i = 0; i < numberOfPositiveDivisions; i+=2) {\r\n gc.strokeText(\"+\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"+\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 - (pixelsPerDivision * i));\r\n if (i != 0) {\r\n gc.strokeText(\"-\" + getScienceNumber(i * VoltagePerDivision) + \"V\", 5, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i)+5);\r\n // gc.strokeText(\"-\" + i / voltageMultiplier + \"V\", canvas.widthProperty().intValue() - 25, canvas.heightProperty().intValue() / 2 + (pixelsPerDivision * i));\r\n }\r\n }\r\n gc.rotate(-90);\r\n\r\n for (int i=4; i<canvasSizeXY/pixelsPerDivision;i+=4){\r\n gc.strokeText(getScienceNumber(i*secondsPerDivision)+\"ms\", -(canvasSizeXY-10),(pixelsPerDivision * i)+5);\r\n }\r\n gc.rotate(90);\r\n //the following will draw a center line over the 0V axis part, but with a thicker pen so we can see 0 clearer\r\n gc.beginPath();\r\n gc.setLineWidth(3);//makes the line thicker\r\n gc.moveTo(0, canvas.heightProperty().intValue() / 2);\r\n gc.lineTo(canvas.widthProperty().intValue(), canvas.heightProperty().intValue() / 2);\r\n gc.stroke();\r\n\r\n }", "private void setTEMparsFromRunner(){\n\t\t\n\t\tString fdummy=\" \";\n\t\t\n\t\tsoipar_cal sbcalpar = new soipar_cal();\n\t\tvegpar_cal vbcalpar = new vegpar_cal();\t\n\t\t\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_CMAX, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setCmax(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NMAX, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setNmax(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_CFALL, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setCfall(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NFALL, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setNfall(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KRB, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setKrb(Float.valueOf(fdummy));\n\t\t\t\t\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCFIB, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcfib(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCHUM, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdchum(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCMIN, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcmin(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCSLOW, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcslow(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NUP, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setNup(Float.valueOf(fdummy));\n\t\t\n\t\tif (fdummy!=\" \") TEM.runcht.cht.resetCalPar(vbcalpar, sbcalpar);\n\n\t\t//\n\t\tsoipar_bgc sbbgcpar = new soipar_bgc();\n\t\tvegpar_bgc vbbgcpar = new vegpar_bgc();\n\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m1, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM1(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m2, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM2(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m3, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM3(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m4, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM4(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsoma, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsoma(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsompr, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsompr(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsomcr, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsomcr(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_som2co2, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setSom2co2(Float.valueOf(fdummy));\n\t\t\n\t\tif (fdummy!=\" \") TEM.runcht.cht.resetBgcPar(vbbgcpar, sbbgcpar);\n\t\t\t\t\n\t}", "@Override\n\tpublic void createParametersBounds() {\n\t\tMap<String, List<Double>> parametersBounds = new HashMap<String, List<Double>>();\n\t\tparametersBounds.put(PROBCATCH_PARAMETER_LABEL_GUI, probCatchBounds);\n\t\tsetParametersBounds(parametersBounds);\n\t}", "private void initParameters(Canvas canvas) {\n hasInitialized = true;\n Random random = new Random();\n int unitY = canvas.getHeight() / 4;\n int x1 = 0;\n if (random.nextBoolean()) {\n x1 = canvas.getWidth();\n this.moveTo(random.nextInt(canvas.getWidth() / 4) + canvas.getWidth() / 4, -getHeight());\n } else {\n this.moveTo(random.nextInt(canvas.getWidth() / 4) + canvas.getWidth() / 2, -getHeight());\n }\n int x2 = canvas.getWidth() - x1;\n int x3 = x1;\n int y1 = random.nextInt(unitY) + unitY;\n int y2 = y1 + unitY;\n int y3 = y1 + 3 * unitY;\n\n m1 = computeMovement((int) getX(), (int) getY(), x1, y1);\n m2 = computeMovement(x1, y1, x2, y2);\n m3 = computeMovement(x2, y2, x3, y3);\n }", "private void getParameters(BlendmontParam blendmontParam) {\n blendmontParam.setBinByFactor(getBinning());\n updateMetaData();\n }", "void results() {\n Time t = new Time(System.currentTimeMillis());\n endTime = t;\n\n float t1gpslog, t2gpslog, t3gpslog, bhgpslog, mhgpslog, fhgpslog, nfgpslog,\n t1dtnlog, t2dtnlog, t3dtnlog, bhdtnlog, mhdtnlog, fhdtnlog, nfdtnlog;\n float t1logpercentage, t2logpercentage, t3logpercentage, bhlogpercentage,\n mhlogpercentage, fhlogpercentage, nflogpercentage;\n\n t1gpslog = t2gpslog = t3gpslog = bhgpslog = mhgpslog = fhgpslog = nfgpslog\n = t1dtnlog = t2dtnlog = t3dtnlog = bhdtnlog = mhdtnlog = fhdtnlog = nfdtnlog = 0;\n int xval, yval;\n\n for (int rbucklocationx = 0; rbucklocationx < MAX_X_GRID; rbucklocationx++) {\n for (int rbucklocationy = 0; rbucklocationy < MAX_Y_GRID; rbucklocationy++) {\n if (t1_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t1GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t1gpslog++;\n }\n\n if (t2_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t2GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t2gpslog++;\n }\n\n if (t3_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t3GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t3gpslog++;\n }\n if (bh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n bhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n bhgpslog++;\n }\n if (mh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n mhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n mhgpslog++;\n }\n if (fh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n fhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n fhgpslog++;\n }\n if (nf_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n nfgGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n nfgpslog++;\n }\n }\n }\n\n for (int resultloop = 0; resultloop < DATA_MAX_PACKETS; resultloop++)\n {\n if (d1_message[resultloop] != 0) {\n if ((d1_message[resultloop] >> 11) == t1_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t1DTNLog.add(new GPSLog(xval, yval));\n t1dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t2_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t2DTNLog.add(new GPSLog(xval, yval));\n t2dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t3_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t3DTNLog.add(new GPSLog(xval, yval));\n t3dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == bh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n bhDTNLog.add(new GPSLog(xval, yval));\n bhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == mh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n mhDTNLog.add(new GPSLog(xval, yval));\n mhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == fh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n fhDTNLog.add(new GPSLog(xval, yval));\n fhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == nf_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n nfgDTNLog.add(new GPSLog(xval, yval));\n nfdtnlog++;\n }\n }\n }\n\n if (t1gpslog != 0) {\n t1logpercentage = (t1dtnlog / t1gpslog) * 100;\n percentageLog.add(\"t1percentage is \" + t1logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n });\n t1tp = t1logpercentage;\n }\n\n if (t2gpslog != 0) {\n t2logpercentage = (t2dtnlog / t2gpslog) * 100;\n percentageLog.add(\"t2percentage is \" + t2logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n });\n t2tp = t2logpercentage;\n }\n\n if (t3gpslog != 0) {\n t3logpercentage = (t3dtnlog / t3gpslog) * 100;\n percentageLog.add(\"t3percentage is \" + t3logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n });\n t3tp = t3logpercentage;\n }\n\n if (bhgpslog != 0) {\n bhlogpercentage = (bhdtnlog / bhgpslog) * 100;\n percentageLog.add(\"bhpercentage is \" + bhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n });\n bhtp = bhlogpercentage;\n }\n\n if (mhgpslog != 0) {\n mhlogpercentage = (mhdtnlog / mhgpslog) * 100;\n percentageLog.add(\"mhpercentage is \" + mhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n });\n mhtp = mhlogpercentage;\n }\n\n if (fhgpslog != 0) {\n fhlogpercentage = (fhdtnlog / fhgpslog) * 100;\n percentageLog.add(\"fhpercentage is \" + fhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n });\n fhtp = fhlogpercentage;\n }\n\n if (nfgpslog != 0) {\n nflogpercentage = (nfdtnlog / nfgpslog) * 100;\n percentageLog.add(\"nfpercentage is \" + nflogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n tpslc.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n });\n nftp = nflogpercentage;\n }\n\n float gpslogSum = t1gpslog + t2gpslog + t3gpslog + bhgpslog + mhgpslog + fhgpslog + nfgpslog;\n float dtnlogSum = t1dtnlog + t2dtnlog + t3dtnlog + bhdtnlog + mhdtnlog + fhdtnlog + nfdtnlog;\n\n \n if (gpslogSum > 0)\n {\n float collectiveThroughput = ((dtnlogSum) / (gpslogSum)) * 100;\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n tpslc.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n });\n ct = collectiveThroughput;\n }\n\n //Add the Radio Contact Ratio value to the series\n \n if (dtnlogSum > 0)\n {\n rcratio = radioContactLog.size()/dtnlogSum;\n }\n else\n {\n rcratio = 0;\n }\n Platform.runLater(()-> {\n rcrSeries.setYValue(rcratio);\n });\n updateGPSLogSeries();\n updateDataCenterSeries();\n\n //Update the binding properties \n Platform.runLater(()-> {\n simStarted.set(false);\n simInProgress.set(false);\n simCompleted.set(true);\n simNotInProgress.set(true);\n simPaused.set(false);\n simNotStarted.set(true);\n });\n packetModels.clear();\n packetModels.add(new PacktTallyModel(t1gpslog));\n packetModels.add(new PacktTallyModel(t2gpslog));\n packetModels.add(new PacktTallyModel(t3gpslog));\n packetModels.add(new PacktTallyModel(bhgpslog));\n packetModels.add(new PacktTallyModel(mhgpslog));\n packetModels.add(new PacktTallyModel(fhgpslog));\n packetModels.add(new PacktTallyModel(nfgpslog));\n packetModels.add(new PacktTallyModel(gpslogSum));\n packetModels.add(new PacktTallyModel(t1dtnlog));\n packetModels.add(new PacktTallyModel(t2dtnlog));\n packetModels.add(new PacktTallyModel(t3dtnlog));\n packetModels.add(new PacktTallyModel(bhdtnlog));\n packetModels.add(new PacktTallyModel(mhdtnlog));\n packetModels.add(new PacktTallyModel(fhdtnlog));\n packetModels.add(new PacktTallyModel(nfdtnlog));\n packetModels.add(new PacktTallyModel(dtnlogSum));\n packetModels.add(new PacktTallyModel(ct));\n packetModels.add(new PacktTallyModel(radioContactLog.size()));\n packetModels.add(new PacktTallyModel(rcratio));\n \n }", "public void graduation()\n{\n stroke(0);\n line(w3, h3, w3, h3+70);//0%\n line(w3+cos(7*TWO_PI/20)*(radiu-5), h3+sin(7*TWO_PI/20)*(radiu-5), w3+cos(7*TWO_PI/20)*radiu, h3+sin(7*TWO_PI/20)*radiu);//10%\n line(w3+cos(9*TWO_PI/20)*(radiu-5), h3+sin(9*TWO_PI/20)*(radiu-5), w3+cos(9*TWO_PI/20)*radiu, h3+sin(9*TWO_PI/20)*radiu);//20%\n line(w3+cos(11*TWO_PI/20)*(radiu-5), h3+sin(11*TWO_PI/20)*(radiu-5), w3+cos(11*TWO_PI/20)*radiu, h3+sin(11*TWO_PI/20)*radiu);//30%\n line(w3+cos(13*TWO_PI/20)*(radiu-5), h3+sin(13*TWO_PI/20)*(radiu-5), w3+cos(13*TWO_PI/20)*radiu, h3+sin(13*TWO_PI/20)*radiu);//40%\n line(w3+cos(15*TWO_PI/20)*(radiu-5), h3+sin(15*TWO_PI/20)*(radiu-5), w3+cos(15*TWO_PI/20)*radiu, h3+sin(15*TWO_PI/20)*radiu);//50%\n line(w3+cos(17*TWO_PI/20)*(radiu-5), h3+sin(17*TWO_PI/20)*(radiu-5), w3+cos(17*TWO_PI/20)*radiu, h3+sin(17*TWO_PI/20)*radiu);//60%\n line(w3+cos(19*TWO_PI/20)*(radiu-5), h3+sin(19*TWO_PI/20)*(radiu-5), w3+cos(19*TWO_PI/20)*radiu, h3+sin(19*TWO_PI/20)*radiu);//60%\n line(w3+cos(21*TWO_PI/20)*(radiu-5), h3+sin(21*TWO_PI/20)*(radiu-5), w3+cos(21*TWO_PI/20)*radiu, h3+sin(21*TWO_PI/20)*radiu);//60%\n line(w3+cos(23*TWO_PI/20)*(radiu-5), h3+sin(23*TWO_PI/20)*(radiu-5), w3+cos(23*TWO_PI/20)*radiu, h3+sin(23*TWO_PI/20)*radiu);//60%\n fill(0);\n textSize(10);\n text(\"0%\", w3-5, h3+radiu+15); \n\n text(\"10%\", w3+cos(7*TWO_PI/20)*(radiu+25), h3+sin(7*TWO_PI/20)*(radiu+15)); \n text(\"20%\", w3+cos(9*TWO_PI/20)*(radiu+25), h3+sin(9*TWO_PI/20)*(radiu+15)); \n text(\"30%\", w3+cos(11*TWO_PI/20)*(radiu+20), h3+sin(11*TWO_PI/20)*(radiu+15)); \n text(\"40%\", w3+cos(13*TWO_PI/20)*(radiu+15), h3+sin(13*TWO_PI/20)*(radiu+10)); \n text(\"50%\", w3+cos(15*TWO_PI/20)*(radiu+15), h3+sin(15*TWO_PI/20)*(radiu+5)); \n text(\"60%\", w3+cos(17*TWO_PI/20)*(radiu+10), h3+sin(17*TWO_PI/20)*(radiu+5)); \n text(\"70%\", w3+cos(19*TWO_PI/20)*(radiu+5), h3+sin(19*TWO_PI/20)*(radiu+15)); \n text(\"80%\", w3+cos(21*TWO_PI/20)*(radiu+5), h3+sin(21*TWO_PI/20)*(radiu+15)); \n text(\"90%\", w3+cos(23*TWO_PI/20)*(radiu+5), h3+sin(23*TWO_PI/20)*(radiu+15)); \n textSize(20);\n text(\"Weekday\", w3+cos(7*TWO_PI/20)*(radiu+100), h3+sin(7*TWO_PI/20)*(radiu+50));\n text(\"Weekend\", w3+cos(24*TWO_PI/20)*(radiu+33), h3+sin(24*TWO_PI/20)*(radiu+33));\n}", "@Override\n\t\t\tvoid drawCurve(Point2D.Double[] p, Graphics2D g) {\n\t\t\t\t\n\t\t\t\tdouble minx = p[0].x;\n\t\t\t\tdouble maxx = p[0].x;\n\t\t\t\tdouble miny = p[0].y;\n\t\t\t\tdouble maxy = p[0].y;\n\t\t\t\tfor (int i = 1; i < p.length ; i++) {\n\t\t\t\t\tminx = Math.min(minx, p[i].x);\n\t\t\t\t\tmaxx = Math.max(maxx, p[i].x);\n\t\t\t\t\tminy = Math.min(miny, p[i].y);\n\t\t\t\t\tmaxy = Math.max(maxy, p[i].y);\n\t\t\t\t}\n\t\t\t Color c = g.getColor();\n\t\t\t\tg.setColor(new Color(1.0f,0.0f,0.0f,0.3f));\n\t\t\t\tfor (int x = (int) minx; x< maxx; x++) {\n\t\t\t\t\tfor (int y = (int) miny; y< maxy; y++) {\n\t\t\t\t\t\tif (inPolygonTurningCount(p, (double)x, (double)y)) g.fillRect(x, y, 1, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tg.setColor(c);\n\t\t\t\tg.draw(new Rectangle2D.Double(minx,miny,maxx-minx,maxy-miny));\t\n\t\t\t\t// \n\t\t\t\tfor (int i = 0; i < p.length ; i++) {\n\t\t\t\t\tg.draw(new Line2D.Double(p[i].x, p[i].y,p[(i+1)%p.length].x, p[(i+1)%p.length].y));\n\t\t\t\t}\n\t\t\t}", "@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "public void setPoints(int numOfIter) {\n\t\tint x = getX();\n\t\tint y = getY();\n\t\tint w = getW();\n\t\tint h = getH();\n\t\th = ((int) (getH() - w*0.29));\n\t\tint numOfSides = 3 * power(4, numOfIter);\n\t\n\t\t\n\t\tif(numOfIter == 0) {\n\t\t\txPointsD = new double[numOfSides];\n\t\t\tyPointsD = new double[numOfSides];\n\t\t\t\n\t\t\txPointsD[2] = x;\n\t\t\tyPointsD[2] = y + h;\n\t\t\t\n\t\t\txPointsD[1] = (double) x + ((double) w)/2;\n\t\t\tyPointsD[1] = y;\n\t\t\t\n\t\t\txPointsD[0] = x + w;\n\t\t\tyPointsD[0] = y + h;\n\t\t} else {\n\t\t\tsetPoints(numOfIter - 1);\n\t\t\tint numOfSidesBefore = xPoints.length;\n\t\t\tdouble[] xPointsDB = xPointsD;\n\t\t\tdouble[] yPointsDB = yPointsD;\n\t\t\txPointsD = new double[numOfSides];\n\t\t\tyPointsD = new double[numOfSides];\n\t\t\t\n\t\t\tfor(int i = 0; i < numOfSidesBefore; i++) {\n\t\t\t\txPointsD[4*i] = xPointsDB[i];\n\t\t\t\tyPointsD[4*i] = yPointsDB[i];\n\t\t\t\t\n\t\t\t\tdouble nextXPointsDB;\n\t\t\t\tdouble nextYPointsDB;\n\t\t\t\tif(i < numOfSidesBefore - 1) {\n\t\t\t\t\tnextXPointsDB = xPointsDB[i+1];\n\t\t\t\t\tnextYPointsDB = yPointsDB[i+1];\n\t\t\t\t} else {\n\t\t\t\t\tnextXPointsDB = xPointsDB[0];\n\t\t\t\t\tnextYPointsDB = yPointsDB[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//4i + 1 --> U = (2A+B)/3\n\t\t\t\txPointsD[4*i + 1] = (2 * xPointsDB[i] + nextXPointsDB)/3;\n\t\t\t\tyPointsD[4*i + 1] = (2 * yPointsDB[i] + nextYPointsDB)/3;\n\t\t\t\t\n\t\t\t\t//4i + 2 --> this one is complicated --> V = U + (AB/3)*(cos(ang(AB) + pi.3), sin(ang(AB) + pi/3))\n\t\t\t\tdouble angAB = Math.atan2(nextYPointsDB-yPointsDB[i], nextXPointsDB-xPointsDB[i]);\n\t\t\t\txPointsD[4*i + 2] = xPointsD[4*i + 1] + \n\t\t\t\t\t\t(Math.sqrt((nextXPointsDB - xPointsDB[i])*(nextXPointsDB - xPointsDB[i]) +\n\t\t\t\t\t\t\t\t(nextYPointsDB - yPointsDB[i])*(nextYPointsDB - yPointsDB[i]))/3.0) *\n\t\t\t\t\t\tMath.cos(angAB + Math.PI/3.0); \n\t\t\t\t\n\t\t\t\tyPointsD[4*i + 2] = yPointsD[4*i + 1] + \n\t\t\t\t\t\t(Math.sqrt((nextXPointsDB - xPointsDB[i])*(nextXPointsDB - xPointsDB[i]) +\n\t\t\t\t\t\t\t\t(nextYPointsDB - yPointsDB[i])*(nextYPointsDB - yPointsDB[i]))/3.0) *\n\t\t\t\t\t\tMath.sin(angAB + Math.PI/3.0);\n\t\t\t\t\n\t\t\t\t//4i + 3 --> W = (A + 2B)/3\n\t\t\t\txPointsD[4*i + 3] = (xPointsDB[i] + 2 * nextXPointsDB)/3;\n\t\t\t\tyPointsD[4*i + 3] = (yPointsDB[i] + 2 * nextYPointsDB)/3;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\txPoints = new int[numOfSides];\n\t\tyPoints = new int[numOfSides];\n\t\tfor(int i = 0; i < numOfSides; i++) {\n\t\t\txPoints[i] = (int) xPointsD[i];\n\t\t\tyPoints[i] = (int) yPointsD[i];\n\t\t}\n\t\t\n\t}", "private void drawModelElements_Parameters_xjal(Panel _panel, Graphics2D _g, boolean _publicOnly)\n/* 227: */ {\n/* 228:311 */ if (!_publicOnly) {\n/* 229:312 */ drawParameter(_panel, _g, 20, 30, 10, 0, \"placeholder\", this.placeholder, 0);\n/* 230: */ }\n/* 231:314 */ if (!_publicOnly) {\n/* 232:315 */ drawParameter(_panel, _g, 200, 90, 10, 0, \"onClick\", null, 4096);\n/* 233: */ }\n/* 234: */ }", "@Override\n\tpublic ParameterSet requiredParameters()\n\t{\n\t\t// Parameter p0 = new\n\t\t// Parameter(\"Dummy Parameter\",\"Lets user know that the function has been selected.\",FormLine.DROPDOWN,new\n\t\t// String[] {\"true\"},0);\n\t\tParameter p0 = getNumThreadsParameter(10, 4);\n\t\tParameter p1 = new Parameter(\"Old Min\", \"Image Intensity Value\", \"0.0\");\n\t\tParameter p2 = new Parameter(\"Old Max\", \"Image Intensity Value\", \"4095.0\");\n\t\tParameter p3 = new Parameter(\"New Min\", \"Image Intensity Value\", \"0.0\");\n\t\tParameter p4 = new Parameter(\"New Max\", \"Image Intensity Value\", \"65535.0\");\n\t\tParameter p5 = new Parameter(\"Gamma\", \"0.1-5.0, value of 1 results in no change\", \"1.0\");\n\t\tParameter p6 = new Parameter(\"Output Bit Depth\", \"Depth of the outputted image\", Parameter.DROPDOWN, new String[] { \"8\", \"16\", \"32\" }, 1);\n\t\t\n\t\t// Make an array of the parameters and return it\n\t\tParameterSet parameterArray = new ParameterSet();\n\t\tparameterArray.addParameter(p0);\n\t\tparameterArray.addParameter(p1);\n\t\tparameterArray.addParameter(p2);\n\t\tparameterArray.addParameter(p3);\n\t\tparameterArray.addParameter(p4);\n\t\tparameterArray.addParameter(p5);\n\t\tparameterArray.addParameter(p6);\n\t\treturn parameterArray;\n\t}", "public void setVariablesFromValue() {\n\t\tif (this.value < .05) {\n\t\t\tthis.diameter = 10;\n\t\t\t// White\n\t\t\tthis.r = 255;\n\t\t\tthis.g= 255;\n\t\t\tthis.b = 255;\n\t\t} else if (this.value < .2) {\n\t\t\tthis.diameter = 20;\n\t\t\t// Gold\n\t\t\tthis.r = 245;\n\t\t\tthis.g = 171;\n\t\t\tthis.b = 53;\n\t\t} else if (this.value < 1) {\n\t\t\tthis.diameter = 40;\n\t\t\t// Turquoise\n\t\t\tthis.r = 3;\n\t\t\tthis.g= 201;\n\t\t\tthis.b = 169;\n\t\t} else if (this.value < 2) {\n\t\t\tthis.diameter = 80;\n\t\t\t// Burgundy\n\t\t\tthis.r = 192;\n\t\t\tthis.g= 57;\n\t\t\tthis.b = 43;\n\t\t}else if (this.value < 5) {\n\t\t\tthis.diameter = 100;\n\t\t\t// Purple\n\t\t\tthis.r = 155;\n\t\t\tthis.g= 89;\n\t\t\tthis.b = 182;\n\t\t}else if (this.value < 20) {\n\t\t\tthis.diameter = 150;\n\t\t\t// Steel Blue\n\t\t\tthis.r = 75;\n\t\t\tthis.g= 119;\n\t\t\tthis.b = 190;\n\t\t}else {\n\t\t\tthis.diameter = 200;\n\t\t\t// Pink\n\t\t\tthis.r = 210;\n\t\t\tthis.g= 82;\n\t\t\tthis.b = 127;\n\t\t}\n\t}", "public void draw(Graphics g){\n\n g.setColor(Color.red);\n g.drawLine(x1,y1,x2,y2);\n g.drawLine(x2,y2,x3,y3);\n g.drawLine(x3,y3,x1,y1);\n g.setFont(new Font(\"Courier\", Font.BOLD, 12));\n DecimalFormat fmt = new DecimalFormat(\"0.##\"); \n g.setColor(Color.blue);\n g.drawString(fmt.format(perimeter()) + \" \" + name,x1+2 , y1 -2);\n \n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint N = getN();\n\t\t\t\tint T = getT();\n\t\t\t\t\n\t\t\t\tStopwatch stopwatch = new Stopwatch();\n\t\t\t\tPercolationStats ps = new PercolationStats(N, T);\n\t\t\t\t\n\t\t\t\t// results of running PercolationStats object after passing N and T \n\t\t\t\t// N - size of the Table (N * N)\n\t\t\t\t// T - times object runs the simulation\n\t\t\t\tString runTime= \"\" + stopwatch.elapsedTime(); // gets run Time\n\t\t\t\tString mean = \t\"\" + ps.mean(); // gets Mean - look at Statistics\n\t\t\t\tString stddev = \"\" + ps.stddev(); // gets Standard Deviation\n\t\t\t\tString HiLo = \t\"\" + ps.confidenceLo() + \", \" + ps.confidenceHi(); // gets 95% confidence interval:\n\t\t\t\tResultScreenGUI result = new ResultScreenGUI(mean, stddev, HiLo, runTime);\n\t\t\t\tresult.pack();\n\t\t\t\tresult.setVisible(true);\n\t\t\t}", "void setParameters() {\n\t\t\n\t}", "void updateStepCoordiantes(){\n if(xIncreasing) {\n lat = lat + STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat + STEP_LENGTH*yCompMotion*degToMRatio;\n }\n else{\n lat = lat - STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat - STEP_LENGTH*yCompMotion*degToMRatio;\n }\n if(yIncreasing) {\n lon = lon + STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon + STEP_LENGTH*xCompMotion*degToMRatio;\n }\n else{\n lon = lon - STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon - STEP_LENGTH*xCompMotion*degToMRatio;\n }\n }", "@Override\n protected void beforeDraw(UI ui, PGraphics pg) {\n pointLight(0, 0, 40, model.cx, model.cy, LengthUnit.FOOT.toMillimetres(-20L));\n pointLight(0, 0, 50, model.cx, model.yMax + LengthUnit.FOOT.toMillimetres(10L), model.cz);\n pointLight(0, 0, 20, model.cx, model.yMin - LengthUnit.FOOT.toMillimetres(10L), model.cz);\n //hint(ENABLE_DEPTH_TEST);\n }", "public double draw() {\n\t\treturn this.bp.P1P2();\n\t}", "public void graphicalSettings(int ps, int tw, int th) {\n\n setZoom(ps);\n T_WIDTH = tw;\n T_HEIGHT = th;\n\n SCREEN_WIDTH = T_WIDTH * P_SCALE + EMBOSS;\n SCREEN_HEIGHT = T_HEIGHT * P_SCALE + EMBOSS;\n }", "public void getGUIVALS() {\n MinX = (double) MinXSpin.getValue();\n MaxX = (double) MaxXSpin.getValue();\n MinY = (double) MinYSpin.getValue();\n MaxY = (double) MaxYSpin.getValue();\n Step = (double) StepSpin.getValue();\n ForceRange = ForceRangeBox.isSelected();\n LineColor = LineCC.getColor();\n BackColor = BackGCC.getColor();\n Increments = (int) IncSpin.getValue();\n DrawArea = DrawAreaBox.isSelected();\n DrawScale = DrawScaleBox.isSelected();\n CurveThickness = (float) (double) CurveThicknessSpin.getValue();\n }", "@Override\n public void returnParameters(int min, int max, int percentClipMin, int percentClipMax, int stdDevFactor,\n StretchType stretchType) {\n mMin = min;\n mMax = max;\n mPercentClipMin = percentClipMin;\n mPercentClipMax = percentClipMax;\n mStdDevFactor = stdDevFactor;\n mStretchType = stretchType;\n updateRenderer();\n }", "public void dibujarSubformula(Nodo act, int x, int y, int x2, int y2, JPanel p, Color colorP) {\n\n Graphics2D g = (Graphics2D) p.getGraphics();\n\n if (colorP != null) {\n System.out.println(\"diferente de null\");\n color = colorP;\n }\n\n if (act == null) {\n return;\n } else {\n int ancho = act.valor.length();\n\n g.setColor(Color.BLACK);\n g.drawLine(x + 15, y + 3, x2 + 15, y2 + 30);\n\n System.out.println(color.toString());\n g.setColor(color);\n\n //el dibujo del circulo dependiendo la cantidad de letras y simbolos\n if (ancho >= 0 && ancho <= 2) {\n g.setColor(color);\n g.fillOval(x, y, 30, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) + 11, (y) + 20);\n\n System.out.println(\"0 y 2\");\n }\n\n if (ancho >= 3 && ancho <= 5) {\n g.setColor(color);\n g.fillOval(x, y, 40, 33);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) + 5, (y) + 20);\n System.out.println(\"3 y 8\");\n }\n if (ancho >= 6 && ancho <= 8) {\n g.setColor(color);\n g.fillOval(x - 18, y, 55, 30);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) - 11, (y) + 20);\n System.out.println(\"3 y 8\");\n }\n if (ancho >= 9 && ancho <= 13) {\n g.setColor(color);\n g.fillOval(x - 25, y + 3, 85, 30);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 30) + 12, (y) + 25);\n System.out.println(\"9 y 13\");\n }\n if (ancho >= 14 && ancho <= 18) {\n g.setColor(color);\n g.fillOval(x - 25, y + 10, 115, 30);\n System.out.println(\"14 y 18\");\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 20) + 12, (y) + 30);\n\n }\n if (ancho >= 19 && ancho <= 23) {\n g.setColor(color);\n g.fillOval(x - 52, y + 1, 132, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 50), (y) + 20);\n System.out.println(\"19 y 23\");\n\n }\n if (ancho >= 24 && ancho <= 27) {\n g.setColor(color);\n g.fillOval(x - 58, y + 10, 148, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 55), (y) + 30);\n System.out.println(\"24 y 27\");\n\n }\n\n if (act.getNodoIzq() != null) {\n dibujarSubformula(act.getNodoIzq(), (x) - (anchoX(act.altura())), y + 100, x, y, p, color);\n\n }\n if (act.getNodoDer() != null) {\n dibujarSubformula(act.getNodoDer(), (x) + (anchoX(act.altura())), y + 100, x, y, p, color);\n }\n\n }\n }", "public double getPerimiter(){return (2*height +2*width);}", "public void update(int strokes, int par) {\n strokesTotal += strokes;\n parTotal += par;\n displayRoundScore();\n }", "public void drawScreen(int var1, int var2, float var3) {\r\n String[] var13 = field_989;\r\n String var5 = \"Activer ToggleSneak\";\r\n String var6 = \"Activer ToggleSprint\";\r\n String var7 = \"Afficher le HUD\";\r\n String var8 = \"Position horizontal du HUD\";\r\n String var9 = \"Position vertical du HUD\";\r\n String var10 = \"Activer le double-tapping\";\r\n String var11 = \"Activer le fly boost\";\r\n String var12 = \"Fly boost X\";\r\n this.method_873();\r\n boolean var10000 = method_1147();\r\n this.drawCenteredString(this.fontRendererObj, \"ToggleMod - Options\", this.width / 2, this.field_985, 16777215);\r\n this.method_657(this.fontRendererObj, var5, this.width / 2 - 100 - this.fontRendererObj.getCharWidth(var5), this.method_1143(1) + 6, 16777215);\r\n this.method_657(this.fontRendererObj, var6, this.width / 2 + 100 - this.fontRendererObj.getCharWidth(var6), this.method_1143(1) + 6, 16777215);\r\n this.method_657(this.fontRendererObj, var7, this.width / 2 - 3 - this.fontRendererObj.getCharWidth(var7), this.method_1143(2) + 6, 16777215);\r\n boolean var4 = var10000;\r\n this.method_657(this.fontRendererObj, var8, this.width / 2 - 3 - this.fontRendererObj.getCharWidth(var8), this.method_1143(3) + 6, 16777215);\r\n this.method_657(this.fontRendererObj, var9, this.width / 2 - 3 - this.fontRendererObj.getCharWidth(var9), this.method_1143(4) + 6, 16777215);\r\n this.method_657(this.fontRendererObj, var10, this.width / 2 - 3 - this.fontRendererObj.getCharWidth(var10), this.method_1143(5) + 6, 16777215);\r\n this.method_657(this.fontRendererObj, var11, this.width / 2 - 3 - this.fontRendererObj.getCharWidth(var11), this.method_1143(6) + 6, 16777215);\r\n this.method_657(this.fontRendererObj, var12, this.width / 2 - 3 - this.fontRendererObj.getCharWidth(var12), this.method_1143(7) + 6, 16777215);\r\n super.drawScreen(var1, var2, var3);\r\n if(class_689.method_3976() != 0) {\r\n method_1145(!var4);\r\n }\r\n\r\n }", "public void updateVariables(){\n Map<String, Integer> specialParameter = myLogic.getSpecialParameterToDisplay();\n liveScore.setText(Double.toString(myLogic.getScore()));\n for (String parameter: specialParameter.keySet()) {\n numLives.setText(parameter + specialParameter.get(parameter));\n }\n myMoney.setText(Double.toString(myLogic.getCash()));\n }", "public void calcP() {\r\n\t\tthis.setP(sick/people.size());\r\n\t}", "protected final void parset() {\n current = read();\n skipSpaces();\n\n for (;;) {\n switch (current) {\n default:\n return;\n case '+': case '-': case '.':\n case '0': case '1': case '2': case '3': case '4':\n case '5': case '6': case '7': case '8': case '9':\n }\n\n float x = parseNumber();\n skipCommaSpaces();\n float y = parseNumber();\n \n smoothQCenterX = currentX * 2 - smoothQCenterX;\n smoothQCenterY = currentY * 2 - smoothQCenterY;\n currentX += x;\n currentY += y;\n p.quadTo(smoothQCenterX, smoothQCenterY, currentX, currentY);\n smoothCCenterX = currentX;\n smoothCCenterY = currentY;\n skipCommaSpaces();\n } \n }", "private void calculations() {\n\t\tSystem.out.println(\"Starting calculations\\n\");\n\t\tcalcMedian(myProt.getChain(requestedChain));\n\t\tcalcZvalue(myProt.getChain(requestedChain));\n\t\tcalcSVMweightedZvalue(myProt.getChain(requestedChain));\n\t}", "public void calcOutput()\n\t{\n\t}", "@Override\n public PointF evaluate(float fraction, PointF startValue,\n PointF endValue) {\n // x方向200px/s ,则y方向0.5 * 10 * t\n PointF point = new PointF();\n if (tag % 2 != 0) {\n point.x = speed * fraction * 3 - ivWidth;\n } else {\n point.x = windowWidth - speed * fraction * 3 + ivWidth;\n }\n point.y = 0.1f * speed * (fraction * 3) * (fraction * 3);\n return point;\n }", "private void ncpStep(double height) {\n/* 56 */ double posX = mc.field_71439_g.field_70165_t;\n/* 57 */ double posZ = mc.field_71439_g.field_70161_v;\n/* 58 */ double y = mc.field_71439_g.field_70163_u;\n/* 59 */ if (height >= 1.1D) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 80 */ if (height < 1.6D) {\n/* */ double[] offset;\n/* 82 */ for (double off : offset = new double[] { 0.42D, 0.33D, 0.24D, 0.083D, -0.078D }) {\n/* 83 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y += off, posZ, false));\n/* */ }\n/* 85 */ } else if (height < 2.1D) {\n/* */ double[] heights;\n/* 87 */ for (double off : heights = new double[] { 0.425D, 0.821D, 0.699D, 0.599D, 1.022D, 1.372D, 1.652D, 1.869D }) {\n/* 88 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + off, posZ, false));\n/* */ }\n/* */ } else {\n/* */ double[] heights;\n/* 92 */ for (double off : heights = new double[] { 0.425D, 0.821D, 0.699D, 0.599D, 1.022D, 1.372D, 1.652D, 1.869D, 2.019D, 1.907D })\n/* 93 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + off, posZ, false)); \n/* */ } \n/* */ return;\n/* */ } \n/* */ double first = 0.42D;\n/* */ double d1 = 0.75D;\n/* */ if (height != 1.0D) {\n/* */ first *= height;\n/* */ d1 *= height;\n/* */ if (first > 0.425D)\n/* */ first = 0.425D; \n/* */ if (d1 > 0.78D)\n/* */ d1 = 0.78D; \n/* */ if (d1 < 0.49D)\n/* */ d1 = 0.49D; \n/* */ } \n/* */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + first, posZ, false));\n/* */ if (y + d1 < y + height)\n/* */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + d1, posZ, false)); \n/* */ }", "void find_it () {\n xt = 210; yt = 105; fact = 50.0;\n if (viewflg != VIEW_FORCES) zoom_slider_pos_y = 50;\n current_part.spanfac = (int)(2.0*fact*current_part.aspect_rat*.3535);\n xt1 = xt + current_part.spanfac;\n yt1 = yt - current_part.spanfac;\n xt2 = xt - current_part.spanfac;\n yt2 = yt + current_part.spanfac;\n \n }", "void total() {\r\n t=m1+m2+m3;\r\n per=t/3;\r\n System.out.println(\"total :\"+t);\r\n System.out.println(\"persentage:\"+per);\r\n \r\n \r\n }", "public static void main(String[] args)\r\n {\r\n //GammaDistribution gam = new GammaDistribution(10.0, 20.0);\r\n //double gamR = gam.sample();\r\n //System.out.println(gamR);\r\n \r\n for(String s : args)\r\n {\r\n System.out.println(s);\r\n }\r\n //if we run the code without any arguments then use default, else overwrite\r\n int lnth = args.length; \r\n if (lnth != 0 ) {\r\n int diff = 0;\r\n try {\r\n //totalT = Integer.valueOf(args[0+diff]);\r\n //totalY = Integer.valueOf(args[1+diff]);\r\n //totalYears = Integer.valueOf(args[2+diff]);\r\n dataSet = args[0+diff];\r\n yrs = Integer.valueOf(args[1+diff]);\r\n spreadYrs = Integer.valueOf(args[2+diff]);\r\n maxDepth = Integer.valueOf(args[3+diff]);\r\n popSize = Integer.valueOf(args[4+diff]);\r\n tournamentSize = (popSize / 100) - 1;\r\n mutProb = Double.valueOf(args[5+diff]);\r\n xoverProb = Double.valueOf(args[6+diff]); \r\n elitismPercentage = Double.valueOf(args[7+diff]);\r\n primProb = Double.valueOf(args[8+diff]);\r\n terminalNodeCrossBias = Double.valueOf(args[9+diff]);\r\n nGens = Integer.valueOf(args[10+diff]);\r\n lowerLowBound = Double.valueOf(args[11+diff]);\r\n lowerUpBound = Double.valueOf(args[12+diff]);\r\n upperLowBound = Double.valueOf(args[13+diff]);\r\n upperUpBound = Double.valueOf(args[14+diff]);\r\n movingAverage = Integer.valueOf(args[15+diff]);\r\n totalNumParams = 0;\r\n additionalParameters = 0;\r\n parameterIndex.add(0);\r\n for (int i = 16; i < args.length -1 + diff; i++) { // minus 1 as the last parameter is whether to use bound \r\n if (Integer.valueOf(args[i]) == 1) { \r\n totalNumParams++;\r\n parameterIndex.add(i-15); //parameterIndex starts from 1, becuase my pred value is in column 0\r\n if (i >= args.length -9 + diff) {//minus 1 to compensate for last value and minus 8 for the 9 parameters\r\n additionalParameters++;\r\n }\r\n } \r\n }\r\n lowerBound = Integer.valueOf(args[args.length - 1]); //last value is whether to use a lower bound\r\n } catch (ArrayIndexOutOfBoundsException t) {\r\n System.out.println(\"args not enough, please check\");\r\n }\r\n } else {\r\n for (int i = 0; i < totalNumParams; i++) {\r\n parameterIndex.add(i);\r\n }\r\n }\r\n FReader read = new FReader();\r\n header = read.readHeader(\"Data/header.txt\");\r\n parametersLength = header.length - 9; //take away the 9 parameters that will be calculated within GP\r\n \r\n Expr[] evolvedMethodParameters = new Expr[totalNumParams-1];\r\n eval = new PredictionEvaluatorTrue2(nRuns, contractLength, parameterIndex, parametersLength, additionalParameters);\r\n \r\n Function evolvedMethod = new Function(Double.TYPE, new Class[0]);\r\n TreeManager.evolvedMethod = evolvedMethod;\r\n \r\n \r\n for (int i=0; i<totalNumParams-1; i++) {\r\n \r\n evolvedMethodParameters[i] = new Parameter(i);\r\n } \r\n TreeManager.evolvedMethodParameters = evolvedMethodParameters;\r\n \r\n ArrayList methodSet = new ArrayList();\r\n methodSet.add(ADD);\r\n methodSet.add(SUB);\r\n methodSet.add(MUL);\r\n methodSet.add(DIV);\r\n methodSet.add(LOG);\r\n methodSet.add(SQRT);\r\n methodSet.add(POW);\r\n methodSet.add(MOD);\r\n //methodSet.add(SIN);\r\n //methodSet.add(COS);\r\n methodSet.add(EXP);\r\n\r\n\r\n Random r = new Random();\r\n ArrayList terminalSet = new ArrayList();\r\n// for (int i = 0; i < terminals; i++)\r\n// {\r\n// double rc = r.nextDouble();\r\n// terminalSet.add(new Constant(new Double(rc * 100.0D), Double.TYPE)); //Building in a function representing random numbers minimum and maximum, consider avearge\r\n// }\r\n// \r\n// //Add in numbers between 0 and 2 in blocks of 0.05 for the purpose of weights\r\n// \r\n// for (int i = 0; i < weights; i++)\r\n// {\r\n// double rc = (1 + i) * 0.05;\r\n// terminalSet.add(new Constant(new Double(rc), Double.TYPE));\r\n// }\r\n \r\n //terminalSet.add(new Constant(new Double(0.0D), Double.TYPE));\r\n //terminalSet.add(new Constant(new Double(3.141592653589793D), Double.TYPE));\r\n \r\n //For old data\r\n //Dynamically adds the number of parameters to be estimated, need to refer to data to input correct values\r\n //for (int i = 0; i < totalT; i++) {\r\n // terminalSet.add(new Parameter(i, Double.TYPE, Boolean.valueOf(true), \"Rain_t-\"+(i+1)));\r\n //}\r\n //for (int i = 0; i < totalY; i++) {\r\n // terminalSet.add(new Parameter(i+totalT, Double.TYPE, Boolean.valueOf(true), \"Year_t-\"+(i+1)));\r\n //}\r\n \r\n //For new data have headers read in and name accordingly.\r\n \r\n for (int i = 0; i < totalNumParams-1; i++) {\r\n terminalSet.add(new Parameter(i, Double.TYPE, Boolean.valueOf(true), header[parameterIndex.get(i)]));\r\n }\r\n \r\n \r\n //consider 3 ERC's one big range, 2 smaller ranges between -1 and 1\r\n terminalSet.add(new Constant(\"ERC\", Double.TYPE));\r\n terminalSet.add(new Constant(\"ERC2\", Double.TYPE));\r\n terminalSet.add(new Constant(\"ERC3\", Double.TYPE));\r\n \r\n double primProb = 0.6D;\r\n double terminalNodeCrossBias = 0.1D;\r\n TreeManager tm = new TreeManager(methodSet, terminalSet, primProb, maxInitialDepth, maxDepth, terminalNodeCrossBias);\r\n \r\n\r\n\r\n\r\n System.out.println(\"============= Experimental parameters =============\");\r\n System.out.println(\"Maximum initial depth: \" + maxInitialDepth);\r\n System.out.println(\"Maximum depth: \" + maxDepth);\r\n System.out.println(\"Primitive probability in Grow method: \" + primProb);\r\n System.out.println(\"Terminal node crossover bias: \" + terminalNodeCrossBias);\r\n System.out.println(\"No of generations: \" + nGens);\r\n System.out.println(\"Population size: \" + popSize);\r\n System.out.println(\"Tournament size: \" + tournamentSize);\r\n System.out.println(\"Crossover probability: \" + xoverProb);\r\n System.out.println(\"Reproduction probability: \" + (1.0D - xoverProb));\r\n System.out.println(\"Mutation probalitity: \" + mutProb);\r\n System.out.println(\"Elitism percentage: \" + elitismPercentage);\r\n System.out.println(\"===================================================\");\r\n \r\n \r\n \r\n \r\n \r\n StatisticalSummary.logExperimentSetup(methodSet, terminalSet, maxInitialDepth, maxDepth, primProb, terminalNodeCrossBias, nGens, popSize, tournamentSize, mutProb, xoverProb); \r\n \r\n StatisticalSummary stat = null;\r\n filenameS = \"Results/Results_\"+yrs+\"_\"+spreadYrs+\"_MA\"+movingAverage+\"_\"+contractLength;\r\n for (int i = 0; i < nRuns; i++)\r\n {\r\n System.out.println(\"========================== Experiment \" + i + \" ==================================\");\r\n File experiment = new File(filenameS + \"/Experiment \"+i);\r\n experiment.mkdirs();\r\n stat = new StatisticalSummary(nGens, popSize, i);\r\n alg = new GA(tm, eval, popSize, tournamentSize, stat, mutProb, elitismPercentage, xoverProb, nRuns);\r\n alg.evolve(nGens, i);\r\n System.out.println(\"===============================================================================\");\r\n }\r\n}", "@Override\n public void paint(Graphics g){\n GraficasEstatus cantidad=new GraficasEstatus();\n super.paint(g);\n if(bandera==true){\n \n int nuevoingreso=cantidad.nuevoIngreso();\n int noreparado=cantidad.noReparado();\n int enrevision=cantidad.enRevision();\n int reparado=cantidad.reparado();\n int entregado=cantidad.entregado();\n int otro=cantidad.otro();\n \n int valormayor=mayorValor(nuevoingreso, noreparado, enrevision, reparado, entregado, otro);\n \n int ningreso=nuevoingreso*400/valormayor;\n int nreparados=noreparado*400/valormayor;\n int erevision=enrevision*400/valormayor;\n int reparados=reparado*400/valormayor;\n int entregados=entregado*400/valormayor;\n int otros=otro*400/valormayor;\n \n g.setColor(new Color(255,170,0));\n g.fillRect(100, 100, ningreso, 40);\n g.drawString(\"Nuevo ingreso\", 10, 118);\n g.drawString(\"Cantida \"+nuevoingreso, 10, 133);\n \n g.setColor(new Color(255,0,0));\n g.fillRect(100, 150, nreparados, 40);\n g.drawString(\"No reparados\", 10, 168);\n g.drawString(\"Cantida \"+noreparado, 10, 180);\n \n g.setColor(new Color(0,0,255));\n g.fillRect(100, 200, erevision, 40);\n g.drawString(\"En revision\", 10, 218);\n g.drawString(\"Cantida \"+enrevision, 10, 233);\n \n g.setColor(new Color(0,150,255));\n g.fillRect(100, 250, reparados, 40);\n g.drawString(\"Reparados\", 10, 268);\n g.drawString(\"Cantida \"+reparado, 10, 280);\n \n g.setColor(new Color(0,130,0));\n g.fillRect(100, 300, entregados, 40);\n g.drawString(\"Entregados\", 10, 318);\n g.drawString(\"Cantida \"+entregado, 10, 333);\n \n g.setColor(new Color(150,100,100));\n g.fillRect(100, 350, otros, 40);\n g.drawString(\"Otro\", 10, 368);\n g.drawString(\"Cantida \"+otro, 10, 380);\n \n }\n }", "@Override\r\n\tpublic void setParameterValuesToGUI() {\r\n\t\tthis.pb = this.workPackage.getParameters();\r\n\r\n\t\tjSpinnerLeft.removeChangeListener(this);\r\n\t\tjSpinnerRight.removeChangeListener(this);\r\n\t\tjSpinnerTop.removeChangeListener(this);\r\n\t\tjSpinnerBottom.removeChangeListener(this);\r\n\t\tjSpinnerConst.removeChangeListener(this);\r\n\r\n\t\tjSpinnerLeft.setValue(pb.getIntParameter(\"Left\"));\r\n\t\tjSpinnerRight.setValue(pb.getIntParameter(\"Right\"));\r\n\t\tjSpinnerTop.setValue(pb.getIntParameter(\"Top\"));\r\n\t\tjSpinnerBottom.setValue(pb.getIntParameter(\"Bottom\"));\r\n\t\tjSpinnerConst.setValue(pb.getIntParameter(\"Const\"));\r\n\r\n\t\tjSpinnerLeft.addChangeListener(this);\r\n\t\tjSpinnerRight.addChangeListener(this);\r\n\t\tjSpinnerTop.addChangeListener(this);\r\n\t\tjSpinnerBottom.addChangeListener(this);\r\n\t\tjSpinnerConst.addChangeListener(this);\r\n\r\n\t\tjSpinnerNewWidth.removeChangeListener(this);\r\n\t\tjSpinnerNewHeight.removeChangeListener(this);\r\n\t\tjSpinnerNewWidth.setValue(pb.getIntParameter(\"NewWidth\"));\r\n\t\tjSpinnerNewHeight.setValue(pb.getIntParameter(\"NewHeight\"));\r\n\t\tjSpinnerNewWidth.addChangeListener(this);\r\n\t\tjSpinnerNewHeight.addChangeListener(this);\r\n\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.ZERO) buttZero.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.CONSTANT) buttConst.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.COPY) buttCopy.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.REFLECT) buttReflect.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.WRAP) buttWrap.setSelected(true);\r\n\r\n\t\tif (buttConst.isSelected()) {\r\n\t\t\tjSpinnerConst.setEnabled(true);\r\n\t\t} else {\r\n\t\t\tjSpinnerConst.setEnabled(false);\r\n\t\t}\r\n\r\n\t\tif (pb.getIntParameter(\"BorderOrSize\") == IqmOpBorderDescriptor.PREFERENCE_BORDER) buttBorder.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"BorderOrSize\") == IqmOpBorderDescriptor.PREFERENCE_SIZE) buttSize.setSelected(true);\r\n\r\n\t}", "@Override\n\tpublic double calculsalaire() {\n\t\treturn 1500 + nbY*20;\n\t}", "private void calculate() {\n\t\tSharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\r\n\t\tString arrowSpeed = sharedPref.getString(SettingsActivity.ARROW_SPEED, DEFAULT_ARROW_SPEED+\"\"); \r\n\r\n\t\tfinal double mToYards = 0.9144;\r\n\t\tfinal int mToMm = 1000;\r\n\r\n\t\ttry {\r\n\t\t\tfinal double v = Double.parseDouble(arrowSpeed); // Velocity\r\n\r\n\t\t\tdouble d = Double.parseDouble(findSelectedEditText(findSelectedRadioButton(\r\n\t\t\t\t\tR.id.radioGroupDistance), \"Distance\").getText().toString()); // Distance\r\n\t\t\tdouble e = Double.parseDouble(findSelectedEditText(findSelectedRadioButton(\r\n\t\t\t\t\tR.id.radioGroupElevation), \"Elevation\").getText().toString()); //Elevation\r\n\r\n\t\t\tString distanceType = findSelectedRadioButton(R.id.radioGroupDistance).getText().toString();\r\n\t\t\tString elevationType = findSelectedRadioButton(R.id.radioGroupElevation).getText().toString();\r\n\r\n\t\t\tif (distanceType == \"Yards\") {\r\n\t\t\t\td *= mToYards;\r\n\t\t\t}\r\n\r\n\t\t\tif (elevationType.equals(\"Yards\")) {\r\n\t\t\t\te *= mToYards;\r\n\t\t\t} else if (elevationType.equals(\"Degrees\")) {\r\n\t\t\t\te = Math.toRadians(e);\r\n\t\t\t\te = d * Math.sin(e);\r\n\t\t\t} else if (elevationType.equals(\"Radians\")) {\r\n\t\t\t\te = d * Math.sin(e);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tdouble da = Math.sqrt(Math.pow(d, 2) - Math.pow(e, 2)); // Calculates horizontal distance\r\n\r\n\t\t\tdouble radians = Math.atan((-Math.pow(v, 2) + Math.sqrt(Math.pow(v, 4) - Math.pow(g*d, 2)))/(g*d));\r\n\t\t\tdouble radians2 = Math.atan((-Math.pow(v, 2) + Math.sqrt(Math.pow(v, 4) + 2*e*g*Math.pow(v, 2) - Math.pow(g*da, 2)))/(g*da));\r\n\r\n\t\t\tdouble answer = -Math.tan(radians2-Math.asin(e/d)-radians);\r\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\r\n\r\n\t\t\tString result = df.format(answer * mToMm) + \"mm\";\r\n\r\n\t\t\tif (answer > 0) {\r\n\t\t\t\tfindTextView(\"textViewDisplay\").setText(message + arrowSpeed + speedUnit + resultPositiveMessage + result);\r\n\t\t\t} else {\r\n\t\t\t\tfindTextView(\"textViewDisplay\").setText(message + arrowSpeed + speedUnit + resultNegativeMessage + result);\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tInputMethodManager inputManager = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE); \r\n\t\t\tinputManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n//\t\t\tInputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\r\n//\t\t\timm.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tcT(\"Error Detected\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.setFont(numFont);\n\n\t\tif (param.showaxis) {\n\t\t\t// pixels\n\t\t\tint actualcenterx = (int) math.Math.scale(0, param.minx, param.maxx, 0, getWidth());\n\t\t\tint actualcentery = (int) math.Math.scale(0, param.miny, param.maxy, getHeight(), 0);\n\n\t\t\tg.drawLine(actualcenterx, 0, actualcenterx, getHeight());\n\t\t\tg.drawLine(0, actualcentery, getWidth(), actualcentery);\n\t\t\tg.drawString(0 + \"\", actualcenterx - xoffset, actualcentery + yoffset);\n\n\t\t\tg.drawString(param.maxx + \"\", getWidth() - xoffset * (param.maxx + \"\").length(), actualcentery + yoffset);\n\t\t\tg.drawString(param.minx + \"\", 0, actualcentery + yoffset);\n\t\t\tg.drawString(param.maxy + \"\", actualcenterx - xoffset * (param.maxy + \"\").length(), yoffset);\n\t\t\tg.drawString(param.miny + \"\", actualcenterx - xoffset * (param.miny + \"\").length(), getHeight() - yoffset);\n\t\t}\n\n\t\tfor (UIPointSet pointSet : pointSets) {\n\n\t\t\tint prevpx = 0, prevpy = 0;\n\t\t\tfor (int i = 0; i < pointSet.getPoints().length; i++) {\n\n\t\t\t\tdouble[] point = pointSet.getPoints()[i];\n\t\t\t\t// pixels\n\t\t\t\tint px = (int) math.Math.scale(point[0], param.minx, param.maxx, 0, getWidth());\n\t\t\t\tint py = (int) math.Math.scale(point[1], param.miny, param.maxy, getHeight(), 0);\n\n\t\t\t\tif (pointSet.getPointColor() != null) {\n\t\t\t\t\tint pointWidth = 10;\n\t\t\t\t\tg.setColor(pointSet.getPointColor());\n\t\t\t\t\tg.fillOval(px - pointWidth / 2, py - pointWidth / 2, pointWidth, pointWidth);\n\t\t\t\t}\n\n\t\t\t\tif (pointSet.getLineColor() != null && i > 0) {// if (Math.abs(y2 - y) < (getHeight())) {\n\t\t\t\t\tg.setColor(pointSet.getLineColor());\n\t\t\t\t\tg.drawLine(prevpx, prevpy, px, py);\n\t\t\t\t\tfor (int ii = 1; ii < 2; ii++) {\n\t\t\t\t\t\tg.drawLine(prevpx, prevpy - ii, px, py - ii);\n\t\t\t\t\t\tg.drawLine(prevpx, prevpy + ii, px, py + ii);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprevpx = px;\n\t\t\t\tprevpy = py;\n\n\t\t\t}\n\t\t}\n\n\t\tfor (PointBox bx : savedBoxes) {\n\t\t\tbx.updatePixCoordinate();\n\t\t\tg.setColor(bx.pointSet.getPointColor());\n\t\t\tbx.paint(g, clickingmBox && mBox.equals(bx), false);\n\t\t}\n\t\tif (showmBox) {\n\t\t\tint index = savedBoxes.indexOf(mBox);\n\t\t\tg.setColor(mBox.pointSet.getPointColor());\n\t\t\tif (index < 0) {\n\t\t\t\tmBox.paint(g, clickingmBox, false);\n\t\t\t} else {\n\t\t\t\tsavedBoxes.get(index).paint(g, clickingmBox, true);\n\t\t\t}\n\t\t\t// now draw the box (top left)\n\t\t\tint corneroffset = 10;\n\t\t\tString eqS = \"y = \" + mBox.pointSet.getTitle();\n\t\t\tString fnumS = pointSets.indexOf(mBox.pointSet) + \"\";\n\n\t\t\tint boxx = corneroffset + 10;\n\t\t\tint boxy = corneroffset;\n\t\t\tint boxw = eqS.length() * (xoffset - 4) + 8 + corneroffset;\n\t\t\tint boxh = yoffset + corneroffset;\n\n\t\t\tg.clearRect(boxx, boxy, boxw, boxh);\n\n\t\t\tg.drawString(eqS, xoffset + corneroffset, yoffset + corneroffset);\n\n\t\t\tg.setFont(subFont);\n\t\t\tg.drawString(fnumS, xoffset * 2 + corneroffset, (yoffset * 4 / 3) + corneroffset);\n\n\t\t\tg.drawRect(boxx, boxy, boxw, boxh);\n\n\t\t}\n\t}", "@Test\n\tpublic void correctParameters() {\n\t\tassertEquals(startTime, circle.startTime);\n\t\tassertEquals(duration, circle.duration);\n\t\tassertEquals(type, circle.type);\n\t\tassertEquals(height, circle.height, 0);\n\t}", "@Override\n public void step(double[] p, int n, double t, double h, double[] pout, Function derivs) {\n \tif ( tmp == null || tmp.length != n ) {\n tmp = new double[n];\n \t}\n \t//state: p.x,p.y,v.x,v.y\n \tVector2d v1 = new Vector2d();\n \tVector2d x1 = new Vector2d();\n \tVector2d a = new Vector2d();\n\t\tderivs.derivs(t,p,tmp);\n\t\t//gives me k1\n \tfor (int i=0;i<p.length-3;i+=4) {\n \t\tdouble[] k2 = new double[4];\n \t\tdouble[] k3 = new double[4];\n \t\tdouble[] k4 = new double[4];\n \t\t//x1 = x0+h(x0+1/2h(x0)')'\n \t\tdouble[] tuples = new double[] {tmp[i]*1/2*h+p[i],tmp[i+1]*1/2*h+p[i+1],\n \t\t\t\ttmp[i+2]*1/2*h+p[i+2],tmp[i+3]*1/2*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k2);\n \t\ttuples = new double[] {k2[i]*1/2*h+p[i],k2[i+1]*1/2*h+p[i+1],\n \t\t\t\tk2[i+2]*1/2*h+p[i+2],k2[i+3]*1/2*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k3);\n \t\ttuples = new double[] {k3[i]*h+p[i],k3[i+1]*h+p[i+1],\n \t\t\t\tk3[i+2]*h+p[i+2],k3[i+3]*h+p[i+3]};\n \t\tderivs.derivs(t,tuples,k4);\n \t\tx1.set(new Vector2d(p[i],p[i+1]));\n \t\tx1.scaleAdd(h/6, new Vector2d(tmp[i],tmp[i+1]), x1);\n \t\tx1.scaleAdd(h/3, new Vector2d(k2[i],k2[i+1]), x1);\n \t\tx1.scaleAdd(h/3, new Vector2d(k3[i],k3[i+1]), x1);\n \t\tx1.scaleAdd(h/6, new Vector2d(k4[i],k4[i+1]), x1);\n \t\t//v1 = v0+h*a\n \t\ta.set(tmp[i+2],tmp[i+3]);\n \t\tv1.set(new Vector2d(p[i+2],p[i+3]));\n \t\tv1.scaleAdd(h/6, a, v1);\n \t\tv1.scaleAdd(h/3, new Vector2d(k2[i+2],k2[i+3]), v1);\n \t\tv1.scaleAdd(h/3, new Vector2d(k3[i+2],k3[i+3]), v1);\n \t\tv1.scaleAdd(h/6, new Vector2d(k4[i+2],k4[i+3]), v1);\n \t\t//update velocity and positions\n \t\tpout[i] = x1.x;\n \t\tpout[i+1] = x1.y;\n \t\tpout[i+2] = v1.x;\n \t\tpout[i+3] = v1.y;\n \t}\n }", "public void output_UpdatedData(){\r\n\r\n\t System.out.println(\"\\nParameters are updated as following...\");\r\n\t \r\n\t System.out.println(\"Dry (double): \"+DRY);\r\n\t \r\n\t System.out.println(\"Wet (double): \"+WET);\r\n\t System.out.println(\"ISNOW (double): \"+ISNOW);\r\n\t System.out.println(\"Wind(double): \"+WIND);\r\n\t System.out.println(\"BUO (double): \"+BUO);\r\n\t System.out.println(\"Iherb (int): \"+IHERB);\r\n}", "abstract int estimationParameter1();", "float[] calculate(float[] acc, float[] oldAcc, float[] gyr , float[] oldGyr,float[] oldGra, float[] oldAccVelDisGra)\n {\n// System.out.println(\"inside method acc:\"+acc[0]+\", \"+acc[1]+\", \"+acc[2]+\", oldAcc:\"+oldAcc[0]+\", \"+oldAcc[1]+\", \"+oldAcc[2]);\n// System.out.println(\"inside method gravity:\"+oldGra[0]+\", \"+oldGra[1]+\", \"+oldGra[2]);\n if (oldAccVelDisGra==null)\n {\n oldAccVelDisGra= new float[9];\n for (int i = 0; i <9; i++) {\n oldAccVelDisGra[i]=0.0f;\n }\n }\n float[] oldDynamicAcc = new float[]{0.0f, 0.0f, 0.0f};\n float[] oldVelocity = new float[]{0.0f, 0.0f, 0.0f};\n float[] oldDistance = new float[]{0.0f, 0.0f, 0.0f};\n float[] newGra = gravityFromRotation(oldGra, gyr);\n\n for (int i = 0; i < 3; i++) {\n oldDynamicAcc[i] = oldAccVelDisGra[i];\n oldVelocity[i] = oldAccVelDisGra[i+3];\n oldDistance[i] = oldAccVelDisGra[i+6];\n }\n float[] accVelDisGra = new float[]{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};\n float[] dynAccDiff = dynamicAccDiff(acc,gyr,oldGra,oldAcc,oldGyr);\n float[] dynamicAcc = dynamicAcc(oldDynamicAcc, dynAccDiff);\n float[] velocity = velocity(oldVelocity,dynamicAcc);\n float[] distance = distance(oldDistance, velocity);\n for (int i = 0; i < 3; i++) {\n accVelDisGra[i]=dynamicAcc[i];\n accVelDisGra[i+3]= velocity[i];\n accVelDisGra[i+6]=distance[i];\n accVelDisGra[i+9]=newGra[i];\n }\n return accVelDisGra;\n }", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}", "public void calculatePaintAndLabor(){\n this.numGallons = squareFeet/115;\n System.out.println(\"Number of Gallons: \" + numGallons);\n this.laborHours = numGallons * 8;\n System.out.println(\"Number of Hours: \" + laborHours);\n this.paintCost = numGallons * pricePerGallon;\n System.out.println(\"Price of Paint: $\" + paintCost);\n this.laborCost = laborHours * 20.00;\n System.out.println(\"Price of Labor: $\" + laborCost);\n this.totalCost = paintCost + laborCost;\n System.out.println(\"Total Cost: $\" + totalCost);\n\n }", "public void setGainResults(){\n TextView editTextGainFactor = (TextView ) findViewById(R.id.EditTextGainFactor);\n TextView editTextGainValue = (TextView ) findViewById(R.id.EditTextGainValue);\n\n // Tedius but robust rounding steps\n double tempGF = Globals.f.getGF() * 1000.0;\n tempGF = Math.round(tempGF);\n tempGF = tempGF / 1000.0;\n double tempPP = Globals.f.getPP() * 1000.0;\n tempPP = Math.round(tempPP);\n tempPP = tempPP / 1000.0;\n\n\n //gFactorString.format(\"%.2f\", Globals.f.getGF());\n\n // The Gain Value is only displayed if it was calculated\n editTextGainFactor.setText(Double.toString(tempGF), TextView.BufferType.NORMAL);\n if (!Double.isNaN(Globals.f.getPP())) {\n editTextGainValue.setText(Double.toString(tempPP), TextView.BufferType.NORMAL);\n }\n else\n editTextGainValue.setText(\"-\", TextView.BufferType.NORMAL);\n\n //Get handles to the text boxes\n TextView gainDescriptor = (TextView ) findViewById(R.id.EditTextDesrip1);\n TextView valueDescriptor = (TextView ) findViewById(R.id.EditTextDesrip2);\n\n // Set the descriptors based on research\n if (tempGF < 0.5)\n gainDescriptor.setText(\"(Low Gains)\", TextView.BufferType.NORMAL);\n else if (tempGF < 1.5)\n gainDescriptor.setText(\"(Moderate Gains)\", TextView.BufferType.NORMAL);\n else if (tempGF < 2.0)\n gainDescriptor.setText(\"(High Gains)\", TextView.BufferType.NORMAL);\n else if (tempGF >= 2.0)\n gainDescriptor.setText(\"(Extreme Gains)\", TextView.BufferType.NORMAL);\n\n\n if (tempPP < 50)\n valueDescriptor.setText(\"(Poor Value)\", TextView.BufferType.NORMAL);\n else if (tempPP < 200)\n valueDescriptor.setText(\"(Moderate Value)\", TextView.BufferType.NORMAL);\n else if (tempPP >= 200)\n valueDescriptor.setText(\"(Great Value)\", TextView.BufferType.NORMAL);\n else\n valueDescriptor.setText(\"(-)\", TextView.BufferType.NORMAL);\n\n }", "public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }", "@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}", "public void drawAngleInfo(){\n\t\tfont2.draw(batch, (\"The angle of Projection is \" + angle),(float)(screenWidth * .45), 20);\n\t}", "private void DrawBraid(GL gl, float x, float y, float size,\n\t\t\tfloat r, float g, float b) {\n\n float reflected_x=0, reflected_y=0;\n float reflected_vector_angle=0, reflected_image_angle=0, reflected_rotate=0;\n\n // Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\n //Do the reflection\n if(m_x_reflection==0 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=y;\n reflected_image_angle=m_slope;\n reflected_vector_angle=m_slope;\n reflected_rotate= m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=-y;\n reflected_image_angle=90-m_slope;\n reflected_vector_angle=-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==0 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=y;\n reflected_image_angle=-90-m_slope;\n reflected_vector_angle=180-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=-y;\n reflected_image_angle=m_slope-180;\n reflected_vector_angle=m_slope+180;\n reflected_rotate= m_rotate;\n }\n\n\t\tfloat start_image_theta = (float) Math.toRadians(reflected_image_angle);\n \t\tfloat start_vector_theta = (float) Math.toRadians(reflected_vector_angle);\n\t\tfloat rotate_theta = (float) Math.toRadians(reflected_rotate);\n\t\tfloat cur_image_theta = 0f, cur_vector_theta = 0f;\n\t\tdouble image_costheta = 0, vector_costheta = 0;\n\t\tdouble image_sintheta = 0, vector_sintheta = 0;\n\t\tfloat xP = 0f;\n\t\tfloat yP = 0f;\n\t\tfloat xO = 0f, nextXO = 0f;\n\t\tfloat yO = 0f, nextYO = 0f;\n\n\t\t//if (txt == null) {\n\t\t//\ttxt = load(\"img/plaitWhite.png\");\n\t\t//}\n\t\tTextureCoords tc = m_txt.getImageTexCoords();\n\t\txO = nextXO = reflected_x;\n\t\tyO = nextYO = reflected_y;\n xP = m_cx * m_starting_dilation;\n\t\tyP = m_cy * m_starting_dilation;\n //vector\n\t\tcur_vector_theta = start_vector_theta;\n vector_costheta = Math.cos(cur_vector_theta);\n\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n cur_image_theta = start_image_theta;\n\t\timage_costheta = Math.cos(cur_image_theta);\n\t\timage_sintheta = Math.sin(cur_image_theta);\n\t\t\n\t\tfor (int i = 0; i < Iteration; i++) {\t\t\t\n DrawPlait(gl, xO, yO, xP / 2, yP / 2, image_costheta, image_sintheta, tc);\n\t\t\t//vector\n cur_vector_theta += rotate_theta;\n\t\t\tvector_costheta = Math.cos(cur_vector_theta);\n\t\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n\t\t\tcur_image_theta += rotate_theta;\n\t\t\timage_costheta = Math.cos(cur_image_theta);\n\t\t\timage_sintheta = Math.sin(cur_image_theta);\n //next centor position\n\t\t\tnextXO = xO + (float) (xP * m_translate * vector_costheta);\n\t\t\tnextYO = yO + (float) (yP * m_translate * vector_sintheta);\n\t\t\tif (m_vector) {\n\t\t\t\tDrawVector(gl, xO, yO, nextXO, nextYO, xP, cur_vector_theta);\n\t\t\t}\n\t\t\txO = nextXO;\n\t\t\tyO = nextYO;\n\t\t\txP *= m_dilate;\n\t\t\tyP *= m_dilate;\n\t\t}\n\t}", "@Override\n\t\tpublic void updateVariables(){\n\t\t\tthis.currentX = odometer.getCurrentX();\n\t\t\tthis.currentY = odometer.getCurrentY();\n\t\t\tthis.currentAngle = odometer.getHeadingAngle();\n\t\t\tthis.currentAverageVelocity = odometer.getCurrentAverageVelocity();\n\t\t}", "public void transConfirm(float draw){\n System.out.println(\"La cantidad de \"+draw+\" ha sido transferida correctamente\");\n System.out.println(\"\");\n}", "public void SvdParameters() {\n\n\t\tSystem.out.print(\"p |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6d\", i);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Max error |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6.1f\", maxerror[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Mean error |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6.1f\", meanerror[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Compression,%|\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tif (ratio[i] > 0)\n\t\t\t\tSystem.out.printf(\"%6.1f\", ratio[i]);\n\t\t\telse\n\t\t\t\tSystem.out.printf(\" n/a \");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public TransmissionCoefficientVisualiser()\n\t{\n\t\tsuper();\n\t\t\n\t\t// set to true for interactive version\n\t\tnonInteractiveTIMAction = NonInteractiveTIMActionEnum.INTERACTIVE;\n\t\t\n\t\t// set all parameters\n\t\t\n\t\trenderQuality = RenderQualityEnum.DRAFT;\n\t\t\n\t\taHat = new Vector3D(0, 0, 1);\n\t\tuHat = new Vector3D(1, 0, 0);\n\t\tvHat = new Vector3D(0, 1, 0);\n\t\tetaU = -0.2;\n\t\tetaV = -0.1;\n\t\tdeltaU = 0.6;\t// 0.2;\n\t\tdeltaV = 0.1;\t// -0.4;\n\t\tsigma1U = 1;\n\t\tsigma1V = 1;\n\t\tsigma2U = 1;\n\t\tsigma2V = 1;\n\t\t\n\t\talphaChoice =\n\t\t\t\tAlphaChoice.ZERO;\n//\t\t\t\tAlphaChoice.MANUAL;\n//\t\t\t\tAlphaChoice.OPTIMISED;\n\n\t\t// AlphaChoice.MANUAL parameters\n\t\talpha1U = 0;\n\t\talpha1V = 0;\n\t\talpha2U = -0.15;\t// -0.6;\n\t\talpha2V = -0.15;\t// -0.1;\n\n\t\tdouble distanceInFront = 2;\t// 0.8;\n\t\tapertureCentre =\n\t\t\t\tnew Vector3D(0, 0, 10-distanceInFront);\t// straight in front\n//\t\t\t\tnew Vector3D(1, 0, 10-distanceInFront);\t// a bit to the right\n//\t\t\t\tnew Vector3D(10, 0, 0);\t// 45 degrees off to the right\n\t\tcameraHorizontalFOVDeg = 2*MyMath.rad2deg(Math.atan(10./distanceInFront*Math.tan(MyMath.deg2rad(10))));\n\t\tbrightnessFactor = 1;\n\t\t\n\t\t// AlphaChoice.OPTIMISED parameters\n\t\tpointAtFOVCentre =\n\t\t\t\tnew Vector3D(0, 0, 8);\t// straight in front\n//\t\t\t\tapertureCentre;\t// always optimised for camera position\n//\t\t\t\tnew Vector3D(0, 0, -1000);\t// 45 degrees off to the right\n\t\tparallelityParameter = 0;\n\n\n\t\t\n\t\tSystem.out.println(\"TransmissionCoefficientVisualiser::TransmissionCoefficientVisualiser: F-numbers are as follows:\" +\n\t\t\t\t\"N_1u=\" + 1/sigma1U +\n\t\t\t\t\", N_1v=\" + 1/sigma1V +\n\t\t\t\t\", N_2u=\" + Math.abs(etaU)/sigma2U +\n\t\t\t\t\", N_2v=\" + Math.abs(etaV)/sigma2V\n\t\t\t);\n\t\t\n\t\t// boring parameters\n\t\tnonInteractiveTIMAction = NonInteractiveTIMActionEnum.INTERACTIVE;\n\n\t\t// for movie version\n\t\tnumberOfFrames = 50;\n\t\tfirstFrame = 0;\n\t\tlastFrame = numberOfFrames-1;\n\t\t\n\t\t// camera parameters are set in populateStudio() method\n\t\t\n\t\t// blur quality if test = false; make this better in the non-interactive version, as this is used to produce publication-quality images\n\t\t// standardCameraBlurQuality = (interactive?QualityType.GOOD:QualityType.SUPER);\t// this is the camera's blur quality if test=false\n\t\t\n\t\t// for interactive version\n\t\twindowTitle = \"Dr TIM's telescope-window transmission-coefficient visualiser\";\n\t\twindowWidth = 1200;\n\t\twindowHeight = 650;\n\t}", "public void aggiornaPropulsori(){\n xPropulsore1=new int[]{xCord[0],xCord[0]};\n yPropulsore1=new int[]{yCord[0],yCord[0]+15}; \n xPropulsore2=new int[]{xCord[2],xCord[2]}; \n yPropulsore2=new int[]{yCord[2],yCord[2]+15};\n \n }", "public void screenMath(){\r\n\t\t//10.9375 H\r\n\t\t//12.037037037037036 W\r\n\t\tDouble test1 = 0.12 * screenWidth / 2.2;\r\n\t\tDouble test2 = 0.807 * screenHight;\r\n\t\tDouble test3 = screenHight - test2;\r\n\t\tDouble test4 = test3 / 10;\r\n\t\tfor(int i = 0; i < 10; i++){\r\n\r\n\t\t\tArrayList<Double> tempArray = new ArrayList<Double>();\r\n\t\t\t\r\n\t\t\ttempArray.add(screenHight - test3 + (test4 * i));\r\n\t\t\ttempArray.add(test1);\r\n\t\t\tint[] RGBArray = getScreenColor(test1, screenHight - test3 + (test4 * i));\r\n\t\t\t\r\n\t\t\tfor(int x = 0; x < RGBArray.length; x++){\r\n\t\t\t\ttempArray.add((double) (RGBArray[x]));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlifeGlobe.addPosition(tempArray);\r\n\t\t}\r\n\t}", "public void mostrarVariablesForrester(){\n System.out.println(\"\");\n for (int i = 0; i < tam; i++) {\n if(matrizTipos[i][i].equals(\"P\")){\n System.out.println(\"[\"+i+\"] es un parametro\"); // parametro = constante\n }\n else if(matrizTipos[i][i].equals(\"V\")){\n System.out.println(\"[\"+i+\"] es un auxiliar\"); // auxiliar = constante * auxiliar (?) ó constante +/- auxiliar\n }\n else if(matrizTipos[i][i].equals(\"R\")){\n System.out.println(\"[\"+i+\"] es un flujo\"); // flujo = constante * auxiliar * nivel\n }\n else if(matrizTipos[i][i].equals(\"X\")){\n System.out.println(\"[\"+i+\"] es un nivel\");// xi(t + Δt) = xi(t) + Δt{rj - rk} rj = entrada y rk = salida, \"el - es por la salida\" (creo) \n }\n }\n }", "public double drawLength() { return drawLength; }", "public void draw()\n {\n super.draw();\n k = 0;\n traceOK = true;\n\n // Initialize n, x0, and xn in the control panel.\n nText.setText(\" \");\n x0Text.setText(\" \");\n xnText.setText(\" \");\n\n PlotFunction plotFunction = getSelectedPlotFunction();\n\n // Create the fixed-point iteration root finder.\n finder = new FixedPointRootFinder((Function) plotFunction.getFunction());\n }", "@Override\n public long numParams(boolean backwards) {\n long numParams = super.numParams(backwards);\n for (GraphVertex vertex : getVertices()) {\n numParams += vertex.numParams();\n }\n return numParams;\n }", "public static void main(String[] args) {\n Point a = new Point(46, 65);\n Point b = new Point(40, 265);\n// Point c = new Point(20, 20);\n// Point d = new Point(21, 211);\n// Point e = new Point(2, 221);\n// Point f = new Point(23, 21);\n// Point g = new Point(-2, 21);\n// Point h = new Point(212, 22);\n//// StdDraw.setPenRadius(0.05);\n//// StdDraw.setPenColor(StdDraw.BLUE);\n//// StdDraw.point(1.0, 2.0);\n//// StdDraw.setCanvasSize(720, 720);\n//// StdDraw.setScale(-10, 10);\n//\n System.out.println(\"Compare : \"+ a.slopeTo(b));\n//\n//// a.draw();\n//// b.draw();\n//// c.draw();\n//// d.draw();\n//// e.draw();\n//// f.draw();\n//// g.draw();\n//// h.draw();\n//// a.drawTo(b);\n//\n//// a.draw();\n\n }", "public void draw()\n {\n myPencil.up();\n myPencil.backward(100);\n myPencil.down();\n myPencil.turnRight(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(400);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n myPencil.turnLeft(90);\n myPencil.forward(200);\n // Roof\n myPencil.up();\n myPencil.move(0,200);\n myPencil.down();\n myPencil.setDirection(333.435);\n myPencil.forward(223.607);\n myPencil.setColor(new Color(2, 0, 0));\n myPencil.up();\n myPencil.move(0,200);\n myPencil.setDirection(206.565);\n myPencil.down();\n myPencil.forward(223.607);\n // Windows\n myPencil.up();\n myPencil.move(-150,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,0);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.turnLeft(90);\n myPencil.forward(50);\n myPencil.turnLeft(90);\n myPencil.forward(100);\n myPencil.up();\n myPencil.move(-50,-100);\n myPencil.setDirection(60);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(50,-100);\n myPencil.setDirection(120);\n myPencil.down();\n myPencil.backward(150);\n myPencil.up();\n myPencil.move(150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-150);\n myPencil.down();\n myPencil.drawCircle(25);\n myPencil.up();\n myPencil.move(-150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(150,-175);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.backward(20);\n myPencil.up();\n myPencil.move(-150,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(75,37.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(-112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n myPencil.up();\n myPencil.move(112.5,0);\n myPencil.setDirection(90);\n myPencil.down();\n myPencil.forward(75);\n // House Sidewalk\n myPencil.up();\n myPencil.move(-250,-112.5);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(250,-112.5);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(192.5);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(90);\n myPencil.forward(193);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(180);\n myPencil.down();\n myPencil.forward(90);\n myPencil.up();\n myPencil.move(-75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(-250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(75,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(100,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(125,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(150,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(175,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(200,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(225,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n myPencil.up();\n myPencil.move(250,-100);\n myPencil.setDirection(240);\n myPencil.down();\n myPencil.forward(15);\n // Chimney\n myPencil.up();\n myPencil.move(125,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(52);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(40);\n myPencil.up();\n myPencil.move(100,190);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(25);\n // Door window\n myPencil.up();\n myPencil.move(0,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(8);\n myPencil.up();\n myPencil.move(-8,-25);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.forward(16);\n myPencil.up();\n myPencil.move(0,-17);\n myPencil.setDirection(270);\n myPencil.down();\n myPencil.forward(16);\n // Door knob\n myPencil.up();\n myPencil.move(14,-55);\n myPencil.setDirection(0);\n myPencil.down();\n myPencil.drawCircle(2);\n }", "private void paintCourbePoints() {\n\t\tfloat x, y;\n\t\tint i, j;\n\t\t\n\t\tfor(x=xMin; x<=xMax; x++) {\n\t\t\ty = parent.getY(x);\n\t\t\t\n\t\t\tif(y>yMin && y<yMax) {\n\t\t\t\ti = convertX(x);\n\t\t\t\tj = convertY(y);\n\t\t\t\t\n\t\t\t\t//Utilisation d'un carre/losange pour simuler un point \n\t\t\t\t//de taille superieur a un pixel car celui-ci est peu visible.\n\t\t\t\tpaintPointInColor(i-2, j);\n\t\t\t\tpaintPointInColor(i-1, j-1);\t\t\t\t\n\t\t\t\tpaintPointInColor(i-1, j);\n\t\t\t\tpaintPointInColor(i-1, j+1);\n\t\t\t\tpaintPointInColor(i, j-2);\t//\t *\n\t\t\t\tpaintPointInColor(i, j-1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j);\t//\t* * * * *\n\t\t\t\tpaintPointInColor(i, j+1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j+2);\t//\t *\n\t\t\t\tpaintPointInColor(i+1, j-1);\n\t\t\t\tpaintPointInColor(i+1, j);\n\t\t\t\tpaintPointInColor(i+1, j+1);\n\t\t\t\tpaintPointInColor(i+2, j);\n\t\t\t}\n\t\t}\t\t\n\t}", "@Override\n public void paint(Graphics g)\n {\n super.paint(g);\n\n if(g instanceof Graphics2D)\n {\n // Initialize vars\n Graphics2D graphics = (Graphics2D) g;\n Dimension panelDimension = this.getSize();\n Rectangle2D turtleBounds;\n int fontHeight = g.getFontMetrics().getHeight();\n\n // Clear drawing sheet\n graphics.setColor(Color.WHITE);\n graphics.fillRect(0, 0, (int) panelDimension.getWidth(), (int) panelDimension.getHeight());\n\n // Draw every turtle\n for(AbstractTurtle turtle : this.turtles)\n {\n // Draw the turtle's shape\n graphics.setColor(turtle.getColor());\n graphics.fill(turtle.getShape());\n\n // Debug mode\n if(this.isDebug)\n {\n // Draw the turtle's sight\n graphics.setColor(Color.BLACK);\n graphics.draw(turtle.getSight());\n\n // Draw the turtle's center\n graphics.setColor(Color.CYAN);\n graphics.drawLine(\n (int) turtle.getX() - 10,\n (int) turtle.getY(),\n (int) turtle.getX() + 10,\n (int) turtle.getY()\n );\n graphics.drawLine(\n (int) turtle.getX(),\n (int) turtle.getY() - 10,\n (int) turtle.getX(),\n (int) turtle.getY() + 10\n );\n\n // Write the turtle's speed\n turtleBounds = turtle.getShape().getBounds2D();\n\n graphics.setColor(Color.BLACK);\n graphics.drawString(\n \"Vitesse : \" + String.format(\"%.2f\", turtle.getSpeed()),\n (int) turtleBounds.getMaxX() + 5,\n (int) turtleBounds.getMinY() - 5\n );\n graphics.drawString(\n \"Direction : \" + String.format(\"%.2f\", turtle.getDirection()),\n (int) turtleBounds.getMaxX() + 5,\n (int) turtleBounds.getMinY() - 5 + fontHeight\n );\n }\n }\n }\n }", "private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }", "public void drawColorFlow() {\n for(int ix=0;ix<cols;ix++) {\n int x0=ix*resolution+resolution/2;\n //int lerpyCount = 0;\n for(int iy=0;iy<rows;iy++) {\n int y0=iy*resolution+resolution/2;\n int ig=iy*cols+ix;\n\n float u=df*sflowx[ig];\n float v=df*sflowy[ig];\n\n // draw the line segments for optical flow\n float a=sqrt(u*u+v*v);\n //if(a>=2.0) { // draw only if the length >=2.0\n if(a>=minRegisterFlowVelocity) { // draw only if the length >=2.0\n //float r=0.5*(1.0+u/(a+0.1));\n //float g=0.5*(1.0+v/(a+0.1));\n //float b=0.5*(2.0-(r+g));\n\n //stroke(255*r,255*g,255*b);\n\n // draw the optical flow field red!\n if (drawOpticalFlow) \n {\n stroke(255.0f, 0.0f, 0.0f);\n line(x0,y0,x0+u,y0+v);\n }\n\n\n // same syntax as memo's fluid solver (http://memo.tv/msafluid_for_processing)\n float mouseNormX = (x0+u) * invKWidth;// / kWidth;\n float mouseNormY = (y0+v) * invKHeight; // kHeight;\n float mouseVelX = ((x0+u) - x0) * invKWidth;// / kWidth;\n float mouseVelY = ((y0+v) - y0) * invKHeight;// / kHeight; \n\n particleManager.addForce(1-mouseNormX, mouseNormY, -mouseVelX, mouseVelY);\n }\n }\n }\n }", "public ahr(aqu paramaqu, xm paramxm)\r\n/* 35: */ {\r\n/* 36: 50 */ super(paramaqu);\r\n/* 37: 51 */ this.g = paramxm;\r\n/* 38: */ \r\n/* 39: 53 */ a(0.25F, 0.25F);\r\n/* 40: */ \r\n/* 41: 55 */ b(paramxm.s, paramxm.t + paramxm.aR(), paramxm.u, paramxm.y, paramxm.z);\r\n/* 42: */ \r\n/* 43: 57 */ this.s -= uv.b(this.y / 180.0F * 3.141593F) * 0.16F;\r\n/* 44: 58 */ this.t -= 0.1000000014901161D;\r\n/* 45: 59 */ this.u -= uv.a(this.y / 180.0F * 3.141593F) * 0.16F;\r\n/* 46: 60 */ b(this.s, this.t, this.u);\r\n/* 47: */ \r\n/* 48: 62 */ float f1 = 0.4F;\r\n/* 49: 63 */ this.v = (-uv.a(this.y / 180.0F * 3.141593F) * uv.b(this.z / 180.0F * 3.141593F) * f1);\r\n/* 50: 64 */ this.x = (uv.b(this.y / 180.0F * 3.141593F) * uv.b(this.z / 180.0F * 3.141593F) * f1);\r\n/* 51: 65 */ this.w = (-uv.a((this.z + l()) / 180.0F * 3.141593F) * f1);\r\n/* 52: */ \r\n/* 53: 67 */ c(this.v, this.w, this.x, j(), 1.0F);\r\n/* 54: */ }", "private GameSetParameters createCustomGameSetParameters() {\n GameSetParameters gameSetParameters = new GameSetParameters();\n gameSetParameters.setPriseBasePoints(20);\n gameSetParameters.setPriseRate(2);\n gameSetParameters.setGardeBasePoints(40);\n gameSetParameters.setGardeRate(4);\n gameSetParameters.setGardeSansBasePoints(80);\n gameSetParameters.setGardeSansRate(8);\n gameSetParameters.setGardeContreBasePoints(160);\n gameSetParameters.setGardeContreRate(16);\n gameSetParameters.setPoigneePoints(10);\n gameSetParameters.setDoublePoigneePoints(20);\n gameSetParameters.setTriplePoigneePoints(30);\n gameSetParameters.setMiseryPoints(10);\n gameSetParameters.setKidAtTheEndPoints(10);\n gameSetParameters.setAnnouncedAndSucceededChelemPoints(400);\n gameSetParameters.setAnnouncedAndFailedChelemPoints(-200);\n gameSetParameters.setNotAnnouncedButSucceededChelemPoints(200);\n gameSetParameters.setBelgianBaseStepPoints(100);\n return gameSetParameters;\n }" ]
[ "0.6325193", "0.6201643", "0.61736006", "0.59959507", "0.59591633", "0.5923497", "0.5859717", "0.5739099", "0.5685094", "0.5631558", "0.5607186", "0.5602195", "0.5574461", "0.55492955", "0.55199695", "0.5504529", "0.54865783", "0.5477765", "0.5473759", "0.54722995", "0.545866", "0.5431727", "0.5422818", "0.540102", "0.53997195", "0.5399117", "0.5379997", "0.5367758", "0.5364039", "0.53626883", "0.53610474", "0.5355445", "0.5351444", "0.53479403", "0.53246266", "0.5323755", "0.53168845", "0.531633", "0.5315008", "0.53128535", "0.5310798", "0.5297517", "0.52974856", "0.5296993", "0.52963996", "0.52786", "0.5276239", "0.5272633", "0.52706677", "0.5270453", "0.5261711", "0.52578145", "0.5256476", "0.5251213", "0.5249481", "0.5247947", "0.5245475", "0.5243723", "0.5241656", "0.52411175", "0.5224696", "0.5222465", "0.52211607", "0.5209357", "0.5209148", "0.52063173", "0.52040684", "0.5203656", "0.5181854", "0.5180256", "0.5176467", "0.51709133", "0.5168887", "0.5164146", "0.515918", "0.51589704", "0.51583505", "0.5158004", "0.5153443", "0.5145743", "0.51446253", "0.5142829", "0.51401246", "0.5127288", "0.5125946", "0.51227725", "0.5120817", "0.51169515", "0.5115278", "0.51108694", "0.51092494", "0.51065093", "0.510122", "0.5098426", "0.50929457", "0.5092364", "0.5091374", "0.5090839", "0.50884813", "0.5087512", "0.50843984" ]
0.0
-1
RESTful Services for Confirmation Of Funds
@Path("/{version}/confirmation-of-funds") @Api(value = "/{version}/accounts}", tags = { "Confirmation"}, consumes = "application/json", produces = "application/json") public interface Confirmation { /** * For /v1/confirmation-of-funds requests * * @param version Version * @param processId ID of the transaction as determined by the initiating party (UUID) * @param requestId ID of the request (UUID) * @param signature A signature of the request by the TPP on application level * @param certificate The certificate used for signing the request * @param date Standard https header element for Date and Time * @param confirmationOfFundsRequest Body data * @return Response */ @POST @Path("/{provider-id}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Confirmation of Funds (page 84) - creates a confirmation of funds request at the ASPSP") @ApiResponses( {@ApiResponse(code = 201, message = "OK, funds request was correctly performe", response = ConfirmationOfFundsResponse.class), @ApiResponse(code = 400, message = "(Bad Request) Validation error occured"), @ApiResponse(code = 401, message = "(Unauthorized) Access Token is not valid"), @ApiResponse(code = 406, message = "(Not Acceptable) ? - not documented but necessary hier") }) public Response confirmationOfFunds( @ApiParam(value = "Version") @PathParam("version") String version, @ApiParam(value = "Provider Identification") @PathParam("provider-id") String providerId, @ApiParam(value = "ID of the transaction as determined by the initiating party (UUID)", required = true) @HeaderParam("Process-ID") String processId, @ApiParam(value = "ID of the request (UUID)", required = true) @HeaderParam("Request-ID") String requestId, @ApiParam(value = "A signature of the request by the TPP on application level", required = false) @HeaderParam("signature") String signature, @ApiParam(value = "The certificate used for signing the request", required = false) @HeaderParam("certificate") String certificate, @ApiParam(value = "Standard https header element for Date and Time", required = true) @HeaderParam("Date") String date, @ApiParam(value = "Request body", required = true) ConfirmationOfFundsRequest confirmationOfFundsRequest); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void confirmFlight();", "@POST\n @Path(\"account/transactions/withdraw\")\n @Consumes(MediaType.APPLICATION_JSON)\n public void accountWithdrawal(String withdrawal){\n \n System.out.println(withdrawal);\n \n }", "@GetMapping(\"/DepAcctBalRq/{rqUID}/{accountId}/{acctType}/{bankIdType}/{bankId}/{bankName}/{branchId}/{branchName}\")\n public DepAcctBalInqRs DepAcctBalanceRequest(@PathVariable(\"accountId\") String accountId,\n @PathVariable(\"rqUID\") String rqUID,\n @PathVariable(\"acctType\") String acctType,\n @PathVariable(\"bankIdType\") String bankIdType,\n @PathVariable(\"bankId\") String bankId,\n @PathVariable(\"bankName\") String bankName,\n @PathVariable(\"branchId\") String branchId,\n @PathVariable(\"branchName\") String branchName\n ) {\n //Objects required to build the IFX compliant response\n RestTemplate restTemplate = new RestTemplate();\n DepAcctIdFrom depAcctIdFrom = new DepAcctIdFrom();\n BankInfo bankInfo = new BankInfo();\n AcctBal acctBal = new AcctBal();\n CurAmt curAmt = new CurAmt();\n DepAcctBalInqRs depAcctBalInqRs = new DepAcctBalInqRs();\n\n //Code to access the PNC API Exchange to retrieve details based on Deposit Account Number\n String accounturl = \"http://apimanager.pncapix.com:8280/smartbank-account/1.0.0/account/{accountId}\";\n\n //Map to store the Parameters that are to be passed\n Map<String, Object> accountparamMap = new HashMap<>();\n accountparamMap.put(\"accountId\", accountId);\n\n //Map to store the headers required for the API Access\n MultiValueMap<String, Object> accountheaders = new LinkedMultiValueMap<>();\n accountheaders.add(\"Accept\", \"application/json\");\n accountheaders.add(\"Authorization\", \"Bearer 4efe4573-3ed8-3c18-847a-b043869f1a45\");\n HttpEntity accounthttpEntity = new HttpEntity(accountheaders);\n\n // Sending the request to the PNC API Exchange\n ResponseEntity<Account> accountResponseEntity =\n restTemplate.exchange(accounturl, HttpMethod.GET, accounthttpEntity, Account.class, accountparamMap);\n\n // Response stored in an object built as per the PNC API Response body JSON Structure\n Account account = accountResponseEntity.getBody();\n\n // Building the target response structure which is IFX Compliant\n bankInfo.setBankId(bankId);\n bankInfo.setBankIdType(bankIdType);\n bankInfo.setBranchId(branchId);\n bankInfo.setBranchName(branchName);\n bankInfo.setName(bankName);\n depAcctIdFrom.setAcctType(acctType);\n depAcctIdFrom.setBankInfo(bankInfo);\n depAcctIdFrom.setAcctId(accountId);\n depAcctIdFrom.setAcctCur(\"USD\");\n curAmt.setAmt(account.getBalance());\n curAmt.setCurCode(\"USD\");\n acctBal.setCurAmt(curAmt);\n acctBal.setBalType(\"Ledger\");\n depAcctBalInqRs.setAcctBal(acctBal);\n depAcctBalInqRs.setDepAcctIdFrom(depAcctIdFrom);\n depAcctBalInqRs.setRqUID(rqUID);\n\n //Return the JSON response\n return depAcctBalInqRs;\n }", "@Test\n\tpublic void moneyTrnasferSucess() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 500.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(amountToBeTranfered);\n\t\tsb.append(\" has been transferred to : \");\n\t\tsb.append(accountNumberTo);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Test\n public void testSuccessTransferFundSufficientFund() throws IOException, URISyntaxException {\n URI uri = builder.setPath(\"/transfers\").build();\n BigDecimal amount = new BigDecimal(10).setScale(4, RoundingMode.HALF_EVEN);\n\n HttpPost request = new HttpPost(uri);\n request.setHeader(\"Content-type\", \"application/json\");\n request.setEntity(new StringEntity(mapper.writeValueAsString(new MoneyTransfer(amount, 1L, 4L))));\n HttpResponse response = client.execute(request);\n\n int statusCode = response.getStatusLine().getStatusCode();\n assertTrue(statusCode == 200);\n }", "public interface PrimaryBankService {\n\n @GET(\"/user/bank\")\n void getPrimaryBankDetail(Callback<List<BankDetail>> callback);\n\n @POST(\"/user/bank\")\n void createPrimaryBankDetail(@Body List<BankDetail> bankDetail, Callback<List<BankDetail>> callback);\n\n @POST(\"/user/netBankingperfios\")\n void uploadPerfiosTransactionStatus(@Body PerfiosService.TransactionStatusResponse perfiosTransactionResponse, Callback<PerfiosTransactionResponse> callback);\n\n @POST(\"/user/netBankingperfios\")\n PerfiosTransactionResponse uploadPerfiosTransactionStatus(@Body PerfiosService.TransactionStatusResponse perfiosTransactionResponse);\n //@PUT(\"/user/bank\")\n //void updatePrimaryBankDetail(@Body BankDetail bankDetail, Callback<BankDetail> callback);\n\n\n public static class PerfiosTransactionResponse{\n private String message;\n\n public String getMessage() {\n return message;\n }\n\n public void setMessage(String message) {\n this.message = message;\n }\n }\n\n public static class BankDetail{\n\n @SerializedName(value = \"name\")\n private String bankName;\n @SerializedName(value = \"account_no\")\n private String accountNumber;\n private boolean isPrimary = false;\n private boolean userStatementPresent = false;\n\n public boolean isUserStatementPresent() {\n return userStatementPresent;\n }\n\n public void setUserStatementPresent(boolean userStatementPresent) {\n this.userStatementPresent = userStatementPresent;\n }\n\n public String getBankName() {\n return bankName;\n }\n\n public void setBankName(String bankName) {\n this.bankName = bankName;\n }\n\n public String getAccountNumber() {\n return accountNumber;\n }\n\n public String getAccountNumberLast4Digits() {\n if(accountNumber!= null && accountNumber.length()>4)\n {\n return accountNumber.substring(accountNumber.length()-4);\n }\n return accountNumber;\n }\n\n public void setAccountNumber(String accountNumber) {\n this.accountNumber = accountNumber;\n }\n\n public boolean isPrimary() {\n return isPrimary;\n }\n\n public void setIsPrimary(boolean isPrimary) {\n this.isPrimary = isPrimary;\n }\n\n @Override\n public boolean equals(Object obj)\n {\n if(obj != null && obj instanceof BankDetail)\n {\n BankDetail second = (BankDetail)obj;\n return this.bankName.equals(second.getBankName())\n && this.getAccountNumberLast4Digits().equals(second.getAccountNumberLast4Digits());\n }\n return false;\n }\n }\n\n}", "public abstract Response makeTransfer(Transaction transaction) throws AccountNotFoundException, InsufficientFundsException;", "public interface HTTPContract {\n void getRequirementList(AnnounceDataSource.GetRequirementListCallback callback);\n void getFeelingList(AnnounceDataSource.GetFeelingListCallback callback);\n void postFeelingCommend();\n void postFeelingComment();\n// void postRequirementBook();\n// void postRequirementComment();\n\n}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String acc = request.getParameter(\"acc\");\n String bank = request.getParameter(\"bank\");\n String email = request.getParameter(\"email\");\n Double txR = Math.random();\n\n String txRef = txR.toString();\n RaveConstant.ENVIRONMENT = Environment.STAGING;\n RaveConstant.PUBLIC_KEY = \"FLWPUBK-d8369e6826011f8a1f9f6c7c14a09b80-X\";\n RaveConstant.SECRET_KEY = \"FLWSECK-8abf446c71a58aaa858323f3a9ed156b-X\";\n try {\n AccountCharge ch = new AccountCharge();\n\n ch.setAccountbank(bank)\n .setAccountnumber(acc)\n .setEmail(email)\n .setTxRef(txRef)\n .setAmount(\"2000\")\n .setCountry(\"NG\")\n .setCurrency(\"NGN\");\n\n JSONObject charge = ch.chargeAccount();\n\n System.out.println(charge);\n JSONObject data = (JSONObject) charge.get(\"data\");\n String response_code = (String) data.get(\"chargeResponseCode\");\n\n if (charge.get(\"status\").equals(\"success\")) {\n {\n if (response_code.equals(\"02\")) {\n\n String flw = (String) data.get(\"flwRef\");\n HttpSession session = request.getSession(true);\n session.setAttribute(\"flwRef\", flw);\n session.setAttribute(\"payload\", ch);\n response.sendRedirect(\"Otp\");\n return;\n }\n else if (response_code.equals(\"00\")) {\n response.sendRedirect(\"Success\");\n return;\n \n }\n }\n } else {\n String message = (String) charge.get(\"message\");\n System.out.println(message);\n HttpSession session = request.getSession(true);\n session.setAttribute(\"message\", message);\n response.sendRedirect(\"401\");\n return;\n\n }\n\n } catch (JSONException ex) {\n }\n doGet(request, response);\n }", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "@Test\n public void testSuccessTransferFundInsufficientFund() throws IOException, URISyntaxException {\n URI uri = builder.setPath(\"/transfers\").build();\n BigDecimal amount = new BigDecimal(100000).setScale(4, RoundingMode.HALF_EVEN);\n\n HttpPost request = new HttpPost(uri);\n request.setHeader(\"Content-type\", \"application/json\");\n request.setEntity(new StringEntity(mapper.writeValueAsString(new MoneyTransfer(amount, 1L, 4L))));\n HttpResponse response = client.execute(request);\n\n int statusCode = response.getStatusLine().getStatusCode();\n assertTrue(statusCode == 500);\n }", "@Test\n void getTransactionList() throws JsonProcessingException {\n\n String idAccount = \"14537780\";\n String fromAccountingDate = \"2019-01-01\";\n String toAccountingDate = \"2019-12-01\";\n\n Response response = greetingWebClient.getTransactionList(idAccount, fromAccountingDate, toAccountingDate);\n assertTrue(response.getPayload().getList().size()>0 && response.getStatus().equals(\"OK\"));\n\n }", "public void transferedFunds(AuctionItem purchasedItem){\n Message<AuctionItem> message = new Message<>(Message.MessageIdentifier.\n TRANSFER_FUNDS,purchasedItem);\n Message<Integer> reply = sendMSG(message);\n if(reply != null){\n if(reply.getMessageIdentifier() == Message.MessageIdentifier.\n TRANSFER_SUCCESS){\n }else{\n System.out.println(\"Bank missing transfer funds\");\n }\n }\n }", "public String perform(HttpServletRequest request) {\n\t\tList<String> errors = new ArrayList<String>();\n\t\trequest.setAttribute(\"errors\", errors);\n\n\t\ttry {\n\t\t\tFundForm form = formBeanFactory.create(request);\n\t\t\trequest.setAttribute(\"form\", form);\n\t\t\t\n\t\t\t//get a full fund list\n\t\t\tFundGeneralInfoBean[] fundGeneralList = fundPriceHistoryDAO.getAllFundsGeneralInfo();\n\t\t\trequest.setAttribute(\"fundGeneralList\", fundGeneralList);\n\t\t\t\n\t\t\tif (!form.isPresent()) {\n\t return \"employee-createfund.jsp\";\n\t }\n\t\n\t errors.addAll(form.getValidationErrors());\n\t if (errors.size() != 0) {\n\t return \"employee-createfund.jsp\";\n\t } \n\t \n\n\t synchronized(this){\n\t \t //test whether fundname and symbol are existed.\n\t\t FundBean fund = fundDAO.read(form.getFundName());\n\t\t FundBean symbol = fundDAO.readSymbol(form.getSymbol());\n\t\t \n\t\t \tif (fund!= null) {\n\t\t \t\terrors.add(\"Existing Fund Name\");\n\t\t \t\treturn \"employee-createfund.jsp\";\n\t\t \t}\n\t\t \tif (symbol!=null){\n\t\t \t\terrors.add(\"Existing Symbol\");\n\t\t \t\treturn \"employee-createfund.jsp\";\n\t\t \t}\n\t\t \n\t\t \tfund = new FundBean();\n\t\t\t\tfund.setSymbol(form.getSymbol());\n\t\t\t\tfund.setName(form.getFundName());\n\t\t\t\tfundDAO.create(fund);\n\t }\n\t \n\t\t\t\n\t\t\trequest.setAttribute(\"message\",\" Fund Successfully Created. Fund: \" + \"<b>\" + form.getFundName() \n\t\t\t\t\t+ \"</b>, Symbol: <b>\" + form.getSymbol() + \"</b>\");\n\t\t\t\n\t\t\treturn \"employee-confirmation.jsp\";\n\t\t\t\n\t\t} catch ( MyDAOException e) {\n\t\t\terrors.add(e.getMessage());\n\t\t\treturn \"error.jsp\";\n\t\t} catch (FormBeanException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"error.jsp\";\n\t\t}\n\t}", "@RPCClientFields(urlfield =\"PAYMENT_SYS\",urlbean = ParamsConfig.class)\npublic interface RechargeOrderServer {\n\n /**\n * 充值订单-审核\n * @param json\n * @return\n */\n @POST(\"rechargeOrder/audit.do\")\n HTTPResponse audit(@Body String json);\n /**\n * 充值/扣款订单-保存\n */\n @POST(\"rechargeOrder/save.do\")\n HTTPResponse saveFinanceOrder(@Body String json);\n\n /**\n * 充值订单-列表\n */\n @POST(\"rechargeOrder/list.do\")\n HTTPResponse list(@Body String json);\n\n /**\n * 充值订单—审核列表\n * @param json\n * @return\n */\n @POST(\"rechargeOrder/auditList.do\")\n HTTPResponse auditList(@Body String json);\n\n /**\n * 获取用户余额\n * @param json\n * @return\n */\n @POST(\"balance/getBalance.do\")\n HTTPResponse getBalance(@Body String json);\n\n\n}", "public boolean requestTransaction(String name,String reason,double amount){\n Transaction t1 = new Transaction(name,reason,amount);\n boolean done=t1.registertransaction();\n \n return done; \n \n}", "@Test\n void executeMoneyTransfer() throws ParseException, JsonProcessingException {\n\n String idAccount = \"14537780\";\n String receiverName = \"Receiver Name\";\n String description = \"description text\";\n String currency = \"EUR\";\n String amount = \"100\";\n String executionDate = \"2020-12-12\";\n MoneyTransfer moneyTransfer = Utils.fillMoneyTransfer(idAccount, receiverName, description, currency, amount, executionDate);\n\n Response response = greetingWebClient.executeMoneyTransfer(moneyTransfer, idAccount);\n assertTrue(response.getStatus().equals(\"KO\"));\n\n\n }", "String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;", "@RequestMapping(value = \"confirmpurchase/v1/wallets/{walletId}/serviceproviders/{spId}/widgets/{widgetId}\", method = RequestMethod.GET)\n public TicketPurchaseResponse confirmPurchaseV1(@PathVariable(value = \"walletId\") String walletId,\n @PathVariable(value = \"spId\") String spId, @PathVariable(value = \"widgetId\") String widgetId) {\n LOG.info(\"########confirmPurchaseV1 started\");\n TicketPurchaseResponse ticketPurchaseResponse = null;\n String result = \"Success\";\n String productRef;\n GenerateProductIDResponse generateProductIDResponse;\n String status = \"success\";\n try {\n /* MIFAREHttpClient mifareClient = new MIFAREHttpClient(DIGITIZE_BASE_URI, GENERATE_PRODUCT_REFERENCE); */\n // MIFAREHttpClient mifareClient = new MIFAREHttpClient.Builder().serviceURL(DIGITIZE_BASE_URI)\n // .apiURL(GENERATE_PRODUCT_REFERENCE).build();\n GenerateProductIDRequest request = new GenerateProductIDRequest();\n RequestContextV1 requestContext = new RequestContextV1();\n requestContext.setServiceProviderId(spId);\n String idRequest = \"\" + System.currentTimeMillis();\n requestContext.setCorrelationId(idRequest);\n requestContext.setRequestId(idRequest);\n request.setRequestContext(requestContext);\n Products products = new Products();\n products.setProductTypeId(widgetId);\n productRef = UUID.randomUUID().toString();\n products.setSpProductReference(productRef);\n request.setProductOrders(new ArrayList<>(Arrays.asList(products)));\n \n /** calling seglan service InitPurchaseOrder API if serviceProviderId is NAME_CRTM */\n if (spId.equals(configBean.getCrtmServiceProviderId())) {\n InitPurchaseOrderRequest InitPurchaseOrderRequest = new InitPurchaseOrderRequest();\n InitPurchaseOrderRequest.setDeviceId(\"1234\");\n InitPurchaseOrderRequest.setGoogleAccountId(\"[email protected]\");\n InitPurchaseOrderRequest.setProduct(widgetId);\n InitPurchaseOrderResponse initPurchaseOrderResponse = crtmService.processInitPurchaseOrder(InitPurchaseOrderRequest);\n if (!initPurchaseOrderResponse.getResponseCode().equals(\"00\")) {\n status = \"failed\";\n result = \"failed\";\n }\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(status).ticketId(productRef)\n .digitalTicketId(initPurchaseOrderResponse.getM2gReference()).build();\n } else {\n Header[] headers = new Header[] {\n new BasicHeader(\"content-type\", ContentType.APPLICATION_JSON.getMimeType())};\n // generateProductIDResponse = mifareClient.invokePost(request, GenerateProductIDResponse.class, headers);\n generateProductIDResponse = utils.postRequestWithAbsoluteURL1(request, configBean, configBean.getDIGITIZE_BASE_URI() + configBean.getGENERATE_PRODUCT_REFERENCE(),\n GenerateProductIDResponse.class);\n ticketPurchaseResponse = TicketPurchaseResponse.builder()\n .status(generateProductIDResponse.getResponseContext().getResponseMessage()).ticketId(productRef)\n .digitalTicketId(generateProductIDResponse.getReferences().get(0).getM2gReference()).build();\n result = JsonUtil.toJSON(generateProductIDResponse);\n }\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n } catch (Exception e) {\n LOG.info(\"#Error occurred during confirm purchase:\" + e);\n result = \"failed\";\n LOG.info(\"########confirmPurchaseV1 result:\" + result);\n ticketPurchaseResponse = TicketPurchaseResponse.builder().status(result).build();\n }\n return ticketPurchaseResponse;\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbateForSuccessLiberataValidation() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture\n .aPbaPaymentRequestForProbateForSuccessLiberataValidation(\"215.00\", \"PROBATE\");\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // Get pba payments by ccdCaseNumber\n PaymentsResponse liberataResponse = paymentTestService\n .getPbaPaymentsByCCDCaseNumber(SERVICE_TOKEN, accountPaymentRequest.getCcdCaseNumber()).then()\n .statusCode(OK.value()).extract().as(PaymentsResponse.class);\n assertThat(liberataResponse.getPayments().size()).isGreaterThanOrEqualTo(1);\n PaymentDto retrievedPaymentDto = liberataResponse.getPayments().stream()\n .filter(o -> o.getPaymentReference().equals(paymentDto.getReference())).findFirst().get();\n assertThat(retrievedPaymentDto.getAccountNumber()).isEqualTo(accountNumber);\n assertThat(retrievedPaymentDto.getFees().get(0).getApportionedPayment()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getCalculatedAmount()).isEqualTo(\"215.00\");\n assertThat(retrievedPaymentDto.getFees().get(0).getMemoLine())\n .isEqualTo(\"Personal Application for grant of Probate\");\n assertThat(retrievedPaymentDto.getFees().get(0).getNaturalAccountCode())\n .isEqualTo(\"4481102158\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction1()).isEqualTo(\"family\");\n assertThat(retrievedPaymentDto.getFees().get(0).getJurisdiction2())\n .isEqualTo(\"probate registry\");\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public int updateFundingStatusByFundingNo(String funding_status, int funding_no) throws Exception;", "@POST \n\t\t@Path(\"NewGrant\") \n\t\t@Consumes(MediaType.APPLICATION_FORM_URLENCODED) \n\t\t@Produces(MediaType.TEXT_PLAIN)\n\t\tpublic String insertFund( @FormParam(\"id\") String id,\n\t\t\t\t @FormParam(\"title\") String title,\n\t\t\t\t\t\t\t\t@FormParam(\"full_name\") String full_name,\n\t\t\t\t\t\t\t\t@FormParam(\"email\") String email,\n\t\t\t\t\t\t\t\t@FormParam(\"phone\") String phone,\n\t\t\t\t\t\t\t\t@FormParam(\"research_category\") String research_category,\n\t\t\t\t\t\t\t\t@FormParam(\"budget\") String budget,\n\t\t\t\t\t\t\t\t@FormParam(\"introduction\") String introduction)\n\t\n\t\t{\n\t\t \t{\n\t\t \t\tString output = Obj.insertGrantApplication(id,title,full_name,email,phone,research_category,budget,introduction); \n\t\t \t\treturn output;\n\t\t\t}\n\t\t}", "TransactionResponseType createTransactionResponseType();", "public interface FundRecordService {\n\n Page<FundRecordDTO> pageList(HashMap<String, Object> params);\n\n FundRecordDTO save(FundRecordDTO hppVideoDTO);\n\n FundRecordDTO createFundRecordDTO(FundRecordDTO hppVideoDTO);\n\n HashMap<String, Object> checkCreateFundRecordDTO(FundRecordDTO hppVideoDTO);\n\n FundRecordDTO findOne(String id);\n\n List<FundRecordDTO> findAll();\n\n /*\n for app 基金入伙记录\n */\n HashMap<String, Object> findListByFundSignalId(String fundSignalId);\n\n /*\n 我的入伙记录\n */\n List<FundRecordDTO> findMyFund(String userId);\n \n void delete(String id);\n\n /*\n 计算总入伙金额\n */\n Double sumFundByFundSignalId(String id);\n}", "@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}", "public JSONObject getFunds() throws Exception;", "@Test\n public void create() throws RazorpayException{\n JSONObject request = new JSONObject(\"{\" +\n \"\\\"amount\\\":\\\"100\\\",\" +\n \"\\\"speed\\\":\\\"normal\\\",\" +\n \"\\\"notes\\\":{\\\"notes_key_1\\\":\\\"BeammeupScotty.\\\",\" +\n \"\\\"notes_key_2\\\":\\\"Engage\\\"},\" +\n \"\\\"receipt\\\":\\\"ReceiptNo.31\\\"}\");\n\n String mockedResponseJson = \"{\\n\" +\n \" \\\"id\\\": \"+REFUND_ID+\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 500100,\\n\" +\n \" \\\"receipt\\\": \\\"Receipt No. 31\\\",\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FCXKPFtYfPXJPy\\\",\\n\" +\n \" \\\"notes\\\": [],\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": null\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078866,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\"\\n\" +\n \"}\";\n\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n Refund fetch = refundClient.create(request);\n assertNotNull(fetch);\n assertEquals(REFUND_ID,fetch.get(\"id\"));\n assertEquals(\"refund\",fetch.get(\"entity\"));\n assertEquals(500100,(int)fetch.get(\"amount\"));\n assertEquals(\"INR\",fetch.get(\"currency\"));\n String createRequest = getHost(Constants.REFUNDS);\n verifySentRequest(true, request.toString(), createRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "public void deposit();", "public interface FundService {\n\n String BASE_URL = \"http://fund.eastmoney.com/f10/\";\n\n @GET(\"F10DataApi.aspx\")\n Observable<GetFundResponse> api(@Query(\"type\") String type, @Query(\"code\") String code, @Query(\"page\") int page, @Query(\"per\") int per);\n}", "@Path(\"Private\")\n@Produces(MediaType.APPLICATION_JSON)\npublic interface IndependentReserveAuthenticated {\n\n @POST\n @Path(\"GetAccounts\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReserveBalance getBalance(AuthAggregate authAggregate) throws IndependentReserveHttpStatusException, IOException;\n\n @POST\n @Path(\"GetOpenOrders\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReserveOpenOrdersResponse getOpenOrders(IndependentReserveOpenOrderRequest independentReserveOpenOrderRequest) throws IndependentReserveHttpStatusException, IOException;\n\n @POST\n @Path(\"GetTrades\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReserveTradeHistoryResponse getTradeHistory(IndependentReserveTradeHistoryRequest independentReserveTradeHistoryRequest) throws IndependentReserveHttpStatusException, IOException;\n\n @POST\n @Path(\"PlaceLimitOrder\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReservePlaceLimitOrderResponse placeLimitOrder(IndependentReservePlaceLimitOrderRequest independentReservePlaceLimitOrderRequest) throws IndependentReserveHttpStatusException, IOException;\n\n @POST\n @Path(\"CancelOrder\")\n @Consumes(MediaType.APPLICATION_JSON)\n public IndependentReserveCancelOrderResponse cancelOrder(IndependentReserveCancelOrderRequest independentReserveCancelOrderRequest) throws IndependentReserveHttpStatusException, IOException;\n}", "@GET\n @Path(\"public/transactions/{CurrencyPair}\")\n GatecoinTransactionResult getTransactions(@PathParam(\"CurrencyPair\") String CurrencyPair) throws IOException, GatecoinException;", "public String approve() throws Exception\r\n {\r\n try\r\n {\r\n PoInvGrnDnMatchingHolder holder = poInvGrnDnMatchingService.selectByKey(param.getMatchingOid());\r\n \r\n if (\"yes\".equals(this.getSession().get(SESSION_SUPPLIER_DISPUTE)))\r\n {\r\n if (PoInvGrnDnMatchingStatus.PENDING.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"pending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.MATCHED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"matched\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.INSUFFICIENT_INV.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"insufficientInv\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingStatus.OUTDATED.equals(holder.getMatchingStatus()))\r\n {\r\n this.result = \"outdated\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingInvStatus.APPROVED.equals(holder.getInvStatus()) || PoInvGrnDnMatchingInvStatus.SYS_APPROVED.equals(holder.getInvStatus()))\r\n {\r\n this.result = \"approved\";\r\n return SUCCESS;\r\n }\r\n if (!holder.getRevised())\r\n {\r\n if (PoInvGrnDnMatchingSupplierStatus.PENDING.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplierpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.ACCEPTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"supplieraccept\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.PENDING.equals(holder.getBuyerStatus()) && PoInvGrnDnMatchingSupplierStatus.REJECTED.equals(holder.getSupplierStatus()))\r\n {\r\n this.result = \"buyerpending\";\r\n return SUCCESS;\r\n }\r\n if (PoInvGrnDnMatchingBuyerStatus.REJECTED.equals(holder.getBuyerStatus()))\r\n {\r\n this.result = \"rejected\";\r\n return SUCCESS;\r\n }\r\n }\r\n }\r\n if (null == param.getInvStatusActionRemarks() || param.getInvStatusActionRemarks().length() == 0 || param.getInvStatusActionRemarks().length() > 255)\r\n {\r\n this.result = \"remarks\";\r\n return SUCCESS;\r\n }\r\n this.checkInvFileExist(holder);\r\n poInvGrnDnMatchingService.changeInvDateToFirstGrnDate(holder);\r\n PoInvGrnDnMatchingHolder newHolder = new PoInvGrnDnMatchingHolder();\r\n BeanUtils.copyProperties(holder, newHolder);\r\n newHolder.setInvStatus(PoInvGrnDnMatchingInvStatus.APPROVED);\r\n newHolder.setInvStatusActionDate(new Date());\r\n newHolder.setInvStatusActionRemarks(param.getInvStatusActionRemarks());\r\n newHolder.setInvStatusActionBy(getProfileOfCurrentUser().getLoginId());\r\n poInvGrnDnMatchingService.auditUpdateByPrimaryKeySelective(this.getCommonParameter(), holder, newHolder);\r\n poInvGrnDnMatchingService.moveFile(holder);\r\n this.result = \"1\";\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n this.result = \"0\";\r\n }\r\n return SUCCESS;\r\n }", "@RequestMapping(value = \"/free-cfdis\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE,\n params = {\"idFree_cfdi\", \"folio_fiscal\",\"rfc_receiver\",\"fromDate\", \"toDate\", \"idState\",\"serie\", \"folio\"})\n @Timed\n public ResponseEntity<List<Free_cfdi>> getAllFree_cfdis(@RequestParam(value = \"idFree_cfdi\") Integer idFree_cfdi,\n @RequestParam(value = \"folio_fiscal\") String folio_fiscal,\n @RequestParam(value = \"rfc_receiver\") String rfc_receiver,\n @RequestParam(value = \"fromDate\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate fromDate,\n @RequestParam(value = \"toDate\") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate toDate,\n @RequestParam(value = \"idState\") Integer idState,\n @RequestParam(value = \"serie\") String serie,\n @RequestParam(value = \"folio\") String folio,\n Pageable pageable)\n throws URISyntaxException {\n log.debug(\"REST request to get a page of Free_cfdis\");\n\n String login = SecurityUtils.getCurrentUserLogin();\n Optional<User> user = userService.getUserWithAuthoritiesByLogin(login);\n if(user.isPresent()){\n boolean administrator = false;\n for(Authority item: user.get().getAuthorities()){\n if(item.getName().compareTo(\"ROLE_ADMIN\")==0){\n administrator = true;\n }\n }\n if(administrator){\n if (idFree_cfdi == 0 && folio_fiscal.compareTo(\" \") == 0 && rfc_receiver.compareTo(\" \") == 0 &&\n fromDate.toString().compareTo(\"0001-01-01\") == 0 && toDate.toString().compareTo(\"0001-01-01\") == 0 &&\n idState == 0 && serie.compareTo(\" \") == 0 && folio.compareTo(\" \") == 0) {\n log.debug(\"Obtener todos para el admin\");\n Page<Free_cfdi> page = free_cfdiService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/free-cfdis\");\n Long idauditevent = new Long(\"36\");\n Audit_event_type audit_event_type = audit_event_typeService.findOne(idauditevent);\n C_state_event c_state_event;\n Long idstate = new Long(\"1\");\n c_state_event = c_state_eventService.findOne(idstate);\n tracemgService.saveTrace(audit_event_type, c_state_event);\n\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }else\n {\n log.debug(\"Obtener alguno para el admin\");\n LocalDate inicio = fromDate;\n LocalDate datefinal = toDate;\n Page<Free_cfdi> page = free_cfdiService.findCustomAdmin(idFree_cfdi, folio_fiscal, rfc_receiver,\n inicio, datefinal, idState, serie, folio, pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/free-cfdis\");\n Long idauditevent = new Long(\"36\");\n Audit_event_type audit_event_type = audit_event_typeService.findOne(idauditevent);\n C_state_event c_state_event;\n Long idstate = new Long(\"1\");\n c_state_event = c_state_eventService.findOne(idstate);\n tracemgService.saveTrace(audit_event_type, c_state_event);\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }\n }else{\n Free_emitter free_emitter = free_emitterService.findOneByUser(userRepository.findOneByLogin(login).get());\n if(free_emitter != null) {\n Long idauditevent = new Long(\"36\");\n Audit_event_type audit_event_type = audit_event_typeService.findOne(idauditevent);\n C_state_event c_state_event;\n Long idstate = new Long(\"1\");\n c_state_event = c_state_eventService.findOne(idstate);\n tracemgService.saveTrace(audit_event_type, c_state_event);\n\n if (idFree_cfdi == 0 && folio_fiscal.compareTo(\" \") == 0 && rfc_receiver.compareTo(\" \") == 0 &&\n fromDate.toString().compareTo(\"0001-01-01\") == 0 && toDate.toString().compareTo(\"0001-01-01\") == 0 &&\n idState == 0 && serie.compareTo(\" \") == 0 && folio.compareTo(\" \") == 0) {\n log.debug(\"Obtener todos\");\n Page<Free_cfdi> page = free_cfdiService.findByFree_emitter(free_emitter, pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/free-cfdis\");\n\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n } else {\n log.debug(\"Obtener alguno\");\n LocalDate inicio = fromDate;\n LocalDate datefinal = toDate;\n Page<Free_cfdi> page = free_cfdiService.findCustom(idFree_cfdi, folio_fiscal, rfc_receiver,\n inicio, datefinal, idState, serie, folio, free_emitter, pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/free-cfdis\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }\n }else\n {\n Long idauditevent = new Long(\"36\");\n Audit_event_type audit_event_type = audit_event_typeService.findOne(idauditevent);\n C_state_event c_state_event;\n Long idstate = new Long(\"2\");\n c_state_event = c_state_eventService.findOne(idstate);\n tracemgService.saveTrace(audit_event_type, c_state_event);\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"free_cfdi\", \"notfound\", \"Free CFDI not found\")).body(null);\n }\n }\n }\n Long idauditevent = new Long(\"36\");\n Audit_event_type audit_event_type = audit_event_typeService.findOne(idauditevent);\n C_state_event c_state_event;\n Long idstate = new Long(\"2\");\n c_state_event = c_state_eventService.findOne(idstate);\n tracemgService.saveTrace(audit_event_type, c_state_event);\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"free_cfdi\", \"notfound\", \"Free CFDI not found\")).body(null);\n\n }", "@WebService(name = \"DomesticRemittanceByPartnerService\", targetNamespace = \"http://www.quantiguous.com/services\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface DomesticRemittanceByPartnerService {\n\n\n /**\n * \n * @param beneficiaryAccountNo\n * @param remitterToBeneficiaryInfo\n * @param remitterAddress\n * @param remitterIFSC\n * @param partnerCode\n * @param transactionStatus\n * @param transferAmount\n * @param remitterName\n * @param beneficiaryAddress\n * @param uniqueResponseNo\n * @param version\n * @param requestReferenceNo\n * @param beneficiaryIFSC\n * @param debitAccountNo\n * @param uniqueRequestNo\n * @param beneficiaryName\n * @param customerID\n * @param beneficiaryContact\n * @param transferType\n * @param attemptNo\n * @param transferCurrencyCode\n * @param remitterContact\n * @param remitterAccountNo\n * @param lowBalanceAlert\n */\n @WebMethod(action = \"http://www.quantiguous.com/services/DomesticRemittanceByPartnerService/remit\")\n @RequestWrapper(localName = \"remit\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.Remit\")\n @ResponseWrapper(localName = \"remitResponse\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.RemitResponse\")\n public void remit(\n @WebParam(name = \"version\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<String> version,\n @WebParam(name = \"uniqueRequestNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String uniqueRequestNo,\n @WebParam(name = \"partnerCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n String partnerCode,\n @WebParam(name = \"customerID\", targetNamespace = \"http://www.quantiguous.com/services\")\n String customerID,\n @WebParam(name = \"debitAccountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String debitAccountNo,\n @WebParam(name = \"remitterAccountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String remitterAccountNo,\n @WebParam(name = \"remitterIFSC\", targetNamespace = \"http://www.quantiguous.com/services\")\n String remitterIFSC,\n @WebParam(name = \"remitterName\", targetNamespace = \"http://www.quantiguous.com/services\")\n String remitterName,\n @WebParam(name = \"remitterAddress\", targetNamespace = \"http://www.quantiguous.com/services\")\n AddressType remitterAddress,\n @WebParam(name = \"remitterContact\", targetNamespace = \"http://www.quantiguous.com/services\")\n ContactType remitterContact,\n @WebParam(name = \"beneficiaryName\", targetNamespace = \"http://www.quantiguous.com/services\")\n String beneficiaryName,\n @WebParam(name = \"beneficiaryAddress\", targetNamespace = \"http://www.quantiguous.com/services\")\n AddressType beneficiaryAddress,\n @WebParam(name = \"beneficiaryContact\", targetNamespace = \"http://www.quantiguous.com/services\")\n ContactType beneficiaryContact,\n @WebParam(name = \"beneficiaryAccountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String beneficiaryAccountNo,\n @WebParam(name = \"beneficiaryIFSC\", targetNamespace = \"http://www.quantiguous.com/services\")\n String beneficiaryIFSC,\n @WebParam(name = \"transferType\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<TransferTypeType> transferType,\n @WebParam(name = \"transferCurrencyCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n CurrencyCodeType transferCurrencyCode,\n @WebParam(name = \"transferAmount\", targetNamespace = \"http://www.quantiguous.com/services\")\n BigDecimal transferAmount,\n @WebParam(name = \"remitterToBeneficiaryInfo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String remitterToBeneficiaryInfo,\n @WebParam(name = \"uniqueResponseNo\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<String> uniqueResponseNo,\n @WebParam(name = \"attemptNo\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigInteger> attemptNo,\n @WebParam(name = \"requestReferenceNo\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<String> requestReferenceNo,\n @WebParam(name = \"lowBalanceAlert\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<Boolean> lowBalanceAlert,\n @WebParam(name = \"transactionStatus\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransactionStatusType> transactionStatus);\n\n /**\n * \n * @param accountCurrencyCode\n * @param partnerCode\n * @param accountNo\n * @param accountBalanceAmount\n * @param customerID\n * @param version\n * @param lowBalanceAlert\n */\n @WebMethod(action = \"http://www.quantiguous.com/services/DomesticRemittanceByPartnerService/getBalance\")\n @RequestWrapper(localName = \"getBalance\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetBalance\")\n @ResponseWrapper(localName = \"getBalanceResponse\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetBalanceResponse\")\n public void getBalance(\n @WebParam(name = \"version\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<String> version,\n @WebParam(name = \"partnerCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n String partnerCode,\n @WebParam(name = \"customerID\", targetNamespace = \"http://www.quantiguous.com/services\")\n String customerID,\n @WebParam(name = \"accountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String accountNo,\n @WebParam(name = \"accountCurrencyCode\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<CurrencyCodeType> accountCurrencyCode,\n @WebParam(name = \"accountBalanceAmount\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigDecimal> accountBalanceAmount,\n @WebParam(name = \"lowBalanceAlert\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<Boolean> lowBalanceAlert);\n\n /**\n * \n * @param reqTransferType\n * @param partnerCode\n * @param transactionStatus\n * @param transferAmount\n * @param transferType\n * @param transactionDate\n * @param version\n * @param transferCurrencyCode\n * @param requestReferenceNo\n */\n @WebMethod(action = \"http://www.quantiguous.com/services/DomesticRemittanceByPartnerService/getRemittanceStatus\")\n @RequestWrapper(localName = \"getRemittanceStatus\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetRemittanceStatus\")\n @ResponseWrapper(localName = \"getRemittanceStatusResponse\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetRemittanceStatusResponse\")\n public void getRemittanceStatus(\n @WebParam(name = \"version\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<String> version,\n @WebParam(name = \"partnerCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n String partnerCode,\n @WebParam(name = \"requestReferenceNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String requestReferenceNo,\n @WebParam(name = \"transferType\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransferTypeType> transferType,\n @WebParam(name = \"reqTransferType\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransferTypeType> reqTransferType,\n @WebParam(name = \"transactionDate\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<XMLGregorianCalendar> transactionDate,\n @WebParam(name = \"transferAmount\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigDecimal> transferAmount,\n @WebParam(name = \"transferCurrencyCode\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<CurrencyCodeType> transferCurrencyCode,\n @WebParam(name = \"transactionStatus\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransactionStatusType> transactionStatus);\n\n /**\n * \n * @param numDebits\n * @param partnerCode\n * @param dateRange\n * @param accountNo\n * @param customerID\n * @param closingBalance\n * @param numTransactions\n * @param numCredits\n * @param version\n * @param openingBalance\n * @param transactionsArray\n */\n @WebMethod(action = \"http://www.quantiguous.com/services/DomesticRemittanceByPartnerService/getTransactions\")\n @RequestWrapper(localName = \"getTransactions\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetTransactions\")\n @ResponseWrapper(localName = \"getTransactionsResponse\", targetNamespace = \"http://www.quantiguous.com/services\", className = \"com.quantiguous.services.GetTransactionsResponse\")\n public void getTransactions(\n @WebParam(name = \"version\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.INOUT)\n Holder<String> version,\n @WebParam(name = \"partnerCode\", targetNamespace = \"http://www.quantiguous.com/services\")\n String partnerCode,\n @WebParam(name = \"customerID\", targetNamespace = \"http://www.quantiguous.com/services\")\n String customerID,\n @WebParam(name = \"accountNo\", targetNamespace = \"http://www.quantiguous.com/services\")\n String accountNo,\n @WebParam(name = \"dateRange\", targetNamespace = \"http://www.quantiguous.com/services\")\n DateRangeType dateRange,\n @WebParam(name = \"openingBalance\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigDecimal> openingBalance,\n @WebParam(name = \"numDebits\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigInteger> numDebits,\n @WebParam(name = \"numCredits\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigInteger> numCredits,\n @WebParam(name = \"closingBalance\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigDecimal> closingBalance,\n @WebParam(name = \"numTransactions\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<BigInteger> numTransactions,\n @WebParam(name = \"transactionsArray\", targetNamespace = \"http://www.quantiguous.com/services\", mode = WebParam.Mode.OUT)\n Holder<TransactionsArrayType> transactionsArray);\n\n}", "@RequestMapping(\"/create\")\r\n\t@Produces({ MediaType.TEXT_PLAIN })\r\n\tpublic String createOrder() {\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"in EO calling Validate REST API : \"+System.currentTimeMillis()); \r\n\t\t\tStopWatch watch = new StopWatch();\r\n\t\t\tHttpUriRequest request = new HttpGet(\"http://localhost:\" + \"\" + \"9091\" + \"/eo/validate\");\r\n\t\t\tHttpResponse httpResponse;\r\n\t\t\twatch.start();\r\n\t\t\thttpResponse = HttpClientBuilder.create().build().execute(request);\r\n\t\t\twatch.stop();\r\n\t\t\tresponse = EntityUtils.toString(httpResponse.getEntity());\r\n\t\t\tSystem.out.println(\">>>>>>>Response:\" + response + \" Response time(hh:mm:SS:mS): \" + watch.toString());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif (response.contains(\"Order Validated\"))\r\n\t\t\treturn \"Order Created!!\";\r\n\t\telse\r\n\t\t\tthrow new InternalServerErrorException();\r\n\t}", "TransactionResponseDTO authorizeTransaction(TransactionRequestDTO transactionRequestDTO);", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Test\n\tpublic void freezeRefundTest() throws Exception {\n AlipayClient alipayClient = new DefaultAlipayClient(\"https://openapi.alipay.com/gateway.do\", \"2017082108306436\",\n \"MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCtyKGAX+U7kfPcw2kS7Cku3d3kNOxjG37T1Ckt43tH/F41QQ/x0HuJs5QoeRkW1Y3UZ0AR2H/Oq4GkkI+tZnxFONx3Pkl/qhuNu/0fv3QEbAcFF7meKY6/9gbRs+ZwmMfazR6U1f4S6ML3+Ee/1NVYuiqKQF2uViXJ0keMS5pPZfQTM2SL+/TgH4YD5ha1iRFgOsLasjonV6PmSfrkpltcHlWdkN+CpSWOCGmDGvzcw6Z91PHVvmGGErFUV6ybJywXtGrf4VG5ijVQOA9FDFf4q0IyG5mlYrurMx09KysfqSkshAequLmU390md9tKWWTjZMgMVXwQz9GG8MAJg8FnAgMBAAECggEAcxNIxl45yDGEnuoS+QHC35LxLP1SjuoVGKYDwqxA5VEa/P6hVUntlCiC8i4GTBWLflwElAydzTfKeDN1wKf9oETf0GJBfzUgW8FhAxXe+FKkb13ffvkb2sdKirAq5uJ0bNGo73uoa9MPz+3rbP69a6yTIMswfZH0IemJkUA65VmRUw2rFuxmbrWuGgL7ZoUm7cIxXiX+TZGhf9+kp71icDoEtJiC8ZFdjapBZmcqsoXm0YGRmY8+tSt2rY3aDDIXEZTWwk4RA3NQ/pHrJ+h3yr+sWXdrIFLRLQm3Oy53zNrkt+eisHl62ACwG2qg2GeUZuHEYBaNpVz8Zp4flDyqAQKBgQDYDPLN3rGtrPGNJVFyYpwSGhhqLwy6PqaPU4pPup3XYY9UtkZIf4WiX+u/8KV2vLoArXhdp9tDztqatzidUHhDQbffYIANecbAsoOP/dnjJJmLOGQrGX7pV9YqExk91AGM+u3BJMTwMA1dgn/urf81LC5EtWbxfDmqPih3oE30ZwKBgQDN6uwSiQakyY0MP+P1L09iZVPWpGT6tie4ncLncCwlBL5X9qy8FMnyQ7Wcp77NEBDEDMb0kAq+gMOhc/8AOa/1PlQ53DC6QAhsn59tb0DyNf2Cj9GPni7iPHUy/IsKOPHgH0Y754Po6NPXyf0+Xvz1lwDWF4qSdkYLzBRroEOrAQKBgENt1yHVjRKtVT4+FWtjx14G8vPA93HxN76nzhUQI08jTb6cnNbnpeeFlGh1TM8AG/U2LsjcKJzDJIsBABRpFv+2tRJsZcrO5O8jR9ha2/P+akV/NhQVgvyEw3yiNVCMqGc9sZKETUrBVIqIvjDZ8TrBLTeYfiaEJOMzPyIG0A2lAoGAC4pkCrHlTm0BW7Nk+kPZhiE5rqjuA+MbnMwytTfjMXvvkwx/J9debhZ/YjVAi0ugNOymZeSAxaZ/0Feo7gFNrEf+/nMpw/Z8wmG71K1MjYabG6slyo/J/uH2i5H91OfWHoKCNC9IhFAwN0LZz5oRQU5iPJ17JbQ9PsIETvffcwECgYAEZ7H5gw+zzgYQUSRexgPCc5lscJGL/kQ3KGx4nwAl8WsvF77nfccd+BpQRqrLaRzAgyATEPuEoclKtdFIWVRzZtIxi3wh21M/te6NMfd59u1duRAWSdF4D0fAt4Q+u/Es9SK0h9Bi5fj1+hwnbMO0+Bv7Fx7gvS2eylYgjZLFsw==\",\n \"json\", \"GBK\",\n \"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDI6d306Q8fIfCOaTXyiUeJHkrIvYISRcc73s3vF1ZT7XN8RNPwJxo8pWaJMmvyTn9N4HQ632qJBVHf8sxHi/fEsraprwCtzvzQETrNRwVxLO5jVmRGi60j8Ue1efIlzPXV9je9mkjzOmdssymZkh2QhUrCmZYI/FCEa3/cNMW0QIDAQAB\",\n \"RSA\");\n\n //[email protected]\n// AlipayClient alipayClient = new DefaultAlipayClient(\"https://openapi.alipay.com/gateway.do\", \"2017082108306200\",\n// \"MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCtyKGAX+U7kfPcw2kS7Cku3d3kNOxjG37T1Ckt43tH/F41QQ/x0HuJs5QoeRkW1Y3UZ0AR2H/Oq4GkkI+tZnxFONx3Pkl/qhuNu/0fv3QEbAcFF7meKY6/9gbRs+ZwmMfazR6U1f4S6ML3+Ee/1NVYuiqKQF2uViXJ0keMS5pPZfQTM2SL+/TgH4YD5ha1iRFgOsLasjonV6PmSfrkpltcHlWdkN+CpSWOCGmDGvzcw6Z91PHVvmGGErFUV6ybJywXtGrf4VG5ijVQOA9FDFf4q0IyG5mlYrurMx09KysfqSkshAequLmU390md9tKWWTjZMgMVXwQz9GG8MAJg8FnAgMBAAECggEAcxNIxl45yDGEnuoS+QHC35LxLP1SjuoVGKYDwqxA5VEa/P6hVUntlCiC8i4GTBWLflwElAydzTfKeDN1wKf9oETf0GJBfzUgW8FhAxXe+FKkb13ffvkb2sdKirAq5uJ0bNGo73uoa9MPz+3rbP69a6yTIMswfZH0IemJkUA65VmRUw2rFuxmbrWuGgL7ZoUm7cIxXiX+TZGhf9+kp71icDoEtJiC8ZFdjapBZmcqsoXm0YGRmY8+tSt2rY3aDDIXEZTWwk4RA3NQ/pHrJ+h3yr+sWXdrIFLRLQm3Oy53zNrkt+eisHl62ACwG2qg2GeUZuHEYBaNpVz8Zp4flDyqAQKBgQDYDPLN3rGtrPGNJVFyYpwSGhhqLwy6PqaPU4pPup3XYY9UtkZIf4WiX+u/8KV2vLoArXhdp9tDztqatzidUHhDQbffYIANecbAsoOP/dnjJJmLOGQrGX7pV9YqExk91AGM+u3BJMTwMA1dgn/urf81LC5EtWbxfDmqPih3oE30ZwKBgQDN6uwSiQakyY0MP+P1L09iZVPWpGT6tie4ncLncCwlBL5X9qy8FMnyQ7Wcp77NEBDEDMb0kAq+gMOhc/8AOa/1PlQ53DC6QAhsn59tb0DyNf2Cj9GPni7iPHUy/IsKOPHgH0Y754Po6NPXyf0+Xvz1lwDWF4qSdkYLzBRroEOrAQKBgENt1yHVjRKtVT4+FWtjx14G8vPA93HxN76nzhUQI08jTb6cnNbnpeeFlGh1TM8AG/U2LsjcKJzDJIsBABRpFv+2tRJsZcrO5O8jR9ha2/P+akV/NhQVgvyEw3yiNVCMqGc9sZKETUrBVIqIvjDZ8TrBLTeYfiaEJOMzPyIG0A2lAoGAC4pkCrHlTm0BW7Nk+kPZhiE5rqjuA+MbnMwytTfjMXvvkwx/J9debhZ/YjVAi0ugNOymZeSAxaZ/0Feo7gFNrEf+/nMpw/Z8wmG71K1MjYabG6slyo/J/uH2i5H91OfWHoKCNC9IhFAwN0LZz5oRQU5iPJ17JbQ9PsIETvffcwECgYAEZ7H5gw+zzgYQUSRexgPCc5lscJGL/kQ3KGx4nwAl8WsvF77nfccd+BpQRqrLaRzAgyATEPuEoclKtdFIWVRzZtIxi3wh21M/te6NMfd59u1duRAWSdF4D0fAt4Q+u/Es9SK0h9Bi5fj1+hwnbMO0+Bv7Fx7gvS2eylYgjZLFsw==\",\n// \"json\", \"GBK\",\n// \"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDI6d306Q8fIfCOaTXyiUeJHkrIvYISRcc73s3vF1ZT7XN8RNPwJxo8pWaJMmvyTn9N4HQ632qJBVHf8sxHi/fEsraprwCtzvzQETrNRwVxLO5jVmRGi60j8Ue1efIlzPXV9je9mkjzOmdssymZkh2QhUrCmZYI/FCEa3/cNMW0QIDAQAB\",\n// \"RSA\");\n// 133290965116141568\t2018032302432256\t853.33\n//// 133870511490088960\t2018032302432256\t853.33\n//// 134281662728257536\t2018032302432256\t1493.33\n//// 134627684222521344\t2018032302432256\t853.33\n\t\tAlipayTradeRefundRequest request = new AlipayTradeRefundRequest();\n\t\trequest.setBizContent(\"{\" +\n\t\t\t\t\" \\\"refund_reason\\\":\\\"正常退款\\\",\" +\n\t\t\t\t\" \\\"trade_no\\\":\\\"2019010322001494210558889685\\\",\" +\n\t\t\t\t\" \\\"refund_amount\\\":\\\"1\\\"\" +\n\t\t\t\t\"}\");\n\t\tAlipayTradeRefundResponse response = alipayClient.execute(request);\n\t\tSystem.out.println(JSON.toJSONString(response));\n\t\tif (response.isSuccess()) {\n\n\t\t\tSystem.out.println(\"调用成功\");\n\t\t} else {\n\t\t\tSystem.out.println(\"调用失败\");\n\t\t}\n\t}", "public interface FairRepairService {\n String ENDPOINT = \"http://fairrepair.onsisdev.info/providerapi/\";\n\n @POST(\"signup\")\n @Multipart\n Call<SignInResponse> signUp(@PartMap Map<String, RequestBody> requestMap);\n\n @POST(\"login\")\n @FormUrlEncoded\n Call<SignInResponse> login(@FieldMap Map<String, String> params);\n\n @POST(\"forgotpassword\")\n @FormUrlEncoded\n Call<SignInResponse> forgotPassword(@FieldMap Map<String, String> params);\n\n @POST(\"logout\")\n @FormUrlEncoded\n Call<SignInResponse> logout(@FieldMap Map<String, String> params);\n\n @POST(\"getprofile\")\n @FormUrlEncoded\n Call<SignInResponse> getProfile(@FieldMap Map<String, String> params);\n\n @POST(\"editprofile\")\n @Multipart\n Call<SignInResponse> editProfile(@PartMap Map<String, RequestBody> params);\n\n @POST(\"changepassword\")\n @FormUrlEncoded\n Call<SignInResponse> resetPassword(@FieldMap Map<String, String> params);\n\n @POST(\"staticpages\")\n @FormUrlEncoded\n Call<SignInResponse> getStaticPages(@FieldMap Map<String, String> params);\n\n @POST(\"getservicetype\")\n @FormUrlEncoded\n Call<SignInResponse> getServiceType(@FieldMap Map<String, String> params);\n\n @POST(\"changeAvailability\")\n @FormUrlEncoded\n Call<SignInResponse> changeAvailability(@FieldMap Map<String, String> params);\n\n @POST(\"requestaccept\")\n @FormUrlEncoded\n Call<SignInResponse> acceptRequest(@FieldMap Map<String, String> requestMap);\n\n @POST(\"cancelrequest\")\n @FormUrlEncoded\n Call<SignInResponse> cancelRequest(@FieldMap Map<String, String> requestMap);\n\n @POST(\"billing\")\n @FormUrlEncoded\n Call<SignInResponse> generateBill(@FieldMap Map<String, String> requestMap);\n\n @POST(\"completerequest\")\n @FormUrlEncoded\n Call<SignInResponse> completeRequest(@FieldMap Map<String, String> requestMap);\n\n @POST(\"updatelatlong\")\n @FormUrlEncoded\n Call<SignInResponse> updateLatLng(@FieldMap Map<String, String> requestMap);\n\n @POST(\"arraived\")\n @FormUrlEncoded\n Call<SignInResponse> arrived(@FieldMap Map<String, String> requestMap);\n\n /********\n * Factory class that sets up a new ribot services\n *******/\n class Factory {\n\n public static FairRepairService makeFairRepairService(Context context) {\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n OkHttpClient okHttpClient = new OkHttpClient.Builder()\n .connectTimeout(2, TimeUnit.MINUTES)\n .readTimeout(2, TimeUnit.MINUTES)\n .addInterceptor(new UnauthorisedInterceptor(context))\n .addInterceptor(logging)\n .build();\n\n Gson gson = new GsonBuilder()\n .setDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\")\n .create();\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(FairRepairService.ENDPOINT)\n .client(okHttpClient)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n return retrofit.create(FairRepairService.class);\n }\n }\n}", "public interface EmailAccountService {\n\n RestfulResponse<PageDatas> listAccount(Integer pageNo, Integer pageSize, String search, String sortBy, Boolean isAscending);\n\n RestfulResponse<Long> addAccount(EmailHostAccountDto emailHostAccountDto);\n\n RestfulResponse<Long> updateAccount(EmailHostAccountDto emailHostAccountDto);\n\n RestfulResponse<Long> deleteAccount(Long id);\n\n EmailAccount getEmailAccount(String hostCode, Long hostSizeLimit);\n\n}", "@Test\n public void testSuccessTransferFundDifferentCcy() throws IOException, URISyntaxException {\n URI uri = builder.setPath(\"/transfers\").build();\n BigDecimal amount = new BigDecimal(100).setScale(4, RoundingMode.HALF_EVEN);\n\n HttpPost request = new HttpPost(uri);\n request.setHeader(\"Content-type\", \"application/json\");\n request.setEntity(new StringEntity(mapper.writeValueAsString(new MoneyTransfer(amount, 1L, 2L))));\n HttpResponse response = client.execute(request);\n\n assertTrue(response.getStatusLine().getStatusCode() == 200);\n }", "@Test\n public void testSuccessWithDrawSufficientFund() throws IOException, URISyntaxException {\n URI uri = builder.setPath(\"/accounts/1/withdraw/10\").build();\n\n HttpPut request = new HttpPut(uri);\n request.setHeader(\"Content-type\", \"application/json\");\n HttpResponse response = client.execute(request);\n int statusCode = response.getStatusLine().getStatusCode();\n assertTrue(statusCode == 200);\n\n assertTrue(mapper.readValue(EntityUtils.toString(response.getEntity()), AccountDetails.class).getAccountBalance()\n .equals(new BigDecimal(100).setScale(4, RoundingMode.HALF_EVEN)));\n\n }", "public interface WithHoldOrderContract {\r\n\r\n ResponseData resendWithholdOrder();\r\n \r\n}", "private Transaction callPaymentServiceApi(Transaction paymentDetails) {\n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n HttpEntity<Transaction> entity = new HttpEntity<Transaction>(paymentDetails,headers);\n\n return restTemplate.exchange(\n \"http://localhost:8083/transaction\", HttpMethod.POST, entity, Transaction.class).getBody();\n }", "public void calculatePayment() {}", "@Transactional\r\n\tpublic void addFundRequest(final FundRequestDto fundRequestDto) throws ServiceException {\r\n\r\n\t\ttry {\r\n\t\t\tFundRequest fundRequest = new FundRequest();\r\n\r\n\t\t\tfundRequest.setCategoryId(fundRequestDto.getCategoryId());\r\n\t\t\tfundRequest.setRequestedBy(fundRequestDto.getRequestedBy());\r\n\t\t\tfundRequest.setFundNeeded(fundRequestDto.getFundNeeded());\r\n\t\t\tfundRequest.setDescription(fundRequestDto.getDescription());\r\n\t\t\tfundRequest.setTitle(fundRequestDto.getTitle());\r\n\r\n\t\t\tFundRequest fundResp = fundRequestRepo.findById(fundRequestDto.getCategoryId());\r\n\t\t\tif (fundResp == null) {\r\n\t\t\t\tfundRequestValidation.fundRequestValidator(fundRequest);\r\n\r\n\t\t\t\tfundRequest.setActive(true);\r\n\t\t\t\tfundRequest.setCreatedDate(LocalDateTime.now());\r\n\t\t\t\tfundRequest.setModifiedDate(LocalDateTime.now());\r\n\r\n\t\t\t\tfundRequestRepo.save(fundRequest);\r\n\t\t\t\t// Mail service\r\n\t\t\t\tMailDto mailDTO = new MailDto();\r\n\t\t\t\tUserDTO user = userService.getUser(fundRequestDto.getRequestedBy());\r\n\t\t\t\tif (user != null) {\r\n\t\t\t\t\tmailDTO.setName(user.getName());\r\n\t\t\t\t\tmailDTO.setEmailId(user.getEmail());\r\n\t\t\t\t}\r\n\t\t\t\tmailDTO.setTitle(fundRequestDto.getTitle());\r\n\t\t\t\tmailDTO.setDescription(fundRequestDto.getDescription());\r\n\t\t\t\tmailDTO.setAmount(fundRequestDto.getFundNeeded());\r\n\t\t\t\t// Category service\r\n\t\t\t\tCategoryDTO categoryDTO = categoryService.getFund(fundRequest.getCategoryId());\r\n\t\t\t\tif (categoryDTO != null) {\r\n\t\t\t\t\tfundRequestDto.setCategoryName(categoryDTO.getCategoryName());\r\n\t\t\t\t}\r\n\t\t\t\tmailDTO.setCategoryName(fundRequestDto.getCategoryName());\r\n\t\t\t\tmailService.sendMail(mailDTO);\r\n\r\n\t\t\t\tRequestorTransaction requestorTransaction = new RequestorTransaction();\r\n\t\t\t\trequestorTransaction.setStatus(\"Verified\");\r\n\t\t\t\trequestorTransaction.setActive(true);\r\n\t\t\t\trequestorTransaction.setCreatedDate(LocalDateTime.now());\r\n\t\t\t\trequestorTransaction.setModifiedDate(LocalDateTime.now());\r\n\t\t\t\trequestorTransaction.setCategoryId(fundRequest.getCategoryId());\r\n\t\t\t\trequestorTransaction.setFundNeeded(fundRequest.getFundNeeded());\r\n\t\t\t\trequestorTransaction.setRequestedBy(fundRequest.getRequestedBy());\r\n\t\t\t\trequestorTransactionRepo.save(requestorTransaction);\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\r\n\t\t\t\tthrow new ServiceException(MessageConstant.FUND_REQUEST_ADDITION);\r\n\r\n\t\t\t}\r\n\t\t} catch (ValidatorException e) {\r\n\t\t\tthrow new ServiceException(e.getMessage());\r\n\r\n\t\t}\r\n\r\n\t}", "@WebService(targetNamespace = \"http://webservice.grtwf.uaf.com/\", name = \"ApprovalWebService\")\n@XmlSeeAlso({ObjectFactory.class})\npublic interface ApprovalWebService {\n\n @RequestWrapper(localName = \"claimTask\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.ClaimTask\")\n @WebMethod\n @ResponseWrapper(localName = \"claimTaskResponse\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.ClaimTaskResponse\")\n public void claimTask(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n java.lang.String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n java.lang.String arg1\n ) throws Exception_Exception;\n\n @WebResult(name = \"return\", targetNamespace = \"\")\n @RequestWrapper(localName = \"getVariables\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.GetVariables\")\n @WebMethod\n @ResponseWrapper(localName = \"getVariablesResponse\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.GetVariablesResponse\")\n public com.uaf.grtwf.webservice.MapEntityArray getVariables(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n java.lang.String arg0\n ) throws Exception_Exception;\n\n @RequestWrapper(localName = \"completeTask\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.CompleteTask\")\n @WebMethod\n @ResponseWrapper(localName = \"completeTaskResponse\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.CompleteTaskResponse\")\n public void completeTask(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n java.lang.String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n java.lang.String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n com.uaf.grtwf.webservice.MapEntityArray arg2\n ) throws Exception_Exception;\n\n @WebResult(name = \"return\", targetNamespace = \"\")\n @RequestWrapper(localName = \"startProcess\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.StartProcess\")\n @WebMethod\n @ResponseWrapper(localName = \"startProcessResponse\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.StartProcessResponse\")\n public java.lang.String startProcess(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n java.lang.String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n java.lang.String arg1,\n @WebParam(name = \"arg2\", targetNamespace = \"\")\n com.uaf.grtwf.webservice.MapEntityArray arg2\n ) throws Exception_Exception;\n\n @WebResult(name = \"return\", targetNamespace = \"\")\n @RequestWrapper(localName = \"findTodoTasks\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.FindTodoTasks\")\n @WebMethod\n @ResponseWrapper(localName = \"findTodoTasksResponse\", targetNamespace = \"http://webservice.grtwf.uaf.com/\", className = \"com.uaf.grtwf.webservice.FindTodoTasksResponse\")\n public java.util.List<com.uaf.grtwf.webservice.TaskDto> findTodoTasks(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n java.lang.String arg0,\n @WebParam(name = \"arg1\", targetNamespace = \"\")\n java.lang.String arg1\n ) throws Exception_Exception;\n}", "@Override\r\n public void dispenseProduct() {\r\n System.out.println(\"Insufficient funds!\");\r\n\r\n }", "boolean isConfirmed();", "void confirmRealWorldTrade(IUserAccount user, ITransaction trans);", "public IBankTransfert payment();", "@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }", "@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "public FeeRefund create(Map<String, Object> params, RequestOptions options)\n throws StripeException {\n return ApiResource.request(ApiResource.RequestMethod.POST, String.format(\"%s%s\",\n Stripe.getApiBase(), this.getUrl()), params, FeeRefund.class, options);\n }", "@FXML\n void depositFunds(ActionEvent event) {\n \ttry {\n \t\t\n \t\tProfile person = new Profile(fName_DepWith.getText(), lName_DepWith.getText());\n \t\tdouble inpBalance = Double.parseDouble(amount.getText());\n \t\tboolean deposited = false;\n \t\t\n \tif(inpBalance < 0) {\n \t\tthrow new IllegalArgumentException(\"No negative numbers, please enter a valid balance.\\n\");\n \t}\n \t\t\n \t\tString accType = ((RadioButton) tgDepositWithdraw.getSelectedToggle()).getText();\n \t\t\n \t\t//deposits funds in specified account by according to account type\n \t\tswitch(accType) {\n \t\tcase \"Checking\":\n \t\t\tAccount currCheckingAcc = new Checking(person);\n \t\t\tdeposited = db.deposit(currCheckingAcc, inpBalance);\n \t\t\tbreak;\n \t\tcase \"Savings\":\n \t\t\tAccount currSavingsAcc = new Savings(person);\n \t\t\tdeposited = db.deposit(currSavingsAcc, inpBalance);\n \t\t\tbreak;\n \t\tcase \"Money Market\":\n \t\t\tAccount currMoneyMarketAcc = new MoneyMarket(person);\n \t\t\tdeposited = db.deposit(currMoneyMarketAcc, inpBalance);\n \t\t\tbreak;\n \t\t}\n \t\t\n \t\t\n \t\tif (deposited) {\n \t\t\tmessageArea.appendText(String.format(\"%.2f\", inpBalance) + \" deposited to account.\\n\");\n \t\t}\n \t\telse {\n \t\t\tmessageArea.appendText(\"Account does not exist.\\n\");\n \t\t}\n \t\t\n \t\t\n \t}\n \tcatch(NumberFormatException e) {\n \t\tmessageArea.appendText(\"Number format exception, enter a valid amount to deposit.\\n\");\n \t}\n \tcatch(NullPointerException e) {\n \t\tmessageArea.appendText(\"Select a valid account type to deposit into.\\n\");\n \t}\n \tcatch (IllegalArgumentException e) {\n \t\tmessageArea.appendText(\"No negative numbers, please enter a valid balance.\\n\");\n \t}\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString action = request.getParameter(\"action\");\n\t\t/*\n\t\t * add Account method to add account as saving or current\n\t\t * \n\t\t */\n\n\t\tif (action.equalsIgnoreCase(\"submit2\")) {\n\t\t\tint CustomerId = Integer.parseInt(request.getParameter(\"cid\"));\n\t\t\tString AccountType = request.getParameter(\"at\");\n\t\n\t\t\tdouble DepositAmount = Double.parseDouble(request.getParameter(\"damount\"));\n\t\t\tAccount acc = new Account();\n\t\t\tacc.setCustomerId(CustomerId);\n\t\t\tacc.setAccountType(AccountType);\n\t\t\tacc.setDepositAmount(DepositAmount);\n\t\t\tlog.info(\"Adding account for Customer Id: \" + CustomerId);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tboolean b = service.createAccount(acc);\n\t\t\t\tif (b) {\n\t\t\t\t\tlog.info(\"Account of\" + CustomerId+\"Added To DataBase\");\n\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/AddAccountSuccessPage.jsp\");\n\t\t\t\t\trs.forward(request, response);\n\t\t\t\t} else {\n\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/AddAccountErrorPage.jsp\");\n\t\t\t\t\trs.forward(request, response);\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.error(e);\n\t\t\t\trequest.getRequestDispatcher(\"jsp/AccountIdDoesNotExistsPage.jsp\").forward(request, response);\n\t\t\t}\n\n\t\t}\n\n\t\telse if (action.equalsIgnoreCase(\"transferComplete\")) {\n\t\t\tboolean b;\n\t\t\tboolean c;\n\t\t\tboolean a;\n\t\t\tboolean d;\n\t\t\tdouble tamount = Double.parseDouble(request.getParameter(\"tamount\"));\n\n\t\t\tint SourceAccountID = Integer.parseInt(request.getParameter(\"SourceAccountID\"));\n\n\t\t\tint TargetAccountID = Integer.parseInt(request.getParameter(\"TargetAccountID\"));\n\t\t\tdouble SourceLatestBalance = Double.parseDouble(request.getParameter(\"SourceLatestBalance\"));\n\t\t\tdouble TargetLatestBalance = Double.parseDouble(request.getParameter(\"TargetLatestBalance\"));\n\t\t\tService ser = FactoryService.getService();\n\t\t\tif (SourceLatestBalance > 0) {\n\t\t\t\tlog.info(\"Transfer of amount is Successfull\");\n\t\t\t\ttry {\n\t\t\t\t\tb = ser.updatebalance(SourceLatestBalance, SourceAccountID);\n\t\t\t\t\ta = ser.updatebalance(TargetLatestBalance, TargetAccountID);\n\t\t\t\t\tc = ser.updatetransaction(SourceAccountID, tamount);\n\t\t\t\t\td = ser.updatetranscationtarget(TargetAccountID, tamount);\n\n\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/CashierTransferSuccess.jsp\");\n\t\t\t\t\trs.forward(request, response);\n\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tlog.error(e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/CashierTransferError.jsp\");\n\t\t\t\trs.forward(request, response);\n\t\t\t}\n\n\t\t} else if (action.equalsIgnoreCase(\"transeferamount\")) {\n\t\t\tdouble tamount = Double.parseDouble(request.getParameter(\"TransferAmount\"));\n\t\t\tint srcaccountid = Integer.parseInt(request.getParameter(\"SourceAccountID\"));\n\t\t\tint trgaccountid = Integer.parseInt(request.getParameter(\"TargetAccountID\"));\n\t\t\tlog.info(\"Transferring amount from \"+srcaccountid+\" to \"+trgaccountid);\n\t\t\tif (srcaccountid != trgaccountid) {\n\t\t\t\tService ser = FactoryService.getService();\n\t\t\t\ttry {\n\t\t\t\t\tboolean b = ser.check(srcaccountid, trgaccountid);\n\t\t\t\t\tif (b) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tAccount sourceacc = ser.informationsource(srcaccountid);\n\t\t\t\t\t\tAccount targetacc = ser.informationsource(trgaccountid);\n\t\t\t\t\t\tdouble sourcebal = ser.sourcebalance(tamount, srcaccountid);\n\t\t\t\t\t\tdouble targetbal = ser.targetbalance(tamount, trgaccountid);\n\t\t\t\t\t\tString sourcename = ser.sourcename(srcaccountid);\n\t\t\t\t\t\tString targetname = ser.sourcename(trgaccountid);\n\t\t\t\t\t\trequest.setAttribute(\"sourcename\", sourcename);\n\t\t\t\t\t\trequest.setAttribute(\"tamount\", tamount);\n\t\t\t\t\t\trequest.setAttribute(\"targetname\", targetname);\n\t\t\t\t\t\trequest.setAttribute(\"sourceacc\", sourceacc);\n\t\t\t\t\t\trequest.setAttribute(\"targetacc\", targetacc);\n\t\t\t\t\t\trequest.setAttribute(\"sourcebal\", sourcebal);\n\t\t\t\t\t\trequest.setAttribute(\"targetbal\", targetbal);\n\t\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/CashierTransferOutput.jsp\");\n\t\t\t\t\t\trs.forward(request, response);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tRequestDispatcher rs = request.getRequestDispatcher(\"jsp/SrcTrgAccountIdNotExists.jsp\");\n\t\t\t\t\t\trs.forward(request, response);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tlog.error(e);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"sameId\", \"SourceId and TargetId Cant Be same\");\n\t\t\t\trequest.getRequestDispatcher(\"jsp/CashierTransferInput.jsp\").forward(request, response);\n\t\t\t}\n\t\t}\n\t}", "private void returnDeposit(String paymentInfo) {\n }", "@Test\n void getAccountBalance() throws JsonProcessingException {\n\n String idAccount = \"14537780\";\n\n Response response = greetingWebClient.getAccountBalance(idAccount);\n assertTrue(response.getPayload().getList().size()>0 && response.getStatus().equals(\"OK\"));\n\n }", "@DELETE\n\t\t@Path(\"/\")\n\t\t@Consumes(MediaType.APPLICATION_XML)\n\t\t@Produces(MediaType.TEXT_PLAIN)\n\t\tpublic String deleteFund(String FundData)\n\t\t{\n\t\t Document doc = Jsoup.parse(FundData, \"\", Parser.xmlParser());\n\n\t\t//Read the value from the element <ProductID>\n\t\t String fund_id = doc.select(\"fund_id\").text();\n\t\t String output = Obj.deleteFund(fund_id);\n\t\treturn output;\n\t\t}", "public static void main(String[] args) {\n FundsTransfer transfer = new FundsTransfer(clientId, clientSecret, Interswitch.ENV_DEV);\n\n try {\n\n BankResponse response = transfer.fetchBanks(); // makes network call\n\n Bank[] bank = response.getBanks(); // a bank array of all banks\n\n if (bank instanceof Object) {\n\n // successful\n Bank testBank = bank[0]; // bank at index 0\n\n String cbnCode = testBank.getCbnCode(); // Central bank code\n String bankName = testBank.getBankName(); // bank name: \n String bankCode = testBank.getBankCode(); // bankcode in alphabetical form: UBA, GTB, FBN\n\n } else {\n\n // error occured\n }\n\n } catch (\n\n Exception ex) {\n // request was not completed\n }\n }", "@Test\n public void makeAndRetrievePbaPaymentsByProbate() {\n String accountNumber = testProps.existingAccountNumber;\n CreditAccountPaymentRequest accountPaymentRequest = PaymentFixture.aPbaPaymentRequestForProbate(\"90.00\",\n \"PROBATE\",accountNumber);\n accountPaymentRequest.setAccountNumber(accountNumber);\n PaymentDto paymentDto = paymentTestService.postPbaPayment(USER_TOKEN, SERVICE_TOKEN, accountPaymentRequest).then()\n .statusCode(CREATED.value()).body(\"status\", equalTo(\"Success\")).extract().as(PaymentDto.class);\n\n assertTrue(paymentDto.getReference().startsWith(\"RC-\"));\n\n // Get pba payment by reference\n PaymentDto paymentsResponse =\n paymentTestService.getPbaPayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then()\n .statusCode(OK.value()).extract().as(PaymentDto.class);\n\n assertThat(paymentsResponse.getAccountNumber()).isEqualTo(accountNumber);\n\n // delete payment record\n paymentTestService.deletePayment(USER_TOKEN, SERVICE_TOKEN, paymentDto.getReference()).then().statusCode(NO_CONTENT.value());\n\n }", "public String showReceipt(Account account);", "public interface AccountService {\n void deposit(Account account, double amount);\n\n void withdraw(Account account, double amount) throws NotEnoughFundsException;\n\n void transfer(Account fromAccount, Account toAccount, double amount) throws NotEnoughFundsException;\n\n\n}", "@PostMapping(\"/clients/current/newfactura\")\n private ResponseEntity<?> newFactura(Authentication authentication, String[] nameArticle, Integer[] cantArticle\n , String[] nameEvent, Integer[] cantEvent\n ) {\n\n Client client = clientService.findClientByEmail(authentication.getName());\n\n if (client == null) {\n return new ResponseEntity<>(\"Client not recognized\", HttpStatus.FORBIDDEN);\n }\n if (authentication == null) {\n return new ResponseEntity<>(\"Client not authenticated\", HttpStatus.FORBIDDEN);\n }\n\n Factura factura = facturaRepository.save(new Factura(LocalDate.now(), client));\n\n\n if (!(nameArticle == null) && !(cantArticle == null)) {\n\n for (int i = 0; i < cantArticle.length; i++) {\n\n Merch product = merchRepository.findByName(nameArticle[i]);\n\n if (product == null) {\n return new ResponseEntity<>(\"Product not find\", HttpStatus.FORBIDDEN);\n }\n if (product.getStock() < cantArticle[i]) {\n return new ResponseEntity<>(\"Stock not available\", HttpStatus.FORBIDDEN);\n }\n\n merchFacturaRepository.save(new MerchFactura(factura, product, cantArticle[i]));\n\n product.setStock(product.getStock() - cantArticle[i]);\n\n merchRepository.save(product);\n }\n }\n\n if (cantEvent[0] != null) {\n\n TicketFactura ticketFactura = ticketFacturaRepository.save(new TicketFactura(factura));\n\n\n for (int i = 0; i < cantEvent.length; i++) {\n Event eventToFacturar = eventRepository.findBynameEvent(nameEvent[i]);\n\n for (int j = 0; j < cantEvent[i]; j++) {\n\n if (eventToFacturar.getRemainingQuantity() < 1) {\n return new ResponseEntity<>(\"Stock not available\", HttpStatus.FORBIDDEN);\n }\n\n if (!(eventToFacturar == null)) {\n\n ticketEntryRepository.save(new TicketEntry(eventToFacturar, ticketFactura));\n }\n\n eventToFacturar.setRemainingQuantity(eventToFacturar.getRemainingQuantity() - 1);\n\n eventRepository.save(eventToFacturar);\n\n }\n }// FIN FOR\n\n }\n return new ResponseEntity<>(factura.getId(), HttpStatus.OK);\n }", "@PUT\n\t\t@Path(\"/\")\n\t\t@Consumes(MediaType.APPLICATION_JSON)\n\t\t@Produces(MediaType.TEXT_PLAIN)\n\t\tpublic String updateFund(String FundData)\n\t\t{\n\t\t JsonObject Object = new JsonParser().parse(FundData).getAsJsonObject();\n\t\t//Read the values from the JSON object\n\t\t String fund_id = Object.get(\"fund_id\").getAsString();\n\t\t String name = Object.get(\"name\").getAsString();\n\t\t String address = Object.get(\"address\").getAsString();\n\t\t String phone = Object.get(\"phone\").getAsString();\n\t\t String e_mail = Object.get(\"e_mail\").getAsString();\n\t\t String description = Object.get(\"description\").getAsString();\n\t\t String output = Obj.updateFund(fund_id, name, address, phone, e_mail, description);\n\t\t\n\t\t return output;\n\t\t}", "@PostMapping(value = \"/withdraw\")\n public ResponseEntity<ResponseWrapper> withdraw(@RequestBody AccountWrapper accountWrapper) {\n ResponseWrapper wrapper =new ResponseWrapper();\n UserAccount userAccount = userAccountRepository.findByAccountNumber(accountWrapper.getAccountNumber());\n if(Objects.isNull(userAccount)){\n wrapper.setMessage(\"Account With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n if (userAccount.getAmount() < accountWrapper.getAmount()) {\n wrapper.setMessage(\"Insufficent funds in your account \");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n Float amount = userAccount.getAmount() - Math.abs(accountWrapper.getAmount());\n userAccount.setAmount(amount);\n\n accountTransactionService.saveTransaction(new AccountTransaction(WITHDRAW,accountWrapper.getAccountNumber(),\"Withdrawing Money\",accountWrapper.getAmount(),userAccount.getUserID()));\n wrapper.setMessage(\"Withdraw amount successfully:\" + accountWrapper.getAmount());\n wrapper.setData(userAccountRepository.save(userAccount));\n\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }", "@POST\n @Path(\"account/transactions/transfer\")\n @Consumes(MediaType.APPLICATION_JSON)\n public void accountTransfer(String transfer){\n \n System.out.println(transfer);\n \n }", "@Test\n public void testLoanRefundByCashCashBasedAccounting() {\n\n Calendar fourMonthsfromNowCalendar = Calendar.getInstance(Utils.getTimeZoneOfTenant());\n fourMonthsfromNowCalendar.add(Calendar.MONTH, -4);\n\n // FINERACT-885: If the loan starts on day 27-31th of month and not all months have that\n // many days, then loan payment will get reset to a day of month less than today's day\n // and 4th payment will be in the past. In such case, start the loan a few days later,\n // so that 4th payment is guaranteed to be in the future.\n if (fourMonthsfromNowCalendar.get(Calendar.DAY_OF_MONTH) > 27) {\n fourMonthsfromNowCalendar.add(Calendar.DAY_OF_MONTH, 4);\n }\n\n String fourMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n\n /***\n * Create loan product with Default STYLE strategy\n */\n\n final Account assetAccount = ACCOUNT_HELPER.createAssetAccount();\n final Account incomeAccount = ACCOUNT_HELPER.createIncomeAccount();\n final Account expenseAccount = ACCOUNT_HELPER.createExpenseAccount();\n final Account overpaymentAccount = ACCOUNT_HELPER.createLiabilityAccount();\n\n final Integer loanProductID = createLoanProduct(\"0\", \"0\", LoanProductTestBuilder.DEFAULT_STRATEGY, CASH_BASED, assetAccount,\n incomeAccount, expenseAccount, overpaymentAccount);\n Assertions.assertNotNull(loanProductID);\n\n /***\n * Apply for loan application and verify loan status\n */\n final String savingsId = null;\n final String principal = \"12,000.00\";\n\n // Add charges with payment mode regular\n List<HashMap> charges = new ArrayList<>();\n\n Integer flatInstallmentFee = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"50\", false));\n addCharges(charges, flatInstallmentFee, \"50\", null);\n\n List<HashMap> collaterals = new ArrayList<>();\n\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, savingsId,\n principal, LoanApplicationTestBuilder.DEFAULT_STRATEGY, -4, collaterals);\n Assertions.assertNotNull(loanID);\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n LOG.info(\"-----------------------------------APPROVE LOAN-----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(fourMonthsfromNow, loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"-------------------------------DISBURSE LOAN-------------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(fourMonthsfromNow, loanID,\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n final JournalEntry[] assetAccountInitialEntry = {\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.DEBIT) };\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, fourMonthsfromNow, assetAccountInitialEntry);\n\n ArrayList<HashMap> loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"2290\", String.valueOf(firstInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #1\n\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String threeMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(threeMonthsfromNow, Float.parseFloat(\"2290\"), loanID);\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"0.00\", String.valueOf(firstInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #2\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String twoMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(twoMonthsfromNow, Float.parseFloat(\"2290\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, twoMonthsfromNow,\n new JournalEntry(Float.parseFloat(\"2290\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"2000\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, twoMonthsfromNow,\n new JournalEntry(Float.parseFloat(\"50\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"240\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n Map secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"0.00\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #3\n // Pay 2290 more than expected\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String oneMonthfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(oneMonthfromNow, Float.parseFloat(\"4580\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, oneMonthfromNow,\n new JournalEntry(Float.parseFloat(\"4580\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"4000\"), JournalEntry.TransactionType.CREDIT));\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, oneMonthfromNow,\n new JournalEntry(Float.parseFloat(\"100\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"480\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap thirdInstallment = loanSchedule.get(3);\n validateNumberForEqual(\"0.00\", String.valueOf(thirdInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make refund of 20\n // max 2290 to refund. Pay 20 means only principal\n // Default style refund order(principal, interest, fees and penalties\n // paid: principal 2000, interest 240, fees 50, penalty 0\n // refund 20 means paid: principal 1980, interest 240, fees 50, penalty\n // 0\n\n // FINERACT-885: As loan may not have started exactly four months ago,\n // make final payment today and not four months from start (as that may be in the future)\n fourMonthsfromNowCalendar.setTime(Date.from(Utils.getLocalDateOfTenant().atStartOfDay(Utils.getZoneIdOfTenant()).toInstant()));\n final String now = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRefundByCash(now, Float.parseFloat(\"20\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, now,\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.DEBIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"principalOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"interestOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"feeChargesOutstanding\")));\n\n // Make refund of 2000\n // max 2270 to refund. Pay 2000 means only principal\n // paid: principal 1980, interest 240, fees 50, penalty 0\n // refund 2000 means paid: principal 0, interest 220, fees 50, penalty 0\n\n LOAN_TRANSACTION_HELPER.makeRefundByCash(now, Float.parseFloat(\"2000\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, now,\n new JournalEntry(Float.parseFloat(\"2000\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"1980\"), JournalEntry.TransactionType.DEBIT));\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, now,\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.DEBIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"2020.00\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"2000.00\", String.valueOf(fourthInstallment.get(\"principalOutstanding\")));\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"interestOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"feeChargesOutstanding\")));\n\n }", "public InternalResultsResponse<Beneficios> fetchBeneficiossByRequest(BeneficiosInquiryRequest request);", "public void testOneWithdrawal(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Teller has an account for this customer already \n\t\tteller.accountsListed.add(new BankAccount(withdraw,100));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 100, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t100.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\twithdraw.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to withdraw 100 dollars, instead it is for \" + teller.pendingTransactions.get(withdraw), \n\t\t\t\t-100.0, teller.pendingTransactions.get(withdraw));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 100.0 dollars, leaving bank.\\\", instead it reads: \" + withdraw.log.getLastLoggedEvent().toString(),\n\t\t\t\twithdraw.log.containsString(\"Got 100.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 0.0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "@Local\npublic interface IGestionnaireReponseService {\n\n /**\n * Envoie une reponse avec le code de statut HTTP fourni, contenant, dans son body,\n * la collection d'entites qui a fait l'objet d'une requete de recuperation (GET /collection).\n * @param listeEntites Liste d'entites recuperees\n * @param reponse Reponse retournee (celle prise en parametre de la methode appelee de la servlet)\n * @param <TEntite> Classe de l'entite (generique, pour prendre n'importe quel objet)\n * @throws IOException en cas d'erreur de creation de l'objet de sortie du contenu du body renvoye\n */\n <TEntite> void envoiReponseAvecDonnees(ArrayList<TEntite> listeEntites, HttpServletResponse reponse, int codeDeStatutHttp, String message) throws IOException;\n\n /**\n * Envoie une reponse avec le code de statut HTTP fourni, contenant, dans son body,\n * l'entite qui a fait l'objet d'une requete de recuperation, de creation ou de modification.\n * @param entite Entite recuperee\n * @param reponse Reponse retournee (celle prise en parametre de la methode appelee de la servlet)\n * @param <TEntite> Classe de l'entite (generique, pour prendre n'importe quel objet)\n * @throws IOException en cas d'erreur de creation de l'objet de sortie du contenu du body renvoye\n */\n <TEntite> void envoiReponseAvecDonnees(TEntite entite, HttpServletResponse reponse, int codeDeStatutHttp, String message) throws IOException;\n\n /**\n * Envoie une reponse 200 OK sans body. Appel uniquement par une route DELETE (suppression d'entite).\n *\n * @param reponse Reponse renvoyee (celle prise en parametre de la methode appelee de la servlet)\n */\n void envoiReponseSansDonnees(HttpServletResponse reponse);\n\n}", "OrderFullDao confirmOrder(String orderNr, String status, Long businessId);", "private void makeDeposit() {\n\t\t\r\n\t}", "Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);", "private void requestBucks() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Please choose a user to request TE Bucks from:\");\n\t\t\tUser fromUser;\n\t\t\tboolean isValidUser;\n\t\t\tdo {\n\t\t\t\tfromUser = (User)console.getChoiceFromOptions(userService.getUsers());\n\t\t\t\tisValidUser = ( fromUser\n\t\t\t\t\t\t\t\t.getUsername()\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(currentUser.getUser().getUsername())\n\t\t\t\t\t\t\t ) ? false : true;\n\n\t\t\t\tif(!isValidUser) {\n\t\t\t\t\tSystem.out.println(\"You can not request money from yourself\");\n\t\t\t\t}\n\t\t\t} while (!isValidUser);\n\t\t\t\n\t\t\t// Select an amount\n\t\t\tBigDecimal amount = new BigDecimal(\"0.00\");\n\t\t\tboolean isValidAmount = false;\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tamount = new BigDecimal(console.getUserInput(\"Enter An Amount (0 to cancel):\\n \"));\n\t\t\t\t\tisValidAmount = true;\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tSystem.out.println(\"Please enter a numerical value\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(amount.doubleValue() < 0.99 && amount.doubleValue() > 0.00) {\n\t\t\t\t\tSystem.out.println(\"You cannot request less than $0.99 TEB\");\n\t\t\t\t\tisValidAmount = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (amount.doubleValue() == 0.00) {\n\t\t\t\t\tmainMenu();\n\t\t\t\t}\n\t\t\t} while(!isValidAmount);\n\n\t\t\t// Create transfer object\n\t\t\tboolean confirmedAmount = false;\n\t\t\tString confirm = \"\";\n\t\t\tTransfer transfer = null;\n\t\t\twhile (!confirmedAmount) {\n\t\t\t\tconfirm = console.getUserInput(\"You entered: \" + amount.toPlainString() + \" TEB. Is this correct? (y/n)\");\n\t\t\t\tif (confirm.toLowerCase().startsWith(\"y\")) {\n\t\t\t\t\t// transferService to POST to server db\n\t\t\t\t\tSystem.out.println(\"You are requesting: \" + amount.toPlainString() +\n\t\t\t\t\t\t\t\" TEB from \" + fromUser.getUsername());\n\t\t\t\t\ttransfer = createTransferObj(\"Request\", \"Pending\",\n\t\t\t\t\t\t\t\t\tcurrentUserId, fromUser.getId(), amount);\n\t\t\t\t\tboolean hasSent = \n\t\t\t\t\t\t\ttransferService.sendBucks(currentUserId, fromUser.getId(), transfer);\n\t\t\t\t\tif (hasSent) {\n\t\t\t\t\t\t// TODO :: Test this\n\t\t\t\t\t\tSystem.out.println(\"The code executed\");\n\t\t\t\t\t}\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Request canceled.\");\n\t\t\t\t\tconfirmedAmount = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} \t\n\t\t\t}\n\t\t\t\n\t\t}catch(UserServiceException ex) {\n\t\t\tSystem.out.println(\"User Service Exception\");\n\t\t}catch(TransferServiceException ex) {\n\t\t\tSystem.out.println(\"Transfer Service Exception\");\n\t\t}\n\t\t\n\t}", "private String sendTransaction(AgentTransaction txn) {\n\t\tString responseMsg = null;\n\t\t/* vishal end */\n\t\tList<ERRORType> errorType = null;\n\t\tList<ERRORDETAILSType> errorDetails = null;\n\t\tString errorDesc = null;\n\n\n\t\ttry {\n\t\t\tFCUBSCLService service = new FCUBSCLService(); \n\t\t\tFCUBSCLServiceSEI ser = service.getFCUBSCLServiceSEI();\n\t\t\tFCUBSHEADERType fcubsHeaderType = getFcubsHeaderTypeObject();\n\t\t\tif (txn.getTxnType().equals(ServiceConstants.REAPYMENT_STATUS)) {\n\t\t\t\tlogger.info(\"sendTransaction to CBS::REPAYMENT : \"+txn.getId());\n\t\t\t\tCREATEPAYMENTFSFSREQ requestMsg = populateCreatePaymentReq(txn,\n\t\t\t\t\t\tfcubsHeaderType);\n\t\t\t\tCREATEPAYMENTFSFSRES response = ser.createPaymentFS(requestMsg);\n\t\t\t\t/* vishal Start */\n\t\t\t\tif(response != null){\n\t\t\t\t/* vishal end */\t\n\t\t\t\t\t\n\t\t\t\t\tresponseMsg = response.getFCUBSHEADER().getMSGSTAT().value();\n\t\t\t\t\terrorType = response.getFCUBSBODY().getFCUBSERRORRESP();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tlogger.info(\"sendTransaction to CBS::REPAYMENT NULL RESPONSE: \"+ txn.getId());\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t} else {\n\t\t\t\tlogger.info(\"sendTransaction to CBS::DISBURSEMENT : \"+txn.getId());\n\t\t\t\tCREATEDISBURSEMENTIOPKREQ requestMsg = populateCreateDisbrReq(\n\t\t\t\t\t\ttxn, fcubsHeaderType);\n\t\t\t\tCREATEDISBURSEMENTIOPKRES response = ser\n\t\t\t\t\t\t.createDisbursementIO(requestMsg);\n\t\t\t\t/* vishal Start */\n\t\t\t\tif(response != null){\t\t\t\t\n\t\t\t\t\tresponseMsg = response.getFCUBSHEADER().getMSGSTAT().value();\n\t\t\t\t\terrorType = response.getFCUBSBODY().getFCUBSERRORRESP();\n\t\t\t\t} else {\n\t\t\t\t\tlogger.info(\"sendTransaction to CBS::FAILED ::RESPONSE NULL:: \"+txn.getId());\n\t\t\t\n\t\t\t\t}\n\t\t\t\t/* vishal end */\n\t\t\t}\n\t\t\t/* vishal Start */\n\t\t\tif (errorType != null && !errorType.isEmpty()) {\n\t\t\t/* vishal End */\n\t\t\t\terrorDetails = errorType.get(0).getERROR();\n\t\t\t/* vishal Start */\n\t\t\t\tif (errorDetails != null && !errorDetails.isEmpty()) {\n\t\t\t/* vishal End */\n\t\t\t\t\terrorDesc = errorDetails.get(0).getEDESC();\n\t\t\t\t\tgetFcubsCbsWebDao().updateTxnWithErrorMsg(errorDesc,\n\t\t\t\t\t\t\ttxn.getTxnId());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (WebServiceException e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tthrow new WebServiceException();\n\t\t}\n\t\treturn responseMsg;\n\t}", "@Test\r\n\tpublic void withdraw() {\n\t\tResult<String> loanWithdraw = qddPaymentService.loanWithdraw(141227113319030002L);\r\n\t\tSystem.out.println(loanWithdraw);\r\n\t}", "public interface IRefundController {\n void transactionRefunded(long transactionId);\n}", "@PostMapping(value = \"/transfer\")\n public ResponseEntity<ResponseWrapper> transfer(@RequestBody AccountWrapper accountWrapper) {\n ResponseWrapper wrapper =new ResponseWrapper();\n UserAccount userAccount = userAccountRepository.findByAccountNumber(accountWrapper.getAccountNumber());\n if(Objects.isNull(userAccount)){\n wrapper.setMessage(\"Account With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n if (userAccount.getAmount() < accountWrapper.getAmount()) {\n wrapper.setMessage(\"Amount in your account is less than the amount you want to transfer \");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n\n //crediting the other user account\n UserAccount userAccount2 = userAccountRepository.findByAccountNumber(accountWrapper.getTransfer_accountNumber());\n if(Objects.isNull(userAccount2)){\n wrapper.setMessage(\"Account To Transfer With that account number does not exist\");\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }\n Float amount = userAccount2.getAmount() + accountWrapper.getAmount();\n userAccount2.setAmount(amount);\n userAccountRepository.save(userAccount2);\n\n //debit the user transferring money\n float amount1 = userAccount.getAmount() - accountWrapper.getAmount();\n userAccount.setAmount(amount1);\n userAccountRepository.save(userAccount);\n\n accountTransactionService.saveTransaction(new AccountTransaction(TRANSFER,accountWrapper.getAccountNumber(),\"Transferring Money\",\n accountWrapper.getAmount(),accountWrapper.getTransfer_accountNumber(),userAccount.getUserID()));\n wrapper.setData(\"Amount transfered successfully\");\n\n return new ResponseEntity<>(wrapper, HttpStatus.OK);\n }", "public interface PayService {\n\n /**\n * 支付订单\n * @param orderDTO 被支付的订单对应的orderDTO对象\n */\n PayResponse create(OrderDTO orderDTO);\n\n /**\n * 异步返回支付信息\n * @param notifyData\n */\n PayResponse notify(String notifyData);\n\n /**\n * 退款\n * @param orderDTO\n */\n RefundResponse refund(OrderDTO orderDTO);\n}", "@Test\n public void creditApproved() throws Exception {\n Application app = new Application();\n app.setName(\"phil garfield\");\n app.setCreditScore(600);\n Offer offer = new Offer();\n offer.setApplication(app);\n\n Application result = service.operation(\"checkCredit\").sendInOut(offer).getContent(Application.class);\n\n // validate the results\n Assert.assertTrue(result.isApproved());\n }", "public void refundConfirmation(String fName, String customerEmail, double price, int numOfTicket, int bookingNo){\n\t Properties props = makeProps();\r\n\t \r\n\t final String username = \"[email protected]\";\r\n\t final String password = \"movie4050\";\r\n\t \r\n\t try{\r\n\t Session session = Session.getDefaultInstance(props, \r\n\t new Authenticator(){\r\n\t protected PasswordAuthentication getPasswordAuthentication() {\r\n\t return new PasswordAuthentication(username,password);}});\r\n\t // -- Create a new message --\r\n\t Message msg = new MimeMessage(session);\r\n\t \r\n\t /* from */\r\n\t msg.setFrom(new InternetAddress(username));\r\n\t \r\n\t /* to */\r\n\t msg.setRecipients(Message.RecipientType.TO, \r\n\t InternetAddress.parse(customerEmail,false));\r\n\t /* title */\r\n\t msg.setSubject(\"Refund Confirmation - Receipt\");\r\n\t \r\n\t /* text field */ \r\n\t String sendThis = \"Hello \\t\"+fName + \"!\\n\\n\"\r\n\t + \"You requested on booking #\" +bookingNo+\".\"\r\n\t + \"Your \"+numOfTicket+\" ticket(s)\"\r\n\t + \" will be refunded within few days.\\n\"\r\n\t + \"Total refund price: $\"+price+\"\\n\"\r\n\t + \"Thank you for using our service!\\n\";\r\n\t msg.setText(sendThis);\r\n\t msg.setSentDate(new Date());\r\n\t Transport.send(msg);\r\n\t \r\n\t System.out.println(\"Message sent.\");\r\n\t }catch (MessagingException e){ \r\n\t System.out.println(\"Error: \" + e);\r\n\t }\r\n\t \r\n\t }", "@Test\n public void testLoanRefundByCashAccrualBasedAccounting() {\n Calendar fourMonthsfromNowCalendar = Calendar.getInstance(Utils.getTimeZoneOfTenant());\n fourMonthsfromNowCalendar.add(Calendar.MONTH, -4);\n\n // FINERACT-885: If the loan starts on day 27-31th of month and not all months have that\n // many days, then loan payment will get reset to a day of month less than today's day\n // and 4th payment will be in the past. In such case, start the loan a few days later,\n // so that 4th payment is guaranteed to be in the future.\n if (fourMonthsfromNowCalendar.get(Calendar.DAY_OF_MONTH) > 27) {\n fourMonthsfromNowCalendar.add(Calendar.DAY_OF_MONTH, 4);\n }\n\n String fourMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n\n /***\n * Create loan product with Default STYLE strategy\n */\n\n final Account assetAccount = ACCOUNT_HELPER.createAssetAccount();\n final Account incomeAccount = ACCOUNT_HELPER.createIncomeAccount();\n final Account expenseAccount = ACCOUNT_HELPER.createExpenseAccount();\n final Account overpaymentAccount = ACCOUNT_HELPER.createLiabilityAccount();\n\n final Integer loanProductID = createLoanProduct(\"0\", \"0\", LoanProductTestBuilder.DEFAULT_STRATEGY, ACCRUAL_UPFRONT, assetAccount,\n incomeAccount, expenseAccount, overpaymentAccount);// ,\n // LoanProductTestBuilder.EQUAL_INSTALLMENTS,\n // LoanProductTestBuilder.FLAT_BALANCE);\n Assertions.assertNotNull(loanProductID);\n\n /***\n * Apply for loan application and verify loan status\n */\n final String savingsId = null;\n final String principal = \"12,000.00\";\n\n // Add charges with payment mode regular\n List<HashMap> charges = new ArrayList<>();\n\n Integer flatInstallmentFee = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"50\", false));\n addCharges(charges, flatInstallmentFee, \"50\", null);\n\n List<HashMap> collaterals = new ArrayList<>();\n\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n Assertions.assertNotNull(collateralId);\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n Assertions.assertNotNull(clientCollateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, savingsId,\n principal, LoanApplicationTestBuilder.DEFAULT_STRATEGY, -4, collaterals);\n Assertions.assertNotNull(loanID);\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n LOG.info(\"-----------------------------------APPROVE LOAN-----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(fourMonthsfromNow, loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"-------------------------------DISBURSE LOAN-------------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(fourMonthsfromNow, loanID,\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(Float.parseFloat(\"1440\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"300.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.DEBIT) };\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, fourMonthsfromNow, assetAccountInitialEntry);\n\n ArrayList<HashMap> loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"2290\", String.valueOf(firstInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #1\n\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String threeMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(threeMonthsfromNow, Float.parseFloat(\"2290\"), loanID);\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"0.00\", String.valueOf(firstInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #2\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String twoMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(twoMonthsfromNow, Float.parseFloat(\"2290\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, twoMonthsfromNow,\n new JournalEntry(Float.parseFloat(\"2290\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"2290\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n Map secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"0.00\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #3\n // Pay 2290 more than expected\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String oneMonthfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(oneMonthfromNow, Float.parseFloat(\"4580\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, oneMonthfromNow,\n new JournalEntry(Float.parseFloat(\"4580\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"4580\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap thirdInstallment = loanSchedule.get(3);\n validateNumberForEqual(\"0.00\", String.valueOf(thirdInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make refund of 20\n // max 2290 to refund. Pay 20 means only principal\n // Default style refund order(principal, interest, fees and penalties\n // paid: principal 2000, interest 240, fees 50, penalty 0\n // refund 20 means paid: principal 1980, interest 240, fees 50, penalty\n // 0\n\n // FINERACT-885: As loan may not have started exactly four months ago,\n // make final payment today and not four months from start (as that may be in the future)\n fourMonthsfromNowCalendar.setTime(Date.from(Utils.getLocalDateOfTenant().atStartOfDay(Utils.getZoneIdOfTenant()).toInstant()));\n final String now = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRefundByCash(now, Float.parseFloat(\"20\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, now,\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.DEBIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"principalOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"interestOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"feeChargesOutstanding\")));\n\n // Make refund of 2000\n // max 2270 to refund. Pay 2000 means only principal\n // paid: principal 1980, interest 240, fees 50, penalty 0\n // refund 2000 means paid: principal 0, interest 220, fees 50, penalty 0\n\n LOAN_TRANSACTION_HELPER.makeRefundByCash(now, Float.parseFloat(\"2000\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, now,\n new JournalEntry(Float.parseFloat(\"2000\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"1980\"), JournalEntry.TransactionType.DEBIT));\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, now,\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.DEBIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"2020.00\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"2000.00\", String.valueOf(fourthInstallment.get(\"principalOutstanding\")));\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"interestOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"feeChargesOutstanding\")));\n\n }", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "@SuppressWarnings( \"VoidMethodAnnotatedWithGET\" )\n@Options( dispatcher = FirebaseAuthDispatcher.class, serviceRootKey = Configuration.PRODUCT_BILLING_API_ROOT )\npublic interface ProductBillingFacade\n extends RestService\n{\n //////////////////////\n ////// products //////\n //////////////////////\n\n @GET\n @Path( \"products\" )\n void getProducts( @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n @HeaderParam( \"vnd.turnon.cloud.calc-pricing-items\" ) boolean calcPricingItems,\n SuccessCallback<Items<Product>> callback );\n\n @GET\n @Path( \"products/{product_id}\" )\n void findProductById( @PathParam( \"product_id\" ) Long productId,\n @HeaderParam( \"vnd.turnon.cloud.calc-pricing-items\" ) boolean calcPricingItems,\n FacadeCallback<Product> callback );\n\n @POST\n @Path( \"products\" )\n void createProduct( @HeaderParam( \"vnd.turnon.cloud.calc-pricing-items\" ) boolean calcPricingItems,\n Product product,\n FacadeCallback<Product> callback );\n\n @PUT\n @Path( \"products/{product_id}\" )\n void updateProduct( @PathParam( \"product_id\" ) Long productId,\n @HeaderParam( \"vnd.turnon.cloud.calc-pricing-items\" ) boolean calcPricingItems,\n Product product,\n FacadeCallback<Product> callback );\n\n @PUT\n @Path( \"products/{product_id}/publishing\" )\n void updateProductPublishing( @PathParam( \"product_id\" ) Long productId,\n ProductPublishing productPublishing,\n FacadeCallback<ProductPublishing> callback );\n\n @DELETE\n @Path( \"products/{product_id}\" )\n void deleteProduct( @PathParam( \"product_id\" ) Long productId,\n FacadeCallback<Void> callback );\n\n @DELETE\n @Path( \"products/{product_id}/publishing/pictures/{order}\" )\n void deleteProductPicture( @PathParam( \"product_id\" ) Long productId,\n @PathParam( \"order\" ) Integer order,\n FacadeCallback<Void> callback );\n\n //////////////////////\n ////// orders ////////\n //////////////////////\n\n @GET\n @Path( \"orders\" )\n void getOrders( @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n SuccessCallback<Items<Order>> callback );\n\n @GET\n @Path( \"orders/{order_id}\" )\n void findOrderById( @PathParam( \"order_id\" ) Long orderId,\n @QueryParam( \"invoices\" ) Integer numberOf,\n FacadeCallback<Order> callback );\n\n @POST\n @Path( \"orders\" )\n void createOrder( Order order,\n FacadeCallback<Order> callback );\n\n @PUT\n @Path( \"orders/{order_id}\" )\n void updateOrder( @PathParam( \"order_id\" ) Long orderId,\n Order order,\n FacadeCallback<Order> callback );\n\n @DELETE\n @Path( \"orders/{order_id}\" )\n void deleteOrder( @PathParam( \"order_id\" ) Long orderId,\n FacadeCallback<Void> callback );\n\n @GET\n @Path( \"orders/{order_id}/status\" )\n void getOrderStatus( @PathParam( \"order_id\" ) Long orderId,\n SuccessCallback<OrderStatus> callback );\n\n @PUT\n @Path( \"orders/{order_id}/status\" )\n void changeOrderStatus( @PathParam( \"order_id\" ) Long orderId,\n OrderStatus status,\n FacadeCallback<Void> callback );\n\n //////////////////////\n ////// invoices //////\n //////////////////////\n\n @GET\n @Path( \"invoices\" )\n void getInvoices( @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n SuccessCallback<Items<Invoice>> callback );\n\n @GET\n @Path( \"orders/{order_id}/invoices\" )\n void getOrderInvoices( @PathParam( \"order_id\" ) Long orderId,\n @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n SuccessCallback<Items<Invoice>> callback );\n\n @POST\n @Path( \"orders/{order_id}/invoices\" )\n void createOrderInvoice( @PathParam( \"order_id\" ) Long orderId,\n Invoice invoice,\n FacadeCallback<Invoice> callback );\n\n @GET\n @Path( \"orders/{order_id}/invoices/{invoice_id}\" )\n void findInvoiceById( @PathParam( \"order_id\" ) Long orderId,\n @PathParam( \"invoice_id\" ) Long invoiceId,\n FacadeCallback<Invoice> callback );\n\n @POST\n @Path( \"invoices\" )\n void createInvoice( Invoice invoice,\n FacadeCallback<Invoice> callback );\n\n @PUT\n @Path( \"orders/{order_id}/invoices/{invoice_id}\" )\n void updateInvoice( @PathParam( \"order_id\" ) Long orderId,\n @PathParam( \"invoice_id\" ) Long invoiceId,\n Invoice invoice,\n FacadeCallback<Invoice> callback );\n\n @PUT\n @Path( \"orders/{order_id}/invoices/{invoice_id}\" )\n void sendInvoice( @PathParam( \"order_id\" ) Long orderId,\n @PathParam( \"invoice_id\" ) Long invoiceId,\n @HeaderParam( \"vnd.turnon.cloud.send-invoice\" ) Boolean sendInvoice,\n Invoice invoice,\n FacadeCallback<Invoice> callback );\n\n @PUT\n @Path( \"orders/{order_id}/invoices/{invoice_id}\" )\n void emailInvoice( @PathParam( \"order_id\" ) Long orderId,\n @PathParam( \"invoice_id\" ) Long invoiceId,\n @HeaderParam( \"vnd.turnon.cloud.send-invoice\" ) Boolean sendInvoice,\n @HeaderParam( \"vnd.turnon.cloud.contact-email\" ) String email,\n Invoice invoice,\n FacadeCallback<Invoice> callback );\n\n @DELETE\n @Path( \"orders/{order_id}/invoices/{invoice_id}\" )\n void deleteInvoice( @PathParam( \"order_id\" ) Long orderId,\n @PathParam( \"invoice_id\" ) Long invoiceId,\n FacadeCallback<Void> callback );\n\n @POST\n @Path( \"prices\" )\n void calculate( Pricing pricing, SuccessCallback<Pricing> callback );\n\n //////////////////////\n ////// codebooks /////\n //////////////////////\n\n @GET\n @Path( \"codebook/billing-units\" )\n void getBillingUnits( @HeaderParam( \"Accept-Language\" ) String acceptLanguage,\n SuccessCallback<Items<BillingUnit>> callback );\n\n @GET\n @Path( \"codebook/vat-rates\" )\n void getVatRates( @QueryParam( \"domicile\" ) String domicile,\n @HeaderParam( \"Accept-Language\" ) String acceptLanguage,\n SuccessCallback<Items<VatRate>> callback );\n\n @GET\n @Path( \"codebook/categories\" )\n void getCategories( @HeaderParam( \"Accept-Language\" ) String acceptLanguage,\n SuccessCallback<Items<Category>> callback );\n\n //////////////////////\n ///// purchases //////\n //////////////////////\n\n @GET\n @Path( \"purchases/orders\" )\n void searchPurchaseOrders( @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n SuccessCallback<Items<PurchaseOrder>> callback );\n\n @GET\n @Path( \"purchases/orders/{order_id}\" )\n void getPurchaseOrder( @PathParam( \"order_id\" ) Long orderId,\n @QueryParam( \"invoices\" ) Integer numberOf,\n SuccessCallback<PurchaseOrder> callback );\n\n @DELETE\n @Path( \"purchases/orders/{order_id}\" )\n void declinePurchaseOrder( @PathParam( \"order_id\" ) Long orderId,\n FacadeCallback<Void> callback );\n\n @GET\n @Path( \"purchases/expenses\" )\n void searchExpenses( @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n SuccessCallback<Items<Expense>> callback );\n\n @GET\n @Path( \"purchases/expenses\" )\n void searchExpensesByOrder( @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n @QueryParam( \"orderId\" ) Long orderId,\n SuccessCallback<Items<Expense>> callback );\n\n @GET\n @Path( \"purchases/orders/{order_id}/invoices\" )\n void listOrderIncomingInvoices( @PathParam( \"order_id\" ) Long orderId,\n @QueryParam( \"offset\" ) Integer offset,\n @QueryParam( \"limit\" ) Integer limit,\n @QueryParam( \"lightList\" ) boolean lightList,\n SuccessCallback<Items<IncomingInvoice>> callback );\n\n @GET\n @Path( \"purchases/orders/{order_id}/invoices/{invoice_id}\" )\n void getIncomingOrderInvoice( @PathParam( \"order_id\" ) Long orderId,\n @PathParam( \"invoice_id\" ) Long invoiceId,\n SuccessCallback<IncomingInvoice> callback );\n\n @DELETE\n @Path( \"purchases/orders/{order_id}/invoices/{invoice_id}\" )\n void deleteIncomingInvoice( @PathParam( \"order_id\" ) Long orderId,\n @PathParam( \"invoice_id\" ) Long invoiceId,\n FacadeCallback<Void> callback );\n\n /**\n * Searches for transaction that match the filtering criteria.\n *\n * @param orderId Identification of the order to search for transactions.\n * If invoice Id is not provided, a transactions of all associated invoices will be in the results.\n * @param invoiceId Identification of the invoice to search settled transactions.\n * Order Id is being required for successful match.\n * @param callback the result callback\n */\n @GET\n @Path( \"transactions\" )\n void getTransactions( @QueryParam( \"orderId\" ) Long orderId,\n @QueryParam( \"invoiceId\" ) Long invoiceId,\n SuccessCallback<Items<Transaction>> callback );\n\n @GET\n @Path( \"transactions/{transaction_id}\" )\n void getTransactionById( @PathParam( \"transaction_id\" ) Long transactionId,\n SuccessCallback<Transaction> callback );\n}", "@Get\n public String serviceRequest() {\n counter.increment(endpoint);\n\n boolean rateResult = false;\n boolean cdrResult = false;\n boolean tcdrResult = false;\n\n // Get the list of enabled resources\n enabledResourceList = getEnabledResources();\n // Service the request\n try {\n if (action.equalsIgnoreCase(\"rate\")) {\n logger.debug(\"Attempting to generate a Rate\");\n rateResult = generateRate();\n } else if (action.equalsIgnoreCase(\"cdr\")) {\n logger.debug(\"Attempting to generate a CDR\");\n cdrResult = generateCdr();\n } else if (action.equalsIgnoreCase(\"t-cdr\")) {\n logger.debug(\"Attempting to generate a CDR for T-nova\");\n tcdrResult = generateTNovaCdr();\n }\n // Construct the response\n if (rateResult) {\n return \"The rate generation was successful\";\n } else if (cdrResult) {\n return \"The cdr generation was successful\";\n } else if (tcdrResult) {\n return \"The T-Nova cdr generation was successful\";\n } else {\n return \"Operation Failed\";\n }\n }catch (Exception e){\n logger.error(\"Error while generating it: \"+e.getMessage());\n return \"Operation Failed\";\n }\n }", "@Test\n public void fetch() throws RazorpayException{\n String mockedResponseJson = \"{\\n\" +\n \" \\\"id\\\": \"+REFUND_ID+\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 300100,\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FIKOnlyii5QGNx\\\",\\n\" +\n \" \\\"notes\\\": {\\n\" +\n \" \\\"comment\\\": \\\"Comment for refund\\\"\\n\" +\n \" },\\n\" +\n \" \\\"receipt\\\": null,\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": \\\"10000000000000\\\"\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078124,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\",\\n\" +\n \" \\\"speed_requested\\\": \\\"optimum\\\"\\n\" +\n \"}\";\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n Refund fetch = refundClient.fetch(REFUND_ID);\n assertNotNull(fetch);\n assertEquals(REFUND_ID,fetch.get(\"id\"));\n String fetchRequest = getHost(String.format(Constants.REFUND,REFUND_ID));\n verifySentRequest(false, null, fetchRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "public void onConfirmButtonClick(View v){\n // Read amount from field to variable\n int amount = Integer.parseInt(amountField.getText().toString());\n\n // Set Strings ready for reading\n String toAccount = \"\";\n String fromAccount = \"\";\n String transactionType = \"\";\n\n // Different read methods for different transaction types\n if (internalBtn.isChecked()){\n transactionType = \"Internal transfer\";\n toAccount = toSpinner.getSelectedItem().toString();\n fromAccount = fromSpinner.getSelectedItem().toString();\n }\n else if (externalBtn.isChecked()){\n transactionType = \"External transfer\";\n toAccount = toTextField.getText().toString();\n fromAccount = fromSpinner.getSelectedItem().toString();\n }\n else if (depositBtn.isChecked()){\n transactionType = \"Deposit\";\n toAccount = toSpinner.getSelectedItem().toString();\n }\n else {\n // If no radio button checked, just finish this activity\n finish();\n }\n\n // Create new Transaction instance from values read\n Transaction transaction = new Transaction(transactionType, fromAccount, toAccount, amount);\n\n // Create intent and put transaction to it as extra\n Intent i = new Intent();\n i.putExtra(\"trans\", transaction);\n\n // Set ok result and finish\n setResult(RESULT_OK, i);\n finish();\n }", "public static String createCharge(Request request, Response response) {\n Stripe.apiKey = \"sk_test_nKon8YMF1HyqAvNgvFpFHGbi\";\n CardChargeMakerParams cm = JsonUtil.getInstance().fromJson(request.body(), CardChargeMakerParams.class);\n\n // Get charge meta information\n String token = cm.getId();\n EntityManager em = DatabaseManager.getInstance().getEntityManager();\n TableSession session = em\n .find(TableSession.class, request.session().attribute(\"TableSessionKey\"));\n Transaction transaction = getCurrentTransaction(session.getRestaurantTable());\n int total = (int) (transaction.getTotal() * 100);\n\n // Create params\n Map<String, Object> params = new HashMap<>();\n params.put(\"amount\", total);\n params.put(\"currency\", \"gbp\");\n params.put(\"description\", \"Your meal at Oaxaca\");\n params.put(\"source\", token);\n\n try {\n // Charge customer card\n Charge charge = Charge.create(params);\n // Change status in database\n em.getTransaction().begin();\n\n Transaction temp = em.find(Transaction.class, transaction.getTransactionId());\n\n temp.setDatetimePaid(new Timestamp(System.currentTimeMillis()));\n temp.setIsPaid(true);\n session.getRestaurantTable().setStatus(TableStatus.NEEDS_CLEANING);\n em.getTransaction().commit();\n NotificationEndpoint.startNotificationService(temp);\n return \"success\";\n } catch (AuthenticationException | InvalidRequestException | CardException | APIConnectionException | APIException e) {\n e.printStackTrace();\n return \"failure\";\n } finally {\n em.close();\n }\n }", "@Test\n\tpublic void moneyTrnasferExcetionAccountNumberWrong() {\n\t\t\n\t\tint accountNumberNotExist = 1820;\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(accountNumberNotExist);\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account not found with Account Number : \");\n\t\tsb.append(accountNumberNotExist);\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "@Path(\"/1/checklists\")\npublic interface ChecklistService {\n /**\n * Retrieve check list data.\n * For a list of Checklists see {@link it.gtug.gadc.trelloid.services.CardService #listChecklists(String, String)}.\n * \n * @param notificationid\n * @param key\n * @return a Checklist object\n */\n @GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{checklistid}\")\n Checklist getChecklist(@PathParam(\"checklistid\") String notificationid, @QueryParam(\"key\") String key);\n \n \n}", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@WebMethod(operationName = \"total-infections\")\n String getTotalInfections() throws JsonProcessingException;", "@GET\n @Path(\"account/transactions/{account_id}\")\n public Response getAccountTransactions(@PathParam(\"account_id\") \n String accountId) {\n \n String output = \"This entry point will return all transactions related to the account: \" + accountId;\n return Response.status(200).entity(output).build();\n \n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry addNewDebts();", "public interface ContractService {\n\n /**\n * 获取授权提现函信息\n * @return\n */\n WithdrawalLetter getWithdrawalLetterInfo(Long id) throws Exception;\n\n\n /**\n * 获取 借款服务协议变量 信息\n * @return\n */\n LoanServiceAgreement getLoanServiceAgreementInfo(Long id) throws Exception;\n\n\n /**\n *\n * 获取 电子签名数字证书用户申请确认函s 信息\n * @return\n */\n ElectronicLetter getElectronicLetterInfo(Long id) throws Exception;\n /**\n * 获取个人信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n PersonalInfoProtocolResForm getPersonalInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取企业信息采集协议数据\n * @param userId 用户主键\n * @return 协议数据\n */\n CompanyInfoProtocolResForm getCompanyInfoCollectionProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId) throws Exception;\n\n /**\n * 获取网络借贷平台借款情况披露及承诺书\n * @param userId 用户主键\n * @param reqForm 请求参数\n * @return 协议数据\n */\n LoanGuaranteeProtocolResForm getLoanGuaranteeProtocol(Long userId, LoanGuaranteeProtocolReqForm reqForm) throws Exception;\n\n /**\n * 公司立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> companyImmediatelySigned(Long id,ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 个人立即签署\n * @param id\n * @param procurationSignatureReqForm\n * @return\n * @throws Exception\n */\n Map<String,Object> personalImmediatelySigned(Long id, ProcurationSignatureReqForm procurationSignatureReqForm) throws Exception;\n\n /**\n * 获取担保函\n * @param orderNo 订单编号\n * @param userId 用户主键\n * @return 协议数据\n */\n GuarantorLetterResForm getGuaranteeLetter(String orderNo, Long userId) throws Exception;\n\n\n Map<String,Object> personFormValidate(PersonReqForm personReqForm);\n\n Map<String,Object> companyFormValidate(String otherLoanAmt, String signatoryName, String signatoryIdentity, String mobile, String smCode,MultipartFile file);\n}", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "protected void service(HttpServletRequest request, \n\t\t\t\t\t\t HttpServletResponse response) \n\t\t\t\t\t\t throws ServletException, IOException {\n\t\tassert (request != null) : \"The request from client is null\";\n\t\tassert (response != null) : \"The response to client is null\";\n\t\tString messageUpdateConfirmation = \"Iniciada\";\n\t\tboolean wasUpdated;\n\t\twasUpdated = sendToProductDAO(request);\n\t\t\n\t\tif(wasUpdated) {\n\t\t\tmessageUpdateConfirmation = \"Produto atualizado com sucesso!\";\n\t\t}\n\t\telse {\n\t\t\tmessageUpdateConfirmation = \"Produto não foi atualizado!\";\n\t\t}\n\t\t\n\t\t//Set the message for send to Product Response\n\t\trequest.setAttribute(\"mensage\", messageUpdateConfirmation);\n\t\t\n\t\t//Dispacher the result from the view of confirmation\n\t\tRequestDispatcher rd;\n\t\trd = request.getRequestDispatcher(\"/ProductResponse.jsp\");\n rd.forward(request,response);\n\t}" ]
[ "0.58889073", "0.58200026", "0.5718805", "0.5656392", "0.56495875", "0.5575771", "0.556569", "0.54044765", "0.5399289", "0.53738594", "0.53472173", "0.5343187", "0.5336389", "0.5332548", "0.5325812", "0.5304574", "0.529859", "0.5294342", "0.5290049", "0.5271506", "0.5263942", "0.52614415", "0.5239392", "0.5239383", "0.5231404", "0.5230645", "0.52107763", "0.5203457", "0.51941127", "0.51908624", "0.5176647", "0.5169027", "0.5159357", "0.51551175", "0.51502806", "0.51456136", "0.5141892", "0.5141892", "0.5141892", "0.51402295", "0.51324064", "0.5128707", "0.51285845", "0.5126171", "0.5126055", "0.51191723", "0.51138705", "0.51138115", "0.5107332", "0.510302", "0.5100409", "0.5095279", "0.50950485", "0.5082512", "0.5080514", "0.5077626", "0.5076977", "0.5076548", "0.5071329", "0.5071298", "0.5053317", "0.5047917", "0.5047626", "0.5046032", "0.50459003", "0.5042002", "0.5038927", "0.5038694", "0.50339234", "0.5031007", "0.5029039", "0.5027466", "0.50267327", "0.502006", "0.50181496", "0.5012687", "0.5004828", "0.5003337", "0.50032306", "0.4998939", "0.49906617", "0.4987882", "0.49758554", "0.49687046", "0.4967479", "0.49649888", "0.49603164", "0.49579185", "0.495606", "0.49555174", "0.4952416", "0.4948339", "0.4946056", "0.49447063", "0.49445942", "0.49442342", "0.4942498", "0.49364164", "0.49315333", "0.49277845" ]
0.7541402
0
TODO: You will need to implement this
public double getObjectiveValue() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private stendhal() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public void identify() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void memoria() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n public void initialize() { \n }", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}" ]
[ "0.6330329", "0.6089758", "0.6085501", "0.60460454", "0.6043946", "0.59456474", "0.5896401", "0.5874166", "0.5849803", "0.5844042", "0.58428913", "0.5792502", "0.5768322", "0.5743992", "0.57193476", "0.57193476", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5671331", "0.5665724", "0.5656679", "0.5596531", "0.5591925", "0.5578842", "0.5578842", "0.5572712", "0.55710196", "0.55710196", "0.55665094", "0.55629563", "0.55629563", "0.55620015", "0.55377895", "0.552713", "0.5520577", "0.5515732", "0.54779565", "0.5477863", "0.5477577", "0.5476944", "0.54715645", "0.5471564", "0.5470861", "0.5463686", "0.54540694", "0.5450822", "0.5444896", "0.54439586", "0.5443699", "0.5438069", "0.5437418", "0.54255575", "0.54233825", "0.54106236", "0.5402395", "0.5397958", "0.5396823", "0.53843826", "0.5382333", "0.53759766", "0.53729576", "0.53723794", "0.53723794", "0.53723794", "0.53723794", "0.53723794", "0.5369644", "0.53665483", "0.53665483", "0.53628725", "0.5345387", "0.5345387", "0.5345387", "0.53452295", "0.5339744", "0.53369164", "0.5332228", "0.5322031", "0.5321471", "0.53180707", "0.53178316", "0.5315141", "0.5309341", "0.5304894", "0.5296809", "0.5296809", "0.5296392", "0.5295491", "0.5293641", "0.5293641", "0.52935475", "0.52927095", "0.52927095", "0.52927095", "0.52849406", "0.5283793", "0.5283793" ]
0.0
-1
TODO: You will need to implement this
public Vector<String> getCoursesForStudentSemester(String student, String semester) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private stendhal() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public void identify() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void memoria() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n public void initialize() { \n }", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}" ]
[ "0.6330329", "0.6089758", "0.6085501", "0.60460454", "0.6043946", "0.59456474", "0.5896401", "0.5874166", "0.5849803", "0.5844042", "0.58428913", "0.5792502", "0.5768322", "0.5743992", "0.57193476", "0.57193476", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5671331", "0.5665724", "0.5656679", "0.5596531", "0.5591925", "0.5578842", "0.5578842", "0.5572712", "0.55710196", "0.55710196", "0.55665094", "0.55629563", "0.55629563", "0.55620015", "0.55377895", "0.552713", "0.5520577", "0.5515732", "0.54779565", "0.5477863", "0.5477577", "0.5476944", "0.54715645", "0.5471564", "0.5470861", "0.5463686", "0.54540694", "0.5450822", "0.5444896", "0.54439586", "0.5443699", "0.5438069", "0.5437418", "0.54255575", "0.54233825", "0.54106236", "0.5402395", "0.5397958", "0.5396823", "0.53843826", "0.5382333", "0.53759766", "0.53729576", "0.53723794", "0.53723794", "0.53723794", "0.53723794", "0.53723794", "0.5369644", "0.53665483", "0.53665483", "0.53628725", "0.5345387", "0.5345387", "0.5345387", "0.53452295", "0.5339744", "0.53369164", "0.5332228", "0.5322031", "0.5321471", "0.53180707", "0.53178316", "0.5315141", "0.5309341", "0.5304894", "0.5296809", "0.5296809", "0.5296392", "0.5295491", "0.5293641", "0.5293641", "0.52935475", "0.52927095", "0.52927095", "0.52927095", "0.52849406", "0.5283793", "0.5283793" ]
0.0
-1
TODO: You will need to implement this
public Vector<String> getStudentsForCourseSemester(String course, String semester) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private stendhal() {\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public void identify() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void prot() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void memoria() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n public void initialize() { \n }", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "private FlyWithWings(){\n\t\t\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}" ]
[ "0.6330329", "0.6089758", "0.6085501", "0.60460454", "0.6043946", "0.59456474", "0.5896401", "0.5874166", "0.5849803", "0.5844042", "0.58428913", "0.5792502", "0.5768322", "0.5743992", "0.57193476", "0.57193476", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5675856", "0.5671331", "0.5665724", "0.5656679", "0.5596531", "0.5591925", "0.5578842", "0.5578842", "0.5572712", "0.55710196", "0.55710196", "0.55665094", "0.55629563", "0.55629563", "0.55620015", "0.55377895", "0.552713", "0.5520577", "0.5515732", "0.54779565", "0.5477863", "0.5477577", "0.5476944", "0.54715645", "0.5471564", "0.5470861", "0.5463686", "0.54540694", "0.5450822", "0.5444896", "0.54439586", "0.5443699", "0.5438069", "0.5437418", "0.54255575", "0.54233825", "0.54106236", "0.5402395", "0.5397958", "0.5396823", "0.53843826", "0.5382333", "0.53759766", "0.53729576", "0.53723794", "0.53723794", "0.53723794", "0.53723794", "0.53723794", "0.5369644", "0.53665483", "0.53665483", "0.53628725", "0.5345387", "0.5345387", "0.5345387", "0.53452295", "0.5339744", "0.53369164", "0.5332228", "0.5322031", "0.5321471", "0.53180707", "0.53178316", "0.5315141", "0.5309341", "0.5304894", "0.5296809", "0.5296809", "0.5296392", "0.5295491", "0.5293641", "0.5293641", "0.52935475", "0.52927095", "0.52927095", "0.52927095", "0.52849406", "0.5283793", "0.5283793" ]
0.0
-1
Inflate the layout for this fragment
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { v = inflater.inflate(R.layout.intro_fragment, container, false); setOnClickListeners(); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
int n = mRisqueArrayList.size();
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { System.out.println("JE SUIS VRAIMENT A L'ECOLE JUSQU'A PRESENT, MOI MEME JE NE COMPRENDS PAS"); //for (Risque r: mRisqueArrayList) //{ if (position == 0) { Toast.makeText(SignalActivity.this, mRisqueArrayList.get(position).getCaracterisation(), Toast.LENGTH_SHORT).show(); } //} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size(){\n return list.size();\n }", "public int size(){return n;}", "public int size(){\n\n \treturn list.size();\n\n }", "public int size(){ return itemCount;}", "int size(){\n\treturn m.size();\n }", "public int size(){\n\t\treturn list.size();\n\t}", "public int size(){\n\t\treturn list.size();\n\t}", "public int size(){\n\t\treturn n;\n\t}", "public int size(){\n\t\treturn n;\n\t}", "public int size(){\n return numItems;\n }", "public int size() { \r\n \treturn n; \r\n }", "public int getSize() \r\n {\r\n return list.size();\r\n }", "public int size()\r\n {\r\n return nItems;\r\n }", "public int size()\r\n { return N; }", "public int size(){\n return items.size();\n }", "@Override\n public int size() {\n return list.size();\n }", "public int size() {\n return _N;\n\n }", "public int size() {\n return n;\n\n }", "private int size() {\n return n;\n }", "public int size() {\n return N;\n\n }", "public int size() {\n\t return list.size();\n }", "public int size()\r\n {\r\n return n;\r\n }", "public int listSize(){\r\n return counter;\r\n }", "int length() {\n return this.myArrayList.size();\n }", "public int size(){\r\n\t\treturn N;\r\n\t}", "public synchronized int size(){\n return list.size();\n }", "public int getSize(){\n\t\tint size = list.size();\n\t\treturn size;\n\n\t}", "public int size() {\n return nItems;\n }", "public int size(){\n\t\t\r\n\t\treturn N;\r\n\t}", "public int size()\n {\n return list.size();\n }", "public int size() {\r\n\t\treturn n;\r\n\t\t\r\n\t}", "int getNumItems();", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "public int size() {\n return n;\n }", "@Override\n\tpublic int getSize()\n\t{\n\t\treturn list.size();\n\t}", "public int size() {\n \treturn numItems;\n }", "@Override\n\tpublic int size() {\n\t\t\n\t\treturn list.size();\n\t}", "public int size()\n {\n return N;\n }", "public int getSize()\n {\n return pList.size();\n }", "public int getSize() {\n return list.size();\n }", "public int size() {\n return elements.size();\n }", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "public int size()\n\t{\n\t\treturn list.size();\n\t}", "@Override\n\tpublic int size() {\n\t\treturn N;\n\t}", "public int size(){\n return count;\n }", "public int size() \n { \n return count; \n }", "public int size()\n {\n return size; \n }", "public int getSize () {\n return this.list.size();\n }", "public int size (){\n return N;\n }", "public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }", "public int getCount() {\n return MyArrList.size();\n }", "public int size() {\n\t\treturn list.size();\n\t}", "public int size() {\n return list.size();\n }", "public int size() {\n return this.n;\n }", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "int getItemsCount();", "int getItemsCount();", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size(){\n return size;\n }", "public int size() {\r\n return N;\r\n }", "@Override\r\n\t\r\n\t public int size() {\n\t\r\n\t\t return lstItems.size();\r\n\t\r\n\t }", "public int size()\n\t\t{\n\t\treturn N;\n\t\t}", "public int size() {\n \t return size;\n }", "public int size() {\n return numItems;\n }", "public int size() {\n return list.size();\n }", "Long getNumberOfElement();", "public int size()\n\t{\n\t\treturn listSize;\n\t}", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size() { return count; }", "public int getSize() {\r\n return list.getItemCount();\r\n }", "@Override\n public int getItemCount() {\n return mArrayList.size();\n }", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "int getListCount();", "protected int getSize() {\n\n\t\treturn this.myRRList.size();\n\t}", "@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}", "public int getNumberOfElements();", "public int size() {\n return(RBT.size()); \n }", "public int size(){\n return size;\n }" ]
[ "0.7519877", "0.7425561", "0.73700637", "0.7363626", "0.73227376", "0.7241846", "0.7241846", "0.72402614", "0.72402614", "0.7213129", "0.721214", "0.7164455", "0.7163192", "0.71622944", "0.7135995", "0.7123263", "0.7122778", "0.71187747", "0.7117642", "0.7102524", "0.7098855", "0.7096942", "0.70748776", "0.70684123", "0.7050287", "0.7043851", "0.7043036", "0.70262617", "0.7018824", "0.70168376", "0.700663", "0.700159", "0.6998368", "0.6998368", "0.6998368", "0.6998368", "0.6998368", "0.6998368", "0.6998368", "0.6998368", "0.6998368", "0.6998368", "0.6997921", "0.69871306", "0.6986731", "0.6979747", "0.6973892", "0.69699234", "0.69488525", "0.69389224", "0.69389224", "0.6935146", "0.69321954", "0.6930228", "0.69172966", "0.690104", "0.6891488", "0.6885561", "0.6885285", "0.6868077", "0.68655413", "0.68525803", "0.6849968", "0.6849968", "0.6849968", "0.6849968", "0.6849968", "0.684261", "0.684261", "0.6839805", "0.6839805", "0.6839805", "0.6839805", "0.6839805", "0.6839805", "0.6839805", "0.683617", "0.6832125", "0.68132603", "0.6811648", "0.68057436", "0.6802607", "0.6800019", "0.6798573", "0.6797876", "0.6791484", "0.6791484", "0.6791484", "0.6791484", "0.6791484", "0.6791484", "0.6784687", "0.6784474", "0.67844594", "0.67837", "0.67805773", "0.67778707", "0.67737633", "0.67714435", "0.67658883", "0.6757586" ]
0.0
-1
System.out.println("Starting Grid Scanning "); long startTime = System.currentTimeMillis();
public void computeWords(){ loadDictionary(); CharacterGrid characterGrid = readCharacterGrid(); Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary); System.out.println(wordSet.size()); for (String word : wordSet) { System.out.println(word); } // System.out.println("Finish scanning character grid in " + (System.currentTimeMillis() - startTime) + " ms"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void startTime() {\n\t\tSystem.out.println(\"인터페이스 ISports2메소드 --> startTime()\");\r\n\t\t\r\n\t}", "public void startBatch() {\n\trunTimer.setVerbose(detailedMetrics);\n\trunTimer.start();\n }", "public static void main(String[] args) {\n\n long preTime = System.currentTimeMillis();\n System.out.println(\"Possible moves to traverse Grid -> \" + gridMemo(15, 15));\n long postTime = System.currentTimeMillis();\n System.out.println(\"Time taken to compute in milliseconds-> \" + (postTime - preTime));\n\n// long preTime = System.currentTimeMillis();\n// System.out.println(\"Possible moves to traverse Grid -> \" + gridBottomUp(15, 15));\n// long postTime = System.currentTimeMillis();\n// System.out.println(\"Time taken to compute in milliseconds-> \" + (postTime - preTime));\n\n }", "public static void main(String[] args)\n {\t\t\n\t\t\tFastTimer timer = new FastTimer();\n\t\t\n\t\t\n\t\t\tGameGrid loaded_grid = new GameGrid(7,7);\n\t\t\t\tboolean isSuccess = loaded_grid.LoadFromFile(\"test.puzzle\");\n\t\t\tif(isSuccess == true){\n\t\t\t\tSystem.out.print(\"Solution initiale\\n\");\n\t\t\t\tloaded_grid.PrintToCmd();\t\t\t\n\t\t\t}\n\t\t\tList<GameMove> found_moves = loaded_grid.GetAvailableMove(); \n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"\\n\\nInitial possible moves\\n\");\n\t\t\tfor(GameMove current_move :found_moves){\n\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tList<GameMove> solution_move = new LinkedList();\n\t\t\tloaded_grid.ResetMonitoring();\n\t\t\t\n\t\t\ttimer.StartTime();\n\t\t\t\tboolean result = loaded_grid.FindSolution(solution_move);\n\t\t\ttimer.StopTime();\n\t\t\t\n\t\t\tSystem.out.println(\"\\n**************************\");\n\t\t\tSystem.out.println(\"File name : \" + loaded_grid.loaded_file_name+\"\\n\");\n\t\t\tif(result == false){\n\t\t\t\tSystem.out.println(\"Pas de solution\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Solution in \" +solution_move.size() +\" moves\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\tTime : \"+timer.LastDelta + \" millsec\");\n\t\t\tSystem.out.println(\"\tNode visited :\"+loaded_grid.node_visited_cpt);\n\t\t\tSystem.out.println(\"\tDept require :\"+loaded_grid.max_dept);\n\t\t\tSystem.out.println(\"\tDept limitation :\"+loaded_grid.dept_limit);\n\t\t\t\n\t\t\tif(solution_move.size() > 0){\n\t\t\t\tSystem.out.println(\"\\nMove from last to first\\n\");\n\t\t\t\tfor(GameMove current_move :solution_move){\n\t\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\\n**************************\\n\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.print(\"Final grid\\n\");\n\t\t\tloaded_grid.PrintToCmd();\n }", "public void run()\n {\n //while (still executing jobs on grid)\n // attempt to sample data\n while (processingJobs)\n {\n //if (not paused)\n // sample data\n if (!paused)\n {\n //get the storage element object appropriate for this thread\n int ind = nodeChoice.indexOf('e');\n String siteno = nodeChoice.substring(ind+1);\n int siteID = Integer.parseInt(siteno);\n site = _gc.findGridSiteByID(siteID);\n StorageElement se = site.getSE();\n //sample time\n long timeMillis = time.getRunningTimeMillis();\n timeSecs = (int)(timeMillis/1000);\n //sample capacity\n capacity = se.getCapacity();\n float usage = (capacity - se.getAvailableSpace())/100;\n /* if (range values identical for last three readings)\n * remove intermediate statistic\n */\n if (usage==prevUsage&&usage==prevPrevUsage)\n { \n int itemCount = seriesSEUVTime.getItemCount();\n if (itemCount>2)\n seriesSEUVTime.remove(itemCount-1);\n } \n prevPrevUsage = prevUsage;\n prevUsage = usage;\n seriesSEUVTime.add(timeSecs, usage);\n pieDataset.setValue(\"Used Storage (GB)\", new Integer((int)((capacity - se.getAvailableSpace())/100)));\n pieDataset.setValue(\"Free Storage (GB)\", new Integer((int)((se.getAvailableSpace())/100)));\n //if (not saving all graphs)\n // try to refresh statistics\n if(!printingAll)\n this.sendDatatoGUI();\n }\n \n //delay next sample by short time\n try\n {\n if (paused)\n sleep(Integer.MAX_VALUE);\n else\n sleep(samplingDelay);\n }\n catch (InterruptedException e)\n {\n //in here if user is wishing to see chart from this object\n this.sendDatatoGUI();\n } \n }\n \n //out here only when all jobs have finished.\n //thread shall sleep for long time but can be \n //re-awakened if user wants to see statistics \n //from this object when run is complete.\n while (true)\n {\n try\n {\n sleep(Integer.MAX_VALUE);\n }\n catch (InterruptedException e)\n {\n //in here if user is wishing to see chart from this object\n this.sendDatatoGUI();\n }\n }\n }", "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "public static void stdout(){\n\t\tSystem.out.println(\"Buildings Found: \" + buildingsFound);\n\t\tSystem.out.println(\"Pages searched: \"+ pagesSearched);\n\t\tSystem.out.println(\"Time Taken: \" + (endTime - startTime) +\"ms\");\t\n\t}", "public void start() {\n startTime = System.currentTimeMillis();\n }", "public void startMeasuring() {\n\tsuper.startMeasuring();\n}", "public void start() {\n startTime = System.currentTimeMillis();\n }", "public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}", "public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}", "private void startTime()\n {\n timer.start();\n }", "public void testPerformance() {\n \t}", "void startTracking();", "public void startExecuting()\n {\n super.startExecuting();\n this.breakingTime = 0;\n }", "long start();", "public long startTime();", "public void externalTestcase() {\n\t\ttry {\n\t\t\n\t\t\tString s;\n\t\t\tDBCursor cur=null;\n\t\t\tDBCollection col;\n\t\t\tcol=mdb.getCollection(Performance.col.toString());//\n\t\t\tSystem.out.println(\"Starting Benchmark\");\n\t\t\tif (Performance.geonear){\n\t\t\t\tfor (int i = 0; i < Performance.externaliterations; i++) {\n\t\t\t\t\ts = parseToRequest(Performance.requestM);\n\t\t\t\t\tBasicDBObject cmd = new BasicDBObject();\n\t\t\t\t\tcmd =(BasicDBObject)(JSON.parse(s));\n\t\t\t\t\tmdb.requestStart();\n\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\tCommandResult r = mdb.command(cmd); \n\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t\tmdb.requestDone();\n\t\t\t\t\tTimer=Timer+stop;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tPerformance.geonear=false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor (int i = 0; i < Performance.externaliterations; i++) {\n\t\t\t\t\ts = parseToRequest(Performance.requestM);\n\t\t\t\t\tmdb.requestStart();\n\t\t\t\t\tif (Performance.limit.length()>0){\n\t\t\t\t\t\tBasicDBObject bo=new BasicDBObject(Performance.geoField.toString(),JSON.parse(s));\n\t\t\t\t\t\tint lim = Integer.parseInt(Performance.limit.toString());\n\t\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\t\tcur= col.find(bo).limit(lim);\n\t\t\t\t\t\twhile(cur.hasNext()) {\n\t\t\t\t\t\t\tcur.next();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tBasicDBObject bo=new BasicDBObject(Performance.geoField.toString(),JSON.parse(s));\n\t\t\t\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\t\t\t\tcur= col.find(bo);\n\t\t\t\t\twhile(cur.hasNext()) {\n\t\t\t\t\t\tcur.next();\n\t\t\t\t\t\t}\n\t\t\t\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tmdb.requestDone();\n\t\t\t\tTimer=Timer+stop;\n\t\t\t\n\t\t\t}\n\t\t\t\tcur.close();\n\t\t\t}\n\t\t\n\t\t\n\t\t\tSystem.out.println(\"Mongo Timer \"+Long.toString(Timer));\n\t\t\tdisconnect();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "@Test\n\tpublic void testStartTiming() {\n\t\tip = new ImagePlus();\n\t\tip.startTiming();\n\t}", "public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}", "public long calculateExecutionTime(int[][] solutiongrid){ \n long startTime = System.currentTimeMillis();\n //Run the program\n validateSudoku(solutiongrid); \n long endTime = System.currentTimeMillis();\n long totalTime = endTime - startTime; \n \n return totalTime;\n }", "public static void main(String[] args) throws Exception {\n \r\n long beginTime = System.nanoTime();\r\n for (int i = 0; i < 50000000; i++) {\r\n// System.out.println(getFlowNo());\r\n getFlowNo();\r\n \r\n }\r\n long endTime = System.nanoTime();\r\n System.out.println(\"onLineWithTransaction cost:\"+((endTime-beginTime)/1000000000) + \"s \" + ((endTime-beginTime)%1000000000) + \"us\");\r\n// \r\n// System.out.println(System.currentTimeMillis());\r\n// TimeUnit.SECONDS.sleep(3);\r\n// System.out.println(System.currentTimeMillis());\r\n }", "public void show() {\n\t\t\n\t\tSystem.out.println(\"time (tree setup) = \" + treeSetup + \" ms\");\n\t\tSystem.out.println(\"time (average search) = \" + (totalSearch/(float)countSearch) + \" ms\");\n\t\tSystem.out.println(\"time (average at) = \" + (totalAt/(float)countAt) + \" ms\");\n \t}", "public static void other() {\n // This is how to generate test data for the grid. (Use the VisibilityGraph algorithm to generate optimal path lengths)\n// ArrayList<Point> points = ReachableNodes.computeReachable(gridGraph, 5, 5);\n// System.out.println(points.size());\n//\n// generateRandomTestDataAndPrint(gridGraph);\n\n //This is how to conduct a running time / path length test for tha algorithm:\n// TestResult test1 = testAlgorithm(gridGraph, sx, sy, ex, ey, 1, 1);\n// System.out.println(test1);\n// TestResult test2 = testAlgorithm(gridGraph, sx, sy, ex, ey, 30, 25);\n// System.out.println(test2);\n }", "private void start() {\n\n\t}", "public void Start(long startTime){\n // Your code here\n this.startTime = startTime;\n Thread t = new Thread(this);\n t.start();\n //run();\n }", "public void start() {\n\t\tthis.startTime = System.nanoTime();\n\t\tthis.running = true;\n\t}", "public void start() {\n try {\n long start = System.currentTimeMillis();\n readFile();\n result = wordStorage.getTopNWords(3);\n long end = System.currentTimeMillis();\n long timeTaken = ((end - start) / 1000);\n logger.info(\"time taken to run program: \" + timeTaken);\n display.displayTimeTaken(timeTaken);\n display.displayTopNWords(result);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void tune() {\n\t\tSystem.out.println(\"ting.. ting...\");\n\t}", "static void start() throws IOException\n {\n cms_list = create_cms( num_cms );\n\n\n // 5.do until terminate\n\t\tfor( int iter=0; iter<num_iter; iter++ )\n\t\t{\n\t\t\tstart_t = System.currentTimeMillis();\n\n\t\t\tcms_sol_rdd = spark_selection(); //selction \n\t\t cms_list = new ArrayList( spark_transition_fitness( cms_sol_rdd ));\n\t\t\treduce_t = System.currentTimeMillis();\n\t\t for( int i=0; i<num_cms; i++ )\n if( best_objectvalue > cms_list.get(i)._2() )\n best_objectvalue = cms_list.get(i)._2();\n\n\t\t\tend_t = System.currentTimeMillis();\n\t\t\tprint_best( iter + 1 ); //print\n\t\t}\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"start . . . \");\n\t\tlong start = System.currentTimeMillis();\n\t\t//rankOffer();\n\t\t//statisticOffer();\\\n\t\t//displayOffer();\n\t\t//idReplace();\n\t\tupdate();\n\t\t//randName();\n\t\tlong end = System.currentTimeMillis();\n\t\tSystem.out.println(\"end use time : \"+ (end-start)+\" ms .\");\n\t}", "private void startTiming() {\n m_startTime = Calendar.getInstance().getTimeInMillis();\n }", "public void start() {\r\n for (int i = 0; i < gridSize; i++){\r\n increaseGridSize();\r\n }\r\n createRectangles();\r\n addRectanglesToGrid(grid, rectangles);\r\n Collections.shuffle(rectangles);\r\n setBoard();\r\n }", "void startStatisticsMonitor();", "public void start(){\n\t\t//System.out.println(\"SimulationTime.start\");\n\t\tthis.running\t\t\t= true;\n\t\tthis.pause\t\t\t\t= false;\n\t}", "public void startCompute();", "protected void setupTime() {\n this.start = System.currentTimeMillis();\n }", "public void run() {\n long num = numEvents.get();\n long lastnum = lastNumEvents.get();\n long evps = (num-lastnum)/App.METRICS_PER_SECOND;\n lastNumEvents.set(num);\n System.out.println(\"Consumer[\"+\n nnaammee+\"]: cursorRestarts=\"+cursorRestarts.get()\n +\" numEvents=\"+num\n +\" events/second=\"+evps\n +\" totalNumEvents=\"+totalNumEvents.get());\n }", "public void startTime() {\n\t\tthis.clock.start();\n\t}", "public void start() {\n System.out.println(\"start\");\n }", "public synchronized void start()\r\n/* 62: */ {\r\n/* 63:185 */ if (this.monitorActive) {\r\n/* 64:186 */ return;\r\n/* 65: */ }\r\n/* 66:188 */ this.lastTime.set(milliSecondFromNano());\r\n/* 67:189 */ long localCheckInterval = this.checkInterval.get();\r\n/* 68:191 */ if ((localCheckInterval > 0L) && (this.executor != null))\r\n/* 69: */ {\r\n/* 70:192 */ this.monitorActive = true;\r\n/* 71:193 */ this.monitor = new TrafficMonitoringTask(null);\r\n/* 72: */ \r\n/* 73:195 */ this.scheduledFuture = this.executor.schedule(this.monitor, localCheckInterval, TimeUnit.MILLISECONDS);\r\n/* 74: */ }\r\n/* 75: */ }", "@Override\r\n public void run() {\n super.run();\r\n for (int i = 0; i < 50000; i++) {\r\n System.out.println(\"i=\" + (i + 1));\r\n }\r\n }", "Sample start();", "protected long logTestStart(String methodName) {\n\t\tString startTimeString = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\").format(new Date());\n\t\tlogEntry(\"*** START \" + methodName + \": \" + testProperties.getEnvironmentName() + \" / \" + browser + \" / \"\n\t\t\t\t+ startTimeString);\n\t\treturn System.nanoTime();\n\t}", "public void start() {\n\r\n }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public static void main(String[] args) throws Exception {\n long start = System.nanoTime();\n TimeUnit.SECONDS.sleep(1);\n long end = System.nanoTime();\n System.out.println(String.format(\"start: %d\", start));\n System.out.println(String.format(\"end: %d\", end));\n System.out.println(String.format(\"span: %d\", end - start));\n }", "@Override\n\tvoid start() {\n\t\tSystem.out.println(\"starts\");\n\t}", "public static void main(String[] args) {\n \tfinal long SYSTEM_RESOLUTION = 393;\n \tlong startTime, endTime;\n \t\n startTime = System.nanoTime(); \t\t\t\t\t// 시작시간\n // 빈 작업\n while ((endTime = System.nanoTime()) == startTime);\t\t// 끝시간\n \n long time = endTime - startTime - SYSTEM_RESOLUTION;\t// 시간 계산\n System.out.println(\"Execition Time = \" + time + \" ns\");\n }", "public abstract void startSingleScan();", "public void startGame() {\n \t\ttimeGameStarted = System.nanoTime();\n \t\tisStarted = true;\n \n \t}", "void analysisStarting();", "public static void main(String[] args) {\n\n SlidingWindowDemo demo = new SlidingWindowDemo();\n\n// LeakyBucketDemo demo = new LeakyBucketDemo();\n\n// TokenBucketDemo demo = new TokenBucketDemo();\n\n\n\n\n\n for (int i = 0; i < 10000; i++) {\n try {\n Thread.sleep(1L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(demo.grant());\n System.out.println(System.currentTimeMillis());\n }\n }", "@Override\n protected void start() throws Exception {\n LogManager.getLogger().log(ALGORITHM, \"STARTING TABU SEARCH...\");\n LogManager.getLogger().log(ALGORITHM, \"MAX ITERATIONS: \" + maxIterations);\n LogManager.getLogger().log(ALGORITHM, \"MAX ITERATIONS WITHOUT IMPROVEMENTS: \" + maxIterationsWithoutImprovement);\n LogManager.getLogger().log(ALGORITHM, \"MIN QUEUE: \" + minQueue);\n LogManager.getLogger().log(ALGORITHM, \"RISING TREND: \" + risingTrend);\n LogManager.getLogger().log(ALGORITHM, \"MAX THREADS: \" + (maxThreads != null ? maxThreads : \"DEFAULT\"));\n LogManager.getLogger().log(ALGORITHM, \"MULTI-STARTS -> # OF GREEDY: \" + greedyMultiStart + \", # OF RANDOM: \" + randomMultiStart);\n\n String iSettings = null;\n if (intensificationLearning) {\n iSettings = \"LEARNING\";\n }\n if (localSearchIntensification) {\n if (iSettings != null) {\n iSettings += \", \";\n } else {\n iSettings = \"\";\n }\n iSettings += \"LOCAL SEARCH\";\n }\n if (pathRelinking) {\n if (iSettings != null) {\n iSettings += \", \";\n } else {\n iSettings = \"\";\n }\n iSettings += \"PATH RELINKING\";\n }\n if (intensification) {\n if (iSettings != null) {\n iSettings += \", \";\n } else {\n iSettings = \"\";\n }\n iSettings += \"INTENSIFICATION\";\n }\n if (iSettings == null) {\n iSettings = \"NONE\";\n }\n LogManager.getLogger().log(ALGORITHM, \"INTENSIFICATION SETTINGS: \" + iSettings);\n\n String dSettings = null;\n if (diversificationLearning) {\n dSettings = \"LEARNING\";\n }\n if (greedyMultiStart + randomMultiStart > 1) {\n if (dSettings != null) {\n dSettings += \", \";\n } else {\n dSettings = \"\";\n }\n dSettings += \"MULTI-STARTS\";\n }\n if (moveDiversification) {\n if (dSettings != null) {\n dSettings += \", \";\n } else {\n dSettings = \"\";\n }\n dSettings += \"MOVE DIVERSIFY\";\n }\n if (diversification) {\n if (dSettings != null) {\n dSettings += \", \";\n } else {\n dSettings = \"\";\n }\n dSettings += \"DIVERSIFICATION\";\n }\n if (dSettings == null) {\n dSettings = \"NONE\";\n }\n LogManager.getLogger().log(ALGORITHM, \"DIVERSIFICATION SETTINGS: \" + dSettings);\n\n LabeledUndirectedGraph<N, E> zero = getZeroGraph(minGraph);\n\n if (!zero.isConnected()) {\n minCost = zero.calculateCost() + 1;\n\n Queue<LabeledUndirectedGraph<N, E>> startsQueue = new LinkedList<>();\n for (int i = 0; i < greedyMultiStart; i++) {\n startsQueue.add(applyMVCA());\n }\n for (int i = 0; i < randomMultiStart; i++) {\n startsQueue.add(new LabeledUndirectedGraph<>(getSpanningTree(graph)));\n }\n int nthreads = Runtime.getRuntime().availableProcessors();\n if (maxThreads != null) {\n if (maxThreads <= 1) {\n nthreads = 1;\n } else {\n nthreads = maxThreads;\n }\n }\n nthreads = Integer.min(nthreads, (greedyMultiStart + randomMultiStart));\n\n LogManager.getLogger().log(ALGORITHM, \"THREADS: \" + nthreads);\n\n //PRINT PROGRESS\n prog = 0;\n tot = startsQueue.size();\n print(Ansi.ansi().cursor().save().erase().eraseLine().a(String.format(\"\\t%.2f%%\", prog)));\n\n if (nthreads == 1) {\n while (!startsQueue.isEmpty()) {\n compute(startsQueue.poll());\n\n //PRINT PROGRESS\n// prog = (tot - startsQueue.size()) * 100 / tot;\n prog = 100;\n print(Ansi.ansi().cursor().load().erase().eraseLine().a(String.format(\"\\t%.2f%%\", prog)));\n }\n } else {\n\n List<Thread> pool = new ArrayList<>();\n for (int i = 0; i < nthreads; i++) {\n Thread th = new Thread(() -> {\n try {\n boolean empty;\n synchronized (lock) {\n empty = startsQueue.isEmpty();\n }\n\n while (!empty) {\n LabeledUndirectedGraph<N, E> g;\n\n synchronized (lock) {\n g = startsQueue.poll();\n }\n compute(g);\n synchronized (lock) {\n empty = startsQueue.isEmpty();\n\n //PRINT PROGRESS\n// prog = (tot - startsQueue.size()) * 100 / tot;\n prog++;\n double _prog = this.prog * 100 / tot;\n print(Ansi.ansi().cursor().load().erase().eraseLine().a(String.format(\"\\t%.2f%%\", _prog)));\n }\n }\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n });\n th.setDaemon(false);\n th.setName(\"TabuSearch_Calc_\" + i);\n th.setPriority(Thread.MAX_PRIORITY);\n th.start();\n pool.add(th);\n }\n for (Thread th : pool) {\n th.join();\n }\n }\n\n println();\n\n minGraphs.forEach(_min -> {\n if (_min.calculateCost() < minGraph.calculateCost()) {\n minGraph = _min;\n }\n });\n\n LogManager.getLogger().log(ALGORITHM, \"END TABU SEARCH.\");\n LogManager.getLogger().log(ALGORITHM, \"BEST AT THIS POINT: \" + minGraph.calculateCost());\n\n if (pathRelinking) {\n LogManager.getLogger().log(ALGORITHM, \"STARTING PATH RELINKING...\");\n\n pathRelinking(pathRelinkingAlt);\n\n println();\n LogManager.getLogger().log(ALGORITHM, \"BEST AT THIS POINT: \" + minGraph.calculateCost());\n }\n } else {\n minGraph = zero;\n }\n\n LogManager.getLogger().log(ALGORITHM, \"END.\");\n }", "private void runBest() {\n }", "public void start() {\n\n\t}", "public void start() {\n \t\tgui.initialize();\n \t\t// DEBUG mode\n\t\tbman.get(0).boostSpeed(2);\n \n \t\tloop();\n \t}", "public void start(){\n getBoard();\n prepareBoard();\n renderBoard();\n }", "public void start() {\n System.out.println(\"Hello player. In front of you is a 3 x 3 grid of tiles numbered from 1 to 8, and \\n\" +\n \"the goal is to put the tiles in increasing order from left to right and top to bottom \\n\" +\n \"as shown below. \\n\");\n\n int[][] sample = {{1,2,3},{4,5,6},{7,8,0}};\n Board sampleBoard = new Board(sample);\n\n System.out.println(sampleBoard.toString());\n\n System.out.println(\"After you have solved the board or you have forfeited by pressing the SPACE key, you can \\n\" +\n \"right-click to generate a new board and then press enter to start the timer again.\\n\\n\" +\n \"If you ever have any trouble, you can request the computer\\n\" +\n \"to solve the board by forfeiting and pressing ENTER to let the computer walk you through a solution. \\n\\n\" +\n \"When you are ready, PRESS ENTER KEY TO START THE TIMER OR PRESS SPACE TO FORFEIT AND TRY ANOTHER BOARD. \");\n\n\n }", "public void startExecution() {\n \n \t\tfinal Thread thread = this.environment.getExecutingThread();\n \t\tthread.start();\n \t\tthis.startTime = System.currentTimeMillis();\n \t}", "@Override\n protected void startScan() {\n startAutomaticRefresh();\n }", "public void start(){\n\n stopWatchStartTimeNanoSecs = magicBean.getCurrentThreadCpuTime();\n\n }", "void start ();", "public static void start(){\n mngr.getStpWds();\n mngr.getDocuments();\n mngr.calculateWeights();\n mngr.getInvertedIndex();\n mngr.getClusters();\n mngr.getCategories();\n mngr.getUserProfiles();\n mngr.makeDocTermMatrix();\n\n }", "public static void main(String[] args) throws AWTException {\n Robot rob = new Robot();\r\n Scanner scanner = new Scanner(System.in);\r\n System.out.println(\"How many columns of pixels would you like to scan?\");\r\n int precision = scanner.nextInt();\r\n int increment = (840/precision);\r\n int greatestY = 0;\r\n Color white = new Color(255,255,255);\r\n long curTime = System.currentTimeMillis();\r\n for(int x = 430; x <= 1250;x+=increment){\r\n System.out.println(x);\r\n for(int y = 100; y <= 1050;y+=30){\r\n if(!rob.getPixelColor(x,y).equals(white) && y > greatestY){\r\n greatestY = y;\r\n }\r\n }\r\n }\r\n long pastTime = System.currentTimeMillis();\r\n System.out.println(pastTime-curTime);\r\n rob.delay(100);\r\n //top-left full screen position\r\n rob.mouseMove(420,45);\r\n //bottom right full screen position\r\n rob.mouseMove(1260,greatestY+20);\r\n System.out.println(rob.getPixelColor(1260,45));\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n double h = screenSize.getHeight();\r\n double w = screenSize.getWidth();\r\n System.out.println(h + \", \" + w);\r\n //multi monitor config\r\n GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();\r\n int width = gd.getDisplayMode().getWidth();\r\n int height = gd.getDisplayMode().getHeight();\r\n System.out.println(height + \", \" + width);\r\n }", "void results() {\n Time t = new Time(System.currentTimeMillis());\n endTime = t;\n\n float t1gpslog, t2gpslog, t3gpslog, bhgpslog, mhgpslog, fhgpslog, nfgpslog,\n t1dtnlog, t2dtnlog, t3dtnlog, bhdtnlog, mhdtnlog, fhdtnlog, nfdtnlog;\n float t1logpercentage, t2logpercentage, t3logpercentage, bhlogpercentage,\n mhlogpercentage, fhlogpercentage, nflogpercentage;\n\n t1gpslog = t2gpslog = t3gpslog = bhgpslog = mhgpslog = fhgpslog = nfgpslog\n = t1dtnlog = t2dtnlog = t3dtnlog = bhdtnlog = mhdtnlog = fhdtnlog = nfdtnlog = 0;\n int xval, yval;\n\n for (int rbucklocationx = 0; rbucklocationx < MAX_X_GRID; rbucklocationx++) {\n for (int rbucklocationy = 0; rbucklocationy < MAX_Y_GRID; rbucklocationy++) {\n if (t1_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t1GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t1gpslog++;\n }\n\n if (t2_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t2GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t2gpslog++;\n }\n\n if (t3_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t3GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t3gpslog++;\n }\n if (bh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n bhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n bhgpslog++;\n }\n if (mh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n mhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n mhgpslog++;\n }\n if (fh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n fhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n fhgpslog++;\n }\n if (nf_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n nfgGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n nfgpslog++;\n }\n }\n }\n\n for (int resultloop = 0; resultloop < DATA_MAX_PACKETS; resultloop++)\n {\n if (d1_message[resultloop] != 0) {\n if ((d1_message[resultloop] >> 11) == t1_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t1DTNLog.add(new GPSLog(xval, yval));\n t1dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t2_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t2DTNLog.add(new GPSLog(xval, yval));\n t2dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t3_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t3DTNLog.add(new GPSLog(xval, yval));\n t3dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == bh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n bhDTNLog.add(new GPSLog(xval, yval));\n bhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == mh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n mhDTNLog.add(new GPSLog(xval, yval));\n mhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == fh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n fhDTNLog.add(new GPSLog(xval, yval));\n fhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == nf_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n nfgDTNLog.add(new GPSLog(xval, yval));\n nfdtnlog++;\n }\n }\n }\n\n if (t1gpslog != 0) {\n t1logpercentage = (t1dtnlog / t1gpslog) * 100;\n percentageLog.add(\"t1percentage is \" + t1logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n });\n t1tp = t1logpercentage;\n }\n\n if (t2gpslog != 0) {\n t2logpercentage = (t2dtnlog / t2gpslog) * 100;\n percentageLog.add(\"t2percentage is \" + t2logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n });\n t2tp = t2logpercentage;\n }\n\n if (t3gpslog != 0) {\n t3logpercentage = (t3dtnlog / t3gpslog) * 100;\n percentageLog.add(\"t3percentage is \" + t3logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n });\n t3tp = t3logpercentage;\n }\n\n if (bhgpslog != 0) {\n bhlogpercentage = (bhdtnlog / bhgpslog) * 100;\n percentageLog.add(\"bhpercentage is \" + bhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n });\n bhtp = bhlogpercentage;\n }\n\n if (mhgpslog != 0) {\n mhlogpercentage = (mhdtnlog / mhgpslog) * 100;\n percentageLog.add(\"mhpercentage is \" + mhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n });\n mhtp = mhlogpercentage;\n }\n\n if (fhgpslog != 0) {\n fhlogpercentage = (fhdtnlog / fhgpslog) * 100;\n percentageLog.add(\"fhpercentage is \" + fhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n });\n fhtp = fhlogpercentage;\n }\n\n if (nfgpslog != 0) {\n nflogpercentage = (nfdtnlog / nfgpslog) * 100;\n percentageLog.add(\"nfpercentage is \" + nflogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n tpslc.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n });\n nftp = nflogpercentage;\n }\n\n float gpslogSum = t1gpslog + t2gpslog + t3gpslog + bhgpslog + mhgpslog + fhgpslog + nfgpslog;\n float dtnlogSum = t1dtnlog + t2dtnlog + t3dtnlog + bhdtnlog + mhdtnlog + fhdtnlog + nfdtnlog;\n\n \n if (gpslogSum > 0)\n {\n float collectiveThroughput = ((dtnlogSum) / (gpslogSum)) * 100;\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n tpslc.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n });\n ct = collectiveThroughput;\n }\n\n //Add the Radio Contact Ratio value to the series\n \n if (dtnlogSum > 0)\n {\n rcratio = radioContactLog.size()/dtnlogSum;\n }\n else\n {\n rcratio = 0;\n }\n Platform.runLater(()-> {\n rcrSeries.setYValue(rcratio);\n });\n updateGPSLogSeries();\n updateDataCenterSeries();\n\n //Update the binding properties \n Platform.runLater(()-> {\n simStarted.set(false);\n simInProgress.set(false);\n simCompleted.set(true);\n simNotInProgress.set(true);\n simPaused.set(false);\n simNotStarted.set(true);\n });\n packetModels.clear();\n packetModels.add(new PacktTallyModel(t1gpslog));\n packetModels.add(new PacktTallyModel(t2gpslog));\n packetModels.add(new PacktTallyModel(t3gpslog));\n packetModels.add(new PacktTallyModel(bhgpslog));\n packetModels.add(new PacktTallyModel(mhgpslog));\n packetModels.add(new PacktTallyModel(fhgpslog));\n packetModels.add(new PacktTallyModel(nfgpslog));\n packetModels.add(new PacktTallyModel(gpslogSum));\n packetModels.add(new PacktTallyModel(t1dtnlog));\n packetModels.add(new PacktTallyModel(t2dtnlog));\n packetModels.add(new PacktTallyModel(t3dtnlog));\n packetModels.add(new PacktTallyModel(bhdtnlog));\n packetModels.add(new PacktTallyModel(mhdtnlog));\n packetModels.add(new PacktTallyModel(fhdtnlog));\n packetModels.add(new PacktTallyModel(nfdtnlog));\n packetModels.add(new PacktTallyModel(dtnlogSum));\n packetModels.add(new PacktTallyModel(ct));\n packetModels.add(new PacktTallyModel(radioContactLog.size()));\n packetModels.add(new PacktTallyModel(rcratio));\n \n }", "public void startSearch() {\n if (solving) {\n Alg.Dijkstra();\n }\n pause(); //pause state\n }", "protected void printExecutionTime(){\n //Do nothing\n }", "public void process() {\n\t\tSystem.out.println(\"snapdragonm 888\");\n\n\t}", "public void startTiming() {\n elapsedTime = 0;\n startTime = System.currentTimeMillis();\n }", "@Override\r\n\tpublic void showSpeed() {\n\t\tSystem.out.println(\"i can run at 100km/h\");\r\n\t}", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "protected void startBatch() {\n \n }", "public void start()\r\n\t{\r\n\t\tcurrentstate = TIMER_START;\r\n\t\tstarttime = Calendar.getInstance();\r\n\t\tamountOfPause = 0;\r\n\t\trunningTime = 0;\r\n\t\tlastRunningTime = 0;\r\n\t\tpassedTicks = 0;\r\n\t}", "public static void main(String[] args) {\n\n\n List<Integer> source = buildIntRange();\n\n if(CollectionUtils.isNotEmpty(source)){\n\n }\n // 传统方式的遍历\n long start = System.currentTimeMillis();\n for (int i = 0; i < source.size(); i++) {\n try {\n TimeUnit.MILLISECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n System.out.println(\"传统方式 : \" + (System.currentTimeMillis() - start) + \"ms\");\n\n // 单管道stream\n start = System.currentTimeMillis();\n source.stream().forEach(r -> {\n try {\n TimeUnit.MILLISECONDS.sleep(1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n System.out.println(\"stream : \" + (System.currentTimeMillis() - start) + \"ms\");\n\n // 多管道parallelStream\n start = System.currentTimeMillis();\n source.parallelStream().forEach(r -> {\n try {\n TimeUnit.MILLISECONDS.sleep(1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n System.out.println(\"parallelStream : \" + (System.currentTimeMillis() - start) + \"ms\");\n }", "public static void main(String[] args) {\n SearchTree search = new SearchTree(new Node(INITIAL_STATE), GOAL_STATE);\n long startTime = System.currentTimeMillis();\n\n search.breadthFirstSearch();\n// search.depthFirstSearch();\n// search.iterativeDeepening(10);\n\n long finishTime = System.currentTimeMillis();\n long totalTime = finishTime - startTime;\n System.out.println(\"\\n[Elapsed time: \" + totalTime + \" milliseconds]\");\n System.out.println(\"========================================================\");\n }", "public void runTime() {\n int generation = 0;\n System.out.println(\"Beginning of time\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // CLS\n\n while (!universeIsDead() & generation < 2000 /*& !universStable*/) {\n // CLS\n System.out.println(\"Generation : \" + generation);\n generation++;\n System.out.println(this);\n nextGeneration();\n try {\n Thread.sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n // CLS\n System.out.println(\"Generation : \" + generation);\n System.out.println(this);\n System.out.println(\"Ending of time\");\n }", "public void start() {}", "public void start() {}", "public void start(){\n }", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif ((timePointB - timePointA)/1000.0 > 5.0) \r\n\t\t\t\t\t{ \r\n\t\t\t\t\t\tsaveTimePoint += (timePointB - timePointA);\r\n\t\t\t\t\t\toutput.setText(\"Found \" + primes.size() + \" in \" + i + \" of \" + num + \" \" + (saveTimePoint)/1000f + \" s\");\r\n\t\t\t\t\t\tupdateText();\r\n\t\t\t\t\t\ttimePointA = System.currentTimeMillis();\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "void startReportingTask();", "public void step() {\n \tinternaltime ++;\n \n }" ]
[ "0.6368904", "0.62149614", "0.6201887", "0.61808914", "0.6066521", "0.6011023", "0.60101676", "0.5976125", "0.5967421", "0.5952613", "0.5930682", "0.590525", "0.5813773", "0.5777888", "0.5775722", "0.5746911", "0.57448745", "0.5743408", "0.57343686", "0.57318217", "0.5682757", "0.56679946", "0.5667546", "0.5666481", "0.564961", "0.5648264", "0.5634058", "0.5631067", "0.56283206", "0.5617008", "0.56027615", "0.5572287", "0.55680764", "0.5567467", "0.55631596", "0.55588096", "0.55442786", "0.55289155", "0.551221", "0.5510667", "0.5505941", "0.550338", "0.5502158", "0.54983985", "0.5495193", "0.5494849", "0.5483614", "0.5483614", "0.5474092", "0.54695565", "0.54631287", "0.5462068", "0.5440969", "0.5438275", "0.54309934", "0.5410457", "0.5408867", "0.5407888", "0.5404171", "0.5402079", "0.5400026", "0.53944445", "0.53937787", "0.5391143", "0.5391025", "0.53879416", "0.5383503", "0.5374251", "0.53709954", "0.535133", "0.5351024", "0.53489673", "0.5347251", "0.53447676", "0.5344239", "0.533412", "0.5331113", "0.53186363", "0.53145623", "0.5310347", "0.5310347", "0.5309894", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.53089416", "0.5308308", "0.529944", "0.52990377", "0.5298159" ]
0.0
-1
System.out.println("Starting to read Grid ");
private CharacterGrid readCharacterGrid() { System.out.println("Starting to read Grid "); // long startTime = System.currentTimeMillis(); try { BufferedReader br = new BufferedReader(new InputStreamReader(gridStream)); int numberOfRows; int numberOfColumns; char[][] rowCharArray; String firstLineOfGridFile = br.readLine(); String[] rowAndColumn = firstLineOfGridFile.split(" "); numberOfRows = Integer.parseInt(rowAndColumn[0]); numberOfColumns = Integer.parseInt(rowAndColumn[1]); String gridLine; int currentRowNumber = 0; rowCharArray = new char[numberOfRows][numberOfColumns]; while ((gridLine = br.readLine()) != null) { String[] row = gridLine.split(" "); if (row.length != numberOfColumns) { throw new RuntimeException("Invalid grid file at line number " + currentRowNumber + 1); } char[] colCharArray = new char[numberOfColumns]; for (int i = 0; i < row.length; i++) { colCharArray[i] = Character.toLowerCase(row[i].charAt(0)); } rowCharArray[currentRowNumber] = colCharArray; currentRowNumber++; } if (currentRowNumber != numberOfRows) { throw new RuntimeException("Invalid grid file wrong number of rows found " + currentRowNumber); } br.close(); CharacterGrid characterGrid = new CharacterGrid(numberOfRows, numberOfColumns, rowCharArray); // System.out.println("Finish reading character grid in " + (System.currentTimeMillis() - startTime) + " ms"); return characterGrid; } catch (Exception ex) { throw new RuntimeException(ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayGrid() {\r\n System.out.print(this.grid);\r\n }", "public void printGrid(){\n System.out.println(\"printing the grid\");\n for(int i=0;i<row_size;i++){\n for(int j = 0;j<col_size;j++){\n System.out.println(grid[i][j]);\n }\n }\n }", "public void showGrid() {\n for (int i = minRow; i <= maxRow; i++) {\n for (int j = minCol; j <= maxCol; j++) {\n clientOutputStream.print(grid[i][j] + \" \");\n }\n clientOutputStream.println();\n }\n clientOutputStream.println();\n clientOutputStream.flush();\n }", "public void displayGrid ()\n {\n for (int i = 0; i < getDimX(); i++) {\n System.out.print(\"[ \");\n for (int y = 0; y < getDimY(); y++) {\n System.out.print(m_grid[i][y]);\n System.out.print(\" \");\n }\n System.out.println(\"]\");\n }\n }", "void printGrid() {\n\t\tSystem.out.println();\n\t\tfor (int row = 0; row < moleGrid.length; row++) {\n\t\t\tfor (int col = 0; col < moleGrid[row].length; col++) {\n\t\t\t\tSystem.out.print(moleGrid[row][col] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }", "public void displayGrid()\n {\n\t\t\n\tfor (int y=0; y<cases.length; y++)\n\t{\n for (int x=0; x<cases[y].length; x++)\n {\n\t\tSystem.out.print(\"|\"+cases[y][x].getValue());\n }\n System.out.println(\"|\");\n\t}\n }", "public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(\"0 \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\"? \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "void printGrid() {\n GridHelper.printGrid(hiddenGrid);\n }", "public void printGrid(){\n\t\tfor (int i = 0; i < 8; i++){\n\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\tSystem.out.print(Grid[i][j]+\" \"); \n\t\t\tSystem.out.println(); \n\t\t}\n\t}", "public void printGrid() {\n // Creation of depth Z\n for (int d = 0; d < grid[0][0].length; d++) {\n System.out.println(\"\");\n int layer = d + 1;\n System.out.println(\"\");\n System.out.println(\"Grid layer: \" + layer);\n // Creation of height Y\n for (int h = 1; h < grid.length; h++) {\n System.out.println(\"\");\n // Creation of width X\n for (int w = 1; w < grid[0].length; w++) {\n if (grid[h][w][d] == null) {\n System.out.print(\" . \");\n } else {\n String gridContent = grid[h][w][d];\n char identifier = gridContent.charAt(0);\n\n int n = 0;\n if(grid[h][w][d].length() == 3) {\n n = grid[h][w][d].charAt(2) % 5;\n } else if (grid[h][w][d].length() == 2) {\n n = grid[h][w][d].charAt(1)%5;\n }\n if(n == 0) n = 6;\n\n // Labelling\n if (identifier == 'G' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'G') {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n } else if (identifier == 'L' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'L') {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n }\n }\n }\n }\n }\n System.out.println(\"\");\n }", "public void printGrid()\n\t{\n\t\tfor(int i = 0; i < numRows; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < numColumns; j++)\n\t\t\t{\n\t\t\t\tif(grid[i][j] == null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"[ ]\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(grid[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\t\t\t\n\t\t}\n\t\tSystem.out.println(\"\\n\\n\");\n\t}", "void printGridToUser() {\n\t\tSystem.out.println();\n\t\tfor (int row = 0; row < moleGrid.length; row++) {\n\t\t\tfor (int col = 0; col < moleGrid[row].length; col++) {\n\t\t\t\tSystem.out.print(moleGrid[row][col] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void printGrid()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "public void printGrid() {\n\t\tfor (int row = 0; row < ROWS; row++) {\n\t\t\tif (row % 3 == 0 && row != 0)\n\t\t\t\tSystem.out.println(\" |\\n ------------------------\");\n\t\t\telse if (row % 3 == 0)\n\t\t\t\tSystem.out.println(\" -------------------------\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\" | \");\n\t\t\tfor (int col = 0; col < COLUMNS; col++) {\n\t\t\t\tif (col % 3 == 0)\n\t\t\t\t\tSystem.out.print(\" | \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tSystem.out.print(grid[row][col]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\" |\\n -------------------------\");\n\t}", "public void process() {\n\t\tSystem.out.println(\"snapdragonm 888\");\n\n\t}", "public void printCells()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n System.out.println(\"Columns: \" + columns + \"Row: \" + rows + \" \" + cellGrid[columns][rows].isAlive());\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "public static void main(String[] args) {\n int[][] grid = {{0,1,0,1,1},\n {1,2,0,0,1},\n {1,1,0,1,2}};\n displayGrid(grid);\n\n int[][] grid1 = {{0,1,0,1,1,0,1,1},\n {1,2,0,0,1,2,2,1},\n {1,1,0,1,2,1,1,2}};\n displayGrid(grid1);\n }", "public void print_maze () {\n \n System.out.println();\n\n for (int row=0; row < grid.length; row++) {\n for (int column=0; column < grid[row].length; column++)\n System.out.print (grid[row][column]);\n System.out.println();\n }\n\n System.out.println();\n \n }", "public void printCountGrid() {\n\n System.out.println(\"AI count grid :\");\n for (int i = this.boardSize.x - 1; i >= 0; i--) {\n for (int j = 0; j < this.boardSize.y; j++) {\n System.out.print(this.countGrid[i][j] + \" \");\n }\n System.out.println(\"\");\n }\n }", "public static void main(String[] args) {\n\t\tint[][] grid = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \n\t { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } \n\t };\n\t\tplay(grid);\n\t\t\n\t}", "public void printGridAsChild()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tSystem.out.print( \"\\t\" );\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "public static void testReadGridFile() throws IOException {\n\n System.out.println(\"\\n--------- Reading Grid File ---------\");\n\n GridFile gridFile = GridFile.open(TEST_FILE);\n\n GridParameters params = gridFile.getParameters();\n\n System.out.println(\"Number of Rows: \" + params.getNumberOfRows());\n System.out.println(\"Number of Columns: \" + params.getNumberOfColumns());\n System.out.println(\"Lower Left X Corner: \" + params.getXllCorner());\n System.out.println(\"Lower Left Y Corner: \" + params.getYllCorner());\n System.out.println(\"No Data Value: \" + params.getNoDataValue());\n System.out.println(\"Word Size: \" + params.getWordSizeInBytes() + \" bytes\");\n System.out.println(\"Description: \" + params.getDescription());\n\n //Create an array to hold row data\n int[] rowValues = new int[params.getNumberOfColumns()];\n\n //Read values in row 1 and print the first 10\n gridFile.getRow(1, rowValues);\n\n for (int i = 0; i < 10; i++) {\n System.out.println(\"row[\" + i + \"] = \" + rowValues[i]);\n }\n\n //Read values in row 2 and print the first 10\n gridFile.getRow(2, rowValues);\n\n for (int i = 0; i < 10; i++) {\n System.out.println(\"row[\" + i + \"] = \" + rowValues[i]);\n }\n\n gridFile.close();\n }", "@Override\n public void printGrid(){\n for(int row = 0; row < rows; row++){\n System.out.print(\"\\n\");\n if(row==0){\n char row_char='A';\n System.out.print(\" |\");\n for(int i=0; i<rows; i++){\n System.out.print(\"[\" + row_char + \"]\");\n row_char++;\n }\n System.out.print(\"\\n\");\n System.out.print(\"---|\");\n for(int i=0; i<rows;i++){\n System.out.print(\"---\");\n }\n System.out.print(\"\\n\");\n }\n\n for(int column = 0; column < columns; column++){\n if (column==0){System.out.print(\"[\"+row+\"]|\");}\n System.out.print(grid[row][column]);\n }\n }\n }", "public static void main(String[] args) {\n\t\tList<List<String>> gridData = ReadOutputFileData.readAeroData();\n\t\tGridDataUtil.printPointList(GridDataUtil.getMatrix(gridData));\n\t}", "public static void main(String[] args)\n {\t\t\n\t\t\tFastTimer timer = new FastTimer();\n\t\t\n\t\t\n\t\t\tGameGrid loaded_grid = new GameGrid(7,7);\n\t\t\t\tboolean isSuccess = loaded_grid.LoadFromFile(\"test.puzzle\");\n\t\t\tif(isSuccess == true){\n\t\t\t\tSystem.out.print(\"Solution initiale\\n\");\n\t\t\t\tloaded_grid.PrintToCmd();\t\t\t\n\t\t\t}\n\t\t\tList<GameMove> found_moves = loaded_grid.GetAvailableMove(); \n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"\\n\\nInitial possible moves\\n\");\n\t\t\tfor(GameMove current_move :found_moves){\n\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tList<GameMove> solution_move = new LinkedList();\n\t\t\tloaded_grid.ResetMonitoring();\n\t\t\t\n\t\t\ttimer.StartTime();\n\t\t\t\tboolean result = loaded_grid.FindSolution(solution_move);\n\t\t\ttimer.StopTime();\n\t\t\t\n\t\t\tSystem.out.println(\"\\n**************************\");\n\t\t\tSystem.out.println(\"File name : \" + loaded_grid.loaded_file_name+\"\\n\");\n\t\t\tif(result == false){\n\t\t\t\tSystem.out.println(\"Pas de solution\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Solution in \" +solution_move.size() +\" moves\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\tTime : \"+timer.LastDelta + \" millsec\");\n\t\t\tSystem.out.println(\"\tNode visited :\"+loaded_grid.node_visited_cpt);\n\t\t\tSystem.out.println(\"\tDept require :\"+loaded_grid.max_dept);\n\t\t\tSystem.out.println(\"\tDept limitation :\"+loaded_grid.dept_limit);\n\t\t\t\n\t\t\tif(solution_move.size() > 0){\n\t\t\t\tSystem.out.println(\"\\nMove from last to first\\n\");\n\t\t\t\tfor(GameMove current_move :solution_move){\n\t\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\\n**************************\\n\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.print(\"Final grid\\n\");\n\t\t\tloaded_grid.PrintToCmd();\n }", "public static void main(String[] args) {\n System.out.println(\"-------------------------\");\n //maze.print();\n // int count= obj.getnonVisits();\n // int percent=obj.getSizeTotal();\n // System.out.println(\"Cells: \"+percent+ \" Unvisited:\"+count);\n //if(count>0)\n // System.out.println(\"Percent unvisited: \"+((count*100)/percent)+\"%\");\n }", "public static void main(String[] args) {\n int N = Integer.parseInt(args[0]);\n boolean[][] grid = new boolean[N][N];\n int x = N/2, y = N/2;\n grid[x][y] = true;\n\n while(((x>0 && x<N-1) && (y>0 && y<N-1))) { // Checking if the pointer is at the grid's end\n // Checking for dead ends\n if (grid[x-1][y] && grid[x+1][y] && grid [x][y-1] && grid[x][y+1]) {\n break;\n }\n int r = (int) (Math.random() * 4);\n\n // Making a move if it's legal\n if (r==0 && !grid[x-1][y]) x--;\n else if (r==1 && !grid[x][y-1]) y--;\n else if (r==2 && !grid[x+1][y]) x++;\n else if (r==3 && !grid[x][y+1]) y++;\n grid[x][y] = true;\n }\n\n for (boolean[] r : grid) {\n for (boolean c : r) {\n if (c) System.out.print(\"x \");\n else System.out.print(\". \");\n }\n System.out.println();\n }\n }", "public void Print()\n\t{\n\t\tSystem.out.print(\"\\n_____GRID______\");\n\t\n\t\tfor(int x = 0; x < 9; x++)\n\t\t{\n\t\t\t\tif(x%3 == 0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\tif(grid[x] !=0)\n\t\t\t\t{\n\t\t\t\t\tif(grid[x] == -1)\n\t\t\t\t\t\tSystem.out.print(\"|_\"+ \"O\" + \"_|\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\"|_\"+ \"X\" + \"_|\");\n\t\t\t\t}\n\t\t\t\telse // blank square\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"|_\"+ \" \" + \"_|\");\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}", "in.display();", "public static void main(String[] arguments)\r\n {\r\n int[] firstImageTestColumns = {1, 1, 1,// horizontal line\r\n 0, 1, 2, 2, 2, // glider\r\n 14, 14, 15, 16, 17, 17}; // beacon\r\n int[] firstImageTestRows = {47, 48, 49, //horizontal line\r\n 1, 2, 0, 1, 2, // glider\r\n 0, 1, 0, 3, 2, 3}; // beacon\r\n\r\n TwoDimensionalGrid grid = new TwoDimensionalGrid(firstImageTestColumns, firstImageTestRows, 14);\r\n\r\n for (int loop = 0; loop < 60; loop ++)\r\n {\r\n grid.update();\r\n } // end of for (int loop = 0; loop < 30; loop ++)\r\n }", "public void start() {\n System.out.println(\"Hello player. In front of you is a 3 x 3 grid of tiles numbered from 1 to 8, and \\n\" +\n \"the goal is to put the tiles in increasing order from left to right and top to bottom \\n\" +\n \"as shown below. \\n\");\n\n int[][] sample = {{1,2,3},{4,5,6},{7,8,0}};\n Board sampleBoard = new Board(sample);\n\n System.out.println(sampleBoard.toString());\n\n System.out.println(\"After you have solved the board or you have forfeited by pressing the SPACE key, you can \\n\" +\n \"right-click to generate a new board and then press enter to start the timer again.\\n\\n\" +\n \"If you ever have any trouble, you can request the computer\\n\" +\n \"to solve the board by forfeiting and pressing ENTER to let the computer walk you through a solution. \\n\\n\" +\n \"When you are ready, PRESS ENTER KEY TO START THE TIMER OR PRESS SPACE TO FORFEIT AND TRY ANOTHER BOARD. \");\n\n\n }", "public void display() { \r\n\t\tfor (int i=0; i<3; i++){ \r\n\t\t\tSystem.out.print(\"|\"); \r\n\t\t\tfor (int j=0; j<3; j++){ \r\n\t\t\t\tSystem.out.print(board[i][j] + \"|\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(); \r\n\t\t}\r\n\t\tSystem.out.println(); \r\n\t}", "public void printBoard() {\n System.out.println(\"Updated board:\");\n for (int row = 0; row < size; row++) {\n for (int col = 0; col < size; col++) {\n\n System.out.print(grid[row][col] + \" \");\n\n }\n System.out.println(\"\");\n }\n }", "public static void main(String [] args){\n\t\tCell testCell1 = new Cell();\n\t\tCell testCell2 = new Cell(false,0,0);\n\n\t\ttestCell1.display();\n\t\ttestCell2.display();\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(testCell1.getStatus());\n\t\tSystem.out.println(testCell2.getStatus());\n\n\t\ttestCell1.changeStatus(6);\n\t\ttestCell2.changeStatus(2);\n\n\t\tSystem.out.println(testCell1.getStatus());\n\t\tSystem.out.println(testCell2.getStatus());\n\n\t\tCell[][] input = new Cell[3][3];\n\t\tinput[0][0] = new Cell(false,0,0);\n\t\tinput[0][1] = new Cell(true,0,1);\n\t\tinput[0][2] = new Cell(false,0,2);\n\t\tinput[1][0] = new Cell(true,1,0);\n\t\tinput[1][1] = new Cell(true,1,1);\n\t\tinput[1][2] = new Cell(true,1,2);\n\t\tinput[2][0] = new Cell(true,2,0);\n\t\tinput[2][1] = new Cell(true,2,1);\n\t\tinput[2][2] = new Cell(true,2,2);\n\t\tCellGrid testGrid = new CellGrid(input);\n\n\t\tSystem.out.println(testGrid.getNeighbors(0,1));\n\n\t\ttestGrid.displayGrid();\n\n\n\t}", "public static void main(String args[]) {\n\t\tBoard initial = new Board(new int[][]{{5,8,7},{1,4,6},{3,0,2}});\r\n\t StdOut.printf(\"Dimension: %d\\n\", initial.dimension());\r\n\t StdOut.print(initial.toString());\r\n\t StdOut.printf(\"Hamming: %d\\n\", initial.hamming());\r\n\t StdOut.printf(\"Manhattan: %d\\n\", initial.manhattan());\r\n\t StdOut.printf(\"Twin:\\n%s\", initial.twin());\r\n\t StdOut.printf(\"\\nNeighbours:\\n\\n\");\r\n\t for (Board b : initial.neighbors()) {\r\n\t \tStdOut.println(b);\r\n\t \tStdOut.printf(\"Distance %d\\n\\n\", b.manhattan());\r\n\t }\r\n\t}", "public void printGrid(char[][] grid){\r\n\t\tSystem.out.println(grid[0][0] + \"|\" + grid[0][1] + \"|\" + grid[0][2] + \"|\" + grid[0][3] + \"|\" + grid[0][4] + \"|\" + grid[0][5] + \"|\" + grid[0][6]);\r\n\t\tSystem.out.println(\"-------------\");\r\n\t\tSystem.out.println(grid[1][0] + \"|\" + grid[1][1] + \"|\" + grid[1][2] + \"|\" + grid[1][3] + \"|\" + grid[1][4] + \"|\" + grid[1][5] + \"|\" + grid[1][6]);\r\n\t\tSystem.out.println(\"-------------\");\r\n\t\tSystem.out.println(grid[2][0] + \"|\" + grid[2][1] + \"|\" + grid[2][2] + \"|\" + grid[2][3] + \"|\" + grid[2][4] + \"|\" + grid[2][5] + \"|\" + grid[2][6]);\r\n\t\tSystem.out.println(\"-------------\");\r\n\t\tSystem.out.println(grid[3][0] + \"|\" + grid[3][1] + \"|\" + grid[3][2] + \"|\" + grid[3][3] + \"|\" + grid[3][4] + \"|\" + grid[3][5] + \"|\" + grid[3][6]);\r\n\t\tSystem.out.println(\"-------------\");\r\n\t\tSystem.out.println(grid[4][0] + \"|\" + grid[4][1] + \"|\" + grid[4][2] + \"|\" + grid[4][3] + \"|\" + grid[4][4] + \"|\" + grid[4][5] + \"|\" + grid[4][6]);\r\n\t\tSystem.out.println(\"-------------\");\r\n\t\tSystem.out.println(grid[5][0] + \"|\" + grid[5][1] + \"|\" + grid[5][2] + \"|\" + grid[5][3] + \"|\" + grid[5][4] + \"|\" + grid[5][5] + \"|\" + grid[5][6]);\r\n\t}", "private void printGrid(StateObservation stateObs) {\n\n ArrayList<Observation>[][] gameGrid = stateObs.getObservationGrid();\n System.out.println(\"rows \" + gameGrid.length + \" cols \" + gameGrid[0].length);\n\n System.out.println(\"------------------\");\n for (int i = 0; i < gameGrid[0].length; i++) { // cols\n for (int j = 0; j < gameGrid.length; j++) { // rows\n\n if (gameGrid[j][i].isEmpty()) {\n System.out.print(\". \");\n } else {\n for (Observation o : gameGrid[j][i]) {\n System.out.print(o.itype + \" \");\n }\n }\n }\n System.out.println();\n }\n System.out.println(\"------------------\");\n }", "private void doSomething(){\n System.out.println(\"Robodromo \" + theRobodrome.getName() +\n \"\\nrighe e colonne, \" + this.theRobodrome.getRowCount() +\n \", \" + this.theRobodrome.getColumnCount());\n System.out.println(theTraining.getDeck());\n }", "public static void main(String[] args) {\n //if(!args.equals(null))\n testGameLayout = new GameLayout(\"GetOutConnections\", args[0]);\n //testGameLayout = new GameLayout(\"GetOutConnections\", \"GetOutProperties\");\n \n currentLocation = testGameLayout.startLocation;\n currentHealth = testGameLayout.currentHealth;\n \n }", "public static void main(String[]args){\n\tGSon obj=new GSon();\n\tobj.display();\n\tobj.write();\n\tobj.read();\n\t}", "public static void main(String[] args) {\n GridMap map = null;\n try {\n map = GridMap.fromFile(\"map.txt\");\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n\n if (map == null)\n throw new RuntimeException(\"Unable to obtain discretized map.\");\n\n // Prints map\n System.out.println(\"Map to analyze:\");\n System.out.println(map);\n\n // Executes search\n int[] rowColIni = map.getStart();\n int[] rowColFim = map.getGoal();\n Block initial = new Block(rowColIni[0], rowColIni[1], BlockType.FREE);\n Block target = new Block(rowColFim[0], rowColFim[1], BlockType.FREE);\n GreedySearch search = new GreedySearch(map, initial, target);\n RobotAction[] ans = search.solve();\n\n // Shows answer\n if (ans == null) {\n System.out.println(\"No answer found for this problem.\");\n } else {\n\n Block current = initial;\n System.out.print(\"Answer: \");\n for (RobotAction a : ans) {\n System.out.print(\", \" + a);\n Block next = map.nextBlock(current, a);\n map.setRoute(next.row, next.col);\n current = next;\n }\n\n // Shows map with the route found\n System.out.println();\n System.out.println(\"Route found:\");\n System.out.println(map);\n }\n }", "public static void displayGrid(int[][] grid){\n // JFrame to open a new window.\n JFrame frame = new JFrame();\n\t\n\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\tfinal int FRAME_WIDTH = offset + width * (grid[0].length + 1);\n\tfinal int FRAME_HEIGHT = offset + width * (grid.length+2);\n\n Grid panel = new Grid(grid);\n\t//creates a window of appropriate (variable) size.\n\tframe.setSize(FRAME_WIDTH,FRAME_HEIGHT); \n\n\tframe.add(panel); \n\tframe.setVisible(true); // makes the application visible.\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n double p = sc.nextDouble();\n int M = sc.nextInt();\n\n // repeatedly created N-by-N matrices and display them using standard draw\n for (int i = 0; i < M; i++) {\n boolean[][] open = Percolation.random(N, p);\n StdDraw.clear();\n StdDraw.setPenColor(StdDraw.BLACK);\n Percolation.show(open, false);\n StdDraw.setPenColor(StdDraw.BOOK_BLUE);\n boolean[][] full = Percolation.flow(open);\n Percolation.show(full, true);\n StdDraw.show(1000);\n }\n }", "void printParking();", "public static void main(String[] args) {\n\t In in = new In(args[0]);\n\t int N = in.readInt();\n\t int[][] blocks = new int[N][N];\n\t for (int i = 0; i < N; i++)\n\t for (int j = 0; j < N; j++)\n\t blocks[i][j] = in.readInt();\n\t Board initial = new Board(blocks);\n\t System.out.println(initial);\n\t \n\t System.out.println(initial.hamming());\n\t System.out.println(initial.manhattan());\n\t System.out.println(initial.isGoal());\n\t \n\t for (Board b:initial.neighbors())\n\t {\n\t \tSystem.out.println(b);\n\t }\n\t \n\t }", "public BuildGrid()\n {\n System.out.print(\"Creating a new grid: \");\n\n m_grid = new double[1][5];\n setDimX(1);\n setDimY(5);\n\n this.fillWith(0);\n System.out.println(\"Done\");\n }", "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "public BoardRandomizer()\n {\n //this is the default constructor for the BoardRandomizer\n System.out.println(number_of_tiles);\n\n }", "public void printBoard() {\n printStream.println(\n \" \" + positions.get(0) + \"| \" + positions.get(1) + \" |\" + positions.get(2) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(3) + \"| \" + positions.get(4) + \" |\" + positions.get(5) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(6) + \"| \" + positions.get(7) + \" |\" + positions.get(8) + \"\\n\");\n }", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "public static void main(String[] args) {\n\n int[][] blocks = new int[3][3];\n\n blocks[0][0] = 1;\n blocks[0][1] = 2;\n blocks[0][2] = 3;\n blocks[1][0] = 0;\n blocks[1][1] = 7;\n blocks[1][2] = 6;\n blocks[2][0] = 5;\n blocks[2][1] = 4;\n blocks[2][2] = 8;\n /*\n * blocks[0][0] = 1; blocks[0][1] = 2; blocks[0][2] = 3; blocks[1][0] =\n * 4; blocks[1][1] = 5; blocks[1][2] = 6; blocks[2][0] = 8; blocks[2][1]\n * = 7; blocks[2][2] = 0;\n */\n\n Board initial = new Board(blocks);\n\n // solve the puzzle\n Solver solver = new Solver(initial);\n\n // print solution to standard output\n if (!solver.isSolvable())\n StdOut.println(\"No solution possible\");\n else {\n StdOut.println(\"Minimum number of moves = \" + solver.moves());\n for (Board board : solver.solution())\n StdOut.println(board);\n }\n\n }", "public static void main(String[] args) {\n for (int i = 1; i < 3; i++){\n for(int j = 0; j < 4; j++){\n System.out.println(\"i=\" + i + \" j=\" + j);\n }\n }\n //2D arrays put arrays inside of arrays\n int[][] grid = {\n {1,2,3},\n {4,5,6},\n {7,8,9}\n };\n }", "public static void main(String[] args) \n {\n int[][] array = { \n { 1, 2, 3 }, \n { 4, 5, 6 }, \n { 7, 8, 9 } \n };\n\n // Create and run the gui\n Gui11 gui = new Gui11();\n gui.showGui();\n gui.printMatrix(array);\n }", "void method0() {\nprivate double edgeCrossesIndicator = 0;\n/** counter for additions to the edgeCrossesIndicator\n\t\t */\nprivate int additions = 0;\n/** the vertical level where the cell wrapper is inserted\n\t\t */\nint level = 0;\n/** current position in the grid\n\t\t */\nint gridPosition = 0;\n/** priority for movements to the barycenter\n\t\t */\nint priority = 0;\n/** reference to the wrapped cell\n\t\t */\nVertexView vertexView = null;\n}", "public void consoleBoardDisplay(){\n\t\tString cell[][] = ttt.getCells();\n\t\tSystem.out.println(\"\\n\" +\n\t\t\t\"R0: \" + cell[0][0] + '|' + cell[0][1] + '|' + cell[0][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R1: \" + cell[1][0] + '|' + cell[1][1] + '|' + cell[1][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R2: \" + cell[2][0] + '|' + cell[2][1] + '|' + cell[2][2] + \"\\n\"\n\t\t);\n\t}", "public void display() {\n\t\tSystem.out.println(x + \" \" + y + \" \" + z);\n\t}", "public static void main(String[] args) throws AWTException {\n Robot rob = new Robot();\r\n Scanner scanner = new Scanner(System.in);\r\n System.out.println(\"How many columns of pixels would you like to scan?\");\r\n int precision = scanner.nextInt();\r\n int increment = (840/precision);\r\n int greatestY = 0;\r\n Color white = new Color(255,255,255);\r\n long curTime = System.currentTimeMillis();\r\n for(int x = 430; x <= 1250;x+=increment){\r\n System.out.println(x);\r\n for(int y = 100; y <= 1050;y+=30){\r\n if(!rob.getPixelColor(x,y).equals(white) && y > greatestY){\r\n greatestY = y;\r\n }\r\n }\r\n }\r\n long pastTime = System.currentTimeMillis();\r\n System.out.println(pastTime-curTime);\r\n rob.delay(100);\r\n //top-left full screen position\r\n rob.mouseMove(420,45);\r\n //bottom right full screen position\r\n rob.mouseMove(1260,greatestY+20);\r\n System.out.println(rob.getPixelColor(1260,45));\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n double h = screenSize.getHeight();\r\n double w = screenSize.getWidth();\r\n System.out.println(h + \", \" + w);\r\n //multi monitor config\r\n GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();\r\n int width = gd.getDisplayMode().getWidth();\r\n int height = gd.getDisplayMode().getHeight();\r\n System.out.println(height + \", \" + width);\r\n }", "public static void main(String[] args) throws Exception {\n\n row = new int[8];\n takenRows = new boolean[8];\n takenLeftDiag = new boolean[15];\n takenRightDiag = new boolean[15];\n\n int tc = parseInt(br.readLine());\n\n for (int TC = 0; TC < tc; TC++) {\n br.readLine();\n String[] nums = br.readLine().split(\" \");\n a = parseInt(nums[0]) - 1;\n b = parseInt(nums[1]) - 1;\n lineCount = 1;\n\n pr.println(\"SOLN COLUMN\");\n pr.println(\" # 1 2 3 4 5 6 7 8\\n\");\n backtrack(0);\n if (TC < tc - 1) {\n pr.println();\n }\n }\n\n br.close();\n pr.close();\n }", "@Override\r\n\tpublic void reading() {\n\t\tSystem.out.println(\"reading\");\r\n\t}", "public void display() {\n\t\tSystem.out.println(\"display..\");\n\t}", "public static void main(String[] args) {\n\t\tint[][] m = Method.initRandomMatrix(5, 5, 20);\r\n\t\tMethod.print(m);\r\n\t\tSystem.out.println(\"Вариант отображения согласно заданию:\");\r\n\t\tfor (int i = 0; i < m.length; i++) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tfor (int j = m[i].length - 1; j >= 0; j--) {\r\n\t\t\t\t\tSystem.out.print(m[i][j] + \"\\t\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int j = 0; j < m[i].length; j++) {\r\n\t\t\t\t\tSystem.out.print(m[i][j] + \"\\t\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "public void run() {\n GameBoard board = new GameBoard(nrows, ncols);\n\n\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner sc = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tsc = new Scanner( new File(\"C:\\\\Users\\\\SRT\\\\algorithms\\\\robot\\\\src\\\\frodo\\\\input2.txt\") );\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tint test_case = sc.nextInt();\r\n\t\t\r\n\t\tint N=0;\r\n\r\n\t\tfor (int tc = 1; tc <= test_case; tc++){\r\n\t\t\t//if(tc ==1 ) {\r\n\t\t\tN = sc.nextInt();\r\n\t\t\tint grid [][] = new int [N][2];\r\n\r\n\t\t\tfor(int row = 0 ; row < grid.length ; row++) {\r\n\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t\tfor(int col=0; col< grid[0].length; col++) {\r\n\t\t\t\t\tgrid[row][col] = sc.nextInt();\r\n\t\t\t\t\tSystem.out.print(\" \"+ grid[row][col]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t\t\t\t\t\t\r\n\t\t\tSystem.out.println(\"#\"+tc+\":\"+getAnswer(N,grid));\r\n\t\t\t//}\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void start() {\r\n for (int i = 0; i < gridSize; i++){\r\n increaseGridSize();\r\n }\r\n createRectangles();\r\n addRectanglesToGrid(grid, rectangles);\r\n Collections.shuffle(rectangles);\r\n setBoard();\r\n }", "private static void printGrid1(Vector<State> states) {\n\t\tint k = 0;\n\t\tfor (State s : states) {\n\t\t\tif (k == 3) {\n\t\t\t\tk = 0;\n\t\t\t\tSystem.out.print(\"\\n\\n\\n\");\n\t\t\t}\n\t\t\tSystem.out.print(\" \" + String.format(\"%.1f\", s.getqUval()) + \" \");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(String.format(\"%.1f\", s.getqLval()));\n\t\t\tSystem.out.print(\" \" + String.format(\"%.1f\", s.getqRval()) + \"\\t\");\n\t\t\tSystem.out.println();\n\n\t\t\tSystem.out.print(\" \" + String.format(\"%.1f\", s.getqDval()));\n\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tif(args.length > 0) {\n\t\t\ttry {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(args[0]));\n\t\t\t\tint cmd = parseCommands(br.readLine());\n\t\t\t\tPrintStream ps = new PrintStream(\"Output Stats for input \" + args[0]);\n\t\t\t\tAllStats as = new AllStats();\n\t\t\t\tif(cmd == 3) {\n\t\t\t\t\tps.println(\"Given edges:\");\n\t\t\t\t\tArrayList<Edge> e = new ArrayList<Edge>();\n\t\t\t\t\t// Read in the lines and parse them to edges\n\t\t\t\t\tString s = br.readLine();\n\t\t\t\t\twhile(s != null){\n\t\t\t\t\t\tEdge temp = parseToEdge(s);\n\t\t\t\t\t\tif(temp == null){\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.add(temp);\n\t\t\t\t\t\tps.println(temp);\n\t\t\t\t\t\ts = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t\tps.println();\n\t\t\t\t\t// Make a grid with default initial edge and given sequence\n\t\t\t\t\tGrid grid = new Grid();\n\t\t\t\t\tgrid.addInitialEdge(new Edge(new Point(0, 1, 0), new Point(1, 0, 0)));\n\t\t\t\t\tgrid.addInitialSeq(e.toArray(new Edge[e.size()]));\n\t\t\t\t\t// Run algorithm and print results\n\t\t\t\t\tgrid.runAlgorithm(1);\n\t\t\t\t\tas.display(new DataStructure2(grid), e.size(), 1, ps);\n\t\t\t\t\tdrawFan(grid.lastFan(), \"Final fan for input \" + args[0]);\n\t\t\t\t\tdrawFan(grid.initialFan(), \"Initial fan for input \" + args[0]);\n\t\t\t\t\tdrawGridPart(grid, \"Grid for input: \" + args[0], new PreciseNumber(0), new PreciseNumber(0), 1);\n\t\t\t\t\t//drawGrid(grid, \"Grid for input: \" + args[0]);\n\t\t\t\t} else if(cmd > 0) {\n\t\t\t\t\tint distance = Integer.parseInt(br.readLine().trim());\n\t\t\t\t\tif(cmd == 1) {\n\t\t\t\t\t\tps.println(\"Exhaustive search for \"+ distance + \" divisions\");\n\t\t\t\t\t\tps.println();\n\t\t\t\t\t\texhaustiveSearch(distance, as, 1, ps);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tps.println(\"Random grid of \"+ distance + \" divisions\");\n\t\t\t\t\t\tps.println();\n\t\t\t\t\t\tGrid grid = solveRandGrid(distance, 1);\n\t\t\t\t\t\tas.display(new DataStructure2(grid), distance, 1, ps);\n\t\t\t\t\t\tdrawFan(grid.lastFan(), \"Final fan for input \" + args[0]);\n\t\t\t\t\t\tdrawFan(grid.initialFan(), \"Initial fan for input \" + args[0]);\n\t\t\t\t\t\tdrawGrid(grid, \"Grid for input: \" + args[0]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tps.close();\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (java.io.FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not valid\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Input error\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Invalid distance\");\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Start the interactive visualizer\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tDrawingPanel d = new DrawingPanel();\n\t\t}\n\t}", "public void printContents(){\n System.out.println(this);\n System.out.println(\"Occupied by: \" + pieceAtVertex + \"\\n Neighbors:\" + neighbors);\n }", "public void printLattice() {\n System.out.println(\"New configuration looks like this:\\n\");\n\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < m; j++) {\n System.out.printf(\"%d \", lattice[i][j]);\n }\n System.out.println();\n }\n }", "public void displayBoard(){\r\n System.out.println(board.toString());\r\n }", "public static void main (String[] args){\n\t\trobotInAGrid();\n\t}", "public static void main(String[] args) {\n int SIZE=4;\n double entropy=0.15;\n MSGeneratorMap map = new MSGeneratorMap(SIZE,entropy);\n String[][] p = map.getBoard();\n System.out.println(map.toString());\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"i is : \"+i+\" j is : \"+new Initblocks().j);\n\t\tSystem.out.println(\"Cars has \"+cars.size()+\" elements\");\n\t}", "public void display() {\n\t\t\n\t}", "public void display() {\n\t\t\n\t}", "void displayBoard();", "public static void robotInAGrid(int[][] grid) {\n\n }", "public void showBoard() {\n System.out.println(\"The board is\");\n System.out.println(\"| 1 | 2 | 3 |\\n| 4 | 5 | 6 | \\n| 7 | 8 | 9 |\");\n }", "public void forfaitCli() throws IOException, InterruptedException {\n printOut(cliToolsManager.sceneInitializer(80));\n\n for(int i=0;i<15;i++)\n printOut(\"\");\n\n printOut(cliToolsManager.centerThatString(\"TUTTI GLI ALTRI GIOCATORI SI SONO DISCONNESSI\", 80));\n printOut(cliToolsManager.centerThatString(\"HAI VINTO\", 80));\n\n printOut(\"\");\n printOut(\"\");\n\n printOut(cliToolsManager.simpleQuestionsMaker(\"Premi qualsiasi tasto per uscire\", 80, true));\n readIt();\n }", "public void run(){\n int i=0;\n while(i<times){\n g.set(m);\n m=g.get();\n printBoards(m);\n if(i<times-1)\n System.out.println();\n i++;\n }\n \n }", "public static void intro(){\n System.out.println(\"Welcome to Maze Runner!\");\n System.out.println(\"Here is your current position:\");\n myMap.printMap();\n\n }", "public void prepare() {\r\n\t\tsuper.prepare();\r\n\t\tSystem.out.println(\" - Gather the grains\");\r\n\t\tSystem.out.println(\" - Shape into circles\");\r\n\t\tSystem.out.println(\" - Randomly color circles\");\r\n\t\tSystem.out.println(\" - Let circles dry\");\r\n\t}", "public void PrintBoard() {\n\tSystem.out.println(\"printing from class\");\n\t\tString[][] a = this.piece;\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 <- X axis\");\n\t\tSystem.out.println(\" +----------------+ \");\n\t\t\n\t\tfor (int i=0; i<8 ;i++) {\n\t\t\tSystem.out.print(i + \" |\");\n\t\t\tfor (int j=0; j<8;j++) {\n\t\t\t\t\n\t\tSystem.out.print(\"\" + a[i] [j] + \" \");\n\t\t\t\t\t} \n\t\t\tSystem.out.println(\"|\");\n\t\t}\n\t\tSystem.out.println(\" +----------------+ \");\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 \");\n\t\n\t}", "static void printBoard() \r\n {\r\n \tSystem.out.println(\"/---|---|---\\\\\");\r\n \tSystem.out.println(\"| \" + board[0][0] + \" | \" + board[0][1] + \" | \" + \r\n \tboard[0][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[1][0] + \" | \" + board[1][1] + \" | \" + \r\n \tboard[1][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[2][0] + \" | \" + board[2][1] + \" | \" + \r\n \tboard[2][2] + \" |\");\r\n \tSystem.out.println(\"\\\\---|---|---/\");\r\n }", "public static void main(String[] args) {\n StdOut.println(\"Elven's Percolation Runner w/ Graphics\");\n StdOut.println(\"Due to graphics limitations, the max grid length is \" + maxN);\n StdOut.println(\"Please Enter Grid Length:\");\n if (N > maxN) {\n StdOut.println(\"max grid length exceeded, running at grid length = \" + maxN);\n }\n N = Math.min(StdIn.readInt(), maxN);\n StdOut.println(\"Which algorithm would you like to test?\");\n StdOut.println(\"1 : QuickFind\");\n StdOut.println(\"2 : QuickUnion\");\n StdOut.println(\"3 : WeightedQuickUnion\");\n StdOut.println(\"4 : WeightedQuickUnion w/ Path Compression\");\n StdOut.println(\"5 : Simulate all of the above\");\n StdOut.println(\"Please input the number corresponding to your chosen algorithm.\");\n int algSelection = StdIn.readInt();\n if (!(algSelection > 0 && algSelection < 6)) {\n StdOut.println(\"You have failed to enter a valid algorithm number, defaulting to simulating all algorithms\");\n algSelection = 1;\n }\n SQR_SIZE = 0.5 / N;\n StdOut.print(\"Input how many repetitions of algorithm #\"+algSelection+\" to simulate: \");\n reps = StdIn.readInt();\n\n //uses another array of algos for Confirmed Chosen Algorithm\n chosenAlg = new algos[1];\n switch (algSelection) {\n case 1:\n chosenAlg[0] = algos.QuickFind;\n break;\n case 2:\n chosenAlg[0] = algos.QuickUnion;\n break;\n case 3:\n chosenAlg[0] = algos.WeightedQuickUnion;\n break;\n case 4:\n chosenAlg[0] = algos.QuickUnionPathCompression;\n break;\n case 5:\n chosenAlg = new algos[4];\n chosenAlg[0] = algos.QuickFind;\n chosenAlg[1] = algos.QuickUnion;\n chosenAlg[2] = algos.WeightedQuickUnion;\n chosenAlg[3] = algos.QuickUnionPathCompression;\n break;\n }\n StdOut.println(\"GraphicsRunner currently running \" + reps+ \"reps of algorithm #\"+algSelection);\n\n //init's drawing field\n StdDraw.setCanvasSize(APPLICATION_SIZE, APPLICATION_SIZE);\n StdDraw.setPenColor(closedSite);\n StdDraw.filledSquare(APPLICATION_SIZE / 2, APPLICATION_SIZE / 2, APPLICATION_SIZE);\n\n long start, end;\n\n //runs through the chosenAlg[] runs\n for (algos currentAlg : chosenAlg) {\n start = System.currentTimeMillis();\n double total = 0;\n for (int j = 0; j < reps; j++) {\n total += calcPercolate(currentAlg);\n }\n end = System.currentTimeMillis();\n StdOut.println(currentAlg + \"\\nAverage Percolation Probability: \" + total / reps / (N * N));\n StdOut.println(\"Time Taken (with graphics): \" + (end - start) + \" ms\\n\");\n }\n }", "public String printGrid() {\n String s = \"KEY: \\n- (sea) = no boat not shot\"\n + \"\\nM (miss) = no boat SHOT \"\n +\" \\nB (boat) = boat not shot\"\n + \"\\nH (hit) = boat SHOT\"\n + \"\\n***********************************************************\\n\";\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n s += decideLetter(grid[i][j]) + \"\\t\";\n }\n s += \"\\n\";\n }\n return s;\n }", "public void showBoardState() {\n System.out.print(\" \");\n //top row X axis\n for(int i = 0; i < boardSize; i++){\n System.out.print(\" \" + i + \" \");\n }\n System.out.println();\n for (int i = 0; i < boardSize; i++) {\n //conversion 0-9 to char for display as Y axis\n System.out.print(\" \" + (char)(i + 'A') + \" \");\n for (int j = 0; j < boardSize; j++) {\n System.out.print(\" \" + board[i][j] + \" \");\n }\n System.out.println();\n\n }\n System.out.println();\n }", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "public static void other() {\n // This is how to generate test data for the grid. (Use the VisibilityGraph algorithm to generate optimal path lengths)\n// ArrayList<Point> points = ReachableNodes.computeReachable(gridGraph, 5, 5);\n// System.out.println(points.size());\n//\n// generateRandomTestDataAndPrint(gridGraph);\n\n //This is how to conduct a running time / path length test for tha algorithm:\n// TestResult test1 = testAlgorithm(gridGraph, sx, sy, ex, ey, 1, 1);\n// System.out.println(test1);\n// TestResult test2 = testAlgorithm(gridGraph, sx, sy, ex, ey, 30, 25);\n// System.out.println(test2);\n }", "void print(){\n\t\tSystem.out.println(\"[\"+x+\",\"+y+\"]\");\n\t}", "public static void main(String[] args) {\r\n\r\n game.getCurrentPlayer().takeTurn();\r\n game.printGrid();\r\n while (!game.gameEnd()) {\r\n game.nextPlayer();\r\n game.getCurrentPlayer().takeTurn();\r\n game.printGrid();\r\n }\r\n }", "private void printNetworks() {\n// for (GeneticNeuralNetwork network : networks)\n// System.out.println(network);\n// System.out.println(\"----------***----------\");\n// ////\n }", "public void setup()\n {\t\nint i;\n// Clear screen and depth buffer\n\n\n }", "public static void main (String[] args) {\n new JOGLFrame(new SelectGrid(args));\n }", "public static void main(String[] args) throws IOException {\n\t\tGridWorld[] workSpace = new GridWorld[50];\r\n\r\n\t\t//create 50 grid worlds to put in the array and within the grid worlds initiate all the cells\r\n\t\tfor(int i = 0; i < 50; i++) {\r\n\t\t\tGridWorld g = new GridWorld(i);\r\n\t\t\tfor(int j = 0; j < gridDimmension; j++) {\r\n\t\t\t\tfor(int k = 0; k < gridDimmension; k++) {\r\n\t\t\t\t\tg.grid[j][k] = new cell();\r\n\t\t\t\t\tg.grid[j][k].setCellCoordinates(j, k);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tworkSpace[i] = g;\r\n\t\t}\r\n\t\t\r\n\t\tRandom rand = new Random();\r\n\r\n\t\t//have to setup the grid world \"maze\" for each grid world in the workspace\r\n\t\tfor(GridWorld g: workSpace) {\r\n\t\t\t//need to visit all 101x101 cells\r\n\t\t\tint x;\r\n\t\t\tint y;\r\n\t\t\twhile(g.counter != (gridDimmension*gridDimmension)) {\r\n\t\t\t\t//if the stack is empty we want to just pick a random unvisited cell and start from there\r\n\t\t\t\tif(g.myStack.isEmpty()) {\r\n\t\t\t\t\t//start by picking a random cell\r\n\t\t\t\t\tcell starter = selectRandomCell(g);\r\n\t\t\t\t\tx = starter.x;\r\n\t\t\t\t\ty = starter.y;\r\n\t\t\t\t\t//if we pick a cell thats already been visited we want to pick another one at random until we find one that hasn't\r\n\t\t\t\t\twhile(g.grid[x][y].visited) {\r\n\t\t\t\t\t\tstarter = selectRandomCell(g);\r\n\t\t\t\t\t\tx = starter.x;\r\n\t\t\t\t\t\ty = starter.y;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//mark the random cell as visited and unblocked\r\n\r\n\t\t\t\t\tg.grid[x][y].setVisited();\r\n\t\t\t\t\tg.grid[x][y].setStatus(unblocked);\r\n\t\t\t\t\t//increment the counter to show one more cell has been visited\r\n\t\t\t\t\tg.counter++;\r\n\r\n\t\t\t\t\t//select a random neighbor\r\n\t\t\t\t\t//1 = move left, 2 = move right, 3 = go up, 4 = go down\r\n\t\t\t\t\t//x is up and down, y is left or right\r\n\t\t\t\t\twhile(!deadEnd(g, x, y)) {\r\n\t\t\t\t\t\tString options = \"lrud\";\r\n\t\t\t\t\t\tif(y - 1 < 0) {\r\n\t\t\t\t\t\t\toptions = options.replace('l', 'q');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(y + 1 >= gridDimmension) {\r\n\t\t\t\t\t\t\toptions = options.replace('r', 'q');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(x + 1 >=gridDimmension) {\r\n\t\t\t\t\t\t\toptions = options.replace('u', 'q');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(x - 1 < 0) {\r\n\t\t\t\t\t\t\toptions = options.replace('d', 'q');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tint r;\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\tr = rand.nextInt(4) + 1;\r\n\t\t\t\t\t\t}while(!randomNeighborChecker(g, x, y, options, r));\r\n\r\n\t\t\t\t\t\t//now that we know which way we are going we can move where we need to go\r\n\t\t\t\t\t\tif(r == 1) {\r\n\t\t\t\t\t\t\ty-=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(r == 2) {\r\n\t\t\t\t\t\t\ty+=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(r == 3) {\r\n\t\t\t\t\t\t\tx-=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(r == 4) {\r\n\t\t\t\t\t\t\tx+=1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//the new coordinates of the cell to work on have been chosen\r\n\t\t\t\t\t\t//with 30% chance mark the cell as blocked, with 70% chance mark the cell as unblocked and add to stack\r\n\t\t\t\t\t\tint blockedNum = rand.nextInt(100);\r\n\t\t\t\t\t\tif(blockedNum <= 30) {\r\n\t\t\t\t\t\t\tg.grid[x][y].setVisited();\r\n\t\t\t\t\t\t\tg.grid[x][y].setStatus(blocked);\r\n\t\t\t\t\t\t\tg.counter++;\r\n\t\t\t\t\t\t} else if(blockedNum > 70) {\r\n\t\t\t\t\t\t\tg.grid[x][y].setVisited();\r\n\t\t\t\t\t\t\tg.grid[x][y].setStatus(unblocked);\r\n\t\t\t\t\t\t\tg.myStack.push(g.grid[x][y]);\r\n\t\t\t\t\t\t\tg.counter++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//if the stack is not empty we do the same exact process \r\n\t\t\t\t//only difference is we don't choose a random cell we choose the one we popped from the stack\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tcell temp = g.myStack.pop();\r\n\t\t\t\t\tx = temp.x;\r\n\t\t\t\t\ty = temp.y;\r\n\r\n\r\n\t\t\t\t\t//select a random neighbor\r\n\t\t\t\t\t//1 = move left, 2 = move right, 3 = go up, 4 = go down\r\n\t\t\t\t\t//x is up and down, y is left or right\r\n\t\t\t\t\twhile(!deadEnd(g, x, y)) {\r\n\t\t\t\t\t\tString options = \"lrud\";\r\n\t\t\t\t\t\tif(y - 1 < 0) {\r\n\t\t\t\t\t\t\toptions = options.replace('l', 'q');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(y + 1 >= gridDimmension) {\r\n\t\t\t\t\t\t\toptions = options.replace('r', 'q');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(x + 1 >= gridDimmension) {\r\n\t\t\t\t\t\t\toptions = options.replace('u', 'q');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(x - 1 < 0) {\r\n\t\t\t\t\t\t\toptions = options.replace('d', 'q');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tint r;\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\tr = rand.nextInt(4) + 1;\r\n\t\t\t\t\t\t}while(!randomNeighborChecker(g, x, y, options, r));\r\n\r\n\t\t\t\t\t\t//now that we know which way we are going we can move where we need to go\r\n\t\t\t\t\t\tif(r == 1) {\r\n\t\t\t\t\t\t\ty-=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(r == 2) {\r\n\t\t\t\t\t\t\ty+=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(r == 3) {\r\n\t\t\t\t\t\t\tx-=1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(r == 4) {\r\n\t\t\t\t\t\t\tx+=1;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//the new coordinates of the cell to work on have been chosen\r\n\t\t\t\t\t\t//with 30% chance mark the cell as blocked, with 70% chance mark the cell as unblocked and add to stack\r\n\t\t\t\t\t\tint blockedNum = rand.nextInt(100);\r\n\t\t\t\t\t\tif(blockedNum <= 30) {\r\n\t\t\t\t\t\t\tg.grid[x][y].setVisited();\r\n\t\t\t\t\t\t\tg.grid[x][y].setStatus(blocked);\r\n\t\t\t\t\t\t\tg.counter++;\r\n\t\t\t\t\t\t} else if(blockedNum > 70) {\r\n\t\t\t\t\t\t\tg.grid[x][y].setVisited();\r\n\t\t\t\t\t\t\tg.grid[x][y].setStatus(unblocked);\r\n\t\t\t\t\t\t\tg.myStack.push(g.grid[x][y]);\r\n\t\t\t\t\t\t\tg.counter++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(GridWorld gw: workSpace){\r\n\t\t\t//get goal\r\n\t\t\tcell goal = gw.grid[rand.nextInt(gridDimmension)][rand.nextInt(gridDimmension)];\r\n\t\t\twhile(goal.status == blocked){\r\n\t\t\t\tgoal = gw.grid[rand.nextInt(gridDimmension)][rand.nextInt(gridDimmension)];\r\n\t\t\t}\r\n\t\t\tgw.g = goal;\r\n\t\t\t\r\n\t\t\t//get start(s)\r\n\t\t\tgw.s = new cell[numAgents];\r\n\t\t\tfor(int i=0; i<numAgents; i++){\r\n\t\t\t\tcell start = gw.grid[rand.nextInt(gridDimmension)][rand.nextInt(gridDimmension)];\r\n\t\t\t\twhile(start.status == blocked || start.equals(goal)){\r\n\t\t\t\t\tstart = gw.grid[rand.nextInt(gridDimmension)][rand.nextInt(gridDimmension)];\r\n\t\t\t\t}\r\n\t\t\t\tgw.s[i] = start;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsaveGrid(gw);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Done\");\r\n\t}", "public static void main(String[] args) throws IOException {\n int boardSize = 0, startingPos = 0;\n\n // Prompt the user and store the results\n System.out.print(\"Enter board size (8 for 8x8 board): \");\n boardSize = getInt();\n System.out.format(\"Enter the beginning square (1 to %d): \", (boardSize * boardSize));\n startingPos = getInt();\n // Create a new board based on user specifications\n Board board = new Board(boardSize, startingPos);\n }", "public static void main(String[] args) throws Exception {\n\n Scanner scn = new Scanner(System.in);\n System.out.println(\"row?\");\n int r = scn.nextInt();\n System.out.println(\"colmn?\");\n int c = scn.nextInt();\n\n int[][] a = new int[r][c];\n\n for (int i = 0; i < r; i++) {\n for (int j = 0; j < c; j++) {\n System.out.println(\"Elements?\");\n a[i][j] = scn.nextInt();\n // System.out.print(a[i][j] + \" \");\n }\n // System.out.println();\n }\n\n // System.out.println(\"\");\n\n for (int j = 0; j < c; j++) {\n\n if (j % 2 == 0) {\n for (int i = 0; i < r; i++) {\n System.out.println(a[i][j]);\n }\n }\n\n else {\n for (int i = r - 1; i >= 0; i--) {\n System.out.println(a[i][j]);\n }\n }\n\n }\n scn.close();\n\n }", "public void printBoard() {\n String value = \"\";\n renderBoard();\n System.out.println(\"\");\n // loop to print out values in rows and columns\n for (int i = 0; i < game.getRows(); i++) {\n for (int j = 0; j < game.getCols(); j++) {\n if (grid[i][j] == 0)\n value = \".\";\n else\n value = \"\" + grid[i][j];\n System.out.print(\"\\t\" + value);\n }\n System.out.print(\"\\n\");\n }\n }", "public void createGrid() {\r\n generator.generate();\r\n }" ]
[ "0.7058749", "0.70352775", "0.6630574", "0.6625752", "0.6601088", "0.6524156", "0.6492608", "0.64924276", "0.6490375", "0.64841276", "0.6455337", "0.63534105", "0.6343511", "0.6329076", "0.6187709", "0.6177402", "0.61593264", "0.61561996", "0.6132294", "0.61298704", "0.61045635", "0.6066757", "0.6028267", "0.6017273", "0.60117286", "0.6000529", "0.5943394", "0.5926214", "0.58955216", "0.5869999", "0.5868357", "0.58460987", "0.5841317", "0.58406967", "0.5829145", "0.582307", "0.58150613", "0.5798815", "0.57976973", "0.57648456", "0.5760932", "0.5751075", "0.5748934", "0.5717275", "0.56787956", "0.56770724", "0.56641775", "0.5655086", "0.56467867", "0.56348836", "0.56346434", "0.56312776", "0.56275165", "0.56200916", "0.56147397", "0.5612064", "0.5609456", "0.5606651", "0.5606369", "0.5605391", "0.55980664", "0.5597463", "0.5596196", "0.55930245", "0.5586074", "0.5582578", "0.55800426", "0.5575971", "0.5571847", "0.5570973", "0.5570051", "0.5566464", "0.5551654", "0.55511814", "0.5550273", "0.5550273", "0.5545373", "0.5542862", "0.5542339", "0.5534016", "0.55327827", "0.5529458", "0.55284166", "0.55283624", "0.55177724", "0.5517754", "0.55169976", "0.5510657", "0.55038136", "0.5502051", "0.5501701", "0.55016226", "0.5496733", "0.5491298", "0.5490032", "0.5485332", "0.5484919", "0.5484396", "0.54801965", "0.5474466" ]
0.5522188
84
TODO Autogenerated method stub
@Override public boolean onLongClick(View v) { if (mSpinner.getSelectedItemPosition() >= str1.length) { mIsDelete = true; Builder builder = new Builder(MainActivity.this); builder.setMessage("确认删除此项吗?"); builder.setTitle("提示"); builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub String[] strArray = { mSpinner .getSelectedItem().toString() }; mWebDao.delete(strArray); list.remove(mSpinner .getSelectedItemPosition()); adapter.notifyDataSetChanged(); dialog.dismiss(); } }); builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub dialog.dismiss(); } }); builder.create().show(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(DialogInterface dialog, int which) { String[] strArray = { mSpinner .getSelectedItem().toString() }; mWebDao.delete(strArray); list.remove(mSpinner .getSelectedItemPosition()); adapter.notifyDataSetChanged(); dialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (mSpinner.getSelectedItemPosition() >= str1.length) { mDesTextView.setVisibility(View.VISIBLE); // Toast toast = Toast.makeText(MainActivity.this, "长按此项可删除", // 2000); // toast.setGravity(Gravity.TOP, 0, 150); // toast.show(); }else { mDesTextView.setVisibility(View.GONE); } if (!mIsBack) { url = map.get(mSpinner.getSelectedItem()); if (url != null) mWebView.loadUrl(url); else { } if (mIsDelete) { listSpinnerPosition.remove(listSpinnerPosition.size() - 1); listSpinnerText.remove(listSpinnerText.size() - 1); } listSpinnerText.add(mSpinner.getSelectedItem().toString()); listSpinnerPosition.add(mSpinner.getSelectedItemPosition()); autoScrollTextView.setText(mSpinner.getSelectedItem() .toString()); autoScrollTextView.init(getWindowManager()); autoScrollTextView.startScroll(); } mIsBack = false; mIsDelete = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onNothingSelected(AdapterView<?> parent) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case Menu.FIRST + 1: Intent intent=new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_SUBJECT, "分享1"); intent.putExtra(Intent.EXTRA_TEXT, map.get(mSpinner.getSelectedItem())); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(Intent.createChooser(intent, getTitle())); break; case Menu.FIRST + 2: Intent intent1 = new Intent(); intent1.setAction(intent1.ACTION_MAIN); intent1.addCategory(intent1.CATEGORY_HOME); startActivity(intent1); default: break; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
fill each nonkalah pit with stones according to game settings, for ex 6 pits 6 stones
@Override public List<Pit> generatePitsFilledWithStones() { List<Pit> pitList = Collections.synchronizedList(new ArrayList<Pit>()); int iCurrentIndex = 1; int iTotalNumberOfPits = GameSettings.NUMBER_OF_PITS_PER_PLAYER * 2 + 2; for (int i = 0; i < iTotalNumberOfPits; i++) { Pit pit = new Pit(iCurrentIndex++); if (!pit.isKalah()) { for (int j = 0; j < GameSettings.NUMBER_OF_STONES_PER_PIT; j++) { pit.addStone(new Stone()); } } pitList.add(pit); } return pitList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setShips(){\n\t\t\n\t\tint x,y;\n\t\tboolean orientacja;\n\t\tRandom generator = new Random();\n\t\t\n\t\tint ilosc = 1;\n\t\tint j = 0;\n\t\tfor(int i = 4; i > 0 ; i--){\n\t\t\twhile( j < ilosc ){\n\t\t\t\tx = generator.nextInt( 13 );\t\t\n\t\t\t\ty = generator.nextInt( 13 );\n\t\t\t\torientacja = generator.nextBoolean();\n\t\t\t\tif( isPossibleAddShip(x, y, i, orientacja) ) j++;\t\n\t\t\t}\n\t\tilosc++;\n\t\tj=0;\n\t\t}\n\t\t\n\t}", "public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}", "public void populateRandomly(final EVGameState state)\n \t{\n \t\tfor (int i = 0; i < 6; i++) {\n \t\t\tfinal int width = MathUtils.getRandomIntBetween(32, 128);\n \t\t\tfinal int height = MathUtils.getRandomIntBetween(24, 72);\n \t\t\tfinal Point3D origin = getRandomSolarPoint(Math.max(width, height));\n \t\t\tfinal SolarSystem tSolar = SolarSystem.randomSolarSystem(width, height, origin, state);\n \t\t\taddSolarSystem(tSolar);\n \t\t}\n\t\tfor (int i = 0; i < 10; i++) {\n \t\t\tfinal SolarSystem ss1 = (SolarSystem) MathUtils.getRandomElement(aSolarSystems.values());\n \t\t\tfinal SolarSystem ss2 = (SolarSystem) MathUtils.getRandomElement(aSolarSystems.values());\n \t\t\tif (ss1.equals(ss2)) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tfinal Portal portal1 = new Portal(state.getNextPropID(), state.getNullPlayer(), ss1.getWormholeLocation(), ss1, ss2);\n \t\t\tfinal Portal portal2 = new Portal(state.getNextPropID() + 1, state.getNullPlayer(), ss2.getWormholeLocation(), ss2,\n \t\t\t\t\tss1);\n \t\t\tfinal Wormhole tempWorhmhole = new Wormhole(portal1, portal2, ss1.getPoint3D().distanceTo(ss2.getPoint3D()), state);\n \t\t\taddWormhole(tempWorhmhole, state);\n \t\t}\n \t}", "Game() {\n this.id = new Random(100).nextInt();\n this.board = new ArrayList<>();\n for (int i = 0; i < NUMBER_OF_ALL_HOUSES_AND_KALAHS; i++) {\n // Add Kalah on n-th position and 2*n-1 position\n if (i == NUMBER_OF_HOUSES || i == NUMBER_OF_ALL_HOUSES_AND_KALAHS - 1) {\n this.board.add(new Pit(0));\n }\n this.board.add(new Pit(NUMBER_OF_SEEDS));\n }\n }", "public void reset() {\n // White Pieces\n placePiece(new Rook(Player.White), new Position(\"a1\"));\n placePiece(new Knight(Player.White), new Position(\"b1\"));\n placePiece(new Bishop(Player.White), new Position(\"c1\"));\n placePiece(new Queen(Player.White), new Position(\"d1\"));\n placePiece(new King(Player.White), new Position(\"e1\"));\n placePiece(new Bishop(Player.White), new Position(\"f1\"));\n placePiece(new Knight(Player.White), new Position(\"g1\"));\n placePiece(new Rook(Player.White), new Position(\"h1\"));\n placePiece(new Pawn(Player.White), new Position(\"a2\"));\n placePiece(new Pawn(Player.White), new Position(\"b2\"));\n placePiece(new Pawn(Player.White), new Position(\"c2\"));\n placePiece(new Pawn(Player.White), new Position(\"d2\"));\n placePiece(new Pawn(Player.White), new Position(\"e2\"));\n placePiece(new Pawn(Player.White), new Position(\"f2\"));\n placePiece(new Pawn(Player.White), new Position(\"g2\"));\n placePiece(new Pawn(Player.White), new Position(\"h2\"));\n\n // Black Pieces\n placePiece(new Rook(Player.Black), new Position(\"a8\"));\n placePiece(new Knight(Player.Black), new Position(\"b8\"));\n placePiece(new Bishop(Player.Black), new Position(\"c8\"));\n placePiece(new Queen(Player.Black), new Position(\"d8\"));\n placePiece(new King(Player.Black), new Position(\"e8\"));\n placePiece(new Bishop(Player.Black), new Position(\"f8\"));\n placePiece(new Knight(Player.Black), new Position(\"g8\"));\n placePiece(new Rook(Player.Black), new Position(\"h8\"));\n placePiece(new Pawn(Player.Black), new Position(\"a7\"));\n placePiece(new Pawn(Player.Black), new Position(\"b7\"));\n placePiece(new Pawn(Player.Black), new Position(\"c7\"));\n placePiece(new Pawn(Player.Black), new Position(\"d7\"));\n placePiece(new Pawn(Player.Black), new Position(\"e7\"));\n placePiece(new Pawn(Player.Black), new Position(\"f7\"));\n placePiece(new Pawn(Player.Black), new Position(\"g7\"));\n placePiece(new Pawn(Player.Black), new Position(\"h7\"));\n }", "@Override\n\tprotected void placeStones(int numStones) {\n\n\t\tShape pitBounds = this.getShape();\n\t\tdouble pitW = pitBounds.getBounds().getWidth();\n\t\tdouble pitH = pitBounds.getBounds().getHeight();\n\t\t\n\n\t\tint stoneWidth = this.stoneIcon.getIconWidth();\n\t\tint stoneHeight = this.stoneIcon.getIconHeight();\n\n\t\t\t\n\t\tfor (int i = 0; i < numStones; i++){\n\t\t\tboolean locationFound = false;\n\t\t\tdo{\n\t\t\t\tfloat x = (float) Math.random();\n\t\t\t\tfloat y = (float) Math.random();\n\n\t\t\t\tx *= pitW;\n\t\t\t\ty *= pitH;\n\t\t\t\t\n\t\t\t\tEllipse2D.Float stoneBounds = new Ellipse2D.Float((float) (x+pitBounds.getBounds().getX()), (float) (y+pitBounds.getBounds().getY()), (float) (stoneWidth), (float) (stoneHeight));\n\n\t\t\t\tSystem.out.println(stoneBounds.getBounds());\n\t\t\t\tpitBounds.getBounds().setLocation(0, 0);\n\t\t\t\tArea pitArea = new Area(pitBounds);\n\t\t\t\tArea pendingStoneLocation = new Area(stoneBounds);\n\t\t\t\tArea intersectionArea = (Area) pitArea.clone();\n\t\t\t\tintersectionArea.add(pendingStoneLocation);\n\t\t\t\tintersectionArea.subtract(pitArea);\n\t\t\t\t\n\t\t\t\tif(intersectionArea.isEmpty() ){\n\t\t\t\t\tlocationFound = true;\n\t\t\t\t\tPoint2D p = new Point2D.Float((float) (x/pitW), (float) (y/pitH));\n\t\t\t\t\trelativeStoneLocations.add(p);\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} while(!locationFound);\n\t\n\t\t}\n\t}", "public void presetPattern(){\n // clear all the cells\n for (int i = 0; i < game.grid.length; i++){\n for (int j = 0; j<game.grid[0].length; j++){\n game.grid[i][j] = false;\n }\n }\n \n // change specific cells to live\n for (int i = 7; i < 12; i++) {\n for (int j = 7; j < 12; j++) {\n game.grid[i][j] = true;\n }\n }\n \n // remove middle cell\n game.grid[9][9] = false;\n \n repaint();\n }", "public void setStartConditions() {\r\n\t\tplayer1.relocate(0, 0);\r\n\t\tgamemap.setPlayerLocation(1, 1);\r\n\t\tgamemap.setEnemyLocation(20, 10);\r\n\t\tenemy1.relocate(19*46, 9*85);\r\n\t\tportal1.relocate(9*46, 9*85);\r\n\t\tportal2.relocate(9*46, 0*85);\r\n\t\tspikes1.relocate(5*46,0*85);\r\n\t\tspikes2.relocate(5*46,1*85);\r\n\t\tspikes3.relocate(5*46,2*85);\r\n\t\tspikes4.relocate(5*46,7*85);\r\n\t\tspikes5.relocate(5*46,8*85);\r\n\t\tspikes6.relocate(5*46,9*85);\r\n\t\tspikes7.relocate(10*46,2*85);\r\n\t\tspikes8.relocate(10*46,3*85);\r\n\t\tspikes9.relocate(10*46,4*85);\r\n\t\tspikes10.relocate(10*46,5*85);\r\n\t\tspikes11.relocate(10*46,6*85);\r\n\t\tspikes12.relocate(10*46,7*85);\r\n\t\tspikes13.relocate(15*46,0*85);\r\n\t\tspikes14.relocate(15*46,1*85);\r\n\t\tspikes15.relocate(15*46,2*85);\r\n\t\tspikes16.relocate(15*46,7*85);\r\n\t\tspikes16.relocate(15*46,8*85);\r\n\t\tspikes17.relocate(15*46,9*85);\r\n\t\tRandom randomObj = new Random();\r\n\t\tint randomX = randomObj.nextInt(20);\r\n\t\tint randomY = randomObj.nextInt(10);\r\n\t\tcoins1.relocate(randomX*46, randomY*85);\r\n\t\tgamemap.setLootLocation(randomX + 1, randomY + 1);\r\n\t\t//coins1.relocate(10*46,5*85);\r\n\t\t//gamemap.setLootLocation(11, 6);\r\n\t}", "public void setPieces(){\r\n Pawn[] arrwPawn = new Pawn[8];\r\n for (int i=0 ; i<8 ; i++){\r\n pos.setPosition(6,i);\r\n arrwPawn[i] = new Pawn (pos , piece.Colour.WHITE);\r\n GameBoard.putPiece(arrwPawn[i]);\r\n }\r\n\r\n Pawn[] arrbPawn = new Pawn[8];\r\n for(int i=0 ; i<8 ; i++){\r\n pos.setPosition(0,i);\r\n arrbPawn[i] = new Pawn(pos , piece.Colour.BLACK);\r\n GameBoard.putPiece(arrbPawn[i]);\r\n }\r\n\r\n\r\n //set black pieces in the board\r\n\r\n pos.setPosition(0,0);\r\n Rook bRook1 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook1);;\r\n\r\n pos.setPosition(0,7);\r\n Rook bRook2 = new Rook(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bRook2);\r\n\r\n\r\n pos.setPosition(0,1);\r\n Knight bKnight1 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,6);\r\n Knight bKnight2 = new Knight(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKnight1);\r\n\r\n pos.setPosition(0,2);\r\n Bishop bBishop1 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop1);\r\n\r\n pos.setPosition(0,5);\r\n Bishop bBishop2 = new Bishop(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bBishop2);\r\n\r\n pos.setPosition(0,3);\r\n Queen bQueen = new Queen(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bQueen);\r\n\r\n pos.setPosition(0,4);\r\n King bKing = new King(pos, piece.Colour.BLACK);\r\n GameBoard.putPiece(bKing);\r\n\r\n //set white pieces in the board\r\n\r\n pos.setPosition(7,0);\r\n Rook wRook1 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook1);\r\n\r\n pos.setPosition(7,7);\r\n Rook wRook2 = new Rook(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wRook2);\r\n\r\n pos.setPosition(7,1);\r\n Knight wKnight1 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,6);\r\n Knight wKnight2 = new Knight(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKnight1);\r\n\r\n pos.setPosition(7,2);\r\n Bishop wBishop1 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop1);\r\n\r\n pos.setPosition(7,5);\r\n Bishop wBishop2 = new Bishop(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wBishop2);\r\n\r\n pos.setPosition(7,3);\r\n Queen wQueen = new Queen(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wQueen);\r\n\r\n pos.setPosition(7,4);\r\n King wKing = new King(pos, piece.Colour.WHITE);\r\n GameBoard.putPiece(wKing);\r\n\r\n\r\n\r\n Rook arrwRook[] = {wRook1,wRook2};\r\n Rook arrbRook[] = {bRook1,bRook2};\r\n Queen arrwQueen[] = {wQueen};\r\n Queen arrbQueen[] = {bQueen};\r\n Knight arrwKnight[] = {wKnight1,wKnight2};\r\n Knight arrbKnight[] = {bKnight1,bKnight2};\r\n King arrwKing[] = {wKing};\r\n King arrbKing[] = {bKing};\r\n Bishop arrwBishop[] = {wBishop1,wBishop2};\r\n Bishop arrbBishop[] = {bBishop1,bBishop2};\r\n }", "public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}", "public static void plaatsComputerVloot(){\n\t\tfor (int iPlaats = 0; iPlaats < 5; iPlaats++){\n\t\t\tboolean shipOrientation = Math.random() < 0.5;\n\t\t\tGame.computer1.fleet.get(iPlaats).horizontal = shipOrientation;\n\t\t\tif (Game.computer1.fleet.get(iPlaats).horizontal) {\n\t\t\t\tGame.computer1.fleet.get(iPlaats).switchlb();\n\t\t\t}\n\t\t\tRandom random = new Random();\n\t\t\tboolean conflict = false;\n\t\t\tif(Game.computer1.fleet.get(iPlaats).horizontal){ //horizontaal\n\t\t\t\tint randomx = random.nextInt(11 - Game.computer1.fleet.get(iPlaats).getBreedte());\n\t\t\t\tint randomy = random.nextInt(10);\n\t\t\t\tfor(int xLoper=0; xLoper < Game.computer1.fleet.get(iPlaats).getBreedte();xLoper++){ //controleer coordinaten die huidige schip wil hebben op conflicten\n\t\t\t\t\tfor(int iConflictIndex=0; iConflictIndex < iPlaats; iConflictIndex++){// deze lus pakt alle eerder geplaatste schepen (heeft geen zin om nog niet geplaatste schepen te controleren)\n\t\t\t\t\t\tfor(int iConflictCo=0;iConflictCo < Game.computer1.fleet.get(iConflictIndex).coordinates.length;iConflictCo++){ //doorloopt coordinaten van een eerder geplaatst schip en controleert op overeenkomsten.\n\t\t\t\t\t\t\tif(Game.computer1.fleet.get(iConflictIndex).coordinates[0][iConflictCo] == randomx+xLoper && Game.computer1.fleet.get(iConflictIndex).coordinates[1][iConflictCo] == randomy){\n\t\t\t\t\t\t\t\tconflict = true; //indien overeenkomst, is er een conflict.\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!conflict){\n\t\t\t\t\tfor(int l = 0; l < Game.computer1.fleet.get(iPlaats).getBreedte(); l++){ \n\t\t\t\t\t\tGame.computer1.fleet.get(iPlaats).coordinates[0][l] = randomx + l;\n\t\t\t\t\t\tGame.computer1.fleet.get(iPlaats).coordinates[1][l] = randomy;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{ //verticaal. komt grotendeels overeen met horizontaal, commentaar: zie daar.\n\t\t\t\tint randomx = random.nextInt(10);\n\t\t\t\tint randomy = random.nextInt(11 - Game.computer1.fleet.get(iPlaats).getLengte());\n\t\t\t\tfor(int yLoper=0; yLoper < Game.computer1.fleet.get(iPlaats).getLengte();yLoper++){\n\t\t\t\t\tfor(int iConflictIndex=0; iConflictIndex < iPlaats; iConflictIndex++){\n\t\t\t\t\t\tfor(int iConflictCo=0;iConflictCo < Game.computer1.fleet.get(iConflictIndex).coordinates.length;iConflictCo++){\n\t\t\t\t\t\t\tif(Game.computer1.fleet.get(iConflictIndex).coordinates[0][iConflictCo] == randomx && Game.computer1.fleet.get(iConflictIndex).coordinates[1][iConflictCo] == randomy+yLoper){\n\t\t\t\t\t\t\t\tconflict = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!conflict){\n\t\t\t\t\tfor(int l = 0; l < Game.computer1.fleet.get(iPlaats).getLengte(); l++){\n\t\t\t\t\t\tGame.computer1.fleet.get(iPlaats).coordinates[0][l] = randomx;\n\t\t\t\t\t\tGame.computer1.fleet.get(iPlaats).coordinates[1][l] = randomy + l;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(conflict){\n\t\t\t\tiPlaats--;\n\t\t\t}\n\t\t}\n\t\tspelen(); //alles geplaatst, dan spelen.\n\t}", "public void setTiles() {\n\t\tTileStack names = new TileStack();\n\t\tfor(int x=0; x < theBoard.getCols(); x++) {\n\t\t\tfor(int y=0; y < theBoard.getRows(); y++) {\n\t\t\t\tp = new Point(x,y);\n\t\t\t\tif(p.equals(new Point(0,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse \n\t\t\t\t\ttheBoard.setTile(p, names.pop());\n\t\t\t}\n\t\t}\n\t}", "public void setRemainingToScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tgrid[i][j]=new Scenery(i*grid[0].length+j);\n\t\t\t}\n\t\t}\n\t}", "public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }", "public void shuffle(){\n\t\t\n\t\tArrayList<Boolean> used = new ArrayList<Boolean>();\n\t\tArrayList<Integer> copyStones = new ArrayList<Integer>();\n\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\tcopyStones.add(gameStones.get(e));\n\t\t\tused.add(false);\n\t\t}\n\t\tfor(int e : copyStones){\n\t\t\tchar l = stoneChars.get(e);\n\t\t\tboolean placed = false;\t\t\n\t\t\twhile(!placed){\n\t\t\t\tint randNumber = (int) (Math.random() * 7);\n\t\t\t\tif(!used.get(randNumber)){\n\t\t\t\t\tgameStones.set(randNumber, e);\n\t\t\t\t\tstoneLetters.set(randNumber, l);\n\t\t\t\t\tused.set(randNumber, true);\n\t\t\t\t\tplaced = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void initGame() {\n\t\tfor (int i = 0; i < gameSize; i++) {\n\t\t\tfor (int j = 0; j < gameSize; j++) {\n\t\t\t\tgrid[i][j] = new GridNode(GridNode.NodeType.EMPTY);\n\t\t\t\tgridLocker[i][j] = -1;\n\t\t\t}\n\t\t}\n\n\t\t// Snakes are placed into start positions here\n\t\tfor (int i = 0; i < snakesList.size(); i++) {\n\t\t\tint x = (int) (Math.random() * 1000) % gameSize;\n\t\t\tint y = (int) (Math.random() * 1000) % gameSize;\n\t\t\tif (grid[x][y].nodeType == GridNode.NodeType.EMPTY) {\n\t\t\t\tSnake currentSnake = snakesList.get(i);\n\t\t\t\tgrid[x][y].SnakeID = currentSnake.snakeID;\n\t\t\t\tcurrentSnake.initalizeSnakeLocation(x, y, gameSize);\n\t\t\t\tgrid[x][y].nodeType = GridNode.NodeType.SNAKEHEAD;\n\t\t\t} else {\n\t\t\t\t// Every snake has to be allocated a spot so go back to the\n\t\t\t\t// index\n\t\t\t\t// of the snake to add and try again\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// Places some snake food randomly somewhere\n\t\tfor(int i = 0; i <4; i++) {\n\t\t\tplaceBonus();\n\t\t}\n\t}", "protected void putMonsters() {\n\t\tRandom rand = new Random();\n\t\tfor (int monsterCount = 0; monsterCount < 4; monsterCount++){\n\t\t\tint x, y;\n\t\t\tdo {\n\t\t\t\tx = rand.nextInt(xSize);\n\t\t\t\ty = rand.nextInt(ySize);\n\t\t\t} while((levelSetup[x][y] instanceof SimpleRoom) && (x == 0 & y == 0) && !levelSetup[x][y].hasItem());\n\t\t\tlevelSetup[x][y].putMonster(new BasicMonster());\n\t\t}\n\t}", "public void reset() {\n state = new boolean[gridSize - 1][gridSize - 1];\n /* Clear state and pellets arrays */\n for (int i = 0; i < state.length; i++) {\n for (int j = 0; j < state.length; j++) {\n state[i][j] = true;\n }\n }\n\n for (int i = 0; i < state.length; i++) {\n for (int j = 0; j < state.length; j++) {\n if (state[i][j])\n pellets[i][j] = true;\n }\n }\n\n //reset traversed\n for (int i = 0; i < traversedTiles.length; i++) {\n for (int j = 0; j < traversedTiles.length; j++) {\n traversedTiles[i][j] = false;\n }\n }\n\n// plannedPoint = new Point();\n plannedPath = new ArrayList<>();\n player.resetPlayer(200, 300);\n ghosts.get(0).resetGhost(180, 180);\n ghosts.get(1).resetGhost(200, 180);\n ghosts.get(2).resetGhost(220, 180);\n updateStateAccordingToMap();\n\n //Resetting total pellet counter\n totalPellets = 0;\n pellets[9][7] = false;\n pellets[8][8] = false;\n pellets[9][8] = false;\n pellets[10][8] = false;\n\n for (int i = 0; i < pellets.length; i++)\n for (int j = 0; j < pellets.length; j++)\n if (pellets[i][j])\n totalPellets++;\n\n System.out.println(\"Total pellets on the map: \" + totalPellets);\n }", "private void addPowerUps() {\n\t\tfor (int i = 0; i < 4; i++) {\n\n\t\t\tint x = (int) (Math.random() * 10);\n\t\t\tint y = (int) (Math.random() * 10);\n\n\t\t\twhile (pgrid[x][y] != 0) { // prevents overlaps\n\t\t\t\tx = (int) (Math.random() * 10);\n\t\t\t\ty = (int) (Math.random() * 10);\n\t\t\t}\n\n\t\t\tpgrid[x][y] = 2;\n\t\t}\n\t}", "private void initialize()\n {\n for(int i=0;i<4;i++)\n {\n foundationPile[i]= new Pile(Rank.ACE);\n foundationPile[i].setRules(true, false, false, false, true,false, true);\n } \n for(int i=0;i<7;i++)\n {\n tableauHidden[i] = new Pile();\n tableauVisible[i] = new Pile(Rank.KING);\n tableauVisible[i].setRules(false, true, false, false, false,false, true);\n } \n deck.shuffle();\n deck.shuffle();\n dealGame();\n }", "public void setSpawns() {\n List<Tile> spawns = this.board.getSpawns();// get all the possible spawns from board\n List<Tile> usedSpawns = new ArrayList<Tile>();// empty list used to represent all the spawns that have been used so no playerPiece gets the same spawn\n for (PlayerPiece playerPiece : this.playerPieces) { // for each playerPiece\n boolean hasSpawn = false; // boolean to represent whether the playerPiece has a spawn and used to initiate and stop the following while loop.\n while (!hasSpawn) { // while hasSpawn is false.\n int random_int = (int) (Math.random() * spawns.size());// get random number with max number of the total possible tiles the pieces can spawn from\n Tile spawn = spawns.get(random_int); // get spawn from spawns list using the random int as an index\n if (!usedSpawns.contains(spawn)) {// if the spawn isn't in the usedSpawn list\n playerPiece.setLocation(spawn);// set the location of the playerPiece to the spawn\n usedSpawns.add(spawn);//add the spawn to usedSpawns\n hasSpawn = true; // set the variable to true so the while loop stops.\n }\n }\n }\n }", "private void placeAllShips()\n {\n \t\n \t//place 2 aircrafts\n \tfor(int n = 0; n < 2; n++){\n \trandomRow = rnd.nextInt(10); //get random integer from 0-9\n \trandomCol = rnd.nextInt(10);//get random integer from 0-9\n \trandomDir = rnd.nextInt(2);//get random integer from 0-1\n \twhile(!checkOverlap(randomRow,randomCol,AIRCRAFT_CARRIER_LENGTH)){ //check if random integers overlap existing ones\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \t//place aircraft if no overlap\n \tfor(int i = randomRow; i <randomRow + AIRCRAFT_CARRIER_LENGTH ; i++){\n \t\tfor(int j = randomCol; j < randomCol + AIRCRAFT_CARRIER_LENGTH; ++j){\n \t\t\tif(randomDir == DIRECTION_RIGHT)\n \t\t\t\tgrid[i][randomCol] = SHIP;\n \t\t\tif(randomDir == DIRECTION_DOWN)\n \t\t\t\tgrid[randomRow][j] = SHIP;\n \t\t\t}\n \t\t}\n \t}\n \t\n \t\n \t//place battleship\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,BATTLESHIP_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i <randomRow + BATTLESHIP_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + BATTLESHIP_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\t\n \t//place destroyer\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,DESTROYER_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + DESTROYER_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + DESTROYER_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\t\n \t//place submarine\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,SUBMARINE_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + SUBMARINE_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + SUBMARINE_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\n \t//place patrol\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,PATROL_BOAT_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + PATROL_BOAT_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + PATROL_BOAT_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\n }", "void defaultsetup(int phi) \n {// The Images should be loded here... Also add labels here\n System.out.println(\"IN DEFAULT SETUP..\");\n if( phi == 0) \n whiteToPlay = true;\n else if (phi == 1) \n whiteToPlay = false;\n // White Chess Pieces\n whiteHorse1.position = 1; whiteHorse1.color = 0;\n whiteHorse2.position = 6; whiteHorse2.color = 0;\n whiteQueen.position = 3; whiteQueen.color = 0;\n whiteKing.position =4 ; whiteKing.color = 0;\n whiteCastle1.position = 0; whiteCastle1.color = 0;\n whiteCastle2.position = 7; whiteCastle2.color = 0;\n whiteBishop1.position = 2; whiteBishop1.color = 0;\n whiteBishop2.position = 5; whiteBishop2.color = 0;\n int y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n whitePawn[x] = new pawn();\n whitePawn[x].position = 8+x;\n whitePawn[x].color = 0;\n }\n //Black Chess Pieces\n blackHorse1.position = 57; blackHorse1.color = 1;\n blackHorse2.position = 62; blackHorse2.color = 1;\n blackQueen.position = 59; blackQueen.color = 1;\n blackKing.position = 60; blackKing.color = 1;\n blackCastle1.position = 56;blackCastle1.color = 1;\n blackCastle2.position = 63;blackCastle2.color = 1;\n blackBishop1.position = 58;blackBishop1.color = 1;\n blackBishop2.position = 61;blackBishop2.color = 1;\n y = 8;\n for(int x = 0 ; x < 8; x++)\n {\n blackPawn[x] = new pawn();\n blackPawn[x].position = 48+x;\n blackPawn[x].color = 1;\n }\n \n this.updatePositions();\n }", "private void setShips() {\n //This clears the board. To \"Invalidate\"\n for (int x = 0; x < maxN; x++) {\n for (int y = 0; y < maxN; y++) {\n ivCell[x][y].setBackgroundResource(gridID);\n }\n }\n\n for (Ship s : ships) {\n for (int i = 0; i < s.getShipSize(); i++) {\n if(player)ivCell[s.getBodyLocationPoints()[i].x][s.getBodyLocationPoints()[i].y].setBackgroundResource(s.getBodyResources()[i]);\n updateOccupiedCells(s.getBodyLocationPoints());\n }\n }\n\n }", "public void setTestBoard() {\n\n /*game.setNode(new NodeImp(\"2,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"2,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"3,2\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,3\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,4\",\"P1\"));\n\n game.setNode(new NodeImp(\"3,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,4\",\"P2\"));\n\n game.setNode(new NodeImp(\"4,5\",\"P1\"));\n\n game.setNode(new NodeImp(\"5,5\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,3\",\"P2\"));\n\n game.setNode(new NodeImp(\"3,4\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,3\",\"P1\"));\n\n game.setNode(new NodeImp(\"4,4\",\"P2\"));*/\n\n }", "public void removeAllPawns(){\n\n for (Map.Entry<Integer, ImageView> entry : actionButtons.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n }\n\n for (Map.Entry<Integer, ImageView> entry : harvestBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n harvestBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : productionBox.entrySet()) {\n\n Image image = null;\n entry.getValue().setImage(image);\n productionBoxFreeSlot = 0;\n\n }\n\n for (Map.Entry<Integer, ImageView> entry : gridMap.entrySet()) {\n Image image = null;\n entry.getValue().setImage(image);\n gridFreeSlot = 0;\n }\n }", "public void setBeginningBoard() {\n clearBooleanBoard();\n\n figBoard[0][0] = new Rook(\"white\", 00, white[0]);\n figBoard[0][1] = new Knight(\"white\", 01, white[1]);\n figBoard[0][2] = new Bishop(\"white\", 02, white[2]);\n figBoard[0][4] = new King(\"white\", 04, white[3]);\n figBoard[0][3] = new Queen(\"white\", 03, white[4]);\n figBoard[0][5] = new Bishop(\"white\", 05, white[2]);\n figBoard[0][6] = new Knight(\"white\", 06, white[1]);\n figBoard[0][7] = new Rook(\"white\", 07, white[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[0][i] = true;\n gA.getBoard()[0][i].setRotation(180);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[1][i] = true;\n gA.getBoard()[1][i].setRotation(180);\n figBoard[1][i] = new Pawn(\"white\", 10 + i, white[8]);\n }\n\n figBoard[7][0] = new Rook(\"black\", 70, black[0]);\n figBoard[7][1] = new Knight(\"black\", 71, black[1]);\n figBoard[7][2] = new Bishop(\"black\", 72, black[2]);\n figBoard[7][4] = new King(\"black\", 74, black[3]);\n figBoard[7][3] = new Queen(\"black\", 73, black[4]);\n figBoard[7][5] = new Bishop(\"black\", 75, black[2]);\n figBoard[7][6] = new Knight(\"black\", 76, black[1]);\n figBoard[7][7] = new Rook(\"black\", 77, black[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[7][i] = true;\n gA.getBoard()[7][i].setRotation(0);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[6][i] = true;\n gA.getBoard()[6][i].setRotation(0);\n figBoard[6][i] = new Pawn(\"black\", 60 + i, black[8]);\n }\n\n clearFallenFigures();\n clearBoardBackground();\n clearStringBoard();\n showBoard(); //shows the figures\n showScore();\n setBoardClickable();\n\n if (beginner % 2 == 0)\n this.turn = 0;\n else this.turn = 1;\n\n beginner++;\n\n numberOfBlackFallen = 0;\n numberOfWhiteFallen = 0;\n fallenFiguresWhite = new ArrayList<Figure>();\n fallenFiguresBlack = new ArrayList<Figure>();\n\n showCheck();\n showTurn();\n }", "public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}", "public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }", "public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }", "private void setPoints () {\n\t\tArrayList<Point> emptySpot = new ArrayList<Point>();\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\tif (maze[i][j] == 0) {\n\t\t\t\temptySpot.add(new Point (i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(emptySpot);\n\t\tthis.goal = emptySpot.get(0);\n\t\tdouble goalRange = this.goal.getX() + this.goal.getY();\n\t\tfor (int i = 1; i < emptySpot.size(); i++) {\n\t\t\tPoint playerStart = emptySpot.get(i);\n\t\t\tdouble playerRange = playerStart.getX() + playerStart.getY();\n\t\t\tif (Math.abs(playerRange - goalRange) > width/2)\n\t\t\tthis.playerStart = playerStart;\n\t\t}\n\t}", "public void autoPutShip(int padding) {\n for (int l=3; l>=0; l--) {\n// if already have ships of this type go to another length\n if (decks[l] == (4-l)) continue;\n for (int i = 0; i < (4-l); i++) {\n// if already put ships of that type go on..\n if (decks[l] == (4-l)) continue;\n// choice random side of sea\n// (for optimal placing need to place near it)\n int side = (int) (Math.random() * 4);\n// generate random indent from side corner\n// (like you go counter clock wise)\n int indent = (int) (Math.random() * (10 - l));\n int x = 0, y = 0;\n// for side get direction\n Direction dir = Direction.values()[side];\n// calculate coordinates\n switch (side) {\n case 0:\n x = padding;\n y = indent;\n break;\n case 1:\n x = indent;\n y = 9 - padding;\n break;\n case 2:\n x = 9 - padding;\n y = 9 - indent;\n break;\n case 3:\n x = 9 - indent;\n y = padding;\n break;\n }\n// create ship (just for right coordinates)\n Ship ship = new Ship(x, y, l, dir);\n// and if you can put it - put\n if (canPutShip(ship)) putShip(ship);\n }\n }\n if (!isAllShipsOn()&& padding < 9) autoPutShip(padding + 1);\n }", "public void bonusStones() {\n\t\tint bonus = 1; // final pit player had when landing on empty pit\n\t\tbonus += board[12 - currentPit]; // (12 - currentPit) will get us pit directly across board\n\t\tboard[12 - currentPit] = 0;\n\t\tif (isPlayer1()) { // if player one, place bonus stones in pit 6\n\t\t\tboard[6] += bonus;\n\t\t} else { // if player 2, place stones in pit 13\n\t\t\tboard[13] += bonus;\n\t\t}\n\t}", "public void getRemainingStones() {\n int CountP1 = 0;\n int CountP2 = 0;\n for (int i = 0; i < P1_STORE_PIT; i++) {\n CountP1 += board.getPit(i).getNumberOfStones();\n board.getPit(P1_STORE_PIT).addStones(CountP1);\n }\n for (int i = P1_STORE_PIT + 1; i < P2_STORE_PIT; i++) {\n CountP2 += board.getPit(i).getNumberOfStones();\n board.getPit(P2_STORE_PIT).addStones(CountP2);\n }\n }", "public void creationSable(){\n\t\tfor(int x=2;x<=this.taille-3;x++) {\n\t\tfor(int y=2;y<=this.taille-3;y++) {\n\t\tif( grille.get(x).get(y).getTypeOccupation()==0 &&\n\t\t\t\tgrille.get(x+2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y-2).getTypeOccupation()!=3 ) {\n\t\t\t\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0]=x;\n\t\t\tcoord[1]=y;\n\t\t\tSable sable = new Sable(coord);\n\t\t\tgrille.get(x).set(y, sable);\n\t\t}\n\t\t}\n\t\t}\n\t}", "public void newGame(String p1, String p2, int stonesInEachPit) {\n\t\toriginalCount = stonesInEachPit;\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tif (i == 6 || i == 13) {\n\t\t\t\tboard[i] = 0; \n\t\t\t} else {\n\t\t\t\tboard[i] = originalCount;\n\t\t\t}\n\t\t}\n\t\tplayer1 = new Player(p1,1);\n\t\tplayer2 = new Player(p2,2);\n\t\tcurrentPlayer = player1;\n\t\t//printBoard();\n\t\tSystem.out.println(\"It is now \" + currentPlayer.getName() + \"'s turn\");\n\t}", "@FXML\n public void initialize() {\n\n greenPlayerTrack.put(GoodType.VICTORYPOINTS,greenVictoryPoints);\n greenPlayerTrack.put(GoodType.MILITARYPOINTS,greenMilitaryPoints);\n greenPlayerTrack.put(GoodType.FAITHPOINTS,greenFaithPoints);\n\n redPlayerTrack.put(GoodType.VICTORYPOINTS,redVictoryPoints);\n redPlayerTrack.put(GoodType.MILITARYPOINTS,redMilitaryPoints);\n redPlayerTrack.put(GoodType.FAITHPOINTS,redFaithPoints);\n\n yellowPlayerTrack.put(GoodType.VICTORYPOINTS,yellowVictoryPoints);\n yellowPlayerTrack.put(GoodType.MILITARYPOINTS,yellowMilitaryPoints);\n yellowPlayerTrack.put(GoodType.FAITHPOINTS,yellowFaithPoints);\n\n bluePlayerTrack.put(GoodType.VICTORYPOINTS,blueVictoryPoints);\n bluePlayerTrack.put(GoodType.MILITARYPOINTS,blueMilitaryPoints);\n bluePlayerTrack.put(GoodType.FAITHPOINTS,blueFaithPoints);\n\n gridMap.put(0,grid0);\n gridMap.put(1,grid1);\n gridMap.put(2,grid2);\n gridMap.put(3,grid3);\n gridMap.put(4,grid4);\n gridMap.put(5,grid5);\n gridMap.put(6,grid6);\n gridMap.put(7,grid7);\n gridMap.put(8,grid8);\n gridMap.put(9,grid9);\n gridMap.put(10,grid10);\n gridMap.put(11,grid11);\n gridMap.put(12,grid12);\n gridMap.put(13,grid13);\n gridMap.put(14,grid14);\n gridMap.put(15,grid15);\n\n\n productionBox.put(0,production2_0);\n productionBox.put(1,production2_1);\n productionBox.put(2,production2_2);\n productionBox.put(3,production2_3);\n\n harvestBox.put(0,harvest2_0);\n harvestBox.put(1,harvest2_1);\n harvestBox.put(2,harvest2_2);\n harvestBox.put(3,harvest2_3);\n\n bluePawnsImagesMap.put(FamilyPawnType.BLACK,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/blueBlackPawn.png\");\n bluePawnsImagesMap.put(FamilyPawnType.NEUTRAL,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/blueNeutralPawn.png\");\n bluePawnsImagesMap.put(FamilyPawnType.ORANGE,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/blueOrangePawn.png\");\n bluePawnsImagesMap.put(FamilyPawnType.WHITE,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/blueWhitePawn.png\");\n\n greenPawnsImagesMap.put(FamilyPawnType.BLACK,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/greenBalckPawn.png\");\n greenPawnsImagesMap.put(FamilyPawnType.NEUTRAL,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/greenNeutralPawn.png\");\n greenPawnsImagesMap.put(FamilyPawnType.ORANGE,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/greenOrangePawn.png\");\n greenPawnsImagesMap.put(FamilyPawnType.WHITE,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/greenWhitePawn.png\");\n\n yellowPawnsImagesMap.put(FamilyPawnType.BLACK,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/yellowBlackPawn.png\");\n yellowPawnsImagesMap.put(FamilyPawnType.NEUTRAL,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/yellowNeutralPawn.png\");\n yellowPawnsImagesMap.put(FamilyPawnType.ORANGE,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/yellowOrangePawn.png\");\n yellowPawnsImagesMap.put(FamilyPawnType.WHITE,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/yellowWhitePawn.png\");\n\n redPawnsImagesMap.put(FamilyPawnType.BLACK,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/redBalckPawn.png\");\n redPawnsImagesMap.put(FamilyPawnType.NEUTRAL,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/redNeutralPawn.png\");\n redPawnsImagesMap.put(FamilyPawnType.ORANGE,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/redOrangePawn.png\");\n redPawnsImagesMap.put(FamilyPawnType.WHITE,\"lorenzo_materiale_grafico_compr/GameboardElements/pawns/redWhitePawn.png\");\n\n\n bonusTilesMap.put(\"0\",\"lorenzo_materiale_grafico_compr/Lorenzo_Punchboard_CUT_compressed/personalbonustile_4.png\");\n bonusTilesMap.put(\"1\",\"lorenzo_materiale_grafico_compr/Lorenzo_Punchboard_CUT_compressed/personalbonustile_5.png\");\n bonusTilesMap.put(\"2\",\"lorenzo_materiale_grafico_compr/Lorenzo_Punchboard_CUT_compressed/personalbonustile_2.png\");\n bonusTilesMap.put(\"3\",\"lorenzo_materiale_grafico_compr/Lorenzo_Punchboard_CUT_compressed/personalbonustile_3.png\");\n bonusTilesMap.put(\"4\",\"lorenzo_materiale_grafico_compr/Lorenzo_Punchboard_CUT_compressed/personalbonustile_1.png\");\n\n\n cardMap.put(\"Avamposto Commerciale\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_1.png\");\n cardMap.put(\"Bosco\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_2.png\");\n cardMap.put(\"Borgo\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_3.png\");\n cardMap.put(\"Cava di Ghiaia\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_4.png\");\n cardMap.put(\"Foresta\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_5.png\");\n cardMap.put(\"Monastero\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_6.png\");\n cardMap.put(\"Rocca\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_7.png\");\n cardMap.put(\"Città\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_8.png\");\n cardMap.put(\"Miniera d'Oro\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_9.png\");\n cardMap.put(\"Villaggio Montano\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_10.png\");\n cardMap.put(\"Villaggio Minerario\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_11.png\");\n cardMap.put(\"Cava di Pietra\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_12.png\");\n cardMap.put(\"Possedimento\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_13.png\");\n cardMap.put(\"Eremo\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_14.png\");\n cardMap.put(\"Maniero\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_15.png\");\n cardMap.put(\"Ducato\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_16.png\");\n cardMap.put(\"Città Mercantile\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_17.png\");\n cardMap.put(\"Tenuta\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_18.png\");\n cardMap.put(\"Colonia\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_19.png\");\n cardMap.put(\"Cava di Marmo\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_20.png\");\n cardMap.put(\"Provincia\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_21.png\");\n cardMap.put(\"Santuario\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_22.png\");\n cardMap.put(\"Castello\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_23.png\");\n cardMap.put(\"Città Fortificata\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_24.png\");\n\n cardMap.put(\"Zecca\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_25.png\");\n cardMap.put(\"Esattoria\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_26.png\");\n cardMap.put(\"Arco di Trionfo\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_27.png\");\n cardMap.put(\"Teatro\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_28.png\");\n cardMap.put(\"Falegnameria\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_29.png\");\n cardMap.put(\"Tagliapietre\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_30.png\");\n cardMap.put(\"Cappella\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_31.png\");\n cardMap.put(\"Residenza\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_32.png\");\n cardMap.put(\"Mercato\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_33.png\");\n cardMap.put(\"Tesoreria\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_34.png\");\n cardMap.put(\"Gilda dei Pittori\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_35.png\");\n cardMap.put(\"Gilda degli Scultori\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_36.png\");\n cardMap.put(\"Gilda dei Costruttori\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_37.png\");\n cardMap.put(\"Battistero\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_38.png\");\n cardMap.put(\"Caserma\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_39.png\");\n cardMap.put(\"Fortezza\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_40.png\");\n cardMap.put(\"Banca\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_41.png\");\n cardMap.put(\"Fiera\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_42.png\");\n cardMap.put(\"Giardino\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_43.png\");\n cardMap.put(\"Castelletto\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_44.png\");\n cardMap.put(\"Palazzo\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_45.png\");\n cardMap.put(\"Basilica\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_46.png\");\n cardMap.put(\"Accademia Militare\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_47.png\");\n cardMap.put(\"Cattedrale\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_48.png\");\n\n cardMap.put(\"Condottiero\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_49.png\");\n cardMap.put(\"Costruttore\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_50.png\");\n cardMap.put(\"Dama\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_51.png\");\n cardMap.put(\"Cavaliere\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_52.png\");\n cardMap.put(\"Contadino\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_53.png\");\n cardMap.put(\"Artigiano\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_54.png\");\n cardMap.put(\"Predicatore\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_55.png\");\n cardMap.put(\"Badessa\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_56.png\");\n cardMap.put(\"Capitano\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_57.png\");\n cardMap.put(\"Architetto\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_58.png\");\n cardMap.put(\"Mecenate\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_59.png\");\n cardMap.put(\"Eroe\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_60.png\");\n cardMap.put(\"Fattore\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_61.png\");\n cardMap.put(\"Studioso\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_62.png\");\n cardMap.put(\"Messo Papale\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_63.png\");\n cardMap.put(\"Messo Reale\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_64.png\");\n cardMap.put(\"Nobile\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_65.png\");\n cardMap.put(\"Governatore\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_66.png\");\n cardMap.put(\"Cortigiana\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_67.png\");\n cardMap.put(\"Araldo\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_68.png\");\n cardMap.put(\"Cardinale\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_69.png\");\n cardMap.put(\"Vescovo\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_70.png\");\n cardMap.put(\"Generale\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_71.png\");\n cardMap.put(\"Ambasciatore\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_72.png\");\n\n cardMap.put(\"Hiring Recruits\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_73.png\");\n cardMap.put(\"Repairing the Church\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_74.png\");\n cardMap.put(\"Building the Walls\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_75.png\");\n cardMap.put(\"Raising a Statue\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_76.png\");\n cardMap.put(\"Military Campaign\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_77.png\");\n cardMap.put(\"Hosting Panhandlers\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_78.png\");\n cardMap.put(\"Fighting Heresies\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_79.png\");\n cardMap.put(\"Support to the Bishop\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_80.png\");\n cardMap.put(\"Hiring Soldiers\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_81.png\");\n cardMap.put(\"Repairing the Abbey\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_82.png\");\n cardMap.put(\"Building the Bastions\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_83.png\");\n cardMap.put(\"Support to the King\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_84.png\");\n cardMap.put(\"Improving the Canals\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_85.png\");\n cardMap.put(\"Hosting Foreigners\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_86.png\");\n cardMap.put(\"Crusade\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_87.png\");\n cardMap.put(\"Support to the Cardinal\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_88.png\");\n cardMap.put(\"Hiring Mercenaries\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_89.png\");\n cardMap.put(\"Repairing the Cathedral\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_90.png\");\n cardMap.put(\"Building the Towers\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_91.png\");\n cardMap.put(\"Promoting Sacred Art\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_92.png\");\n cardMap.put(\"Military Conquest\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_93.png\");\n cardMap.put(\"Improving the Roads\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_94.png\");\n cardMap.put(\"Sacred War\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_95.png\");\n cardMap.put(\"Support to the Pope\",\"lorenzo_materiale_grafico_compr/LorenzoCards_compressed_png/devcards_f_en_c_96.png\");\n\n personalGreenCards.put(0,greenCard1);\n personalGreenCards.put(1,greenCard2);\n personalGreenCards.put(2,greenCard3);\n personalGreenCards.put(3,greenCard4);\n personalGreenCards.put(4,greenCard5);\n personalGreenCards.put(5,greenCard6);\n\n personalBlueCards.put(0,blueCard1);\n personalBlueCards.put(1,blueCard2);\n personalBlueCards.put(2,blueCard3);\n personalBlueCards.put(3,blueCard4);\n personalBlueCards.put(4,blueCard5);\n personalBlueCards.put(5,blueCard6);\n\n personalYellowCards.put(0,yellowCard1);\n personalYellowCards.put(1,yellowCard2);\n personalYellowCards.put(2,yellowCard3);\n personalYellowCards.put(3,yellowCard4);\n personalYellowCards.put(4,yellowCard5);\n personalYellowCards.put(5,yellowCard6);\n\n personalPurpleCards.put(0,purpleCard1);\n personalPurpleCards.put(1,purpleCard2);\n personalPurpleCards.put(2,purpleCard3);\n personalPurpleCards.put(3,purpleCard4);\n personalPurpleCards.put(4,purpleCard5);\n personalPurpleCards.put(5,purpleCard6);\n\n resourceAmount.put(GoodType.COINS,gold);\n resourceAmount.put(GoodType.STONE,stone);\n resourceAmount.put(GoodType.WOOD,wood);\n resourceAmount.put(GoodType.WORKERS,workers);\n\n greenTower.put(0,greenTowerCard1);\n greenTower.put(1,greenTowerCard2);\n greenTower.put(2,greenTowerCard3);\n greenTower.put(3,greenTowerCard4);\n\n blueTower.put(0,blueTowerCard1);\n blueTower.put(1,blueTowerCard2);\n blueTower.put(2,blueTowerCard3);\n blueTower.put(3,blueTowerCard4);\n\n yellowTower.put(0,yellowTowerCard1);\n yellowTower.put(1,yellowTowerCard2);\n yellowTower.put(2,yellowTowerCard3);\n yellowTower.put(3,yellowTowerCard4);\n\n purpleTower.put(0,purpleTowerCard1);\n purpleTower.put(1,purpleTowerCard2);\n purpleTower.put(2,purpleTowerCard3);\n purpleTower.put(3,purpleTowerCard4);\n\n actionButtons.put(0,greenTowerAction1);\n actionButtons.put(1,greenTowerAction2);\n actionButtons.put(2,greenTowerAction3);\n actionButtons.put(3,greenTowerAction4);\n actionButtons.put(4,yellowTowerAction1);\n actionButtons.put(5,yellowTowerAction2);\n actionButtons.put(6,yellowTowerAction3);\n actionButtons.put(7,yellowTowerAction4);\n actionButtons.put(8,blueTowerAction1);\n actionButtons.put(9,blueTowerAction2);\n actionButtons.put(10,blueTowerAction3);\n actionButtons.put(11,blueTowerAction4);\n actionButtons.put(12,purpleTowerAction1);\n actionButtons.put(13,purpleTowerAction2);\n actionButtons.put(14,purpleTowerAction3);\n actionButtons.put(15,purpleTowerAction4);\n actionButtons.put(16,market1);\n actionButtons.put(17,market2);\n actionButtons.put(18,market3);\n actionButtons.put(19,market4);\n actionGrid.put(20,councilPalace);\n actionButtons.put(21,harvest1);\n actionBox.put(22,harvest2);\n actionButtons.put(23,production1);\n actionBox.put(24,production2);\n\n\n buttonAction.put(greenTowerAction1Cover,0);\n buttonAction.put(greenTowerAction2Cover,1);\n buttonAction.put(greenTowerAction3Cover,2);\n buttonAction.put(greenTowerAction4Cover,3);\n buttonAction.put(yellowTowerAction1Cover,4);\n buttonAction.put(yellowTowerAction2Cover,5);\n buttonAction.put(yellowTowerAction3Cover,6);\n buttonAction.put(yellowTowerAction4Cover,7);\n buttonAction.put(blueTowerAction1Cover,8);\n buttonAction.put(blueTowerAction2Cover,9);\n buttonAction.put(blueTowerAction3Cover,10);\n buttonAction.put(blueTowerAction4Cover,11);\n buttonAction.put(purpleTowerAction1Cover,12);\n buttonAction.put(purpleTowerAction2Cover,13);\n buttonAction.put(purpleTowerAction3Cover,14);\n buttonAction.put(purpleTowerAction4Cover,15);\n buttonAction.put(market1Cover,16);\n buttonAction.put(market2Cover,17);\n buttonAction.put(market3Cover,18);\n buttonAction.put(market4Cover,19);\n buttonAction.put(councilPalaceCover,20);\n buttonAction.put(harvest1Cover,21);\n buttonAction.put(harvest2Cover,22);\n buttonAction.put(production1Cover,23);\n buttonAction.put(production2Cover,24);\n\n coverImages.put(0,greenTowerAction1Cover);\n coverImages.put(1,greenTowerAction2Cover);\n coverImages.put(2,greenTowerAction3Cover);\n coverImages.put(3,greenTowerAction4Cover);\n coverImages.put(4,yellowTowerAction1Cover);\n coverImages.put(5,yellowTowerAction2Cover);\n coverImages.put(6,yellowTowerAction3Cover);\n coverImages.put(7,yellowTowerAction4Cover);\n coverImages.put(8,blueTowerAction1Cover);\n coverImages.put(9,blueTowerAction2Cover);\n coverImages.put(10,blueTowerAction3Cover);\n coverImages.put(11,blueTowerAction4Cover);\n coverImages.put(12,purpleTowerAction1Cover);\n coverImages.put(13,purpleTowerAction2Cover);\n coverImages.put(14,purpleTowerAction3Cover);\n coverImages.put(15,purpleTowerAction4Cover);\n coverImages.put(16,market1Cover);\n coverImages.put(17,market2Cover);\n coverImages.put(18,market3Cover);\n coverImages.put(19,market4Cover);\n coverImages.put(20,councilPalaceCover);\n coverImages.put(21,harvest1Cover);\n coverImages.put(22,harvest2Cover);\n coverImages.put(23,production1Cover);\n coverImages.put(24,production2Cover);\n\n\n familyPawns = new ArrayList<>(Arrays.asList(whitePawn, orangePawn, blackPawn, neutralPawn));\n\n activateLeaderCardsButtons = new ArrayList<>(Arrays.asList(activate0, activate1, activate2, activate3));\n\n burnLeaderCardsButtons = new ArrayList<>(Arrays.asList(burn0, burn1, burn2, burn3));\n\n }", "private void setupVariant1TerrainMap() {\n\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-4), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-3), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-3), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-3), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,-2), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,-2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,-2), TerrainKind.BIG_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,-2), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,-2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,-2), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,-1), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,-1), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,-1), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,-1), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,-1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,-1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,0), TerrainKind.FOREST);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,0), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,0), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,0), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,0), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,1), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,1), TerrainKind.SEA);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-8,2), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,2), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,2), TerrainKind.FIELDS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,2), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,2), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(6,2), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(8,2), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-7,3), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-5,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-3,3), TerrainKind.MOUNTAINS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-1,3), TerrainKind.PASTURE);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(1,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(3,3), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(5,3), TerrainKind.GOLDFIELD);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(7,3), TerrainKind.SMALL_FISHERY);\n\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-6,4), TerrainKind.SMALL_FISHERY);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-4,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(-2,4), TerrainKind.HILLS);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(0,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(2,4), TerrainKind.SEA);\n\t\tvariant1TerrainKindMap.put(getHashCodeofPair(4,4), TerrainKind.FOREST);\n\t}", "public void initialiseBoard() {\n\t\tPlayer1Mancala = new MancalaPit(this.player1Name, 0, null);\n\t\tPit player1_Pit6 = new Pit(this.player1Name, 6, 1, Player1Mancala);\n\t\tPit player1_Pit5 = new Pit(this.player1Name, 5, 1, player1_Pit6);\n\t\tPit player1_Pit4 = new Pit(this.player1Name, 4, 1, player1_Pit5);\n\t\tPit player1_Pit3 = new Pit(this.player1Name, 3, 1, player1_Pit4);\n\t\tPit player1_Pit2 = new Pit(this.player1Name, 2, 1, player1_Pit3);\n\t\tPit player1_Pit1 = new Pit(this.player1Name, 1, 1, player1_Pit2);\n\n\t\t// Define Player2 Pits in descending order \n\t\tPlayer2Mancala = new MancalaPit(this.player2Name, 0, null);\n\t\tPit player2_Pit6 = new Pit(this.player2Name, 6, 1, Player2Mancala);\n\t\tPit player2_Pit5 = new Pit(this.player2Name, 5, 1, player2_Pit6);\n\t\tPit player2_Pit4 = new Pit(this.player2Name, 4, 1, player2_Pit5);\n\t\tPit player2_Pit3 = new Pit(this.player2Name, 3, 1, player2_Pit4);\n\t\tPit player2_Pit2 = new Pit(this.player2Name, 2, 1, player2_Pit3);\n\t\tPit player2_Pit1 = new Pit(this.player2Name, 1, 1, player2_Pit2);\n\n\t\t// Complete the board by connecting mancala with player pits\n\t\tPlayer1Mancala.setNextPit(player2_Pit1);\n\t\tPlayer2Mancala.setNextPit(player1_Pit1);\n\n\t\t//Initialize the Player1 board \n\t\tthis.Player1Pits[0] = player1_Pit1;\n\t\tthis.Player1Pits[1] = player1_Pit2;\n\t\tthis.Player1Pits[2] = player1_Pit3;\n\t\tthis.Player1Pits[3] = player1_Pit4;\n\t\tthis.Player1Pits[4] = player1_Pit5;\n\t\tthis.Player1Pits[5] = player1_Pit6;\n\n\t\t// Initialize the Player2 board \n\t\tthis.Player2Pits[0] = player2_Pit1;\n\t\tthis.Player2Pits[1] = player2_Pit2;\n\t\tthis.Player2Pits[2] = player2_Pit3;\n\t\tthis.Player2Pits[3] = player2_Pit4;\n\t\tthis.Player2Pits[4] = player2_Pit5;\n\t\tthis.Player2Pits[5] = player2_Pit6;\n\t}", "private void setThePieces(){\n for(int i = 0; i<HEIGHT;i++){\n for(int j = 0; j<WIDTH;j++){\n if(piecesToSwap[i][j]==null){\n \n }else{\n m_Pieces[i][j]=piecesToSwap[i][j];\n \n }\n }\n }\n }", "private void setScanStars(String filled, String notFilled, String filledGold)\t{\n\t\t\n\t\tint idFilled = getResources().getIdentifier(filled, \"drawable\", \"com.loyal3.loyal3\");\n\t\tint idNotFilled = getResources().getIdentifier(notFilled, \"drawable\", \"com.loyal3.loyal3\");\n\t//\tint idFilledGold = getResources().getIdentifier(filledGold, \"drawable\", \"com.loyal3.loyal3\");\n\t\t\n\t\t\n\tif(Integer.parseInt(scanCount) < Integer.parseInt(maxScans)) {\t\n\t\t\n\t\t//Top Row \n\t\tLinearLayout llStarsTopRow = (LinearLayout) findViewById(R.id.llStars1);\n\t\tLinearLayout llStarsBottomRow = (LinearLayout) findViewById(R.id.llStars2);\n\n\t\tfor(int i = 0; i < (Integer.parseInt(maxScans)-(Integer.parseInt(maxScans)/2));i++)\t{\n\n\t\t\tstarCounter = i;\n\t\t\tImageView iv = new ImageView(this);\n\n\n\t/*\t\tif(Integer.parseInt(scanCount) == Integer.parseInt(maxScans))\t{\n\t\t\t\tiv.setImageResource(idFilledGold);\n\t\t\t}\n\t\t\telse*/ if( i < Integer.parseInt(scanCount))\t{\n\t\t\t\tiv.setImageResource(idFilled);\n\t\t\t}\t\n\t\t\telse\t{\n\t\t\t\tiv.setImageResource(idNotFilled);\n\t\t\t}\n\n\t\t\tiv.setLayoutParams(new LinearLayout.LayoutParams((int)(width/(Integer.parseInt(maxScans)-(Integer.parseInt(maxScans)/2))),(int)(height*(0.08))));\n\t\t\tiv.setBackgroundColor(Color.TRANSPARENT);\n\n\t\t\tllStarsTopRow.addView(iv);\n\t\t}\n\n\t\t//Bottom Row\n\t\tfor(int i = starCounter+1; i < (Integer.parseInt(maxScans));i++)\t{\n\t\t\tImageView iv = new ImageView(this);\n\n\n\t\t/*\tif(Integer.parseInt(scanCount) == Integer.parseInt(maxScans))\t{\n\t\t\t\tiv.setImageResource(idFilledGold);\n\t\t\t}\n\t\t\telse*/ if( i < Integer.parseInt(scanCount))\t{\n\t\t\t\tiv.setImageResource(idFilled);\n\t\t\t}\t\n\t\t\telse\t{\n\t\t\t\tiv.setImageResource(idNotFilled);\n\t\t\t}\n\n\t\t\tiv.setLayoutParams(new LinearLayout.LayoutParams((int)(width/(Integer.parseInt(maxScans)/2)),(int)(height*(0.08))));\n\t\t\tiv.setBackgroundColor(Color.TRANSPARENT);\n\n\t\t\tllStarsBottomRow.addView(iv);\n\n\t\t}\n\t}\n\n\t\tLinearLayout llMainDisplay = (LinearLayout) findViewById(R.id.llMainDisplay);\n\n\t\tthis.setContentView(llMainDisplay);\t\n\t}", "public void fillPassengersOnPlane(){//private, ändrar till public för grafiska\r\n //int i = 0;\r\n //for (Passenger p : passengers) {//fel med foreach tror jag\r\n for(int i = 0; i < 10; i++){\r\n if (passengers.size() >= 10) {\r\n passengers.get(i).setFirstName(\"Passenger\");//p\r\n passengers.get(i).setLastName(\"Unnamed\" + i);\r\n passengers.get(i).setAge(35 + i);\r\n passengers.get(i).setDestination(getDestination());\r\n passengers.get(i).setSeatNr(i + 1);\r\n if (i < 5) {\r\n passengers.get(i).setTicketPrice(21500);\r\n } else {\r\n passengers.get(i).setTicketPrice(5300);\r\n }\r\n if (seats.size() >= 10) {\r\n seats.get(i).setBooked(true);\r\n seats.get(i).setSeatNumber(i + 1);\r\n seats.get(i).setPassenger(passengers.get(i)); \r\n } else {\r\n seats.add(i, new Seat(i + 1, passengers.get(i)));\r\n }\r\n }\r\n else {\r\n Passenger nyP = new Passenger();\r\n nyP.setFirstName(\"Passenger\");//p\r\n nyP.setLastName(\"Unnamed\" + i);\r\n nyP.setAge(35 + i);\r\n nyP.setDestination(getDestination());\r\n nyP.setSeatNr(i + 1);\r\n if (i < 5) {\r\n nyP.setTicketPrice(21500);\r\n } else {\r\n nyP.setTicketPrice(5300);\r\n }\r\n passengers.add(nyP);\r\n \r\n if (seats.size() >= 10) {\r\n seats.get(i).setBooked(true);\r\n seats.get(i).setSeatNumber(i + 1);\r\n seats.get(i).setPassenger(nyP); \r\n } else {\r\n seats.add(i, new Seat(i + 1, nyP));\r\n }\r\n } \r\n }\r\n }", "public void setAllPokemon()\n {\n PokemonFactory pFactory = new PokemonFactory();\n this.allPokemon = pFactory.getRandomPokemon();\n\n }", "public void addMines() {\n int xs=0;\n int ys=0;\n\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n if(difficulty==0) {\n for(int x=0;x<15;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n\n board[xs][ys].setMine(true);\n }\n\n spotsx.clear();\n spotsy.clear();\n }\n else if(difficulty==INSANE) {\n System.out.println(\"HELLO AGAIN OBIWAN\");\n for(int x=0;x<97;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n\n board[xs][ys].setMine(true);\n }\n\n spotsx.clear();\n spotsy.clear();\n }\n else if(difficulty==EZPZ) {\n for(int x=0;x<5;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n\n board[xs][ys].setMine(true);\n }\n\n spotsx.clear();\n spotsy.clear();\n }\n else if(difficulty==1) {\n for(int x=0;x<40;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n board[xs][ys].setMine(true);\n }\n\n\n spotsx.clear();\n spotsy.clear();\n }\n else if(difficulty==2) {\n for(int x=0;x<100;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n board[xs][ys].setMine(true);\n }\n\n spotsx.clear();\n spotsy.clear();\n }\n }", "public static void initGame() {\r\n\t\tfor (int i = 0; i < ROWS; i++) {\r\n\t\t\tfor (int j = 0; j < COLUMNS; j++) {\r\n\t\t\t\tfield[i][j] = EMPTY;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tsnake.addFirst(new int[] { r.nextInt(ROWS), r.nextInt(COLUMNS) });\r\n\t\tfield[snake.getFirst()[0]][snake.getFirst()[1]] = SNAKE;\r\n\r\n\t\twhile (true) {\r\n\t\t\tint x = r.nextInt(ROWS);\r\n\t\t\tint y = r.nextInt(COLUMNS);\r\n\r\n\t\t\tif (field[x][y] == EMPTY) {\r\n\t\t\t\tfood.add(new int[] { APPLE, x, y });\r\n\t\t\t\tfield[x][y] = APPLE;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void game(int set1hometeampoints, int set2hometeampoints,\n int set3hometeampoints, int set4hometeampoints, int set5hometeampoints,\n int set1awayteampoints, int set2awayteampoints, int set3awayteampoints, \n int set4awayteampoints, int set5awayteampoints)\n { \n if (set1hometeampoints == 21){\n setsWonHT ++;\n } else if(set1awayteampoints == 21){\n setsWonAT ++; \n } \n if (set2hometeampoints == 21){\n setsWonHT ++;\n } else if(set2awayteampoints == 21){\n setsWonAT ++; \n } \n if (set3hometeampoints == 21){\n setsWonHT ++;\n } else if(set3awayteampoints == 21){\n setsWonAT ++; \n }\n if (set4hometeampoints == 21){\n setsWonHT ++;\n } else if(set4awayteampoints == 21){\n setsWonAT ++; \n } \n if (set5hometeampoints == 15){\n setsWonHT ++;\n } else if(set5awayteampoints == 15){\n setsWonAT ++; \n }\n }", "private void resetGame() {\r\n\t\t\r\n\t\tif(easy.isSelected()) {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\t\t\t\r\n\t\t} else if(medium.isSelected()) {\r\n\t\t\tGRID_SIZE = 15;\r\n\t\t\tlbPits = 8;\r\n\t\t\tubPits = 12;\r\n\t\t} else if(hard.isSelected()) {\r\n\t\t\tGRID_SIZE = 20;\r\n\t\t\tlbPits = 35;\r\n\t\t\tubPits = 45;\r\n\t\t} else {\r\n\t\t\tGRID_SIZE = 10;\r\n\t\t\tlbPits = 3;\r\n\t\t\tubPits = 5;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tvisited = new boolean[GRID_SIZE][GRID_SIZE];\r\n\t\tGameMapFactory mf = new GameMapFactory(new Obstacle[GRID_SIZE][GRID_SIZE], new Random(), GRID_SIZE, lbPits, ubPits);\r\n\t\tmf.setupMap();\r\n\t\tgame.resetGame(GRID_SIZE, mf.getGameMap(), visited, mf.getHunterPosition());\r\n\t\t\r\n\t}", "private void InitializeApp() {\n\n for (int y = 0; y < 11; y++) {\n for (int x = 0; x < 11; x++) {\n defendingGrid[x][y] = new GameCell();\n attackingGrid[x][y] = new GameCell();\n }\n }\n\n// attackingGrid[5][5].setMiss(true);\n// attackingGrid[5][6].setHit(true);\n// attackingGrid[5][7].setWaiting(true);\n// attackingGrid[5][7].setHasShip(true);\n\n }", "private void initialSetup() {\n\t\tplaceNewPiece('a', 1, new Rook(board, Color.WHITE));\n placeNewPiece('b', 1, new Knight(board, Color.WHITE));\n placeNewPiece('c', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('d', 1, new Queen(board, Color.WHITE));\n placeNewPiece('e', 1, new King(board, Color.WHITE, this)); // 'this' refere-se a esta jogada\n placeNewPiece('f', 1, new Bishop(board, Color.WHITE));\n placeNewPiece('g', 1, new Knight(board, Color.WHITE));\n placeNewPiece('h', 1, new Rook(board, Color.WHITE));\n placeNewPiece('a', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('b', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('c', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('d', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('e', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('f', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('g', 2, new Pawn(board, Color.WHITE, this));\n placeNewPiece('h', 2, new Pawn(board, Color.WHITE, this));\n\n placeNewPiece('a', 8, new Rook(board, Color.BLACK));\n placeNewPiece('b', 8, new Knight(board, Color.BLACK));\n placeNewPiece('c', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('d', 8, new Queen(board, Color.BLACK));\n placeNewPiece('e', 8, new King(board, Color.BLACK, this));\n placeNewPiece('f', 8, new Bishop(board, Color.BLACK));\n placeNewPiece('g', 8, new Knight(board, Color.BLACK));\n placeNewPiece('h', 8, new Rook(board, Color.BLACK));\n placeNewPiece('a', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('b', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('c', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('d', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('e', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('f', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('g', 7, new Pawn(board, Color.BLACK, this));\n placeNewPiece('h', 7, new Pawn(board, Color.BLACK, this));\n\t}", "protected Ocean(){\n for (int i=0; i<10; i++){\n for (int j=0;j<10; j++){\n EmptySea empty = new EmptySea();\n ships[i][j] = empty;\n }\n }\n }", "public static void makePieces() {\n\t\tPiece[] pieces = new Piece[35];\n\t\tfor (int i = 0; i < pieces.length; i++) {\n\t\t\tTile t = new Tile(false, true, 0, 0);\n\t\t\tTile f = new Tile(false, false, 0, 0);\n\t\t\tTile[][] tiles = new Tile[6][6];\n\t\t\tswitch (i) {\n\t\t\tcase 0:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, t, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpieces[i] = new Piece(tiles);\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream saveFile = new FileOutputStream(\"pieces.data\");\n\t\t\tObjectOutputStream save = new ObjectOutputStream(saveFile);\n\t\t\tsave.reset();\n\t\t\tsave.writeObject(pieces);\n\t\t\tsave.close();\n\t\t} catch (Exception exc) {\n\t\t\texc.printStackTrace(); // If there was an error, print the info.\n\t\t}\n\t}", "public void ajoutPions() {\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 10; j += 2) {\n if (i % 2 == 0) {\n this.ajoutPieces(new Pion(i, j, true, (String) JouerIA.getColor1().first()));\n\n } else {\n this.ajoutPieces(new Pion(i, j+1, true, (String) JouerIA.getColor1().first()));\n }\n }\n\n }\n\n for (int i = 6; i < 10; i++) {\n for (int j = 0; j < 10; j += 2) {\n if (i % 2 == 0) {\n this.ajoutPieces(new Pion(i, j, false, (String) JouerIA.getColor2().first()));\n } else {\n this.ajoutPieces(new Pion(i, j + 1, false, (String) JouerIA.getColor2().first()));\n }\n }\n\n }\n }", "public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }", "public void setInitialPosition()\n {\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.a2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.b2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.c2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.d2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.e2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.f2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.g2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.h2);\n //Se colocan los peones negros en la séptima fila\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.a7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.b7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.c7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.d7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.e7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.f7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.g7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.h7);\n //Se colocan las torres blancas en a1 y h1\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.a1);\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.h1);\n //Se colocan las torres negras en a8 y h9\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.a8);\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.h8);\n //Se colocan los caballos blancos en b1 y g1\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.b1);\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.g1);\n //Se colocan los caballos negros en b8 y g8\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.b8);\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.g8);\n //Se colocan los alfiles blancos en c1 y f1\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.c1);\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.f1);\n //Se colocan los alfiles negros en c8 y f8\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.c8);\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.f8);\n //Se coloca la dama blanca en d1\n putGenericPiece(GenericPiece.QUEEN,Colour.WHITE,Square.d1);\n //Se coloca la dama negra en d8\n putGenericPiece(GenericPiece.QUEEN,Colour.BLACK,Square.d8);\n //Se coloca el rey blanco en e1\n putGenericPiece(GenericPiece.KING,Colour.WHITE,Square.e1);\n //Se coloca el rey negro en e8\n putGenericPiece(GenericPiece.KING,Colour.BLACK,Square.e8);\n \n //Se permiten los enroques para ambos jugadores\n setCastlingShort(Colour.WHITE,true);\n setCastlingShort(Colour.BLACK,true);\n setCastlingLong(Colour.WHITE,true);\n setCastlingLong(Colour.BLACK,true);\n \n //Se da el turno a las blancas\n setTurn(Colour.WHITE);\n \n gamePositionsHash.clear();\n gamePositionsHash.put(zobristKey.getKey(), 1);\n }", "private static void fillArea()\n\t{\n\t\tconnections=new int[board.length][board[1].length];\n\n\t\twhile(!(isFilled()))\n\t\t{\n\t\t\tTemplates temp = Templates.intToTemplates(rn.nextInt(Templates.values().length));\n\t\t\ttemp.rotate(rn.nextInt(4));\n\n\t\t\taddTemplate(temp);\n\t\t}\t\n\t}", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public GameState(int initialStones) \n {\n \tif (initialStones < 1) initialStones = 4;\n \tfor (int i=0; i<6; i++)\n \t\tstate[i] = state[i+7] = initialStones;\n }", "public static void FillBoard(Board building, int n){\n Room[][] map = building.getMap();\n\n //Where the user starts\n map[n/2][n/2] = new Cornucopia(n/2,n/2);\n\n if(building.isHardLevel()){\n for (int x = 0; x<n; x++)\n {\n for (int y = 0; y<(n/2)-1; y++) {\n map[x][y] = new Lake(x, y);\n map[x][y+(n/2)+2] = new Forest(x, y);\n }\n }\n\n for(int y=1; y<n-1;y++){\n for(int x = 0; x<(n/2)-1; x++) {\n map[x][y] = new Lake(x, y);\n map[x+(n/2)+2][y] = new Forest(x+(n/2)+2, y);\n }\n }\n }\n else{\n //Fill half of the remaining rooms with Lake or Forest rooms\n for (int x = 0; x<n/2; x++)\n {\n map[x][n/2] = new Lake(x,0);\n map[x+(n/2)+1][n/2] = new Forest(x,n-1);\n }\n\n for(int x=0; x<n;x++){\n for(int y=0; y<n/2;y++){\n map[x][y] = new Lake(x,y);\n map[x][y+(n/2)+1] = new Forest(x,y);\n }\n }\n }\n }", "public void initPieces() {\r\n\t\tfor (int i = 0; i < 64; i++) {\r\n\t\t\tif (i < 12) {\r\n\t\t\t\tblackPieces[i] = new ChessPiece(\"black\", \"\");\r\n\t\t\t\tblackPieces[i].setBackground(Color.BLACK);\r\n\t\t\t\tblackPieces[i].addMouseMotionListener(this);\r\n\t\t\t\tblackPieces[i].addMouseListener(this);\r\n\t\t\t\tblackPieces[i].setText(null);\r\n\t\t\t\twhitePieces[i] = new ChessPiece(\"white\", \"\");\r\n\t\t\t\twhitePieces[i].setBackground(Color.WHITE);\r\n\t\t\t\twhitePieces[i].addMouseMotionListener(this);\r\n\t\t\t\twhitePieces[i].addMouseListener(this);\r\n\t\t\t\twhitePieces[i].setText(null);\r\n\t\t\t}\r\n\t\t\tspacePieces[i] = new ChessPiece(\"empty\", \"\");\r\n\t\t\tspacePieces[i].setEnabled(false);\r\n\t\t\tspacePieces[i].setVisible(false);\r\n\t\t\tspacePieces[i].setText(null);\r\n\t\t}\r\n\t}", "public void generateGame() {\n clearGame();\n\n //generate new game\n SudokuGenerator generator = new FullGenerator();\n generator.generateSudoku(this);\n\n //set start locations\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < size; j++) {\n int value = board.getSquareValue(i, j);\n if (value != 0) { // startlocation\n startLocations.add(new int[] {i, j});\n }\n }\n }\n }", "public static void makeGrid (Species map[][], int numSheepStart, int numWolfStart, int numPlantStart, int sheepHealth, int plantHealth, int wolfHealth, int plantSpawnRate) {\n \n // Declare coordinates to randomly spawn species\n int y = 0;\n int x = 0;\n \n // Initialise plants\n Plant plant;\n \n // Spawn plants\n for (int i = 0; i < numPlantStart; i++) {\n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Choose a random plant (50% chance healthy, 25% poisonous or energizing)\n int plantChoice = (int) Math.ceil(Math.random() * 100);\n \n // Create the new plants\n if ((plantChoice <= 100) && (plantChoice >= 50)) {\n plant = new HealthyPlant(plantHealth, x, y, plantSpawnRate);\n } else if ((plantChoice < 50) && (plantChoice >= 25)) {\n plant = new EnergizingPlant(plantHealth, x, y, plantSpawnRate);\n } else {\n plant = new PoisonousPlant(plantHealth, x, y, plantSpawnRate);\n }\n \n // Set plant coordinates\n plant.setX(x);\n plant.setY(y);\n map[y][x] = plant;\n \n // No space\n } else { \n i -= 1;\n }\n \n }\n \n // Spawn sheep\n for (int i = 0; i < numSheepStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) {\n \n // Create new sheep\n Sheep sheep = new Sheep(sheepHealth, x, y, 5); \n \n // Set sheep coordinates\n sheep.setX(x);\n sheep.setY(y);\n map[y][x] = sheep;\n \n // No space\n } else { \n i -= 1; \n }\n \n }\n \n // Spawn wolves\n for (int i = 0; i < numWolfStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Create new wolf\n Wolf wolf = new Wolf(wolfHealth, x, y, 5); \n \n // Set wolf coordinates\n wolf.setX(x);\n wolf.setY(y);\n map[y][x] = wolf; \n \n // No space\n } else { \n i -= 1; \n }\n }\n \n }", "private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }", "public void createWall() { // make case statement?\n\t\tRandom ran = new Random();\n\t\tint range = 6 - 1 + 1; // max - min + min\n\t\tint random = ran.nextInt(range) + 1; // add min\n\n\t\t//each wall is a 64 by 32 chunk \n\t\t//which stack to create different structures.\n\t\t\n\t\tWall w; \n\t\tPoint[] points = new Point[11];\n\t\tpoints[0] = new Point(640, -32);\n\t\tpoints[1] = new Point(640, 0);\n\t\tpoints[2] = new Point(640, 32); // top\n\t\tpoints[3] = new Point(640, 384);\n\t\tpoints[4] = new Point(640, 416);\n\n\t\tif (random == 1) {\n\t\t\tpoints[5] = new Point(640, 64);\n\t\t\tpoints[6] = new Point(640, 96);\n\t\t\tpoints[7] = new Point(640, 128); // top\n\t\t\tpoints[8] = new Point(640, 288);\n\t\t\tpoints[9] = new Point(640, 320);\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t} else if (random == 2) {\n\t\t\tpoints[5] = new Point(640, 64);\n\t\t\tpoints[6] = new Point(640, 96); // top\n\t\t\tpoints[7] = new Point(640, 256);\n\t\t\tpoints[8] = new Point(640, 288); // bottom\n\t\t\tpoints[9] = new Point(640, 320);\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t} else if (random == 3) {\n\t\t\tpoints[5] = new Point(640, 64);\n\t\t\tpoints[6] = new Point(640, 96);\n\t\t\tpoints[7] = new Point(640, 128); // top\n\t\t\tpoints[8] = new Point(640, 160);\n\t\t\tpoints[9] = new Point(640, 192); // top\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t} else if (random == 4) {\n\t\t\tpoints[5] = new Point(640, 64);\n\t\t\tpoints[6] = new Point(640, 96);\n\t\t\tpoints[7] = new Point(640, 128); // top\n\t\t\tpoints[8] = new Point(640, 160);\n\t\t\tpoints[9] = new Point(640, 192);\n\t\t\tpoints[10] = new Point(640, 224); // top\n\t\t} else if (random == 5) {\n\t\t\tpoints[5] = new Point(640, 64); // top\n\t\t\tpoints[6] = new Point(640, 224);\n\t\t\tpoints[7] = new Point(640, 256);\n\t\t\tpoints[8] = new Point(640, 288); // bottom\n\t\t\tpoints[9] = new Point(640, 320);\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t} else if (random == 6) {\n\t\t\tpoints[5] = new Point(640, 192);\n\t\t\tpoints[6] = new Point(640, 224);\n\t\t\tpoints[7] = new Point(640, 256); // bottom\n\t\t\tpoints[8] = new Point(640, 288);\n\t\t\tpoints[9] = new Point(640, 320);\n\t\t\tpoints[10] = new Point(640, 352); // bottom\n\t\t}\n\n\t\tfor (int i = 0; i < points.length; i++) { // adds walls\n\t\t\tw = new Wall();\n\t\t\tw.setBounds(new Rectangle(points[i].x, points[i].y, 64, 32));\n\t\t\twalls.add(w);\n\t\t}\n\t\tWall c; // adds a single checkpoint\n\t\tc = new Wall();\n\t\tcheckPoints.add(c);\n\t\tc.setBounds(new Rectangle(640, 320, 32, 32));\n\t}", "@Override\n public void placeShips(Fleet fleet, Board board) {\n foundPosition = new boolean[sizeX][sizeY];\n for (int i = fleet.getNumberOfShips() - 1; i >= 0; i--) {\n Ship s = fleet.getShip(i);\n boolean vertical = rnd.nextBoolean();\n Position pos;\n if (vertical) {\n int x = rnd.nextInt(sizeX);\n int y = rnd.nextInt(sizeY - (s.size()));\n\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x = rnd.nextInt(sizeX);\n y = rnd.nextInt(sizeY - (s.size()));\n break;\n }\n }\n if (check == false) {\n break;\n }\n /* int counter = 0;\n if (counter > 1) {\n y = rnd.nextInt(sizeY - (s.size()));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x++;\n if (x >= sizeX) {\n x = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x][y + j] = true;\n }\n pos = new Position(x, y);\n } else {\n int x = rnd.nextInt(sizeX - (s.size()));\n int y = rnd.nextInt(sizeY);\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n x = rnd.nextInt(sizeX - (s.size()));\n y = rnd.nextInt(sizeY);\n }\n }\n if (check == false) {\n break;\n }\n /*int counter = 0;\n if (counter > 1) {\n x = rnd.nextInt(sizeX - (s.size() - 1));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n y++;\n if (y >= sizeX) {\n y = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x + j][y] = true;\n }\n pos = new Position(x, y);\n }\n board.placeShip(pos, s, vertical);\n }\n }", "public void setBoard(){\n \n\t m_Pieces[3][3]= WHITE_PIECE;\n m_Pieces[4][4]= WHITE_PIECE;\n m_Pieces[3][4]= BLACK_PIECE;\n m_Pieces[4][3]= BLACK_PIECE;\n for(int x=0;x<WIDTH;x++){\n for(int y=0;y<HEIGHT;y++){\n if(m_Pieces[x][y]==null){\n m_Pieces[x][y]=NONE_PIECE;\n }\n }\n }\n }", "public void refactor() {\n this.maxX = SnakeGame.getxSquares();\n this.maxY = SnakeGame.getySquares();\n snakeSquares = new int[this.maxX][this.maxY];\n fillSnakeSquaresWithZeros();\n createStartSnake();\n }", "private void setMines(){\n Random random = new Random();\r\n int counter = mines;\r\n while(counter>0){\r\n int rx = random.nextInt(this.x); //without +1 because it can be 0\r\n int ry = random.nextInt(this.y);\r\n if( ! this.grid[rx][ry].isMine() ){\r\n this.grid[rx][ry].setMine();\r\n counter--; \r\n }\r\n }\r\n \r\n }", "public void step()\n { \n //Remember, you need to access both row and column to specify a spot in the array\n //The scalar refers to how big the value could be\n //int someRandom = (int) (Math.random() * scalar)\n //remember that you need to watch for the edges of the array\n\t int randomRow = (int)(Math.random() * grid.length - 1);\n\t int randomCol = (int)(Math.random() * grid[0].length - 1);\n\t int randomDirection = (int)(Math.random() * 3);\n\t int randomDirectionFire = (int)(Math.random() * 4);\n\t int randomSpread = (int)(Math.random() * 100);\n\t int randomTelRow = (int)(Math.random() * grid.length);\n\t int randomTelCol = (int)(Math.random() * grid[0].length);\n\t \n\t //Sand\n\t if(grid[randomRow][randomCol] == SAND && (grid[randomRow + 1][randomCol] == EMPTY || grid[randomRow + 1][randomCol] == WATER))\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\n\t }\n\t //Water\n\t if(grid[randomRow][randomCol] == WATER && randomCol - 1 >= 0)\n\t {\n\t\t if(randomDirection == 1 && grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = WATER;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t //Helium\n\t if(grid[randomRow][randomCol] == HELIUM && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow - 1][randomCol] == WATER)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = WATER;\n\t\t }\n\t\t else if(randomDirection == 1 && grid[randomRow - 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(randomDirection == 2 && grid[randomRow][randomCol - 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else if(grid[randomRow][randomCol + 1] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = grid[randomRow][randomCol];\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Bounce\n\t if(grid[randomRow][randomCol] == BOUNCE)\n\t { \t\n\t\t if(randomRow + 1 >= grid[0].length - 1 || randomRow + 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = true;\n\t\t }\n\t\t else if(randomRow - 1 < 0 || randomRow - 1 == METAL)\n\t\t {\n\t\t\t hitEdge[randomCol] = false;\n\t\t }\n\t\t \n\t\t if(hitEdge[randomCol] == true)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = BOUNCE;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t }\n\t \n\t //Virus\n\t if(grid[randomRow][randomCol] == VIRUS && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t grid[randomRow][randomCol] = 0;\n\t\t }\n\t\t \n\t\t\t int temp = grid[randomRow + 1][randomCol];\n\t\t\t //VIRUS takeover\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = VIRUS;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = VIRUS;\n\t\t\t }\n\t\t\t //TEMP takeover\n\t\t\t grid[randomRow][randomCol] = temp;\n\t\t\t if(grid[randomRow - 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow - 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow + 1][randomCol] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol - 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol - 1] = temp;\n\t\t\t }\n\t\t\t if(grid[randomRow][randomCol + 1] != EMPTY)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol + 1] = temp;\n\t\t\t }\n\t }\n\t \n\t //Fire\n\t if(grid[randomRow][randomCol] == FIRE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t { \n\t\t if(randomDirectionFire == 1)\n\t\t {\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol - 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t else if(randomDirectionFire == 3)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol + 1] = FIRE;\n\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t }\n\t\t \n\t\t //Fire Eats Vine\n\t\t if(grid[randomRow - 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == VINE)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = FIRE;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == VINE)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = FIRE;\n\t\t }\n\t\t \n\t\t //Fire Blows Up Helium\n\t\t if(grid[randomRow - 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t //Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow + 1][randomCol] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol - 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t\t if(grid[randomRow][randomCol + 1] == HELIUM && randomRow - 2 >= 0 && randomCol - 2 >= 0 && randomRow + 2 < grid[0].length && randomCol + 2 < grid.length)\n\t\t {\n\t\t\t//Explosion\n\t\t\t grid[randomRow - 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow + 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol + 2] = FIRE;\n\t\t\t grid[randomRow - 2][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol - 2] = FIRE;\n\t\t\t grid[randomRow][randomCol + 2] = FIRE;\n\t\t\t //Clear Explosion\n\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow + 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol + 1] = EMPTY;\n\t\t\t grid[randomRow - 1][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t }\n\t }\n\t \n\t //Vine\n\t if(grid[randomRow][randomCol] == VINE && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(grid[randomRow + 1][randomCol] == EMPTY)\n\t\t { \n\t\t\t if(randomSpread == 1)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t }\n\t\t }\n\t\t else if(grid[randomRow + 1][randomCol] == WATER)\n\t\t {\n\t\t\t if(randomSpread >= 90)\n\t\t\t {\n\t\t\t\t grid[randomRow + 1][randomCol] = VINE;\n\t\t\t\t grid[randomRow][randomCol + 1] = VINE;\n\t\t\t\t grid[randomRow][randomCol - 1] = VINE;\n\t\t\t }\n\t\t }\n\t }\n\t \n\t //Teleport\n\t if(grid[randomRow][randomCol] == TELEPORT && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t grid[randomTelRow][randomTelCol] = TELEPORT;\n\t\t grid[randomRow][randomCol] = EMPTY;\n\t }\n\t \n\t //Laser\n\t if(grid[randomRow][randomCol] == LASER && randomCol - 1 >= 0 && randomRow - 1 >= 0)\n\t {\n\t\t if(randomDirectionLaser == 1 && randomRow - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow + 1][randomCol] = LASER;\n\t\t\t grid[randomRow - 4][randomCol] = EMPTY;\n\t\t\t if(randomRow + 1 == grid.length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow - 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 2)\n\t\t {\n\t\t\t grid[randomRow - 1][randomCol] = LASER;\n\t\t\t grid[randomRow + 4][randomCol] = EMPTY;\n\t\t\t if(randomRow - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 1][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 2][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow + 3][randomCol] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else if(randomDirectionLaser == 3 && randomCol - 4 >= 0)\n\t\t {\n\t\t\t grid[randomRow][randomCol + 1] = LASER;\n\t\t\t grid[randomRow][randomCol - 4] = EMPTY;\n\t\t\t if(randomCol + 1 == grid[0].length - 1)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol - 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t grid[randomRow][randomCol - 1] = LASER;\n\t\t\t grid[randomRow][randomCol + 4] = EMPTY;\n\t\t\t if(randomCol - 1 == 0)\n\t\t\t {\n\t\t\t\t grid[randomRow][randomCol] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 1] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 2] = EMPTY;\n\t\t\t\t grid[randomRow][randomCol + 3] = EMPTY;\n\t\t\t }\n\t\t }\n\t }\n }", "private void setupPhase() {\n ClickObserver.getInstance().setTerrainFlag(\"Setup: SelectStartTerrain\");\n for (final Player p : playerList) {\n \t\n this.player = p;\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n \n // Cover all terrains, uncover starting pos ones\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getRackGui().setOwner(player);\n \tBoard.applyCovers();\n \tfor (Coord spot : startingPos) {\n \t\tif (!Board.getTerrainWithCoord(spot).isOccupied())\n \t\t\tBoard.getTerrainWithCoord(spot).uncover();\n \t}\n GUI.getHelpText().setText(\"Setup Phase: \" + p.getName() \n + \", select a valid hex to start your kingdom.\");\n }\n });\n while( isPaused ){\n int num = p.getHexesOwned().size();\n if( num == 1 ){\n unPause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tPlayerBoard.getInstance().updateGold(player);\n }\n });\n System.out.println(\"done\");\n }\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n pause();\n \n // Now that all players have selected starting spots, flip over all terrains\n // *Note: Not sure I understand the rules with regards to this, but I think this is right\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \t Board.showTerrains();\n Board.removeBadWaters();\n }\n });\n while( isPaused ){\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n \n // Check if player has at least two land hexes around starting spot\n for( final Player p : playerList ) {\n this.player = p;\n\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(p.getName() \n + \", select a water hex to replace with from deck\");\n Board.removeBadAdjWaters();\n }\n });\n while( isPaused ){\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n\n player.flipAllDown();\n }\n \n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\t\tTileDeck.getInstance().slideOut();\n }\n });\n\n \n // next prompt each player to select an adjacent hex\n ClickObserver.getInstance().setTerrainFlag(\"Setup: SelectTerrain\");\n // loop 2 times so each player adds 2 more hexes\n for( int i=0; i<2; i++ ){\n for( final Player p : playerList ) {\n this.player = p;\n\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n \n final ArrayList<Terrain> ownedHexes = player.getHexesOwned();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Board.applyCovers();\n }\n });\n \tfor (Terrain t1 : ownedHexes) {\n \t\tIterator<Coord> keySetIterator = Board.getTerrains().keySet().iterator();\n \twhile(keySetIterator.hasNext()) {\n \t\tCoord key = keySetIterator.next();\n \t\tfinal Terrain t2 = Board.getTerrains().get(key);\n \t\tif (t2.compareTo(t1) == 1 && !t2.isOccupied() && !t2.getType().equals(\"SEA\")) {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\t\tt2.uncover();\n }\n });\n \t\t}\n \t}\n \t}\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getRackGui().setOwner(player);\n GUI.getHelpText().setText(\"Setup Phase: \" + p.getName() \n + \", select an adjacent hex to add to your kingdom.\");\n }\n });\n // forces the GameLoop thread to wait until unpaused\n while( isPaused ){\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n }\n // prompt each player to place their first tower\n ClickObserver.getInstance().setTerrainFlag(\"Construction: ConstructFort\");\n for( final Player p : playerList ) {\n this.player = p;\n \n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n \n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Board.applyCovers();\n GUI.getRackGui().setOwner(player);\n GUI.getHelpText().setText(\"Setup Phase: \" + p.getName() \n + \", select one of your tiles to place a tower.\");\n }\n });\n \n // sleeps to avoid null pointer (runLater is called before player.getHexesOwned() below)\n try { Thread.sleep(50); } catch( Exception e ){ return; }\n ArrayList<Terrain> ownedHexes = player.getHexesOwned();\n \n for (final Terrain t : ownedHexes) {\n \t\n \tif (t.getOwner().getName().equals(player.getName())) { \n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tt.uncover();\n }\n });\n \t}\n }\n while( isPaused ){\n try { Thread.sleep(100); } catch( Exception e ){ return; }\n }\n player.flipAllDown();\n }\n // allow players to add some or all things to their tiles.\n ClickObserver.getInstance().setTerrainFlag(\"RecruitingThings: PlaceThings\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n }\n });\n for (final Player p : playerList) {\n this.player = p;\n player.flipAllUp();\n doneClicked = false;\n ClickObserver.getInstance().setClickedTerrain(p.getHexesOwned().get(2));\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n GUI.getRackGui().setOwner(player);\n Board.applyCovers();\n GUI.getHelpText().setText(\"Setup Phase: \" + p.getName()\n + \", place some or all of your things on a tile you own.\");\n }\n });\n ClickObserver.getInstance().setActivePlayer(this.player);\n pause();\n ArrayList<Terrain> ownedHexes = player.getHexesOwned();\n for (final Terrain t : ownedHexes) {\n \tif (t.getOwner().getName().equals(player.getName())) {\n\t Platform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tt.uncover();\n\t }\n\t });\n \t}\n }\n \n while (isPaused) {\n try { Thread.sleep(100); } catch(Exception e) { return; }\n }\n player.flipAllDown();\n }\n ClickObserver.getInstance().setTerrainFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Board.removeCovers();\n }\n });\n }", "private void setNextGame() {\n Persistence db = Persistence.getInstance();\n game = db.getNextGame();\n\n // set the initial grid in the model\n grid = game.getInitial();\n\n // get rid of everything on the view grid\n view.clearGrid(true);\n\n // put givens for new game into view\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (grid.isGiven(i, j)) {\n view.setGiven(i, j, grid.getNumber(i, j));\n } // if given\n } // for j\n } // for i\n\n }", "private void initialize() {\n\n this.levelName = \"Green 3\";\n this.numberOfBalls = 2;\n int ballsRadius = 5;\n Color ballsColor = Color.white;\n this.paddleHeight = (screenHeight / 27);\n this.paddleWidth = (screenWidth / 8);\n this.paddleSpeed = 11;\n int surroundingBlocksWidth = 30;\n this.paddleColor = new Color(1.0f, 0.699f, 0.000f);\n this.paddleUpperLeft = new Point(screenWidth / 2.2, screenHeight - surroundingBlocksWidth\n - this.paddleHeight);\n Color backgroundColor = new Color(0.000f, 0.420f, 0.000f);\n this.background = new Block(new Rectangle(new Point(0, 0), screenWidth + 1\n , screenHeight + 2), backgroundColor);\n this.background.setNumber(-1);\n\n Color[] colors = {Color.darkGray, Color.red, Color.yellow, Color.blue, Color.white};\n int blocksRowsNum = 5;\n int blocksInFirstRow = 10;\n int blocksWidth = screenWidth / 16;\n int blockHeight = screenHeight / 20;\n int firstBlockYlocation = screenHeight / 4;\n int removableBlocks = 0;\n Block[][] stairs = new Block[blocksRowsNum][];\n //blocks initialize.\n for (int i = 0; i < blocksRowsNum; i++, blocksInFirstRow--) {\n int number;\n for (int j = 0; j < blocksInFirstRow; j++) {\n if (i == 0) {\n number = 2; //top row.\n } else {\n number = 1;\n }\n stairs[i] = new Block[blocksInFirstRow];\n Point upperLeft = new Point(screenWidth - (blocksWidth * (j + 1)) - surroundingBlocksWidth\n , firstBlockYlocation + (blockHeight * i));\n stairs[i][j] = new Block(new Rectangle(upperLeft, blocksWidth, blockHeight), colors[i % 5]);\n if (stairs[i][j].getHitPoints() != -2 && stairs[i][j].getHitPoints() != -3) { // not death or live block\n stairs[i][j].setNumber(number);\n removableBlocks++;\n }\n this.blocks.add(stairs[i][j]);\n }\n\n }\n this.numberOfBlocksToRemove = (int) (removableBlocks * 0.5); //must destroy half of them.\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n List<Velocity> v = new ArrayList<>();\n v.add(Velocity.fromAngleAndSpeed(45, 9));\n v.add(Velocity.fromAngleAndSpeed(-45, 9));\n this.ballsFactory = new BallsFactory(this.ballsCenter, ballsRadius, ballsColor,\n screenWidth, screenHeight, v);\n\n //bodies.\n //tower.\n Block base = new Block(new Rectangle(new Point(surroundingBlocksWidth + screenWidth / 16, screenHeight * 0.7)\n , screenWidth / 6, screenHeight * 0.3), Color.darkGray);\n base.setNumber(-1);\n this.bodies.add(base);\n Block base2 = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLine()\n .middle().getX() - base.getWidth() / 6\n , base.getCollisionRectangle().getUpperLeft().getY() - base.getHeight() / 2.5), base.getWidth() / 3\n , base.getHeight() / 2.5), Color.gray);\n base2.setNumber(-1);\n this.bodies.add(base2);\n Block pole = new Block(new Rectangle(new Point(base2.getCollisionRectangle().getUpperLine().middle().getX()\n - base2.getWidth() / 6, base2.getCollisionRectangle().getUpperLeft().getY() - screenHeight / 3)\n , base2.getWidth() / 3, screenHeight / 3), Color.lightGray);\n pole.setNumber(-1);\n this.bodies.add(pole);\n\n double windowWidth = base.getWidth() / 10;\n double windowHeight = base.getHeight() / 7;\n double b = base.getWidth() / 12;\n double h = base.getHeight() / 20;\n for (int i = 0; i < 6; i++) { //windows of tower.\n for (int j = 0; j < 5; j++) {\n Block window = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLeft().getX() + b\n + (windowWidth + b) * j,\n base.getCollisionRectangle().getUpperLeft().getY() + h + (windowHeight + h) * i), windowWidth\n , windowHeight), Color.white);\n window.setNumber(-1);\n this.bodies.add(window);\n }\n }\n\n //circles on the top of the tower.\n Circle c1 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 17, Color.black, \"fill\");\n Circle c2 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 12, Color.darkGray, \"fill\");\n Circle c3 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 7, Color.red, \"fill\");\n this.bodies.add(c1);\n this.bodies.add(c2);\n this.bodies.add(c3);\n\n\n }", "public final void initialPosition() {\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.RED, Type.PAWN), new PositionImpl( 38 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.BLACK, Type.PAWN), new PositionImpl( 12 + i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.YELLOW, Type.PAWN), new PositionImpl( 1 + 8*i));\n\t\t}\n\t\tfor( int i = 0; i < 4; i++) {\n\t\t setPiece( new PieceImpl( Color.GREEN, Type.PAWN), new PositionImpl( 48 + i));\n\t\t}\n\t\t\n\t\tsetPiece( new PieceImpl( Color.RED, Type.BOAT), new PositionImpl( 63 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KNIGHT), new PositionImpl( 55 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.ELEPHANT), new PositionImpl( 47 ));\n\t\tsetPiece( new PieceImpl( Color.RED, Type.KING), new PositionImpl( 39 ));\n\t\t\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.BOAT), new PositionImpl( 7 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KNIGHT), new PositionImpl( 6 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.ELEPHANT), new PositionImpl( 5 ));\n\t\tsetPiece( new PieceImpl( Color.BLACK, Type.KING), new PositionImpl( 4 ));\n\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.BOAT), new PositionImpl( 0 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KNIGHT), new PositionImpl( 8 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.ELEPHANT), new PositionImpl( 16 ));\n\t\tsetPiece( new PieceImpl( Color.YELLOW, Type.KING), new PositionImpl( 24 ));\n\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.BOAT), new PositionImpl( 56 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KNIGHT), new PositionImpl( 57 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.ELEPHANT), new PositionImpl( 58 ));\n\t\tsetPiece( new PieceImpl( Color.GREEN, Type.KING), new PositionImpl( 59 ));\n\t\t\n }", "public void generateLabyrinth() {\n\n /**\n * Generate some randoms Monsters for rooms\n */\n Monsters[] monster = new Monsters[countRooms];\n for (int i = 0; i < countRooms; i++) {\n monster[i] = new Monsters(\n rnd.nextDouble() * 10 + 1,\n rnd.nextDouble() * 10 + 1,\n rnd.nextDouble() * 10 + 1\n );\n }\n\n /**\n * Genetare random rooms with monsters\n */\n Rooms[] room = new Rooms[countRooms];\n for (int i = 0; i < countRooms; i++) {\n room[i] = new Rooms(\"unknownRoom\" + i);\n room[i].setMonster(monster[i]);\n if (rnd.nextInt(100) < 50) {\n room[i].setItem(shop.getRandomItem());\n }\n }\n\n /**\n * Connecting rooms with each other\n * North to South\n * East to West\n */\n\n //init and connect first room with labyrinth\n currentRoom = new Rooms(\"startRoom\");\n currentRoom.setNorth(room[0]);\n room[0].setSouth(currentRoom);\n\n for (int i = 0; i < countRooms - 1; i++) {\n int rint;\n //North to South\n rint = rnd.nextInt(countRooms);\n if (room[i].getNorth() == null) {\n while (room[rint].getSouth() != null) {\n rint = rnd.nextInt(countRooms);\n }\n room[i].setNorth(room[rint]);\n room[rint].setSouth(room[i]);\n }\n //East to West\n rint = rnd.nextInt(countRooms);\n if (room[i].getEast() == null) {\n while (room[rint].getWest() != null) {\n rint = rnd.nextInt(countRooms);\n }\n room[i].setEast(room[rint]);\n room[rint].setWest(room[i]);\n }\n\n }\n\n\n }", "private void init() {\r\n\r\n\t\tPlanetLayoutGenerator gen = new PlanetLayoutGenerator();\r\n\t\tint planetCount = 15;\r\n\t\tint width = 5, height = 5, depth = 5;\r\n\t\tint[][][] layout = gen.generate(width, height, depth, planetCount);\r\n\t\tfinal float minSize = 4, maxSize = 10;\r\n\t\tfinal float gap = (C.World.PlanetBoxSize - maxSize*width)/(width-1);\r\n\r\n\t\tTextureRegion textures[] = new TextureRegion[] {\r\n\t\t\tassets.planetNeptune,\r\n\t\t\tassets.planetSaturn,\r\n\t\t\tassets.planetEarth,\r\n\t\t};\r\n\t\tfloat x = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat y = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\t\tfloat z = -C.World.PlanetBoxSize/2 + maxSize/2;\r\n\r\n\t\tfor (int ix = 0; ix < width; ++ix) {\r\n\t\t\tfor (int iy = 0; iy < height; ++iy) {\r\n\t\t\t\tfor (int iz = 0; iz < depth; ++iz) {\r\n\t\t\t\t\tif (layout[ix][iy][iz] == 1) {\r\n\t\t\t\t\t\tTextureRegion tex = textures[(ix+iy+iz)%3];\r\n\t\t\t\t\t\tfloat size = MathUtils.random(minSize, maxSize);\r\n\r\n\t\t\t\t\t\tfactory.createPlanet(x+ix*(maxSize+gap), y+iy*(maxSize+gap), z+iz*(maxSize+gap), size, 0, tex);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tEntity player = factory.createPlayerShip(0, 0, 5);\r\n\t\tplayerSystem.setPlayer(player);\r\n\r\n\t\tcollisions.relations.connectGroups(CollisionGroups.PLAYER_2D, CollisionGroups.PLANETS_2D);\r\n\t}", "private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }", "public void gossipGirl(){\n\t\tfor(Point p: currentPiece){\n\t\t\twell[p.x + pieceOrigin.x][p.y + pieceOrigin.y] = currentColor;\n\t\t}\n\t\trowChecked();\n\n\t\tsetNewPiece();\n\t\tgetNewPiece();\n\t}", "private void swellForests(Square[][]Squares, int rows, int columns, int[][] terrainLoc)\n {\n // for loop to go through every second column\n for (int a = 1; a < rows-1; a=a+2)\n {\n // for loop to go through every row\n for (int b = 1 ; b < columns-1 ; b++)\n {\n // checking for seeds\n if (terrainLoc[a][b] == 2)\n {\n // randoming the amount of forests to add around the found seed\n int rand = (int ) (Math.random() * 8 +1);\n \n // for loop to random the locations and place the new forest tiles\n for (int c = 0 ; c<=rand;c++)\n { \n int randvalue = (int ) (Math.random() * 8 +1);\n \n switch (randvalue)\n {\n case 1: Squares[a-1][b-1].setTerrain(2); // vasen ylänurkka\n case 2: Squares[a][b-1].setTerrain(2); // yläpuoli\n case 3: Squares[a+1][b-1].setTerrain(2); // oikea ylänurkka\n case 4: Squares[a-1][b].setTerrain(2); // vasen\n case 5: Squares[a+1][b].setTerrain(2); // oikea\n case 6: Squares[a-1][b+1].setTerrain(2); // vasen alanurkka\n case 7: Squares[a][b+1].setTerrain(2); // alapuoli\n case 8: Squares[a+1][b+1].setTerrain(2); // oikea alanurkka\n }\n }\n }\n }\n }\n }", "void setEmptyCase(int x, int y, ArrayList<Spot> spots, ArrayList<Spot> spotsTrie) {\n int nArr = nbrBombAround(y, x);\n // if found a number \n if (nArr != 0) {\n stateGame[y][x] = (char)(48 + nArr);\n }\n else {\n // determine empty case \n for (int i = y - 1; i <= y + 1; i++) {\n for (int j = x - 1; j <= x + 1; j++) {\n if (i >= 0 && i < 9 && j >= 0 && j < 9) {\n // case choise (clicked)\n if(i == y && j == x) {\n stateGame[i][j] = '/';\n if (!existe(spots, new Spot(i, j)) && !existe(spotsTrie, new Spot(i, j))) {\n spotsTrie.add(new Spot(i,j));\n }\n continue;\n }\n // save and make all empty case in arr\n nArr = nbrBombAround(i, j);\n if (nArr == 0){\n //stateGame[i][j] = '/';\n if (!existe(spots, new Spot(i, j)) && !existe(spotsTrie, new Spot(i, j))) {\n spots.add(new Spot(i,j));\n }\n }\n else{\n // en cas trouve bomb around\n stateGame[i][j] = (char)(48 + nArr);\n if (!existe(spots, new Spot(i, j)) && !existe(spotsTrie, new Spot(i, j))) {\n spotsTrie.add(new Spot(i,j));\n }\n }\n }\n }\n }\n }\n \n if(!spots.isEmpty()) {\n Spot nextPoint = spots.get(0);\n spots.remove(0);\n setEmptyCase(nextPoint.getY(), nextPoint.getX(), spots, spotsTrie);\n }\n }", "public void resetPlateau(){\n\t\tEnvironnementController.getInstance().initlistHexagons();\n plateau.clear();\n getFreeSlots().clear();\n Hexagon base = new Hexagon(0,0,0,Enums.Color.NON,new DefaultImprovement());\n base.setIrrigated(false);\n plateau.put(makeKey(base), base);\n /*after initialization all neighbours slots of 0,0,0 are free*/\n getFreeSlots().addAll(plateau.get(makeKeyFromCoords(0,0,0)).getNeighbours());\n }", "public boolean placeComputerShipsSmart(int pattern) {\n if(cpuHasPlaced){\n return false;\n }\n switch(pattern) {\n case 1:\n computerShips[0].setShip(1, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n computerShips[1].setShip(3, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][3] = board.ship.ordinal();\n }\n computerShips[2].setShip(5, 3, 0);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[3].setShip(4, 1, 0);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(8, 5, 1);\n for (int i = 5; i < 7; i++){\n computerPlayerBoard[i][8] = board.ship.ordinal();\n }\n\n break;\n case 2:\n computerShips[0].setShip(4, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[1].setShip( 6, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][6] = board.ship.ordinal();\n }\n computerShips[2].setShip( 6, 0, 0);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 1, 8, 0);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[4].setShip( 1, 2, 1);\n for (int i = 2; i < 4; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n\n break;\n case 4:\n computerShips[0].setShip( 0, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[1].setShip( 8, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][8] = board.ship.ordinal();\n }\n computerShips[2].setShip( 5, 2, 1);\n for (int i = 2; i < 5; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[3].setShip( 3, 8, 0);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(0, 9, 0);\n for (int i = 0; i < 2; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n\n break;\n case 5:\n computerShips[0].setShip( 7, 5, 1);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n computerShips[1].setShip( 1, 1, 1);\n for (int j = 1; j < 5; j++){\n computerPlayerBoard[j][1] = board.ship.ordinal();\n }\n computerShips[2].setShip( 4, 2, 0);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 1, 8, 0);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[4].setShip( 3, 6, 0);\n for (int i = 3; i < 5; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n\n break;\n case 6:\n computerShips[0].setShip( 3, 3, 0);\n for (int i = 3; i < 8; i++) {\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n computerShips[1].setShip( 3, 7, 0);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[7][j] = board.ship.ordinal();\n }\n computerShips[2].setShip( 7, 4, 0);\n for (int i =7; i < 10; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 2, 5, 0);\n for (int i = 2; i < 5; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(8, 8, 0);\n for (int i = 8; i < 10; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n\n break;\n case 7:\n computerShips[0].setShip( 3, 6, 0);\n for (int i = 3; i < 8; i++) {\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(1, 2, 1);\n for (int j = 2; j < 6; j++){\n computerPlayerBoard[j][1] = board.ship.ordinal();\n }\n computerShips[2].setShip( 7, 4, 1);\n for (int i =7; i < 10; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 2, 5, 0);\n for (int i = 2; i < 5; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[4].setShip( 8, 8, 0);\n for (int i = 8; i < 10; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n\n break;\n case 8:\n computerShips[0].setShip(5, 1, 0);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[1].setShip( 7, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n computerShips[2].setShip( 4, 6, 1);\n for (int i =6; i < 9; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[3].setShip( 2, 4, 1);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[4].setShip( 0, 1, 1);\n for (int i = 1; i < 3; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n\n break;\n case 9:\n computerShips[0].setShip( 5, 1, 0);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[1].setShip( 7, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n computerShips[2].setShip( 6, 3, 1);\n for (int i =3; i < 6; i++){\n computerPlayerBoard[i][6] = board.ship.ordinal();\n }\n computerShips[3].setShip( 0, 1, 0);\n for (int i = 0; i < 3; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[4].setShip( 5, 8, 1);\n for (int i = 8; i < 10; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n\n break;\n case 10:\n computerShips[0].setShip( 9, 3, 1);\n for (int i = 3; i < 8; i++) {\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[1].setShip( 7, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n computerShips[2].setShip( 4, 6, 1);\n for (int i =6; i < 9; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 2, 4, 1);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[4].setShip( 0, 1, 1);\n for (int i = 1; i < 3; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n\n break;\n case 11:\n //carrier\n computerShips[0].setShip( 1, 3, 0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n //battleship\n computerShips[1].setShip(1, 6, 0);\n for(int i = 1; i < 5; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n //submarine\n computerShips[2].setShip( 5, 6, 1);\n for(int i = 6; i < 8; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n //cruiser\n computerShips[3].setShip( 1, 0, 0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n //destroyer\n computerShips[4].setShip( 7, 0, 1);\n for(int i = 0; i < 2; i++){\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n\n break;\n case 12:\n //carrier (5)\n computerShips[0].setShip( 2, 1, 0);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n //battleship (4)\n computerShips[1].setShip( 4, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][4] = board.ship.ordinal();\n }\n //submarine (3)\n computerShips[2].setShip( 7, 3, 1);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n //cruiser (3)\n computerShips[3].setShip( 2, 9, 0);\n for (int i = 2; i < 5; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n //destroyer (2)\n computerShips[4].setShip( 1, 3, 1);\n for (int i = 3; i < 5; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n break;\n case 13:\n //carrier (5)\n computerShips[0].setShip( 9, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n //battleship (4)\n computerShips[1].setShip( 6, 0, 1);\n for (int j = 0; j < 4; j++){\n computerPlayerBoard[j][6] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 4, 9, 0);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 1, 1, 0);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 3, 5, 1);\n for (int i = 5; i < 7; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n break;\n case 14:\n //carrier (5)\n\n computerShips[0].setShip( 0, 5, 1);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 7, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 3, 3, 1);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 4, 5, 1);\n for (int i = 5; i < 8; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 5, 1, 0);\n for (int i = 5; i < 7; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n break;\n case 15:\n //carrier (5)\n\n computerShips[0].setShip( 1, 8, 0);\n for (int i = 1; i < 6; i++) {\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 7, 3, 1);\n for (int j = 3; j < 7; j++){\n computerPlayerBoard[j][7] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 6, 1, 0);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 1, 5, 0);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 2, 1, 1);\n for (int i = 1; i < 3; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n break;\n case 16:\n //carrier (5)\n\n computerShips[0].setShip( 0, 1, 1);\n for (int i = 1; i < 6; i++) {\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 1, 9, 0);\n for (int j = 1; j < 5; j++){\n computerPlayerBoard[9][j] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 9, 5, 1);\n for (int i = 5; i < 8; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 9, 1, 1);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 4, 0, 0);\n for (int i = 4; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n break;\n case 17:\n //carrier (5)\n\n computerShips[0].setShip( 4, 2, 1);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 1, 5, 1);\n for (int j = 5; j < 9; j++){\n computerPlayerBoard[j][1] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 7, 4, 1);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 6, 1, 0);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 1, 1, 0);\n for (int i = 1; i < 3; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n break;\n case 18:\n //carrier (5)\n\n computerShips[0].setShip( 2, 3, 1);\n for (int i = 3; i < 8; i++) {\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 6, 4, 1);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[j][6] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 8, 1, 1);\n for (int i = 1; i < 4; i++){\n computerPlayerBoard[i][8] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 3, 2, 0);\n for (int i = 3; i < 6; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 4, 9, 0);\n for (int i = 4; i < 6; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n break;\n case 19:\n //carrier (5)\n\n computerShips[0].setShip( 8, 5, 1);\n for (int i = 5; i < 10; i++) {\n computerPlayerBoard[i][8] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 0, 0, 0);\n for (int j = 0; j < 4; j++){\n computerPlayerBoard[0][j] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 7, 0, 1);\n for (int i = 0; i < 3; i++){\n computerPlayerBoard[i][7] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 5, 4, 1);\n for (int i = 4; i < 7; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 3, 8, 0);\n for (int i = 3; i < 5; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n break;\n case 20:\n //carrier (5)\n\n computerShips[0].setShip( 2, 5, 0);\n for (int i = 2; i < 7; i++) {\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n //battleship (4)\n\n computerShips[1].setShip( 2, 1, 0);\n for (int j = 2; j < 6; j++){\n computerPlayerBoard[1][j] = board.ship.ordinal();\n }\n //submarine (3)\n\n computerShips[2].setShip( 3, 7, 1);\n for (int i = 7; i < 10; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n //cruiser (3)\n\n computerShips[3].setShip( 6, 8, 0);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n //destroyer (2)\n\n computerShips[4].setShip( 8, 0, 0);\n for (int i = 8; i < 10; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n break;\n\n }\n return true;\n }", "private void initialize(int index) {\n\t\tthis.NW = new Point((int) this.getCoarseGrainedMinX(), (int) this.getCoarseGrainedMinY());\n\t\tthis.NE = new Point((int) this.getCoarseGrainedMaxX(), (int) this.getCoarseGrainedMinY());\n\t\tthis.SW = new Point((int) this.getCoarseGrainedMinX(), (int) this.getCoarseGrainedMaxY());\n\t\tthis.SE = new Point((int) this.getCoarseGrainedMaxX(), (int) this.getCoarseGrainedMaxY());\n\t\tswitch (this.type) {\n\t\tcase (TownTile.GRASS):\n\t\t\tthis.addImage(ResourceManager.getImage(DogWarriors.grassImages[index]));\n\t\t\tbreak;\n\t\tcase (TownTile.WALL):\n\t\t\tthis.addImageWithBoundingBox(ResourceManager.getImage(DogWarriors.wallImages[index]));\n\t\t\tbreak;\n\t\tcase (TownTile.EXIT_ROAD):\n\t\t\tthis.addImage(ResourceManager.getImage(DogWarriors.roadImages[index]));\n\t\t\tthis.addShape(new ConvexPolygon(16.0f));\n\t\t\tbreak;\n\t\tcase (TownTile.EXIT_GRASS):\n\t\t\tthis.addImage(ResourceManager.getImage(DogWarriors.grassImages[index]));\n\t\t\tthis.addShape(new ConvexPolygon(16.0f, 16.0f));\n\t\t\tbreak;\n\t\tcase (TownTile.ROAD):\n\t\t\tthis.addImage(ResourceManager.getImage(DogWarriors.roadImages[index]));\n\t\t\tbreak;\n\t\tcase (TownTile.SHRUB):\n\t\t\tthis.addImage(ResourceManager.getImage(DogWarriors.worldImages[index]), \n\t\t\t\t\tnew Vector(0.0f, -16.0f));\n\t\t\tthis.addShape(new ConvexPolygon(16.0f, 16.0f));\n\t\t\tbreak;\n\t\tcase (TownTile.CAT_GRASS):\n\t\t\tthis.addImage(ResourceManager.getImage(DogWarriors.grassImages[index]));\n\t\t\tbreak;\n\t\t}\n\t}", "private void createMaps() {\r\n\t\tint SIZE = 100;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tshipStateMap.put(new Point(x, y), 0);\r\n\t\t\tshipTypeMap.put(new Point(x, y), 0);\r\n\t\t\tx++;\r\n\t\t}\r\n\t}", "private void initialiseBags() {\r\n\t\t//Player one bag\r\n\t\taddToBag1(GridSquare.Type.a, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.b, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.c, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.d, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.e, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.f, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.g, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.h, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.i, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.j, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.k, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.l, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.m, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.n, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.o, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.p, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.r, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.s, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.t, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.u, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.v, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.w, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.x, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\t\r\n\t\t//Player two bag\r\n\t\taddToBag2(GridSquare.Type.A, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.B, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.C, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.D, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.E, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.F, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.G, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.H, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.I, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.J, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.K, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.L, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.M, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.N, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.O, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.P, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.Q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.R, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.S, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.T, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.U, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.V, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.W, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.X, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t}", "@Override\n\tprotected void updateTiles() {\n\n\t\tfinal byte tileId = getPlanetType().mainTileId;\n\n\t\tfor (int i = 0; i < tiles.length; i++) {\n\t\t\t// if (random.NextDouble() > 0.95f)\n\t\t\t// tiles[i] = 0;\n\t\t\t// else\n\t\t\ttiles[i] = tileId;\n\t\t}\n\t}", "public void initLogicBoard() {\n int numOfBombs = 0;\n while (numOfBombs<bombs) {\n int randX = (int) (Math.random() * (rows - 1));\n int randY = (int) (Math.random() * (cols - 1));\n if (allTiles[randX][randY].getType() != 10) {\n allTiles[randX][randY].setType(10);\n\n for (int m = randX - 1; m <= randX + 1; m++) {\n for (int n = randY - 1; n <= randY + 1; n++) {\n if ((m < rows && n < cols) && (m >= 0 && n >= 0)) {\n if (allTiles[m][n].getType() != 10)\n allTiles[m][n].setType(allTiles[m][n].getType() + 1);\n }\n }\n }\n numOfBombs++;\n\n }\n }\n }", "@Override\n public void start(Stage teater){\n GridPane brettGP = new GridPane();\n boolean hvittFelt = false;\n for(int y = 0; y < 10; y ++){\n for(int x = 0; x < 10; x++){\n if(x == 0 || x == 9){\n if(y == 0 || y == 9){\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE / 2,\n Settinger.RUTE_BREDDE / 2);\n r.setFill(Color.DARKGREY);\n brettGP.add(r, x, y);\n }\n else{\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE / 2,\n Settinger.RUTE_BREDDE);\n r.setFill(Color.DARKGREY);\n StackPane stack = new StackPane();\n stack.getChildren().add(r);\n Text tekst = new Text(Integer.toString(9 - y));\n tekst.setFont(new Font(12));\n tekst.setTextAlignment(TextAlignment.CENTER);\n stack.getChildren().add(tekst);\n brettGP.add(stack, x, y);\n }\n }\n else{\n if(y == 0 || y == 9){\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE / 2);\n r.setFill(Color.DARKGREY);\n StackPane stack = new StackPane();\n stack.getChildren().add(r);\n Text tekst = new Text(Character.toString((char)(x + 64)));\n tekst.setFont(new Font(12));\n tekst.setTextAlignment(TextAlignment.CENTER);\n stack.getChildren().add(tekst);\n brettGP.add(stack, x, y);\n }\n else{\n Rectangle varselFargeR = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE);\n varselFargeR.setFill(Color.RED);\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE);\n if(hvittFelt){ r.setFill(Color.WHITE); }\n else{ r.setFill(Color.GREY); }\n StackPane stack = new StackPane();\n feltene[x - 1][8 - y] = stack;\n stack.getChildren().add(varselFargeR);\n stack.getChildren().add(r);\n brettGP.add(stack, x, y);\n hvittFelt = !hvittFelt;\n }\n\n }\n }\n hvittFelt = !hvittFelt;\n }\n\n statusFelt = new Text(\"Tekstfeltet\");\n statusFelt.setWrappingWidth(Settinger.BRETT_BREDDE + Settinger.RUTE_BREDDE);\n //statusFelt.setY(Settinger.BRETT_BREDDE + 100);\n statusFelt.setFont(new Font(16));\n statusFelt.setTextAlignment(TextAlignment.CENTER);\n\n hoyreTekstFelt = new Text(\"Høyre\");\n hoyreTekstFelt.setWrappingWidth(Settinger.RUTE_BREDDE * 12);\n hoyreTekstFelt.setFont(new Font(10));\n\n\n\n\n Pane hovedKulisse = new Pane();\n GridPane layoutGP = new GridPane();\n layoutGP.add(brettGP, 0, 0);\n layoutGP.add(hoyreTekstFelt, 1, 0);\n layoutGP.add(statusFelt, 0, 1);\n\n hovedKulisse.getChildren().add(layoutGP);\n\n\n Scene scene = new Scene(hovedKulisse);\n teater.setScene(scene);\n teater.setTitle(\"Java-sjakk\");\n teater.show();\n\n // STARTER OPP SJAKK LOGIKK:\n administrator = new Administrator(this);\n partiet = administrator.hentParti();\n stilling = administrator.hentStilling();\n hoyreTekstFelt.setText(stilling.toString());\n //hoyreTekstFelt.setText(stilling.hentEvalStreng());\n // OPPSETT FERDIG, STARTER AUTOSJAKK:\n if(partiet.hentAutomatisk(0)){ autoTrekk(); }\n\n }", "public boolean placeComputerShipsDumb(int pattern) {\n if(cpuHasPlaced){\n return false;\n }\n switch(pattern){\n case 1:\n computerShips[0].setShip(4, 2, 1);\n for (int i = 4; i < 9; i++) {\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[1].setShip(2, 4, 0);\n for (int j = 4; j < 8; j++){\n computerPlayerBoard[2][j] = board.ship.ordinal();\n }\n computerShips[2].setShip(0, 0, 1);\n for (int i = 0; i < 3; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[3].setShip(7, 9, 1);\n for (int i = 6; i < 9; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[4].setShip(5, 4, 1);\n for (int i = 5; i < 7; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n break;\n case 2:\n computerShips[0].setShip(0, 0, 1);\n for(int i = 0; i < 6; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[1].setShip( 0, 3, 1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n computerShips[2].setShip(0, 4, 1);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[3].setShip(0,1,1);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n computerShips[4].setShip(0,2,1);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n break;\n case 3:\n computerShips[0].setShip(0,0,0);\n for(int i = 0; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[1].setShip( 0, 3, 0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(0, 4, 0);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip( 0, 1, 0);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(0,2,0);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n break;\n case 4:\n computerShips[0].setShip(3,4,1);\n for(int i = 3; i < 8; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[1].setShip( 3, 6, 1);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[i][6] = board.ship.ordinal();\n }\n computerShips[2].setShip(3, 3, 1);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n computerShips[3].setShip( 7, 9, 1);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[4].setShip(8,0,0);\n for(int i = 8; i <= 9; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n break;\n case 5:\n computerShips[0].setShip(0,9,0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,6,1);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[i][6] = board.ship.ordinal();\n }\n computerShips[2].setShip(3,3,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(0,9,1);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[4].setShip(8,0,1);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n break;\n case 6:\n computerShips[0].setShip(0,9,0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(0,6,0);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(0,5,0);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(0,8,0);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(0,7,0);\n for(int i = 0; i < 2; i++){\n computerPlayerBoard[7][i] = board.ship.ordinal();\n }\n break;\n case 7:\n computerShips[0].setShip(3,3,0);\n for(int i = 3; i < 8; i++){\n computerPlayerBoard[3][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,5,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n //cruiser\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(3,2,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(3,4,0);\n for(int i = 3; i < 5; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n break;\n case 8:\n computerShips[0].setShip(2,4,1);\n for(int i = 2; i < 7; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,6,1);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[i][6] = board.ship.ordinal();\n }\n computerShips[2].setShip(4,5,1);\n for(int i = 4; i < 7; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[3].setShip(2,3,1);\n for(int i = 2; i < 5; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n computerShips[4].setShip(2,5,1);\n for(int i = 2; i < 4; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n break;\n case 9:\n computerShips[0].setShip(0,0,1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,1,1);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n computerShips[2].setShip(7,0,1);\n for(int i = 7; i <= 9; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[3].setShip(5,0,1);\n for(int i = 5; i < 8; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[4].setShip(0,1,1);\n for(int i = 0; i < 2; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n break;\n case 10:\n computerShips[0].setShip(0,0,0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,1,0);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(7,0,0);\n for(int i = 7; i <= 9; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(5,0,0);\n for(int i = 5; i < 8; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(0,1,0);\n for(int i = 0; i < 2; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n break;\n case 11:\n computerShips[0].setShip(2,3,1);\n for(int i = 2; i < 7; i++){\n computerPlayerBoard[i][3] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,5,1);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[2].setShip(3,0,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(4,1,1);\n for(int i = 4; i < 6; i++){\n computerPlayerBoard[i][1] = board.ship.ordinal();\n }\n computerShips[4].setShip(4,8,1);\n for(int i = 4; i < 6; i++){\n computerPlayerBoard[i][8] = board.ship.ordinal();\n }\n break;\n case 12:\n computerShips[0].setShip(3,5,0);\n for(int i = 3; i < 8; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,2,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(4,2,1);\n for(int i = 4; i < 7; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[3].setShip(3,0,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(3,9,0);\n for(int i = 3; i < 5; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n break;\n case 13:\n computerShips[0].setShip(0,0,1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[1].setShip(0,9,1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,0,1);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[i][0] = board.ship.ordinal();\n }\n computerShips[3].setShip(6,9,1);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n computerShips[4].setShip(8,9,1);\n for(int i = 8; i <= 9; i++){\n computerPlayerBoard[i][9] = board.ship.ordinal();\n }\n break;\n case 14:\n computerShips[0].setShip(0,4,1);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[1].setShip(0,2,1);\n for(int i = 0; i < 4; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[2].setShip(5,4,1);\n for(int i = 5; i < 8; i++){\n computerPlayerBoard[i][4] = board.ship.ordinal();\n }\n computerShips[3].setShip(4,2,1);\n for(int i = 4; i < 7; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n computerShips[4].setShip(6,2,1);\n for(int i = 6; i < 8; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n break;\n case 15:\n computerShips[0].setShip(1,4,0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,5,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,4,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[4][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,5,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(7,5,0);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n break;\n case 16:\n computerShips[0].setShip(1,1,0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,8,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,1,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,8,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(7,8,0);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n break;\n case 17:\n computerShips[0].setShip(1,1,0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,2,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,1,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[1][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,2,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(7,2,0);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n break;\n case 18:\n computerShips[0].setShip(1,6,0);\n for(int i = 1; i < 6; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(3,7,0);\n for(int i = 3; i < 7; i++){\n computerPlayerBoard[7][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(6,6,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[6][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,7,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[7][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(7,7,0);\n for(int i = 7; i < 9; i++){\n computerPlayerBoard[7][i] = board.ship.ordinal();\n }\n break;\n case 19:\n computerShips[0].setShip(0,5,0);\n for(int i = 0; i < 5; i++){\n computerPlayerBoard[5][i] = board.ship.ordinal();\n }\n computerShips[1].setShip(2,2,0);\n for(int i = 2; i < 6; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(0,9,0);\n for(int i = 0; i < 3; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(6,0,0);\n for(int i = 6; i < 9; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(6,9,0);\n for(int i = 6; i < 8; i++){\n computerPlayerBoard[9][i] = board.ship.ordinal();\n }\n break;\n case 20:\n computerShips[0].setShip(2,5,1);\n for(int i = 2; i < 7; i++){\n computerPlayerBoard[i][5] = board.ship.ordinal();\n }\n computerShips[1].setShip(1,8,0);\n for(int i = 1; i < 5; i++){\n computerPlayerBoard[8][i] = board.ship.ordinal();\n }\n computerShips[2].setShip(3,0,0);\n for(int i = 3; i < 6; i++){\n computerPlayerBoard[0][i] = board.ship.ordinal();\n }\n computerShips[3].setShip(1,2,0);\n for(int i = 1; i < 4; i++){\n computerPlayerBoard[2][i] = board.ship.ordinal();\n }\n computerShips[4].setShip(4,2,1);\n for(int i = 4; i < 6; i++){\n computerPlayerBoard[i][2] = board.ship.ordinal();\n }\n break;\n\n }\n cpuHasPlaced = true;\n return true;\n }", "public void create3(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating stairs to connect rooms\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Stairs[1][1] = 1;\n\n\t\t//creating board to keep track of garret\n\t\tfor(int i = 0; i <this.Garret.length; i++){\n\t\t\tfor(int p = 0; p < this.Garret.length; p++){\n\t\t\t\tthis.Garret[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of garret board\n\t\tthis.Garret[18][10] = 1;//putts garret there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 1; i< 6 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 7; p > 4; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 11 ; i++){\n\t\t\tfor(int p = 4; p < 5; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 10; i< 11 ; i++){\n\t\t\tfor(int p = 5; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 11; i< 15 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 7; p > 3; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 1; p < 4; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 12; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 5; i< 9 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 7; p < 12; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 16 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 12; p < 19; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "public static void setUpGameComp() {\r\n for (int i = 0; i < fleet.length; i++) {\r\n int random = (int)(Math.random() * 10);\r\n \r\n if (random < 5) {\r\n placeShipHorzRand(gameBoardComp, fleet[i], symbols[i]);\r\n }\r\n else {\r\n placeShipVertRand(gameBoardComp, fleet[i], symbols[i]);\r\n }\r\n }\r\n \r\n System.out.print(\" Computer is finished!\");\r\n //displayBoard(gameBoardComp);\r\n \r\n }", "public void letSmartComputerSetup() {\n //generates a random spot for the flag\n int randomRow = (int)(Math.random() * 2);\n int randomCol = (int)(Math.random() * 10);\n\n //adjusts the flag for the proper team\n if(state.getCurrentTeamsTurn().getTEAMNUMBER() == 0) {\n randomRow += 8;\n }\n\n //adds the flag to the board\n state.setLastTappedPieceButton(Rank.FLAG);\n state.tapOnSquare(randomRow, randomCol);\n state.tapOnSquare(randomRow, randomCol);\n\n //places bombs around the flag if possible\n state.setLastTappedPieceButton(Rank.BOMB);\n if(randomRow != 0) {\n state.tapOnSquare(randomRow - 1, randomCol);\n state.tapOnSquare(randomRow - 1, randomCol);\n }\n if(randomRow != 9) {\n state.tapOnSquare(randomRow + 1, randomCol);\n state.tapOnSquare(randomRow + 1, randomCol);\n }\n if(randomCol != 0) {\n state.tapOnSquare(randomRow, randomCol -1);\n state.tapOnSquare(randomRow, randomCol -1);\n }\n if(randomCol != 9) {\n state.tapOnSquare(randomRow, randomCol + 1);\n state.tapOnSquare(randomRow, randomCol + 1);\n }\n\n //transitions the player to play phase\n state.transitionPhases();\n }", "public void initGame() {\r\n Log.d(\"UT3\", \"init game\");\r\n mEntireBoard = new Tile(this);\r\n // Create all the tiles\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large] = new Tile(this);\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small] = new Tile(this);\r\n }\r\n mLargeTiles[large].setSubTiles(mSmallTiles[large]);\r\n }\r\n mEntireBoard.setSubTiles(mLargeTiles);\r\n\r\n // If the player moves first, set which spots are available\r\n mLastSmall = -1;\r\n mLastLarge = -1;\r\n setAvailableFromLastMove(mLastSmall);\r\n }", "public void speckle() {\n\t\tint r = (height / res) - 1;\n\t\tint c = (width / res);\n\t\tfor (int i = 0; i < c; i++)\t\t{\n\t\t\tint x = rng.nextInt(25);\t\t\t\n\t\t\tif (x == 0) { // 1/25 chance of changing bottom row pixel to black\t \n\t\t\t\tvalues[r][i] = color1;\t\t\t\t\n\t\t\t}\n\t\t\telse if (x == 1) { // 1/25 chance of changing bottom row pixel to white\n\t\t\t\tvalues[r][i] = color2;\n\t\t\t}\n\t\t\t// 23/25 chance of leaving bottom pixel alone\n\t\t}\n\t}", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }", "public static void setHardLevelObstacles() {\n\t\t// Setting values for obstacles\n\t\tint selectedPlatform = 0;\n\t\tint selectedXPart = 0;\n\t\tfor(int i = 0; i < obstacle.length; i++) {\n\t\t\tif(i % 2 == 0) {\n\t\t\t\tobstacle[i].setSize(OBSTACLE_WIDTH, OBSTACLE_HEIGHT);\n\t\t\t\tobstacle[i].setObstacleImage(Engine.pickRandomImage(imgObstacle));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tobstacle[i].setSize(OBSTACLE_LARGE_WIDTH, OBSTACLE_LARGE_HEIGHT);\n\t\t\t\tobstacle[i].setObstacleImage(Engine.pickRandomImage(imgObstacleLarge));\n\t\t\t}\n\n\t\t\tint x;\n\t\t\tint y;\n\t\t\tint randomOffset = (int) (Math.random() * OBSTACLE_INCREASE);\n\t\t\t\t\n\t\t\t// X CALCULATION //\n\t\t\t\n\t\t\t// Place on second platform\n\t\t\tif((float) i / 6 == 1) {\n\t\t\t\tselectedPlatform++;\n\t\t\t\tselectedXPart = 0;\n\t\t\t}\n\t\t\t// Place on third and last platform\n\t\t\tif((float) i / 6 == 2) {\n\t\t\t\tselectedPlatform++;\n\t\t\t\tselectedXPart = 0;\n\t\t\t}\n\t\t\t// Next \"third part section\" of the platform \n\t\t\tif(i % 2 == 0) selectedXPart += 2;\n\t\t\t\n\t\t\tif(selectedXPart != 6) x = platform[selectedPlatform].getX() + (OBSTACLE_INCREASE * (selectedXPart - 1)) + randomOffset;\n\t\t\telse x = platform[selectedPlatform].getX() + (OBSTACLE_INCREASE * (selectedXPart - 1)) + randomOffset - OBSTACLE_LARGE_WIDTH;\n\t\t\t\n\t\t\t// Y CALCULATION //\n\t\t\t\n\t\t\tif(i % 2 == 0) {\n\t\t\t\tint temp = (int) (Math.random() * 10);\n\t\t\t\tif(temp <= 5) y = ground[selectedPlatform].getY() - Init.getObstacleGroundOffset();\n\t\t\t\telse y = platform[selectedPlatform].getY() + Init.getObstaclePlatformOffset();\n\t\t\t}\n\t\t\telse y = platform[selectedPlatform].getY() - Init.getObstacleLargePlatformOffset();\n\t\t\t\n\t\t\tobstacle[i].setLocation(x, y);\n\t\t}\n\t}", "public Puzzle exPuzzle() {\n List<Tile> tiles = new ArrayList<>(9);\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.C, Half.x), new Pic(Pattern.C, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y), new Pic(Pattern.C, Half.y)));\n return new Puzzle(tiles);\n }", "private void SetUp() {\n numbers.add(0);\n numbers.add(1);\n numbers.add(2);\n numbers.add(3);\n numbers.add(4);\n numbers.add(5);\n numbers.add(6);\n numbers.add(7);\n numbers.add(8);\n numbers.add(9);\n\n PuzzleSolve(10, empty, numbers);\n }", "private void setNumbers() {\n\t\tint w = worldWidth;\n\t\tint h = worldHeight;\n\t\tfor (int x = 0; x <= w - 1; x++) {\n\t\t\tfor (int y = 0; y <= h - 1; y++) {\n\t\t\t\tint numbers = 0;\n\n\t\t\t\tint right = x + 1;\n\t\t\t\tint left = x - 1;\n\t\t\t\tint up = y - 1;\n\t\t\t\tint down = y + 1;\n\n\t\t\t\tif (left < 0) {\n\t\t\t\t\tleft = 0;\n\t\t\t\t}\n\t\t\t\tif (up < 0) {\n\t\t\t\t\tup = 0;\n\t\t\t\t}\n\t\t\t\tif (down >= h) {\n\t\t\t\t\tdown = h - 1;\n\t\t\t\t}\n\t\t\t\tif (right >= w) {\n\t\t\t\t\tright = w - 1;\n\t\t\t\t}\n\n\t\t\t\tfor (int m = left; m <= right; m++) {\n\t\t\t\t\tfor (int n = up; n <= down; n++) {\n\t\t\t\t\t\tif (!(m == x && n == y)) {\n\t\t\t\t\t\t\tif (tileArr[m][n].hasBomb()) {\n\t\t\t\t\t\t\t\tnumbers++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttileArr[x][y].setNeighbors(numbers);\n\t\t\t}\n\n\t\t}\n\n\t}", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private void createBitMap() {\n bitMap = bitMap.copy(bitMap.getConfig(), true);\n Canvas canvas = new Canvas(bitMap);\n Paint paint = new Paint();\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(4.5f);\n canvas.drawCircle(50, 50, 30, paint);\n winningBitMap = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas2 = new Canvas(winningBitMap);\n paint.setAntiAlias(true);\n paint.setColor(Color.GREEN);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas2.drawCircle(50, 50, 30, paint);\n bitMapWin = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas3 = new Canvas(bitMapWin);\n paint.setAntiAlias(true);\n paint.setColor(Color.MAGENTA);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas3.drawCircle(50, 50, 30, paint);\n bitMapCat = winningBitMap.copy(winningBitMap.getConfig(), true);\n Canvas canvas4 = new Canvas(bitMapCat);\n paint.setAntiAlias(true);\n paint.setColor(Color.DKGRAY);\n paint.setStyle(Paint.Style.FILL);\n paint.setStrokeWidth(4.5f);\n canvas4.drawCircle(50, 50, 30, paint);\n }" ]
[ "0.65272903", "0.64055675", "0.6401629", "0.62819546", "0.6275942", "0.6213447", "0.61736995", "0.61736447", "0.61689085", "0.6122171", "0.60934436", "0.608592", "0.6083554", "0.60423434", "0.6006078", "0.597773", "0.5975604", "0.5973274", "0.5953089", "0.59519935", "0.59202695", "0.59170914", "0.5914562", "0.5913703", "0.58820295", "0.5881972", "0.5874243", "0.58572316", "0.584903", "0.58342755", "0.5833907", "0.5830142", "0.579248", "0.5791286", "0.5778158", "0.5773721", "0.57689345", "0.576617", "0.57603574", "0.57507753", "0.5750094", "0.57419854", "0.574178", "0.57374275", "0.5730169", "0.57282263", "0.5728028", "0.5723577", "0.5703282", "0.5703188", "0.5699001", "0.5695948", "0.5692465", "0.5685548", "0.5682832", "0.56822276", "0.5677771", "0.5676571", "0.5672142", "0.5669077", "0.5668906", "0.56674314", "0.5667194", "0.56671643", "0.5666284", "0.5666282", "0.565585", "0.5648058", "0.5646683", "0.5645169", "0.5637523", "0.5636518", "0.56342036", "0.5632764", "0.56307", "0.5629785", "0.56283", "0.5626805", "0.5625736", "0.5623575", "0.5622273", "0.5621691", "0.5621389", "0.56212014", "0.56185085", "0.56169415", "0.5611829", "0.5601989", "0.5597305", "0.5596977", "0.55934095", "0.55924433", "0.5592135", "0.55905336", "0.5585866", "0.5566391", "0.5565409", "0.5564524", "0.5563989", "0.5557743" ]
0.7139973
0
private ImageLoader imageLoader; private DisplayImageOptions options;
public Comm2Adapter(List<String> titleList, List<String> urlList, Context context) { this.mContext = context; this.titleList = titleList; this.urlList = urlList; inflater = LayoutInflater.from(mContext); // imageLoader = ImageLoader.getInstance(); // options = new DisplayImageOptions.Builder().cacheInMemory(true) // .cacheOnDisk(true) // .showImageOnLoading(R.drawable.default_title) // .showImageForEmptyUri(R.drawable.default_title) // .showImageOnFail(R.drawable.default_title).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ImageLoader {\n\n}", "private ImageLoader() {}", "public void setImageLoader(ImageLoader imageLoader) {\n/* 248 */ this.loader = imageLoader;\n/* */ }", "public void initDisplayImageOptions() {\n this.mDisplayImageOptionBuilder = new DisplayImageOptions.Builder().cacheThumbnail(true).loadFromMicroCache(true).cacheInMemory(true).considerExifParams(true).showStubImage(R.drawable.default_face_cover).resetViewBeforeLoading(true).imageScaleType(ImageScaleType.EXACTLY).bitmapConfig(Bitmap.Config.RGB_565).displayer(new CircleBitmapDisplayer()).usingRegionDecoderFace(true);\n this.mDefaultDisplayImageOptions = this.mDisplayImageOptionBuilder.build();\n }", "public interface ImageRenderer {\n /** Set displayed image from ImageProvider. This method is recommended,\n * because it allows the Rendered to choose the most efficient transfer\n * format. \n */\n void setImageFromSpec(ImageProvider spec);\n\n /** Set displayed image from buffered image. */\n void setImage(BufferedImage i);\n \n /** \n * Specify whether rendering should keep the aspect ratio of the image. \n * If no, it well be stretched to the display surface. If yes, borders\n * may occur, if the aspect ratio of surface and source image are different.\n * The default is false.\n */\n public void setKeepAspectRatio(boolean keepAspect);\n \n /**\n * Setter for property imageLocation.\n * @param imageLocation New value of property imageLocation.\n */\n void setImageLocation(URL imageLocation) throws IOException;\n\n /**\n * Setter for property imageResource.\n * @param imageResource New value of property imageResource.\n */\n void setImageResource(String imageResource) throws IOException;\n\n}", "public interface IImageLoader {\n void displayHeadImage(Context context, String url, ImageView imageView);\n\n void displayImage(Context context, String url, ImageView imageView);\n\n void displayImage(Context context, File file, ImageView imageView);\n\n void displayImage(Context context, int resId, ImageView imageView);\n\n void displayImage(Context context, Bitmap bitmap, ImageView imageView);\n\n\n void displayCircleImage(Context context, String url, ImageView imageView);\n\n void displayCircleImage(Context context, File file, ImageView imageView);\n\n void displayCircleImage(Context context, int resId, ImageView imageView);\n\n void displayCircleImage(Context context, Bitmap bitmap, ImageView imageView);\n\n}", "public interface ImageViewLoaderListener {\n public void onFinishLoader();\n}", "public static void loadImageLoader(DisplayImageOptions options, String url, final ImageView imageView) {\n ImageLoader.getInstance().displayImage(url, imageView, options, new SimpleImageLoadingListener() {\n final List<String> displayedImages = Collections.synchronizedList(new LinkedList<String>());\n\n @Override\n public void onLoadingStarted(String imageUri, View view) {\n //spinner.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onLoadingFailed(String imageUri, View view, FailReason failReason) {\n String message = null;\n switch (failReason.getType()) {\n case IO_ERROR:\n message = \"Check internet\";\n break;\n case DECODING_ERROR:\n message = \"Image can't be decoded\";\n break;\n case NETWORK_DENIED:\n message = \"Downloads are denied\";\n break;\n case OUT_OF_MEMORY:\n message = \"Out Of Memory error\";\n break;\n case UNKNOWN:\n message = \"Unknown error\";\n break;\n }\n Toast.makeText(view.getContext(), message, Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n if (loadedImage != null) {\n ImageView imageView = (ImageView) view;\n boolean firstDisplay = !displayedImages.contains(imageUri);\n if (firstDisplay) {\n FadeInBitmapDisplayer.animate(imageView, 300);\n displayedImages.add(imageUri);\n }\n }\n imageView.setImageBitmap(loadedImage);\n }\n });\n }", "public static ImageLoader getImageLoader() {\n return ImageLoader.IMAGE;\n }", "public interface ImageView {\n void addImages(List<ImageBean> list);\n void showProgress();\n void hideProgress();\n void showLoadFailMsg();\n}", "public interface IImageLoader\n{\n public void loadImage(String uri, ImageView imageView);\n public void loadImage(String uri, ImageView imageView, ImageLoadListener imageLoadListener);\n}", "public ImageSection() { // required by the SessionLoader (should not be used elsewhere)\n hasImage = new HasImage();\n }", "public interface IImageLoader {\n\n /**\n * 获取当前图片缓存的大小\n *\n * @return\n */\n long size();\n\n /**\n * 清空所有的缓存\n *\n * 注意 不要在主线程上执行 这样的耗时操作\n */\n void clear();\n\n /**\n * ImageLoaderBuilder\n *\n * 默认是Application Context\n *\n * @return IImageLoaderBuilder\n */\n IImageLoaderBuilder with();\n}", "public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}", "protected abstract Image loadImage();", "public static void initImageLoader() {\n }", "public ImagesLoader(ImageFactory imageFactory) {\n this.imageFactory = imageFactory;\n }", "public interface Image {\n public String getPath();\n\n public String getFormat();\n\n public String getWidth();\n\n public String getHeight();\n\n}", "private Images() {}", "public void displayImage() {\n RealImage real = new RealImage(url);\n real.displayImage();\n }", "private ImageDownloader(){ \t\n \n }", "public interface Image {\n void display();\n}", "private ImageUtils() {}", "public interface ZypInitImageCallback {\n void initImage(ZypRoundImageView imageView);\n}", "public interface IImageLoaderClient {\n public void init(Context context);\n\n public void destroy(Context context);\n\n public File getCacheDir(Context context);\n\n public void clearMemoryCache(Context context);\n\n public void clearDiskCache(Context context);\n\n public Bitmap getBitmapFromCache(Context context, String url);\n\n public void getBitmapFromCache(Context context, String url, IGetBitmapListener listener);\n\n public void displayImage(Context context, int resId, ImageView imageView);\n\n public void displayImage(Context context, String url, ImageView imageView);\n\n public void displayImage(Context context, String url, ImageView imageView, boolean isCache);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes, BitmapTransformation transformations);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes, BitmapTransformation transformations);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes, ImageSize size);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes, ImageSize size);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes, boolean cacheInMemory);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes, boolean cacheInMemory);\n\n\n public void displayImage(Context context, String url, ImageView imageView, IImageLoaderListener listener);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, IImageLoaderListener listener);\n\n public void displayImage(Context context, String url, ImageView imageView, int defRes, IImageLoaderListener listener);\n\n public void displayImage(Fragment fragment, String url, ImageView imageView, int defRes, IImageLoaderListener listener);\n\n\n public void displayCircleImage(Context context, String url, ImageView imageView, int defRes);\n\n public void displayCircleImage(Fragment fragment, String url, ImageView imageView, int defRes);\n @Deprecated\n public void displayRoundImage(Context context, String url, ImageView imageView, int defRes, int radius);\n\n public void displayRoundImage(Fragment fragment, String url, ImageView imageView, int defRes, int radius);\n\n public void displayBlurImage(Context context, String url, int blurRadius, IGetDrawableListener listener);\n\n public void displayBlurImage(Context context, String url, ImageView imageView, int defRes, int blurRadius);\n\n public void displayBlurImage(Context context, int resId, ImageView imageView, int blurRadius);\n\n public void displayBlurImage(Fragment fragment, String url, ImageView imageView, int defRes, int blurRadius);\n\n public void displayImageInResource(Context context, int resId, ImageView imageView);\n\n public void displayImageInResource(Fragment fragment, int resId, ImageView imageView);\n\n public void displayImageInResource(Context context, int resId, ImageView imageView, BitmapTransformation transformations);\n\n public void displayImageInResource(Fragment fragment, int resId, ImageView imageView, BitmapTransformation transformations);\n\n public void displayImageInResource(Context context, int resId, ImageView imageView, int defRes);\n\n public void displayImageInResource(Fragment fragment, int resId, ImageView imageView, int defRes);\n\n public void displayImageInResource(Context context, int resId, ImageView imageView, int defRes, BitmapTransformation transformations);\n\n public void displayImageInResource(Fragment fragment, int resId, ImageView imageView, int defRes, BitmapTransformation transformations);\n\n\n //add shiming 2018.4.20 transformation 需要装换的那种图像的风格,错误图片,或者是,正在加载中的错误图\n public void displayImageInResourceTransform(Activity activity, int resId, ImageView imageView, Transformation transformation, int errorResId);\n public void displayImageInResourceTransform(Context context, int resId, ImageView imageView, Transformation transformation, int errorResId);\n public void displayImageInResourceTransform(Fragment fragment, int resId, ImageView imageView, Transformation transformation, int errorResId);\n\n //这是对网络图片,进行的图片操作,使用的glide中的方法\n public void displayImageByNet(Context context, String url, ImageView imageView, int defRes, Transformation transformation);\n public void displayImageByNet(Fragment fragment, String url, ImageView imageView, int defRes, Transformation transformation);\n public void displayImageByNet(Activity activity, String url, ImageView imageView, int defRes, Transformation transformation);\n\n\n /**\n * 停止图片的加载,对某一个的Activity\n * @hide\n */\n public void clear(Activity activity, ImageView imageView);\n /**\n * 停止图片的加载,context\n * {@hide}\n */\n public void clear(Context context, ImageView imageView);\n /**\n * 停止图片的加载,fragment\n * {@hide}\n */\n public void clear(Fragment fragment, ImageView imageView);\n\n\n //如果需要的话,需要指定加载中,或者是失败的图片\n public void displayImageByDiskCacheStrategy(Fragment fragment, String url, DiskCacheStrategy diskCacheStrategy, ImageView imageView);\n public void displayImageByDiskCacheStrategy(Activity activity, String url, DiskCacheStrategy diskCacheStrategy, ImageView imageView);\n public void displayImageByDiskCacheStrategy(Context context, String url, DiskCacheStrategy diskCacheStrategy, ImageView imageView);\n //某些情形下,你可能希望只要图片不在缓存中则加载直接失败(比如省流量模式)\n public void disPlayImageOnlyRetrieveFromCache(Fragment fragment, String url, ImageView imageView);\n public void disPlayImageOnlyRetrieveFromCache(Activity activity, String url, ImageView imageView);\n public void disPlayImageOnlyRetrieveFromCache(Context context, String url, ImageView imageView);\n\n\n\n /**\n *如果你想确保一个特定的请求跳过磁盘和/或内存缓存(比如,图片验证码 –)\n * @param fragment\n * @param url\n * @param imageView\n * @param skipflag 是否跳过内存缓存\n * @param diskCacheStratey 是否跳过磁盘缓存\n */\n public void disPlayImageSkipMemoryCache(Fragment fragment, String url, ImageView imageView, boolean skipflag, boolean diskCacheStratey);\n public void disPlayImageSkipMemoryCache(Activity activity, String url, ImageView imageView, boolean skipflag, boolean diskCacheStratey);\n public void disPlayImageSkipMemoryCache(Context context, String url, ImageView imageView, boolean skipflag, boolean diskCacheStratey);\n\n /**\n * 知道这个图片会加载失败,那么的话,我们可以重新加载\n * @param fragment\n * @param url\n * @param fallbackUrl\n * @param imageView\n */\n //从 Glide 4.3.0 开始,你可以很轻松地使用 .error() 方法。这个方法接受一个任意的 RequestBuilder,它会且只会在主请求失败时开始一个新的请求:\n public void disPlayImageErrorReload(Fragment fragment, String url, String fallbackUrl, ImageView imageView);\n public void disPlayImageErrorReload(Activity activity, String url, String fallbackUrl, ImageView imageView);\n public void disPlayImageErrorReload(Context context, String url, String fallbackUrl, ImageView imageView);\n\n\n /**\n 未来 Glide 将默认加载硬件位图而不需要额外的启用配置,只保留禁用的选项 现在已经默认开启了这个配置,但是在有些情况下需要关闭\n 所以提供了以下的方法,禁用硬件位图 disallowHardwareConfig\n * @param fragment\n * @param url\n * @param imageView\n */\n// 哪些情况不能使用硬件位图?\n// 在显存中存储像素数据意味着这些数据不容易访问到,在某些情况下可能会发生异常。已知的情形列举如下:\n// 在 Java 中读写像素数据,包括:\n// Bitmap#getPixel\n// Bitmap#getPixels\n// Bitmap#copyPixelsToBuffer\n// Bitmap#copyPixelsFromBuffer\n// 在本地 (native) 代码中读写像素数据\n// 使用软件画布 (software Canvas) 渲染硬件位图:\n// Canvas canvas = new Canvas(normalBitmap)\n//canvas.drawBitmap(hardwareBitmap, 0, 0, new Paint());\n// 在绘制位图的 View 上使用软件层 (software layer type) (例如,绘制阴影)\n// ImageView imageView = …\n// imageView.setImageBitmap(hardwareBitmap);\n//imageView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);\n// 打开过多的文件描述符 . 每个硬件位图会消耗一个文件描述符。\n// 这里存在一个每个进程的文件描述符限制 ( Android O 及更早版本一般为 1024,在某些 O-MR1 和更高的构建上是 32K)。\n// Glide 将尝试限制分配的硬件位图以保持在这个限制以内,但如果你已经分配了大量的文件描述符,这可能是一个问题。\n// 需要ARGB_8888 Bitmaps 作为前置条件\n// 在代码中触发截屏操作,它会尝试使用 Canvas 来绘制视图层级。\n// 作为一个替代方案,在 Android O 以上版本你可以使用 PixelCopy.\n// 共享元素过渡 (shared element transition)(OMR1已修复)\n public void disPlayImagedisallowHardwareConfig(Fragment fragment, String url, ImageView imageView);\n public void disPlayImagedisallowHardwareConfig(Activity activity, String url, ImageView imageView);\n public void disPlayImagedisallowHardwareConfig(Context context, String url, ImageView imageView);\n\n //监听图片的下载进度,是否完成,百分比 也可以加载本地图片,扩张一下\n public void disPlayImageProgress(Context context, String url, ImageView imageView, int placeholderResId, int errorResId, OnGlideImageViewListener listener);\n public void disPlayImageProgress(Activity activity, String url, ImageView imageView, int placeholderResId, int errorResId, OnGlideImageViewListener listener);\n public void disPlayImageProgress(Fragment fragment, String url, ImageView imageView, int placeholderResId, int errorResId, OnGlideImageViewListener listener);\n\n public void disPlayImageProgressByOnProgressListener(Context context, String url, ImageView imageView, int placeholderResId, int errorResId, OnProgressListener onProgressListener);\n public void disPlayImageProgressByOnProgressListener(Activity activity, String url, ImageView imageView, int placeholderResId, int errorResId, OnProgressListener onProgressListener);\n public void disPlayImageProgressByOnProgressListener(Fragment fragment, String url, ImageView imageView, int placeholderResId, int errorResId, OnProgressListener onProgressListener);\n\n\n\n// TransitionOptions 用于给一个特定的请求指定过渡。\n// 每个请求可以使用 RequestBuilder 中的 transition()\n// 方法来设定 TransitionOptions 。还可以通过使用\n// BitmapTransitionOptions 或 DrawableTransitionOptions\n// 来指定类型特定的过渡动画。对于 Bitmap 和 Drawable\n// 之外的资源类型,可以使用 GenericTransitionOptions。 Glide v4 将不会默认应用交叉淡入或任何其他的过渡效果。每个请求必须手动应用过渡。\n public void displayImageByTransition(Context context, String url, TransitionOptions transitionOptions, ImageView imageView);\n public void displayImageByTransition(Activity activity, String url, TransitionOptions transitionOptions, ImageView imageView);\n public void displayImageByTransition(Fragment fragment, String url, TransitionOptions transitionOptions, ImageView imageView);\n\n //失去焦点,建议实际的项目中少用,取消求情\n public void glidePauseRequests(Context context);\n public void glidePauseRequests(Activity activity);\n public void glidePauseRequests(Fragment fragment);\n\n //获取焦点,建议实际的项目中少用\n public void glideResumeRequests(Context context);\n public void glideResumeRequests(Activity activity);\n public void glideResumeRequests(Fragment fragment);\n //加载缩图图 int thumbnailSize = 10;//越小,图片越小,低网络的情况,图片越小\n //GlideApp.with(this).load(urlnoData).override(thumbnailSize))// API 来强制 Glide 在缩略图请求中加载一个低分辨率图像\n public void displayImageThumbnail(Context context, String url, String backUrl, int thumbnailSize, ImageView imageView);\n public void displayImageThumbnail(Activity activity, String url, String backUrl, int thumbnailSize, ImageView imageView);\n public void displayImageThumbnail(Fragment fragment, String url, String backUrl, int thumbnailSize, ImageView imageView);\n //如果没有两个url的话,也想,记载一个缩略图\n public void displayImageThumbnail(Fragment fragment, String url, float thumbnailSize, ImageView imageView);\n public void displayImageThumbnail(Activity activity, String url, float thumbnailSize, ImageView imageView);\n public void displayImageThumbnail(Context context, String url, float thumbnailSize, ImageView imageView);\n}", "private void showImageDetail() {\n }", "private void initImageLoader() {\n ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(this);\n config.threadPriority(Thread.NORM_PRIORITY - 2);\n config.denyCacheImageMultipleSizesInMemory();\n config.diskCacheFileNameGenerator(new Md5FileNameGenerator());\n config.diskCacheSize(50 * 1024 * 1024); // 50 MiB\n config.tasksProcessingOrder(QueueProcessingType.LIFO);\n // Initialize ImageLoader with configuration.\n ImageLoader.getInstance().init(config.build());\n }", "public interface ImageLoaderListener {\n void onImageDownloaded(Bitmap bmp);\n }", "public interface BaseImageLoaderStrategy<T extends ImageConfig> {\n void loadImage(Context ctx, T config);\n void clear(Context ctx, T config);\n}", "public interface ImageLoaderInter {\n /**\n * 加载普通的图片\n *\n * @param activity\n * @param imageUrl\n * @param imageView\n */\n void loadCommonImgByUrl(Activity activity, String imageUrl, ImageView imageView);\n\n /**\n * 加载普通的图片\n *\n * @param fragment\n * @param imageUrl\n * @param imageView\n */\n void loadCommonImgByUrl(Fragment fragment, String imageUrl, ImageView imageView);\n\n /**\n * 加载圆形或者是圆角图片\n *\n * @param activity\n * @param imageUrl\n * @param imageView\n */\n void loadCircleOrReboundImgByUrl(Activity activity, String imageUrl, ImageView imageView);\n\n /**\n * 加载圆形或者是圆角图片\n *\n * @param fragment\n * @param imageUrl\n * @param imageView\n */\n void loadCircleOrReboundImgByUrl(Fragment fragment, String imageUrl, ImageView imageView);\n\n void resumeRequests(Activity activity);\n\n void resumeRequests(Fragment fragment);\n\n void pauseRequests(Activity activity);\n\n void pauseRequests(Fragment fragment);\n}", "public ImageDisplay()\n\t{\n initComponents();\n }", "public interface ImageLoaderSources<E> {\n /**\n * Returns an instance of each type of ImageLoader that can\n * load an image for the generic type.\n *\n * @return An instance of each type of ImageLoader that can\n * load an image for the generic type.\n */\n public ArrayList<ImageLoader<E>> getImageLoaders();\n}", "public ArrayList<ImageLoader<E>> getImageLoaders();", "public interface LoaderListener {\n void onFinish(List<Picture> pictures);\n}", "public interface ImageEngine {\n\n //采用责任链模式\n\n void init();\n\n ImageEngine with(Context context);\n\n ImageEngine load(String path);\n\n ImageEngine into(ImageView target);\n\n\n}", "public interface BaseImageLoaderStrategy {\n //无占位图\n void loadImage(Object url, ImageView imageView);\n\n void loadImage(Object url, int placeholder, ImageView imageView);\n\n void loadImage(Context context, Object url, int placeholder, ImageView imageView);\n\n //这里的context指定为ApplicationContext\n void loadImageWithAppCxt(Object url, ImageView imageView);\n\n void loadImageWithListener(Object url, int placeholder, ImageView imageView, ImageLoadListener listener);\n\n void loadCenterCropWithCorner(Context context, Object model, ImageView imageView, int corner_px);\n\n void loadCenterCropWithCorner(Context context, Object model, int placeholder, ImageView imageView, int corner_px);\n\n void loadCircleImage(Object url, int placeholder, ImageView imageView);\n\n void loadCentercropCircleImage(Object model, int placeholder, ImageView imageView);\n\n void loadCircleImage(Bitmap bitmap, int placeholder, ImageView imageView);\n\n void loadCircleImage(Bitmap bitmap, int placeholder, ImageView imageView, ImageLoadListener listener);\n\n void loadCircleImage(Object url, int placeholder, ImageView imageView, ImageLoadListener listener);\n\n void loadCircleBorderImage(Object url, int placeholder, ImageView imageView, float borderWidth, int borderColor);\n\n void loadCornerImage(Bitmap bitmap, int placeholder, ImageView imageView, int dp);\n\n void loadCornerImage(Object url, int placeholder, ImageView imageView, int dp);\n\n void loadCornerImage(Object url, int placeholder, ImageView imageView, int dp, ImageLoadListener listener);\n\n //清除硬盘缓存\n void clearImageDiskCache(final Context context);\n\n //清除内存缓存\n void clearImageMemoryCache(Context context);\n\n //根据不同的内存状态,来响应不同的内存释放策略\n void trimMemory(Context context, int level);\n\n //获取缓存大小\n String getCacheSize(Context context);\n\n void saveImage(Context context, Object url, String savePath, String saveFileName, ImageSaveListener listener);\n\n void downloadOnly(Context context, String url, ImageDownloadListener listener);\n\n void loadDrawable(Context context, Object url, ImageDrawableListener listener);\n}", "public interface ImageDownloader {\n\n /**\n * Load the image from the URL into the image view resizing it if necessary.\n * @param imageURL Image URL.\n * @param imageView ImageView reference to load the image into.\n */\n void downloadImage(String imageURL, ImageView imageView);\n\n}", "public interface ImageDownLoadListener {\n\n //预览的小图\n void preview(String path);\n\n void preview(Bitmap bitmap);\n\n //下载或者缓存读取成功\n void success(String path);\n\n void success(Bitmap bitmap);\n\n //下载或者缓存读取失败\n void fail();\n\n}", "private void loadNormal(Context ctx, ImageLoader img) {\r\n RequestOptions options = getCommonOptions(img);\r\n\r\n Glide.with(ctx).load(img.getUrl()).apply(options).into(img.getImgView());\r\n }", "public interface FaroProfileImageDo {\n URL getPublicUrl();\n ImageProvider getImageProvider();\n boolean isThumbnail();\n}", "interface Image {\n public void displayImage();\n}", "private void galleryAddPic() {\n\t}", "public void displayImage(ImageView imageView, Drawable loadingImage, int width,\n int height, ImageGenerator<?> imageGenerator, Runnable callback) {\n if (imageView == null) {\n if (callback != null) \n callback.run();\n return;\n }\n \n if (loadingImage != null) {\n// if (imageView.getBackground() == null) {\n// imageView.setBackgroundDrawable(loadingImage);\n// }\n// imageView.setImageDrawable(null);\n \timageView.setImageDrawable(loadingImage);\n }\n \n if (imageGenerator == null || imageGenerator.getTag() == null) {\n if (callback != null) \n callback.run();\n return;\n }\n\n String tag = imageGenerator.getTag();\n imageView.setTag(tag);\n String key = (width != 0 && height != 0) ? tag + width + height : tag;\n Bitmap bitmap = null;\n synchronized (mMemoryCache) {\n bitmap = mMemoryCache.get(key);\n }\n if (bitmap != null) {\n setImageBitmap(imageView, bitmap, false);\n if (callback != null) \n callback.run();\n return;\n }\n \n synchronized (mTaskStack) {\n for (AsyncImageLoadTask asyncImageTask : mTaskStack) {\n if (asyncImageTask != null \n && asyncImageTask.mImageRef != null\n && tag.equals(asyncImageTask.mImageRef.tag)) {\n if (callback != null) \n callback.run();\n return;\n }\n }\n }\n\n ImageRef imageRef = new ImageRef(imageView, tag, width, height,\n imageGenerator, callback);\n AsyncImageLoadTask asyncImageTask = new AsyncImageLoadTask();\n mTaskStack.push(asyncImageTask); \n asyncImageTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, imageRef);\n \n }", "public ImageLoader(Activity activity){\n this.main = activity;\n }", "public interface DBImageBitmapListener {\n void onLoadingComplete(DBImage dbImage);\n}", "public void imageLoader(File file)\n{\n float ratio;\n if (file == null)\n {\n return;\n } else\n {\n try\n {\n PImage img = loadImage(file.getAbsolutePath());\n //if(img.width < 300)\n //{\n // img.resize(300,img.height);\n // if(img.height/((float)img.width)>3)\n // img.resize(300, 900);\n // if(img.width/((float)img.height)<0.3)\n // img.resize(900, 300);\n //}\n //if(img.height < 300)\n //{\n // img.resize(img.width, 300);\n // if(img.width/((float)img.width)>3)\n // img.resize(300, 900);\n // if(img.width/((float)img.height)<0.3)\n // img.resize(900, 300);\n //}\n if(img.height/((float)img.width)>3)\n {\n ratio = 1.0f;\n if(img.width < 400)\n {\n ratio = 400/((float)img.width);\n }\n img.resize((int)(ratio*img.width),(int)(ratio*img.width*2.5f));\n }\n if(img.height/((float)img.width)<0.25f)\n {\n ratio = 1.0f;\n if(img.height < 400)\n {\n ratio = 400/((float)img.height);\n }\n img.resize((int)(ratio*img.height*2.5f),(int)(ratio*img.height));\n }\n if(img.width < 400 || img.height < 400)\n {\n ratio = 1.0f;\n if(img.width < 400)\n {\n ratio = 400/((float)img.width);\n }\n if(img.height < 400 && img.height < img.width)\n {\n ratio = 400/((float)img.height);\n }\n img.resize((int)(ratio*img.width),(int)(ratio*img.height));\n }\n m.getInputImageManager().setImage(img);\n m.getInputImageManager().setResizedImage(m.getInputImageManager().resizeToFit(img, width-150, height-20));\n if(m.getOutputImageManager().getMosaic()!= null)\n {\n m.getOutputImageManager().createMosaic(m.getInputImageManager().getImage(),m.getOutputImageManager().getMosaic().getLastSeenImage(), m.getOutputImageManager().getMosaic().getTiles());\n }\n else\n {\n m.getOutputImageManager().createMosaic(m.getInputImageManager().getImage(),m.getInputImageManager().getImage(), m.getTileManager().getTiles());\n }\n m.getOutputImageManager().getMosaic().setMiniatures();\n }\n catch(NullPointerException e)\n {\n println(e);\n }\n }\n}", "public interface ImageDownLoadCallBack {\n void onDownLoadSuccess(File file);\n void onDownLoadSuccess(Bitmap bitmap);\n\n void onDownLoadFailed();\n}", "public interface ImageLoadedListener\n {\n public void imageLoaded(Bitmap imageBitmap);\n }", "public ImageLoader(Context context) {\r\n this(context, false);\r\n }", "public ImageProviderPipeline(ImageCache cache, ImageLoader loader) {\n/* 65 */ this.cache = cache;\n/* 66 */ setImageLoader(loader);\n/* */ }", "public interface ILoadImgListener {\r\n public void load(String url, ImageView img);\r\n //public void load(String url, ImageView img, int round);\r\n}", "public interface PhotoGalleryView extends LoadingView {\n\n void showPhotos(ArrayList<PhotoGalleryItem> arPhotos);\n\n void openFullSizePhoto(int position, ArrayList<PhotoGalleryItem> ar);\n\n void setLoadedCount(int loadedCount, int size);\n\n void showToolbarLoading();\n\n void onAdd(ArrayList<PhotoGalleryItem> ar);\n\n void setPosition(int position);\n}", "public void InitLoadingInRecognition() {\n Point screen = MainView.GetScreenSize();\n // image setting\n int x = (screen.x - LOADING_IMAGE_SIZE.x) >> 1;\n int y = 100;\n this.m_LoadingImage.InitCharacterEx(\n \"recognizerimages\",\n x, y,\n LOADING_IMAGE_SIZE.x,\n LOADING_IMAGE_SIZE.y,\n 255, 1.0f, 0);\n // animation setting\n this.m_LoadingImage.InitAnimation(\n ANIMATION_LOADING_COUNT_MAX,\n ANIMATION_LOADING_FRAME, 0);\n }", "@SuppressWarnings(\"unused\")\n \t\tfinal public void cacheImage(final Map<String,String> options) {\n \t\t\tmImagePicker = new ImagePicker(\n \t\t\t\tIntroFlow.this,\n \t\t\t\t152,\n \t\t\t\tnew ImagePickerCB() {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onPictureChosen(Bitmap image) {\n\t\t\t\t\t\t\t\tcachedImage = image;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n \t\t\t).show();\n \t\t}", "public interface ImageListener {\n void displayImage(Image image, ImageView target);\n}", "public interface Notifier {\n void notifyImageLoaded();\n}", "public String getImage() { return image; }", "public ImageProviderPipeline(ImageLoader loader) {\n/* 74 */ this(null, loader);\n/* */ }", "@Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n }", "protected void setPic() {\n }", "private void enhanceImage(){\n }", "public void drawImage() {\n ImageView imageView = (ImageView) findViewById(R.id.photo);\n imageView.setVisibility(View.VISIBLE);\n Glide.with(MainActivity.this).load(iURI).fitCenter().into(imageView);\n }", "public interface GlideLoadInterface {\n void glideLoad(Context context, Object url, ImageView view, int default_image, int radius);\n}", "public interface ILoader {\n\n void init(Context context,int cacheSizeInM);\n\n void request(SingleConfig config);\n\n void pause();\n\n void resume();\n\n void clearDiskCache();\n\n void clearMomoryCache();\n\n long getCacheSize();\n\n void clearCacheByUrl(String url);\n\n void clearMomoryCache(View view);\n void clearMomoryCache(String url);\n\n File getFileFromDiskCache(String url);\n\n void getFileFromDiskCache(String url,FileGetter getter);\n\n\n\n\n\n boolean isCached(String url);\n\n void trimMemory(int level);\n\n void onLowMemory();\n\n\n /**\n * 如果有缓存,就直接从缓存里拿,如果没有,就从网上下载\n * 返回的file在图片框架的缓存中,非常规文件名,需要自己拷贝出来.\n * @param url\n * @param getter\n */\n void download(String url,FileGetter getter);\n\n}", "void lSetImage(Image img);", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "public interface ImageCallback {\n public void onImageFetched(Bitmap bitmap, File imageFile);\n}", "public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }", "@Override\r\n public void onPrepareLoad(Drawable arg0) {\n\r\n }", "public void initImageLoader() {\n if (!ImageLoader.getInstance().isInited()) {\n ImageLoaderConfiguration config = ImageLoaderConfiguration.createDefault(getActivity().getApplicationContext());\n ImageLoader.getInstance().init(config);\n }\n }", "@Override\r\n\tpublic void init() {\n\t\timg = new ImageClass();\r\n\t\timg.Init(imgPath);\r\n\t}", "public interface MenuThumbnailHandler {\n\n\n public void showMenuImage(ArrayList<String> images,int position);\n}", "public interface IImage {\n public int getWidth();\n public int getHeight();\n public IGraphics.ImageFormat getFormat();\n public void dispose();\n}", "public void initImageLoader(Context context){\n ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)\n\t .memoryCacheExtraOptions(1200, 1000) // default = device screen dimensions\n\t .discCacheExtraOptions(1200, 1000, CompressFormat.JPEG, 85, null)\n\t .threadPoolSize(3) // default\n\t .threadPriority(Thread.NORM_PRIORITY - 1) // default\n\t .tasksProcessingOrder(QueueProcessingType.FIFO) // default\n\t .denyCacheImageMultipleSizesInMemory()\n\t .memoryCache(new LruMemoryCache(2 * 1024 * 1024))\n\t .memoryCacheSize(2 * 1024 * 1024)\n\t .memoryCacheSizePercentage(13) // default\n\t .discCacheSize(50 * 1024 * 1024)\n\t .discCacheFileCount(100)\n\t .discCacheFileNameGenerator(new HashCodeFileNameGenerator()) // default\n\t .imageDownloader(new BaseImageDownloader(context)) // default\n\t .defaultDisplayImageOptions(DisplayImageOptions.createSimple()) // default\n\t .writeDebugLogs()\n .build();\n ImageLoader.getInstance().init(config);\n\t}", "public interface OnLoadUserPaintListener {\n void loadUserPaintFinished(List<LocalImageBean> list);\n}", "public abstract Image getImage();", "public abstract Image getImage();", "public ImageLoader getImageLoader() {\n return new ImageLoader(getRequestQueue(),\n new LruBitmapCache());\n }", "public interface LoadImagePresenter extends FetchData {\n\n void fetchPresenter(FetchData fetchData,int spage,String nextpagetoken);\n\n}", "public interface ImageReader {\n}", "public interface ImageFetchListener {\n void onFetchBitmap(Bitmap bitmap);\n}", "private void initAreaImageFilm() {\n\n }", "public interface LoadImageCallBackListener {\n public void loadImage(ImageView imageView, Bitmap bitmap);\n}", "public String getImageUrl();", "public interface ImageAnimation \n { \n }", "public interface Common {\n void onLoadAdImage(boolean isSuccess, ImageInfo imageInfo);\n}", "@Override\n public void loadImage(String url, ImageView imageView) {\n ImageLoader.getInstance().displayImage(url, imageView);\n }", "PImage getImage() {\n return _img;\n }", "public void setImage(Image img) {\r\n this.img = img;\r\n }", "@Override\n public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n holder.imageView.setVisibility(View.VISIBLE);\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}", "private void resultImgInit() {\n resultImgAndLoadingLayout.setX(cornerPositions.getLeftTop().x);\n resultImgAndLoadingLayout.setY(cornerPositions.getLeftTop().y);\n int wight = cornerPositions.getRightBottom().x - cornerPositions.getLeftTop().x + cornerImgSize;\n int height = cornerPositions.getRightBottom().y - cornerPositions.getLeftTop().y + cornerImgSize;\n resultImgAndLoadingLayout.setLayoutParams(new LayoutParams(wight, height));\n }", "public interface LeadImageContainer {\n\tLeadAsset getImage();\n}", "public ImageLoader(Context contextSet)\n\t{\n\t\topts = new BitmapFactory.Options();\n\t\topts.inDither = false;\n\t\topts.inPurgeable = true;\n\t\topts.inInputShareable = true;\n\t\topts.inTempStorage = new byte[16 * 1024];\n\t\tpackageName = contextSet.getPackageName();\n\t\tres = contextSet.getResources();\n\t}", "public homegallery(String image_url)\n {\n this.image_url=image_url;\n }", "public interface GalleryLoadedListner {\n public void onGalleryLoadedlistner(Gallery gallery);\n}", "public void displayGivenImage() {\n\t\tthis.image.display();\n\t}", "@Override\n\tpublic void init() {\n\t\tthis.image = Helper.getImageFromAssets(AssetConstants.IMG_ROAD_NORMAL);\n\t}", "public ImageProcessor(Pic a) {\n image = a;\n }", "public AlternateImageRenderer() {\r\n super(\"\");\r\n images = new Image[2];\r\n try {\r\n Resources imageRes = UIDemoMain.getResource(\"images\");\r\n images[0] = imageRes.getImage(\"sady.png\");\r\n images[1] = imageRes.getImage(\"smily.png\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n setUIID(\"ListRenderer\");\r\n }", "public String getImageSource() {\r\n return imageSource;\r\n }" ]
[ "0.7439895", "0.73712957", "0.7369206", "0.69744277", "0.67214054", "0.6679005", "0.65941", "0.6562793", "0.65439594", "0.64978105", "0.6492631", "0.6473579", "0.64666086", "0.6437931", "0.6430263", "0.6393797", "0.6370676", "0.63163954", "0.62834036", "0.62765473", "0.6274215", "0.624278", "0.6198256", "0.61902964", "0.6176925", "0.6173571", "0.61602896", "0.6139265", "0.6137397", "0.61036325", "0.61020756", "0.60872835", "0.6077576", "0.60694695", "0.6067078", "0.60622907", "0.60590386", "0.6045076", "0.60290515", "0.60278666", "0.601947", "0.60033315", "0.5997833", "0.59953725", "0.5992232", "0.59908336", "0.59709084", "0.5958472", "0.5939271", "0.5937247", "0.591762", "0.5914418", "0.5899189", "0.5897843", "0.5896224", "0.5886925", "0.5877824", "0.5869735", "0.5868795", "0.5862983", "0.5862391", "0.5859205", "0.584824", "0.5832264", "0.58299345", "0.5821861", "0.58184993", "0.5816518", "0.5815287", "0.58118695", "0.5807531", "0.580505", "0.5800145", "0.5794587", "0.5794182", "0.5790614", "0.5790614", "0.57731557", "0.5761189", "0.57595855", "0.57504505", "0.5747945", "0.57331717", "0.5732529", "0.5712864", "0.5708188", "0.5707297", "0.57069826", "0.57047117", "0.57042044", "0.57029647", "0.5692481", "0.5692476", "0.56915385", "0.56912756", "0.56877273", "0.56759495", "0.5662694", "0.5646034", "0.5645652", "0.56406194" ]
0.0
-1
Initiates the LightObject using the given Color
public Light(Color color, boolean castsShadows){ this.color = color; this.castsShadows = castsShadows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Light(Color color){\n this.color = color;\n this.castsShadows = false;\n }", "public LightBulb(RGBColor color){\r\n _color = new RGBColor(color);\r\n }", "public Light(Vector3f position, Vector3f color) {\n\t\tthis.position = position;\n\t\tthis.color = color;\n\t}", "public Light(Vector3f position, Vector3f colour) {\r\n\t\tthis.position = position;\r\n\t\tthis.colour = colour;\r\n\t}", "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "@Override\n public void initialize() {\n m_desiredColor = ColorWheel.fromGameMessage();\n USBLogging.info(\"Desired Color is \" + m_desiredColor.getName());\n }", "public Light(){\n this(0.0, 0.0, 0.0);\n }", "public Light(Vector3f position, Vector3f colour, Vector3f attenuation) {\r\n\t\tthis.position = position;\r\n\t\tthis.colour = colour;\r\n\t\tthis.attenuation = attenuation;\r\n\t}", "@Override\r\n public void setColor(Llama.Color color) {\r\n this.color = color;\r\n }", "@Override\n\tpublic LightTank create(Enum<?> model, Enum<?> color) {\n\t\treturn new LightTank(GameContext.getGameContext(), model, color);\n\t}", "public Light(Vec3f dir, Vec3f color, float intensity)\n\t{\n\t\tm_light_type = Config.g_light_types.DIRECTIONAL;\n\t\tm_dir = dir.normalize();\n\t\tm_color = color;\n\t\tm_intensity = intensity;\n\t}", "public Shape(Color c) {\n\t\tcolor = c;\n\t}", "public LightBulb(LightBulb other){\r\n _color = new RGBColor(other._color);\r\n }", "public void setColor(Color c) { color.set(c); }", "public void setColor(Color color) {\n this.color = color;\n }", "colorChoice(Vec3 color) {\n this.color = color;\n }", "public void setColor(Color color);", "public void setColor(Color color) {\n this.color = color;\r\n }", "public void init(GLAutoDrawable gLDrawable) {\n GL2 gl = gLDrawable.getGL().getGL2();\n \n gl.glClearDepth(1.0f); // Depth Buffer Setup\n gl.glEnable(GL2.GL_DEPTH_TEST); // Enables Depth Testing\n gl.setSwapInterval(1); // enable v-synch @ 60fps\n \n gl.glEnable(GL2.GL_CULL_FACE);\n \n gl.glColorMaterial (GL2.GL_FRONT_AND_BACK, GL2.GL_AMBIENT_AND_DIFFUSE);\n gl.glEnable (GL2.GL_COLOR_MATERIAL);\n \n // create a light source at 0, 100, 100\n EffectsManager.getManager().createLight(gl, new Vector3f(0, 100, 100), new Vector3f(), new Vector3f(1f, 1f, 1f), new Vector3f()); \n }", "public void setColor(RGBColor color){\r\n this._color = new RGBColor(color);\r\n }", "public Light(double xPos, double yPos, double zPos){\n this(xPos, yPos, zPos, 1.0, 1.0, 1.0, 1);\n }", "public void setColor(Color c);", "public void setLightColor(int lightColor) {\n if (lightColor != this.lightColor) {\n int oldLightColor = this.lightColor;\n this.lightColor = lightColor;\n this.propertyChangeSupport.firePropertyChange(Property.LIGHT_COLOR.name(), oldLightColor, lightColor);\n }\n }", "public void setColor(Color newColor) ;", "public LightBulb(int red, int green,int blue){\r\n _switchedOn=false;\r\n\t\tif ((red < 0)||(red > 255)||(green < 0)||(green > 255)||(blue < 0)\r\n\t\t\t\t||(blue > 255)){\r\n\t\t\t_color = new RGBColor();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t_color = new RGBColor(red, green, blue);\r\n\t\t}\r\n\t\r\n }", "private void init(int color) {\n\t\tgetWindow().setFormat(PixelFormat.RGBA_8888);\n\t\tsetUp(color);\n\t}", "Color(int R, int G, int B) {\r\n\t\t this.rgb = new RGB(R,G,B);\r\n\t\t this.colorific = true;\r\n\t }", "void setColor(Vector color);", "private void setLightColor(final Light theLight) {\n switch (theLight) {\n case GREEN:\n myLightColor = Color.GREEN.darker();\n break;\n\n case RED:\n myLightColor = Color.RED.darker();\n break;\n\n case YELLOW:\n myLightColor = Color.YELLOW;\n break;\n\n default:\n }\n }", "public void setColor(float r, float g, float b, float a);", "public void setColor(int color);", "public void setColor(int color);", "public void setColor(Color c) {\n this.color = c;\n }", "public void setColor(Color color) {\n this.color = color;\n }", "public LambertMaterial(final Color color){\n if(color == null){\n throw new IllegalArgumentException(\"color must not be null\");\n }\n \n this.color = color;\n }", "public ColorChange(Color color, double time) {\n this.color = color;\n this.time = time;\n }", "public Light(Vec3f pos, Vec3f color, float intensity, float constant, float linear, float exponent)\n\t{\n\t\tm_light_type = Config.g_light_types.POINT;\n\t\tm_pos = pos;\n\t\tm_color = color;\n\t\tm_intensity = intensity;\n\t\tm_constant = constant;\n\t\tm_linear = linear;\n\t\tm_exponent = exponent;\n\t}", "public void setColor(RMColor aColor)\n{\n // Set color\n if(aColor==null) setFill(null);\n else if(getFill()==null) setFill(new RMFill(aColor));\n else getFill().setColor(aColor);\n}", "public void setColor(Color c) {\n color = c;\n }", "@Override\n public void initialize() {\n initialColor = m_colorWheel.getColor();\n initialColorString = m_colorWheel.getColorString(initialColor);\n rotationCount = 0;\n seesNewColor = false;\n m_colorWheel.wheelSpin(1.0);\n isDone = false;\n System.out.println(\"auto color spin starting\");\n }", "public DirectionalLight(Vector3f color, float intensity) {\n\t\tsuper(color, intensity);\n\n\t\t// super.setShader(ForwardDirectionalShader.getInstance());\n\t\tsuper.setShader(new Shader(\"forward-directional\"));\n\t}", "public void setColor(int color){\n this.color = color;\n }", "public Color() {\n\n\t\tthis(0, 0, 0);\n\t}", "public void setLight1(){\n }", "public Circle(SelectedColor color) {\n super(Name.Circle, color);\n\n Log.i(\"Circle\",\"Created a \" + color + \" Circle\");\n //Need getcolor() to pick random\n //Maybe keep all colors random at create time, then when we add them to data struc\n //we change one of the colors depending on \"correct shape\"\n }", "public void color(Color the_color) {\n \n }", "public Shape(String color) { \n System.out.println(\"Shape constructor called\"); \n this.color = color; \n }", "void setCor(Color cor);", "public SceneLight(String name, int light_number, \n\t\t\tColor4f ambient, Color4f diffuse, Color4f specular, \n\t\t\tdouble posx,double posy,double posz,\n\t\t\tdouble directionx,double directiony,double directionz,\n\t\t\tfloat spot_Cutoff,float intensity, \n\t\t\tfloat constant_attenuation_constant,float linear_attenuation_constant,\n\t\t\tfloat quad_attenuation_constant){\n\t\t\n\t\tthis.name=name;\n\t\tthis.light_number=light_number;\n\t\tposition=new Vector3d(posx,posy,posz);\n\t\tdirection=new Vector3d(directionx,directiony,directionz);\n\t\tthis.ambient=ambient;\n\t\tthis.diffuse=diffuse;\n\t\tthis.specular=specular;\n\t\tthis.spot_Cutoff=spot_Cutoff;\n\t\tthis.intensity=intensity;\n\t\tthis.constant_attenuation_constant=constant_attenuation_constant;\n\t\tthis.linear_attenuation_constant=linear_attenuation_constant;\n\t\tthis.quad_attenuation_constant=quad_attenuation_constant;\n\t}", "public void init (int mColor, LatLng mSrc, LatLng mDst) {\n color = mColor;\n src = mSrc;\n dst = mDst;\n }", "public void init (int mColor, LatLng mSrc, LatLng mDst) {\n color = mColor;\n src = mSrc;\n dst = mDst;\n }", "public Emrld() {\n super(\n new Color(211, 242, 163),\n new Color(151, 225, 150),\n new Color(108, 192, 139),\n new Color(76, 155, 130),\n new Color(33, 122, 121),\n new Color(16, 89, 101),\n new Color(7, 64, 80)\n\n );\n\n\n }", "@Override\n\tpublic void initialize() {\n\t\ttarget = Robot.getColorWheelColor();\n\t\tif (target != null)\n\t\t\tcolorSpinnerSubsystem.setRunning(true);\n\t\telse\n\t\t\tthis.cancel();\n\t}", "@Override\n public void setColor(Color color) {\n this.color = color;\n }", "public Car(int floor, String color){\n\t\tthis.carPosition = floor;\n\t\tthis.carColor = color;\n\t}", "public void\nsetAmbientElt( SbColor color )\n\n{\n this.coinstate.ambient.copyFrom(color);\n}", "public Color(Color newColor) {\n\n\t\tthis(newColor.r, newColor.g, newColor.b);\n\t}", "@Override\n public void setUilButtonLightColor(java.lang.Object uilButtonLightColor) throws G2AccessException {\n setAttributeValue (UIL_BUTTON_LIGHT_COLOR_, uilButtonLightColor);\n }", "public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}", "@Override // Override GameObject setColor\n @Deprecated // Deprecated so developer does not accidentally use\n public void setColor(int color) {\n }", "public static void lightSetUp()\r\n {\r\n lightStatusNode green = new lightStatusNode(\"Green\");\r\n lightStatusNode green2 = new lightStatusNode(\"Green\");\r\n lightStatusNode green3 = new lightStatusNode(\"Green\");\r\n lightStatusNode yellow = new lightStatusNode(\"Yellow\");\r\n lightStatusNode yellow2 = new lightStatusNode(\"Yellow\");\r\n lightStatusNode yellow3 = new lightStatusNode(\"Yellow\");\r\n lightStatusNode red = new lightStatusNode(\"Red\");\r\n lightStatusNode red2 = new lightStatusNode(\"Red\");\r\n lightStatusNode red3 = new lightStatusNode(\"Red\");\r\n lightStatusNode red4 = new lightStatusNode(\"Red\");\r\n lightStatusNode red5 = new lightStatusNode(\"Red\");\r\n lightStatusNode red6 = new lightStatusNode(\"Red\");\r\n green.setNext(green2);\r\n green2.setNext(green3);\r\n green3.setNext(yellow);\r\n yellow.setNext(yellow2);\r\n yellow2.setNext(yellow3);\r\n yellow3.setNext(red);\r\n red.setNext(red2);\r\n red2.setNext(red3);\r\n red3.setNext(red4);\r\n red4.setNext(red5);\r\n red5.setNext(red6);\r\n red6.setNext(green);\r\n light = green;\r\n light2 = red;\r\n }", "public void setHasLightSource(Creature creature, byte colorRed, byte colorGreen, byte colorBlue, byte radius) {\n/* 5521 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5525 */ if (vz.getWatcher().getWurmId() == creature.getWurmId())\n/* */ {\n/* 5527 */ vz.sendAttachCreatureEffect(null, (byte)0, colorRed, colorGreen, colorBlue, radius);\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 5532 */ vz.sendAttachCreatureEffect(creature, (byte)0, colorRed, colorGreen, colorBlue, radius);\n/* */ }\n/* */ \n/* */ }\n/* 5536 */ catch (Exception e) {\n/* */ \n/* 5538 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }", "public ColorFilter(Color color) {\r\n this.color = color;\r\n }", "public Light(double xPos, double yPos, double zPos, double r, double g, double b, int radPix){\n pos[0] = xPos;\n pos[1] = yPos;\n pos[2] = zPos;\n ir = (float)r;\n ig = (float)g;\n ib = (float)b;\n radiusPix = radPix;\n }", "public abstract void setColor(Color color);", "public abstract void setColor(Color color);", "public DrawComponent(int color) {\n this.color = color;\n }", "public Figure(Color color){\n this.color=color;\n }", "public Light() {\n\t\tthis(false);\n\t}", "public void setColor(Color color) \n\t{\n\t\tthis.color = color;\n\t}", "public void init()\n {\n setBackground(Color.YELLOW);\n setForeground(Color.RED);\n }", "protected void initLight(GL10 gl) {\n\t\tgl.glEnable(GL10.GL_LIGHTING);\n\t\tgl.glEnable(GL10.GL_LIGHT0);\n\t\tgl.glEnable(GL10.GL_LIGHT1);\n\t\tgl.glShadeModel(GL10.GL_SMOOTH);\n\t\tthis.mLight = new Light();\n\t\tthis.mLight.initAmbient(-0.2f, -0.2f, -0.2f, 1.0f);\n\t\tthis.mLight.initDiffuse(1.f, 1.0f, 1.0f, 1f);\n\t\tthis.mLight.initSpecular(1.0f, 1.0f, 1.0f, 1.0f);\n\t\tthis.mLight.initPosition(0.0f, 3f, 20f, 0.0f);\n\t\tthis.mLight.setLight(gl, GL10.GL_LIGHT0);\n\t\t\n\t\tthis.mLight2 = new Light();\n\t\tthis.mLight2.initAmbient(-0.1f, -0.1f, -0.1f, 1.0f);\n\t\tthis.mLight2.initDiffuse(1f, 1f, 1f, 1f);\n\t\tthis.mLight2.initSpecular(1f, 1f, 1f, 1f);\n\t\tthis.mLight2.initPosition(0f, 2f, 13.5f, 0.0f);\n\t\tthis.mLight2.setLight(gl, GL10.GL_LIGHT1);\n//\t\tgl.glDisable(GL10.GL_LIGHT1);\n\t}", "public void setColor(int color) {\n this.color = color;\n }", "public void setColor(Color c) {\n\t\tthis.color = c;\n\t}", "public void setColor(Color c)\n\t{\n\t\tthis.color = c;\n\t}", "public void setColor(Color color_) {\r\n\t\tcolor = color_;\r\n\t}", "public void setColor(Color newColor) {\n\tcolor = newColor;\n }", "@Override\r\n public Llama.Color getColor() {\r\n return color;\r\n }", "@Override\n public void init() {\n //no initialization, event are only created when car get into intersection\n if (!trafficLights.isEmpty()) {\n getSimEngine().addEvent(new ChangeColorEvent(trafficLights.get(current_traffic_light_index), getSimEngine().getCurrentSimTime()));\n }\n }", "public void setColor(Long color) {\n\t\tthis.color = color;\n\t}", "public Miner(PlayerColor aColor) {\n super(3, aColor);\n }", "public void set(Color inColor) {\n\n\t\tthis.r = inColor.r;\n\t\tthis.g = inColor.g;\n\t\tthis.b = inColor.b;\n\n\t}", "public void\nsetSpecularElt( SbColor color )\n//\n{\n this.coinstate.specular.copyFrom(color);\n}", "public void setColor(Color color) {\n\t\tthis.color = color;\n\t}", "public void setColor(Color color) {\n\t\tthis.color = color;\n\t}", "public void Color() {\n\t\t\r\n\t}", "public SearchManager(Color givenColor) {\n\t\tsuper(givenColor);\n\t}", "public EnemyBackground(Color color) {\r\n this.color = color;\r\n }", "void setColor(final java.awt.Color color);", "public void setColor(float[] color){\n GLES20.glUniform4fv(mColorHandle, 1, color, 0);\n }", "public void setColor(final Color theColor) {\n myColor = theColor;\n }", "public LightOnCommand(Light light) {\n this.light = light;\n }", "public void initLight(GL10 gl)\n\t{\n\t\tgl.glEnable(GL10.GL_LIGHT0);// 打开0号光源\n\n\t\t// 环境光设置\n\t\tfloat[] ambientParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };// 光参数 RGBA\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, ambientParams, 0);\n\n\t\t// 散射光设置\n\t\tfloat[] diffuseParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, diffuseParams, 0);\n\n\t\t// 镜面光设置\n\t\tfloat[] specularParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_SPECULAR, specularParams, 0);\n\n\t\t// 指定光源位置\n\t\tfloat[] directionParams =\n\t\t{ -1f, 1f, 1f, 0 };// 定向光\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, directionParams, 0);\n\t}", "public void setColor(Color newColor)\n {\n this.color = newColor;\n conditionallyRepaint();\n }", "void setupLights() {\n\n lightGroup = new Group();\n\n // Set up the ambient light\n lightAmbient = new AmbientLight(darkGrey);\n lightAmbient.setInfluencingBounds(infiniteBounds);\n lightAmbient.setCapability(Light.ALLOW_STATE_WRITE);\n lightAmbient.setEnable(true);\n lightGroup.addChild(lightAmbient);\n\n // Set up the directional light\n Vector3f lightDirection = new Vector3f(0.65f, -0.65f, -0.40f);\n lightDirectional = new DirectionalLight(white, lightDirection);\n lightDirectional.setInfluencingBounds(infiniteBounds);\n lightDirectional.setEnable(true);\n lightDirectional.setCapability(Light.ALLOW_STATE_WRITE);\n lightGroup.addChild(lightDirectional);\n\n // Set up the point light\n Point3f lightPosition = new Point3f(-1.0f, 1.0f, 0.6f);\n lightPoint = new PointLight(white, lightPosition, attenuation);\n lightPoint.setInfluencingBounds(infiniteBounds);\n lightPoint.setEnable(false);\n lightPoint.setCapability(Light.ALLOW_STATE_WRITE);\n lightPoint.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightGroup.addChild(lightPoint);\n\n // Set up the spot light\n // Point the light back at the origin\n lightSpot = new SpotLight(white, lightPosition, attenuation,\n lightDirection, (float) Math.toRadians(spotSpreadAngle),\n spotConcentration);\n lightSpot.setInfluencingBounds(infiniteBounds);\n lightSpot.setEnable(false);\n lightSpot.setCapability(Light.ALLOW_STATE_WRITE);\n lightSpot.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_CONCENTRATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_SPREAD_ANGLE_WRITE);\n lightGroup.addChild(lightSpot);\n }", "public Box(String color) {\n\t\tthis.color = color;\n\t}", "public void setBlockColor(Color color) {\n rectangle.setFill(color);\n int a = 0;\n }", "public void setColor(Color clr){\n color = clr;\n }", "public void setColor(Color newColor) {\n\t\tcolor = newColor;\n\t}", "public ColorRenderer() {\r\n\t}" ]
[ "0.76987547", "0.7645402", "0.72223514", "0.6919948", "0.67847073", "0.66321224", "0.6619878", "0.6530159", "0.63736004", "0.6363866", "0.6288672", "0.6284043", "0.6282106", "0.6261202", "0.6256188", "0.62405753", "0.6236928", "0.6201221", "0.6200058", "0.6180991", "0.61500245", "0.61402446", "0.6124203", "0.6104889", "0.610428", "0.61005574", "0.60983145", "0.6092029", "0.6091704", "0.6082777", "0.60815126", "0.60815126", "0.60678697", "0.6057866", "0.6056928", "0.604198", "0.60319954", "0.60306734", "0.60271335", "0.60258216", "0.59740424", "0.5951486", "0.59430397", "0.5934296", "0.5933533", "0.5931885", "0.5918686", "0.5918582", "0.5912286", "0.59038705", "0.59038705", "0.58935237", "0.5887418", "0.5884196", "0.5881559", "0.5880965", "0.5873821", "0.5870918", "0.5867346", "0.5864621", "0.58623916", "0.5858729", "0.5853266", "0.5848585", "0.5848213", "0.5848213", "0.5845024", "0.5842195", "0.5839059", "0.58371997", "0.58369595", "0.5836371", "0.58284104", "0.58257747", "0.5821389", "0.5814968", "0.5810374", "0.57963085", "0.579555", "0.5791564", "0.5791503", "0.5790554", "0.5786826", "0.57811165", "0.57811165", "0.57614243", "0.5756183", "0.5752188", "0.5746936", "0.573875", "0.5735508", "0.5709161", "0.5705121", "0.57033443", "0.5703243", "0.5696522", "0.56941485", "0.56924313", "0.56919885", "0.56868243" ]
0.6769268
5
Initiates the LightObject using the given Color
public Light(Color color){ this.color = color; this.castsShadows = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LightBulb(RGBColor color){\r\n _color = new RGBColor(color);\r\n }", "public Light(Vector3f position, Vector3f color) {\n\t\tthis.position = position;\n\t\tthis.color = color;\n\t}", "public Light(Vector3f position, Vector3f colour) {\r\n\t\tthis.position = position;\r\n\t\tthis.colour = colour;\r\n\t}", "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "public Light(Color color, boolean castsShadows){\n this.color = color;\n this.castsShadows = castsShadows;\n }", "@Override\n public void initialize() {\n m_desiredColor = ColorWheel.fromGameMessage();\n USBLogging.info(\"Desired Color is \" + m_desiredColor.getName());\n }", "public Light(){\n this(0.0, 0.0, 0.0);\n }", "public Light(Vector3f position, Vector3f colour, Vector3f attenuation) {\r\n\t\tthis.position = position;\r\n\t\tthis.colour = colour;\r\n\t\tthis.attenuation = attenuation;\r\n\t}", "@Override\r\n public void setColor(Llama.Color color) {\r\n this.color = color;\r\n }", "@Override\n\tpublic LightTank create(Enum<?> model, Enum<?> color) {\n\t\treturn new LightTank(GameContext.getGameContext(), model, color);\n\t}", "public Light(Vec3f dir, Vec3f color, float intensity)\n\t{\n\t\tm_light_type = Config.g_light_types.DIRECTIONAL;\n\t\tm_dir = dir.normalize();\n\t\tm_color = color;\n\t\tm_intensity = intensity;\n\t}", "public Shape(Color c) {\n\t\tcolor = c;\n\t}", "public LightBulb(LightBulb other){\r\n _color = new RGBColor(other._color);\r\n }", "public void setColor(Color c) { color.set(c); }", "public void setColor(Color color) {\n this.color = color;\n }", "colorChoice(Vec3 color) {\n this.color = color;\n }", "public void setColor(Color color);", "public void setColor(Color color) {\n this.color = color;\r\n }", "public void init(GLAutoDrawable gLDrawable) {\n GL2 gl = gLDrawable.getGL().getGL2();\n \n gl.glClearDepth(1.0f); // Depth Buffer Setup\n gl.glEnable(GL2.GL_DEPTH_TEST); // Enables Depth Testing\n gl.setSwapInterval(1); // enable v-synch @ 60fps\n \n gl.glEnable(GL2.GL_CULL_FACE);\n \n gl.glColorMaterial (GL2.GL_FRONT_AND_BACK, GL2.GL_AMBIENT_AND_DIFFUSE);\n gl.glEnable (GL2.GL_COLOR_MATERIAL);\n \n // create a light source at 0, 100, 100\n EffectsManager.getManager().createLight(gl, new Vector3f(0, 100, 100), new Vector3f(), new Vector3f(1f, 1f, 1f), new Vector3f()); \n }", "public void setColor(RGBColor color){\r\n this._color = new RGBColor(color);\r\n }", "public Light(double xPos, double yPos, double zPos){\n this(xPos, yPos, zPos, 1.0, 1.0, 1.0, 1);\n }", "public void setColor(Color c);", "public void setLightColor(int lightColor) {\n if (lightColor != this.lightColor) {\n int oldLightColor = this.lightColor;\n this.lightColor = lightColor;\n this.propertyChangeSupport.firePropertyChange(Property.LIGHT_COLOR.name(), oldLightColor, lightColor);\n }\n }", "public void setColor(Color newColor) ;", "public LightBulb(int red, int green,int blue){\r\n _switchedOn=false;\r\n\t\tif ((red < 0)||(red > 255)||(green < 0)||(green > 255)||(blue < 0)\r\n\t\t\t\t||(blue > 255)){\r\n\t\t\t_color = new RGBColor();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t_color = new RGBColor(red, green, blue);\r\n\t\t}\r\n\t\r\n }", "private void init(int color) {\n\t\tgetWindow().setFormat(PixelFormat.RGBA_8888);\n\t\tsetUp(color);\n\t}", "Color(int R, int G, int B) {\r\n\t\t this.rgb = new RGB(R,G,B);\r\n\t\t this.colorific = true;\r\n\t }", "void setColor(Vector color);", "private void setLightColor(final Light theLight) {\n switch (theLight) {\n case GREEN:\n myLightColor = Color.GREEN.darker();\n break;\n\n case RED:\n myLightColor = Color.RED.darker();\n break;\n\n case YELLOW:\n myLightColor = Color.YELLOW;\n break;\n\n default:\n }\n }", "public void setColor(float r, float g, float b, float a);", "public void setColor(int color);", "public void setColor(int color);", "public void setColor(Color c) {\n this.color = c;\n }", "public void setColor(Color color) {\n this.color = color;\n }", "public LambertMaterial(final Color color){\n if(color == null){\n throw new IllegalArgumentException(\"color must not be null\");\n }\n \n this.color = color;\n }", "public ColorChange(Color color, double time) {\n this.color = color;\n this.time = time;\n }", "public Light(Vec3f pos, Vec3f color, float intensity, float constant, float linear, float exponent)\n\t{\n\t\tm_light_type = Config.g_light_types.POINT;\n\t\tm_pos = pos;\n\t\tm_color = color;\n\t\tm_intensity = intensity;\n\t\tm_constant = constant;\n\t\tm_linear = linear;\n\t\tm_exponent = exponent;\n\t}", "public void setColor(RMColor aColor)\n{\n // Set color\n if(aColor==null) setFill(null);\n else if(getFill()==null) setFill(new RMFill(aColor));\n else getFill().setColor(aColor);\n}", "public void setColor(Color c) {\n color = c;\n }", "@Override\n public void initialize() {\n initialColor = m_colorWheel.getColor();\n initialColorString = m_colorWheel.getColorString(initialColor);\n rotationCount = 0;\n seesNewColor = false;\n m_colorWheel.wheelSpin(1.0);\n isDone = false;\n System.out.println(\"auto color spin starting\");\n }", "public DirectionalLight(Vector3f color, float intensity) {\n\t\tsuper(color, intensity);\n\n\t\t// super.setShader(ForwardDirectionalShader.getInstance());\n\t\tsuper.setShader(new Shader(\"forward-directional\"));\n\t}", "public void setColor(int color){\n this.color = color;\n }", "public Color() {\n\n\t\tthis(0, 0, 0);\n\t}", "public void setLight1(){\n }", "public Circle(SelectedColor color) {\n super(Name.Circle, color);\n\n Log.i(\"Circle\",\"Created a \" + color + \" Circle\");\n //Need getcolor() to pick random\n //Maybe keep all colors random at create time, then when we add them to data struc\n //we change one of the colors depending on \"correct shape\"\n }", "public void color(Color the_color) {\n \n }", "public Shape(String color) { \n System.out.println(\"Shape constructor called\"); \n this.color = color; \n }", "void setCor(Color cor);", "public SceneLight(String name, int light_number, \n\t\t\tColor4f ambient, Color4f diffuse, Color4f specular, \n\t\t\tdouble posx,double posy,double posz,\n\t\t\tdouble directionx,double directiony,double directionz,\n\t\t\tfloat spot_Cutoff,float intensity, \n\t\t\tfloat constant_attenuation_constant,float linear_attenuation_constant,\n\t\t\tfloat quad_attenuation_constant){\n\t\t\n\t\tthis.name=name;\n\t\tthis.light_number=light_number;\n\t\tposition=new Vector3d(posx,posy,posz);\n\t\tdirection=new Vector3d(directionx,directiony,directionz);\n\t\tthis.ambient=ambient;\n\t\tthis.diffuse=diffuse;\n\t\tthis.specular=specular;\n\t\tthis.spot_Cutoff=spot_Cutoff;\n\t\tthis.intensity=intensity;\n\t\tthis.constant_attenuation_constant=constant_attenuation_constant;\n\t\tthis.linear_attenuation_constant=linear_attenuation_constant;\n\t\tthis.quad_attenuation_constant=quad_attenuation_constant;\n\t}", "public void init (int mColor, LatLng mSrc, LatLng mDst) {\n color = mColor;\n src = mSrc;\n dst = mDst;\n }", "public void init (int mColor, LatLng mSrc, LatLng mDst) {\n color = mColor;\n src = mSrc;\n dst = mDst;\n }", "public Emrld() {\n super(\n new Color(211, 242, 163),\n new Color(151, 225, 150),\n new Color(108, 192, 139),\n new Color(76, 155, 130),\n new Color(33, 122, 121),\n new Color(16, 89, 101),\n new Color(7, 64, 80)\n\n );\n\n\n }", "@Override\n\tpublic void initialize() {\n\t\ttarget = Robot.getColorWheelColor();\n\t\tif (target != null)\n\t\t\tcolorSpinnerSubsystem.setRunning(true);\n\t\telse\n\t\t\tthis.cancel();\n\t}", "@Override\n public void setColor(Color color) {\n this.color = color;\n }", "public Car(int floor, String color){\n\t\tthis.carPosition = floor;\n\t\tthis.carColor = color;\n\t}", "public void\nsetAmbientElt( SbColor color )\n\n{\n this.coinstate.ambient.copyFrom(color);\n}", "public Color(Color newColor) {\n\n\t\tthis(newColor.r, newColor.g, newColor.b);\n\t}", "@Override\n public void setUilButtonLightColor(java.lang.Object uilButtonLightColor) throws G2AccessException {\n setAttributeValue (UIL_BUTTON_LIGHT_COLOR_, uilButtonLightColor);\n }", "public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}", "@Override // Override GameObject setColor\n @Deprecated // Deprecated so developer does not accidentally use\n public void setColor(int color) {\n }", "public static void lightSetUp()\r\n {\r\n lightStatusNode green = new lightStatusNode(\"Green\");\r\n lightStatusNode green2 = new lightStatusNode(\"Green\");\r\n lightStatusNode green3 = new lightStatusNode(\"Green\");\r\n lightStatusNode yellow = new lightStatusNode(\"Yellow\");\r\n lightStatusNode yellow2 = new lightStatusNode(\"Yellow\");\r\n lightStatusNode yellow3 = new lightStatusNode(\"Yellow\");\r\n lightStatusNode red = new lightStatusNode(\"Red\");\r\n lightStatusNode red2 = new lightStatusNode(\"Red\");\r\n lightStatusNode red3 = new lightStatusNode(\"Red\");\r\n lightStatusNode red4 = new lightStatusNode(\"Red\");\r\n lightStatusNode red5 = new lightStatusNode(\"Red\");\r\n lightStatusNode red6 = new lightStatusNode(\"Red\");\r\n green.setNext(green2);\r\n green2.setNext(green3);\r\n green3.setNext(yellow);\r\n yellow.setNext(yellow2);\r\n yellow2.setNext(yellow3);\r\n yellow3.setNext(red);\r\n red.setNext(red2);\r\n red2.setNext(red3);\r\n red3.setNext(red4);\r\n red4.setNext(red5);\r\n red5.setNext(red6);\r\n red6.setNext(green);\r\n light = green;\r\n light2 = red;\r\n }", "public void setHasLightSource(Creature creature, byte colorRed, byte colorGreen, byte colorBlue, byte radius) {\n/* 5521 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5525 */ if (vz.getWatcher().getWurmId() == creature.getWurmId())\n/* */ {\n/* 5527 */ vz.sendAttachCreatureEffect(null, (byte)0, colorRed, colorGreen, colorBlue, radius);\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 5532 */ vz.sendAttachCreatureEffect(creature, (byte)0, colorRed, colorGreen, colorBlue, radius);\n/* */ }\n/* */ \n/* */ }\n/* 5536 */ catch (Exception e) {\n/* */ \n/* 5538 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }", "public ColorFilter(Color color) {\r\n this.color = color;\r\n }", "public Light(double xPos, double yPos, double zPos, double r, double g, double b, int radPix){\n pos[0] = xPos;\n pos[1] = yPos;\n pos[2] = zPos;\n ir = (float)r;\n ig = (float)g;\n ib = (float)b;\n radiusPix = radPix;\n }", "public abstract void setColor(Color color);", "public abstract void setColor(Color color);", "public DrawComponent(int color) {\n this.color = color;\n }", "public Figure(Color color){\n this.color=color;\n }", "public Light() {\n\t\tthis(false);\n\t}", "public void setColor(Color color) \n\t{\n\t\tthis.color = color;\n\t}", "public void init()\n {\n setBackground(Color.YELLOW);\n setForeground(Color.RED);\n }", "protected void initLight(GL10 gl) {\n\t\tgl.glEnable(GL10.GL_LIGHTING);\n\t\tgl.glEnable(GL10.GL_LIGHT0);\n\t\tgl.glEnable(GL10.GL_LIGHT1);\n\t\tgl.glShadeModel(GL10.GL_SMOOTH);\n\t\tthis.mLight = new Light();\n\t\tthis.mLight.initAmbient(-0.2f, -0.2f, -0.2f, 1.0f);\n\t\tthis.mLight.initDiffuse(1.f, 1.0f, 1.0f, 1f);\n\t\tthis.mLight.initSpecular(1.0f, 1.0f, 1.0f, 1.0f);\n\t\tthis.mLight.initPosition(0.0f, 3f, 20f, 0.0f);\n\t\tthis.mLight.setLight(gl, GL10.GL_LIGHT0);\n\t\t\n\t\tthis.mLight2 = new Light();\n\t\tthis.mLight2.initAmbient(-0.1f, -0.1f, -0.1f, 1.0f);\n\t\tthis.mLight2.initDiffuse(1f, 1f, 1f, 1f);\n\t\tthis.mLight2.initSpecular(1f, 1f, 1f, 1f);\n\t\tthis.mLight2.initPosition(0f, 2f, 13.5f, 0.0f);\n\t\tthis.mLight2.setLight(gl, GL10.GL_LIGHT1);\n//\t\tgl.glDisable(GL10.GL_LIGHT1);\n\t}", "public void setColor(int color) {\n this.color = color;\n }", "public void setColor(Color c) {\n\t\tthis.color = c;\n\t}", "public void setColor(Color c)\n\t{\n\t\tthis.color = c;\n\t}", "public void setColor(Color color_) {\r\n\t\tcolor = color_;\r\n\t}", "public void setColor(Color newColor) {\n\tcolor = newColor;\n }", "@Override\r\n public Llama.Color getColor() {\r\n return color;\r\n }", "@Override\n public void init() {\n //no initialization, event are only created when car get into intersection\n if (!trafficLights.isEmpty()) {\n getSimEngine().addEvent(new ChangeColorEvent(trafficLights.get(current_traffic_light_index), getSimEngine().getCurrentSimTime()));\n }\n }", "public void setColor(Long color) {\n\t\tthis.color = color;\n\t}", "public Miner(PlayerColor aColor) {\n super(3, aColor);\n }", "public void set(Color inColor) {\n\n\t\tthis.r = inColor.r;\n\t\tthis.g = inColor.g;\n\t\tthis.b = inColor.b;\n\n\t}", "public void\nsetSpecularElt( SbColor color )\n//\n{\n this.coinstate.specular.copyFrom(color);\n}", "public void setColor(Color color) {\n\t\tthis.color = color;\n\t}", "public void setColor(Color color) {\n\t\tthis.color = color;\n\t}", "public void Color() {\n\t\t\r\n\t}", "public SearchManager(Color givenColor) {\n\t\tsuper(givenColor);\n\t}", "public EnemyBackground(Color color) {\r\n this.color = color;\r\n }", "void setColor(final java.awt.Color color);", "public void setColor(float[] color){\n GLES20.glUniform4fv(mColorHandle, 1, color, 0);\n }", "public void setColor(final Color theColor) {\n myColor = theColor;\n }", "public LightOnCommand(Light light) {\n this.light = light;\n }", "public void initLight(GL10 gl)\n\t{\n\t\tgl.glEnable(GL10.GL_LIGHT0);// 打开0号光源\n\n\t\t// 环境光设置\n\t\tfloat[] ambientParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };// 光参数 RGBA\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, ambientParams, 0);\n\n\t\t// 散射光设置\n\t\tfloat[] diffuseParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, diffuseParams, 0);\n\n\t\t// 镜面光设置\n\t\tfloat[] specularParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_SPECULAR, specularParams, 0);\n\n\t\t// 指定光源位置\n\t\tfloat[] directionParams =\n\t\t{ -1f, 1f, 1f, 0 };// 定向光\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, directionParams, 0);\n\t}", "public void setColor(Color newColor)\n {\n this.color = newColor;\n conditionallyRepaint();\n }", "void setupLights() {\n\n lightGroup = new Group();\n\n // Set up the ambient light\n lightAmbient = new AmbientLight(darkGrey);\n lightAmbient.setInfluencingBounds(infiniteBounds);\n lightAmbient.setCapability(Light.ALLOW_STATE_WRITE);\n lightAmbient.setEnable(true);\n lightGroup.addChild(lightAmbient);\n\n // Set up the directional light\n Vector3f lightDirection = new Vector3f(0.65f, -0.65f, -0.40f);\n lightDirectional = new DirectionalLight(white, lightDirection);\n lightDirectional.setInfluencingBounds(infiniteBounds);\n lightDirectional.setEnable(true);\n lightDirectional.setCapability(Light.ALLOW_STATE_WRITE);\n lightGroup.addChild(lightDirectional);\n\n // Set up the point light\n Point3f lightPosition = new Point3f(-1.0f, 1.0f, 0.6f);\n lightPoint = new PointLight(white, lightPosition, attenuation);\n lightPoint.setInfluencingBounds(infiniteBounds);\n lightPoint.setEnable(false);\n lightPoint.setCapability(Light.ALLOW_STATE_WRITE);\n lightPoint.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightGroup.addChild(lightPoint);\n\n // Set up the spot light\n // Point the light back at the origin\n lightSpot = new SpotLight(white, lightPosition, attenuation,\n lightDirection, (float) Math.toRadians(spotSpreadAngle),\n spotConcentration);\n lightSpot.setInfluencingBounds(infiniteBounds);\n lightSpot.setEnable(false);\n lightSpot.setCapability(Light.ALLOW_STATE_WRITE);\n lightSpot.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_CONCENTRATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_SPREAD_ANGLE_WRITE);\n lightGroup.addChild(lightSpot);\n }", "public Box(String color) {\n\t\tthis.color = color;\n\t}", "public void setBlockColor(Color color) {\n rectangle.setFill(color);\n int a = 0;\n }", "public void setColor(Color clr){\n color = clr;\n }", "public void setColor(Color newColor) {\n\t\tcolor = newColor;\n\t}", "public ColorRenderer() {\r\n\t}" ]
[ "0.7645402", "0.72223514", "0.6919948", "0.67847073", "0.6769268", "0.66321224", "0.6619878", "0.6530159", "0.63736004", "0.6363866", "0.6288672", "0.6284043", "0.6282106", "0.6261202", "0.6256188", "0.62405753", "0.6236928", "0.6201221", "0.6200058", "0.6180991", "0.61500245", "0.61402446", "0.6124203", "0.6104889", "0.610428", "0.61005574", "0.60983145", "0.6092029", "0.6091704", "0.6082777", "0.60815126", "0.60815126", "0.60678697", "0.6057866", "0.6056928", "0.604198", "0.60319954", "0.60306734", "0.60271335", "0.60258216", "0.59740424", "0.5951486", "0.59430397", "0.5934296", "0.5933533", "0.5931885", "0.5918686", "0.5918582", "0.5912286", "0.59038705", "0.59038705", "0.58935237", "0.5887418", "0.5884196", "0.5881559", "0.5880965", "0.5873821", "0.5870918", "0.5867346", "0.5864621", "0.58623916", "0.5858729", "0.5853266", "0.5848585", "0.5848213", "0.5848213", "0.5845024", "0.5842195", "0.5839059", "0.58371997", "0.58369595", "0.5836371", "0.58284104", "0.58257747", "0.5821389", "0.5814968", "0.5810374", "0.57963085", "0.579555", "0.5791564", "0.5791503", "0.5790554", "0.5786826", "0.57811165", "0.57811165", "0.57614243", "0.5756183", "0.5752188", "0.5746936", "0.573875", "0.5735508", "0.5709161", "0.5705121", "0.57033443", "0.5703243", "0.5696522", "0.56941485", "0.56924313", "0.56919885", "0.56868243" ]
0.76987547
0
Determines whether the given Point is illuminated by this light.
public abstract boolean illuminates(Point3 point);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean illuminates(Point3 point, World world);", "public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }", "public boolean pointWhithin(Point point) {\n\t\treturn false;\n\t}", "private boolean isInRange(Balloon balloon) {\r\n\t\tfloat xDistance = Math.abs(balloon.getX() - x);\r\n\t\tfloat yDistance = Math.abs(balloon.getY() - y);\r\n\r\n\t\tif (xDistance < range && yDistance < range) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isAsphaltOnTrack(Point p) {\n\t\treturn this.trk.contains(p);\n\t}", "public boolean isAt(Point punto) {\r\n Point inner = toInnerPoint(punto);\r\n for (Point block : innerPiece.getPoints())\r\n \tif (block.X() == inner.X() && block.Y() == inner.Y())\r\n \t\treturn true;\r\n return false;\r\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public boolean isPointReached(Point p) {\n return getDistanceAway(p) < MINIMUM_DISTANCE_AWAY;\n }", "abstract public boolean isPickedBy(Point p);", "private boolean obligatoryEats(Color pColor){\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if(isBlack(pColor) && !isEmpty(pos) && isBlack(pos) && canEats(pos))\r\n return true;\r\n if(isRed(pColor) && !isEmpty(pos) && isRed(pos) && canEats(pos))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean isIn(Point p)\n {\n \n \treturn isIn(p.x, p.y);\n \t\n //\tboolean cond1 = false;\n // boolean cond2 = false; \n // cond1 = (p.x>=rettangoloX)&&(p.x<=(rettangoloX+larghezza));\n // cond2 = (p.y>=rettangoloY)&&(p.y<=(rettangoloY+altezza));\n // return (cond1&&cond2);\n }", "public boolean includesPoint(Point p) {\n double ABC = getArea();\n double PAB = new Triangle(p, p1, p2).getArea();\n double PBC = new Triangle(p, p2, p3).getArea();\n double PAC = new Triangle(p, p1, p3).getArea();\n return abs(ABC - (PAB + PBC + PAC)) < 0.000000001;\n }", "public boolean contains(Point point) {\n return this.center.distance(point) <= this.r;\n }", "private boolean checkSurroundingOfPoint(Point p) {\n\t\tPoint check = new Point();\n\t\tcheck.x\t\t= p.x;\n\t\tcheck.y \t= p.y;\n\t\t\n\t\tfor(int y = -1; y <= 1; y++) {\n\t\t\tcheck.y += y;\n\t\t\tfor(int x = -1; x <= 1; x++) {\n\t\t\t\tcheck.x += x;\n\t\t\t\tif(occupiedPositions.contains(check)) return false;\n\t\t\t\t//restore values\n\t\t\t\tcheck.x\t= p.x;\n\t\t\t}\n\t\t\t//restore values\n\t\t\tcheck.y = p.y;\n\t\t}\n\t\treturn true;\n\t}", "public boolean getIsAntHillAt(AntColor color)\r\n\t{\r\n\t\tif (antHill)\r\n\t\t{\r\n\t\t\treturn antHillColor == color;\r\n\t\t} else\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isMouseOver(){\n\t\treturn this.contains(Main.camera.getMousePos());\n\t}", "public boolean isInside(final Tuple3d point) {\n final double distance = this.distanceToPoint(point);\n\n return IntersectionUtils.isGreaterOrEqual(distance, 0.0);\n }", "public boolean isPointIncluded() {\n return geometry.almostZero(distance);\n }", "public boolean isInRange(Point testPt){\n\t\tfor(int i = 0; i < display.size();i++){\n\t\t\tif(testPt.x >= display.get(i).x && testPt.y >= display.get(i).y && testPt.x <= (display.get(i).x + display.get(i).width()) && testPt.y <= (display.get(i).y + display.get(i).height())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean isLocationFogged(XYCoord coord)\n {\n return isLocationFogged(coord.xCoord, coord.yCoord);\n }", "public boolean containsPoint( Point p ) {\r\n return (( p.x > drawx-getWidth()/2) && ( p.x < drawx+getWidth()/2) \r\n && ( p.y > drawy-getHeight()/2) && ( p.y < drawy+getHeight()/2));\r\n }", "public boolean isInShape(Point p) \n\t{\n\t\tPoint centre = new Point((int)posX + diam/2, (int)posY + diam/2);\n\t\t//If distance between two points if less than or equal to radius, true is\n\t\t//returned\n\t\treturn p.distance(centre) <= diam/2;\n\t}", "static Boolean pointInPgm(int x, int y) {\n return (x >= 0 ) && (y >= 0) && (x <= pgmInf.width) && (y <= pgmInf.height);\n }", "@Override\r\n public boolean equals(INavMeshAtom atom) {\r\n if(atom.getClass() == OffMeshPoint.class) {\r\n OffMeshPoint op = (OffMeshPoint) atom;\r\n return (op.navpointId.getStringId().equals(this.navpointId.getStringId()));\r\n }\r\n else return false;\r\n }", "public boolean isOver(int x, int y) {\n // if the point is not within any of the edges of the image, we return false\n if ((y < this.y) || (y > (this.y + image.height))\n || ((x < this.x) || (x > (this.x + image.width)))) {\n return false;\n }\n\n // otherwise, (it is somewhere over the image) we return true\n return true;\n\n }", "public boolean isPositionReached(Point p) {\n return isPointReached(p) && isAngleReached(p);\n }", "public boolean isPointAged(SeatopDataPoint point) {\n if (isPointExpired(point)) { return false; }\n return point.ageInSeconds() >= ( agedDuration * unit );\n }", "public boolean isOn (int x, int y) {\n boolean on = false;\n int xPos = xPosition + radius;\n int yPos = yPosition + radius;\n double tempX = Math.pow(x-xPos, 2);\n double tempY = Math.pow(y-yPos, 2);\n \n double dist = Math.sqrt(tempX + tempY);\n if(dist <= radius) {\n on = true;\n }\n return on;\n }", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n \n final Point other = (Point) obj;\n if( !(Point.memeReel(this.x, other.getX()) && Point.memeReel(this.y, other.getY())) ) {\n return false;\n }\n\n return true;\n }", "private boolean findPixel(Location p) {\n\t\treturn !(bst.get(bst.getRoot(), p) == null);\n\t}", "public boolean percolates() {\n if (wuf.connected(virtTop, virtBottom)) {\n hasPercolated = true;\n return true;\n }\n \n return false;\n }", "private boolean unshaded(Vector l, Vector n, GeoPoint gp, LightSource lightSource) \r\n\t{\r\n\t\tVector lightDirection = l.scale(-1); // from point to light source\r\n//\t\tVector delta = n.scale(n.dotProduct(lightDirection) > 0 ? DELTA : -DELTA);// where we need to move the point\r\n//\t\tPoint3D point = gp.point.add(delta);// moving the point\r\n//\t\tRay lightRay = new Ray(point, lightDirection);// the new ray after the moving\r\n\t\tRay lightRay = new Ray(gp.point, lightDirection, n);\r\n\t\tList<GeoPoint> intersections = scene.geometries.findGeoIntersections(lightRay);\r\n\t\tif (intersections == null)\r\n\t\t\treturn true;// if there are not intersection points - unshadow\r\n\t\tdouble lightDistance = lightSource.getDistance(gp.point);\r\n\t\tfor (GeoPoint g : intersections) {\r\n\t\t\tif (Util.alignZero(g.point.distance(lightRay.getP0()) - lightDistance) <= 0\r\n\t\t\t\t\t&& g.geometry.getMaterial().kT == 0)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t}", "public boolean isOver(PVector i_mousePosition){\n\t\tPVector mouseLocal = globalToLocal(i_mousePosition);\t\t\n\t\treturn pointInTriangle(mouseLocal, c1, c2, c3);\n\t}", "private boolean inOneQuadrant(double x, double y,\n double llx, double lly,\n double urx, double ury) {\n boolean horCond = llx < x == urx < x;\n boolean verCond = lly < y == ury < y;\n return horCond && verCond;\n }", "@Override\n public Color getIntensity(Point3D point) {\n\n Color pointLight = super.getIntensity(point); // the point light intensity\n // multiply the dot product between the direction and the L vector\n // (if it's far from direction - it's more weak. if it's close, it's stronger.\n double k = getL(point).dotProduct(getDirection().normalize());\n k = Math.abs(k);\n\n if (k > 1) k = 1;\n\n return new Color((int) (pointLight.getRed() * k), (int) (pointLight.getGreen() * k), (int) (pointLight.getBlue() * k)); // scale and return\n }", "public boolean hasReachedLEDTarget() {\n\t\tif (closestWhiteLED != null) {\n\t\t\tif (sens.isCloseTo(closestWhiteLED.getTargetX(), closestWhiteLED.getTargetY(), 2)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean onPosition(Point p)\n {\n for(Point pellet : pellets) // iterate over all the pellets\n {\n if (pellet.equals(p))\n return true;\n }\n return false;\n }", "public double getIllumination(SimpleMatrix normal, SimpleMatrix point) {\n double illumination = intensity * Vectors.dot(\n Vectors.unit(normal),\n Vectors.unit(point.minus(position))\n );\n\n return Math.max(illumination, 0);\n }", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }", "public boolean containsPoint(Point p) {\n\t\treturn (p.x >= x && p.x <= (x + WIDTH)\n\t\t\t\t&& p.y >= y && p.y <= (y + HEIGHT));\n\t}", "public boolean percolates() {\n\t\treturn linearGrid.connected(0, 1);\n\t}", "public boolean contains(RMPoint aPoint)\n{\n // Get line width to be used in contain test\n float lineWidth = getStrokeWidth();\n \n // If polygon or line, make line width effectively at least 8, so users will have a better shot of selecting it\n if(this instanceof RMPolygonShape || this instanceof RMLineShape)\n lineWidth = Math.max(8, getStrokeWidth());\n \n // Get bounds, adjusted for line width\n RMRect bounds = getBoundsInside();\n bounds.inset(-lineWidth/2, -lineWidth/2);\n\n // If point isn't even in bounds rect, just return false\n if(!aPoint.inRect(bounds))\n return false;\n \n // Get shape path in bounds rect\n RMPath path = getPathInBounds();\n \n // Return whether path intersects point\n return path.intersects(aPoint, lineWidth);\n}", "public boolean isMine(int x, int y);", "public boolean checkAlienPlacementTile(float x, float y)\r\n/* 471: */ {\r\n/* 472:563 */ if (!tileWalkable(x, y)) {\r\n/* 473:565 */ return false;\r\n/* 474: */ }\r\n/* 475:568 */ AgentModel a = getAgentOnTile(x, y);\r\n/* 476:569 */ if ((a != null) || (((a instanceof DoorModel)) && (!((DoorModel)a).isOpen()))) {\r\n/* 477:571 */ return false;\r\n/* 478: */ }\r\n/* 479:574 */ return true;\r\n/* 480: */ }", "@Override\n public boolean isPointEnclosed(Point point) {\n Point bottomRightCorner = findBottomRightCornerPoint();\n Point topLeftCorner = findTopLeftCornerPoint();\n if (((point.getX() >= origin.getX()) && (point.getX() <= bottomRightCorner.getX())) &&\n ((point.getY() >= origin.getY()) && (point.getY() <= topLeftCorner.getY()))) {\n return true;\n }\n return false;\n }", "boolean hasAuvLoc();", "boolean hasOrigin();", "boolean hasOrigin();", "public boolean isOnPlateau(int x, int y) {\n return x >= 0 && x <= xTopRight && y >= 0 && y <= yTopRight;\n }", "public boolean percolates() {\n return backwashQuickUnion.connected(virtualTop, virtualBottom);\n }", "public boolean onStairs(){\n\t\tint yp = 0; int xp = 0;\n\t\tint ys = 1; int xs = 1;\n\t\tfor(int i = 0; i < this.position.length; i ++){//looks though arrays to gather position\n\t\t\tfor(int p = 0 ; p < this.position.length; p++){\n\t\t\t\tif(this.position[i][p] == 1 && this.Stairs[i][p] == 1){\n\t\t\t\t\typ=i; xp=p;\n\t\t\t\t\tys=i; xs=p;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\tif(yp==ys && xp==xs){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;//if they are not in the same location, return false\n\t}", "public abstract boolean isHit(int x, int y);", "public boolean isPressed() {\r\n List<Entity> entities = dungeon.getEntities();\r\n for (Entity e: entities) {\r\n if (e != null && e.getY() == getY() && e.getX() == getX()) {\r\n if (\"Boulder\".equals(e.getClass().getSimpleName()))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean percolates() {\n // The system percolates if top and bottom are connected\n return UF.connected(top, bottom);\n }", "private boolean towerLocation(final Point current_point) {\r\n\t\tfor (int i = 0; i < my_towers.size(); i++) {\r\n\t\t\tif (my_towers.get(i).getLocation().equals(current_point)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean pointInFlammableLocations(Point point) {\n for (Point location : fireLocations) {\n if (location == point) {\n return true;\n }\n }\n return false;\n }", "public boolean containsPoint(Point p) {\n \treturn\n \t\tp.x >= x &&\n \t\tp.x <= x + width &&\n \t\tp.y >= y &&\n \t\tp.y <= y + height;\n }", "public boolean contains(Point mousePt) {\r\n\t\treturn (x <= mousePt.x && mousePt.x <= (x + width + 1)\t&&\ty <= mousePt.y && mousePt.y <= (y + height + 1));\r\n\t}", "public boolean percolates()\r\n { return uf.find(0) == uf.find(dimension*dimension + 1); }", "private boolean aUnMissileQuiOccupeLaPosition(int x, int y) {\n\t\treturn this.aUnMissile() && missile.occupeLaPosition(x, y);\n\t}", "public boolean hitObject(BasicObject oppose){\n if (oppose.classOfObejct != classOfObejct){\n if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "public boolean percolates(){\n \tif(this.gridLength == 1){\n \t\treturn isOpen(1,1);\n \t}\n \treturn (this.bottom[unionTest.find(0)]);\n }", "public abstract boolean isInterior();", "public boolean containsPoint(Point pt)\n {\n\n // E[O(log(n))]\n if(_lineBVH != null)\n {\n throw new Error(\"Implement me Please!\");\n }\n else\n {\n // O(n).\n return _point_in_polygon_test(pt);\n }\n }", "public boolean contains(Point point) {\n\n\t\tif (Math.abs(center.getX() - point.getX()) <= (width / 2) && (Math.abs(center.getY() - point.getY()) <= height /2)) {\n\n\t\t\treturn true;\n\t\t\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isPointOnTheLeft(Point2d point){\n return direction.y*(point.x-this.point.x)-direction.x*(point.y-this.point.y) < 0;\n }", "public boolean isAmmoPoint() {\n return isAmmoPoint;\n }", "public boolean onGround() {\n return getLocation().getY() <= 0 || (interactingWithY != null && interactingWithY.getLocation().getY() + interactingWithY.size.height <= getLocation().getY());\n }", "public boolean checkmate()\n {\n return checkmate(PieceColor.BLACK)||checkmate(PieceColor.WHITE);\n }", "public boolean isAngleReached(Point p) {\n return Math.abs(getAngleAway(p)) < MINIMUM_ANGLE_AWAY;\n }", "public boolean collidepoint(float mX, float mY){\n return super.shape.contains(mX, mY);\n //return isPressed;\n }", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "public boolean percolates() {\n return mainUnion.connected(virtualTopId, virtualBottomId);\n }", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "private boolean maybeBelowTracked(Block block) {\n\t\tif (Material.SOIL.equals(block.getType()) || // wheat, carrots, potatoes, beetroot, melon stalk, pumpkin stalk\n\t\t\t\tMaterial.NETHERRACK.equals(block.getType()) || // netherwart\n\t\t\t\tMaterial.SAND.equals(block.getType()) || // cactus, sugarcane\n\t\t\t\tMaterial.END_STONE.equals(block.getType())) { // chorus fruit \n\t\t\treturn true;\n\t\t}\n\t\tBlock up = block.getRelative(BlockFace.UP);\n\t\tif (Material.BROWN_MUSHROOM.equals(up.getType()) || Material.RED_MUSHROOM.equals(up.getType()) || // mushrooms\n\t\t\t\tMaterial.SAPLING.equals(up.getType())) { // saplings\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isCurrentPlayerHungry() {\r\n\tboolean isHungry = true;\r\n\tint length = this.territory[this.currentSide].length;\r\n\tfor (short i = 0; i < length && isHungry; i++) {\r\n\t isHungry = (this.territory[this.currentSide][i] == 0);\r\n\t}\r\n\r\n\treturn isHungry;\r\n }", "public boolean isVisible() {\r\n return !((x + width) < ocean.getXmin() || x > ocean.getXmax() || (y + height) < ocean.getYmin()\r\n || y > ocean.getYmax());\r\n }", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "private boolean isOverRect(Point p) {\n Rectangle r = (Rectangle)component.rect.clone();\n r.grow(PROX_DIST, PROX_DIST);\n return r.contains(p);\n }", "public boolean hasOrbited(Bunch<T> theBunch){\n\t \tdouble currentDis=(PhysicsVector.subtract(theBunch.getPosition(),origin)).magnitude();\n\t \tboolean anOrbit=false;\n\t \t\n\t \tif (currentDis>=displacement){\n\t \t\tif (converge){\n\t \t\t\t// passed through closest approach and is now diverging from origin\n\t \t\t\tanOrbit=true;\n\t \t\t}\n\t \t\tconverge=false;\n\t \t}\n\t \telse{\n\t \t\tconverge=true; // bunch is approaching origin\n\t \t}\n\t \tdisplacement=currentDis;\n\t \treturn anOrbit ;\t \n\t}", "public boolean distLocX(Animal an) {\n return (locX != an.locX);\n }", "public boolean liesOnWall() {\n return getBaseParameters().getWorld()[this.getX()][this.getY()] == getBaseParameters().getWall();\n }", "@Override\n\tpublic boolean insideObject(Vector3D p)\n\t{\n\t\treturn (inverse\n\t\t\t\t?(centre.getDifferenceWith(p).getModSquared() > MyMath.square(radius))\n\t\t\t\t:(centre.getDifferenceWith(p).getModSquared() < MyMath.square(radius))\n\t\t\t);\n\t}", "public boolean isAttacking(ChessPiece piece)\n {\n if ((Math.abs(this.getRow() - piece.getRow()) == Math.abs(this.getCol() - piece.getCol())) && (this.getColor() != piece.getColor())) // if self is on same diagonal as chesspiece, this is attack. we use absolute values to determine diagonal\n return true;\n else\n return false; // self is not attacking chesspiece at position l\n }", "public boolean percolates(){\n\t\treturn unionFind.connected(virtualBottom, virtualTop);\n\t}", "public boolean isGoal() {\n if (posX != N-1 || posY != N-1) return false;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (matrix[i][j] == 0) continue;\n if (i*N+j+1 != matrix[i][j]) return false;\n }\n }\n return true;\n }", "private boolean occluded(LightSource light, Point3D point, Geometry geometry){\n Vector lightDirection = light.getL(point);\n // we want to check the vector from the ray of the camera to the light ray\n // this is the revers direction\n lightDirection.scale(-1);\n\n Point3D geometryPoint = new Point3D(point);\n Vector epsVector = new Vector(geometry.getNormal(point));\n epsVector.scale(2);\n geometryPoint.add(epsVector);\n // create new ray\n Ray lightRay = new Ray(geometryPoint, lightDirection);\n // check for intersection points\n Map<Geometry, List<Point3D>> intersectionPoints = getSceneRayIntersections(lightRay);\n\n // Flat geometry cannot self intersect\n if (geometry instanceof FlatGeometry){\n intersectionPoints.remove(geometry);\n }\n for(Entry<Geometry, List<Point3D>> entry: intersectionPoints.entrySet()){\n if(entry.getKey().getMaterial().getKt() == 0)\n if (!(light instanceof PointLight) ||\n (light instanceof PointLight && point.distance(entry.getValue().get(0)) < point.distance(((PointLight)light).getPosition())))\n return true;\n }\n return false;\n }", "public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean isOnSegment(Point2D point) {\n double x = point.getX();\n double y = point.getY();\n double val = this.a * x + this.b * y + this.c;\n if (val < 0.0) {\n val = -val;\n }\n if (val > EPS) {\n return false;\n }\n\n if ((x < (this.minx - EPS)) || (x > (this.maxx + EPS))) {\n return false;\n }\n if ((y < (this.miny - EPS)) || (y > (this.maxy + EPS))) {\n return false;\n }\n return true;\n }", "private boolean reelIn()\n {\n final Point mouse = MouseInfo.getPointerInfo().getLocation();\n final long START_TS = System.currentTimeMillis(), GIVE_UP_TS = 26000;\n final int CPU_DELAY = 25;\n /* If the user moves his mouse, then we will still have memory of the right coordinates. */\n final int MOUSE_X = mouse.x, MOUSE_Y = mouse.y;\n\n /* Determine how much blue there WAS at the start of this cycle. */\n final double ctrlBlue = Tools.avgBlueProximity(MOUSE_X, MOUSE_Y);\n\n /* As long as the in-game cast is still going, there's hope of catching the fish. */\n while (!interrupted && !Tools.timePassed(START_TS, GIVE_UP_TS))\n {\n /* Sleep to prevent max-CPU usage. */\n Tools.sleep(CPU_DELAY);\n /* Find the average blue where the mouse is */\n final double avgBlue = Tools.avgBlueProximity(MOUSE_X, MOUSE_Y);\n final double diff = Math.abs(ctrlBlue - avgBlue);\n if (Controller.debugMode.get())\n Controller.sendMessage(Lang.EN_DEBUG_COLOR_THRESH.replaceFirst(\"%1\",\n String.format(\"%.2f\", diff))\n .replaceFirst(\"%2\", String.format(\"%.2f\", sensitivityProperty.get())));\n\n /* If the difference in blue changed enough, the bobber just splashed! */\n if (Math.abs(ctrlBlue - avgBlue) >= sensitivityProperty.get())\n {\n /* Shift right click to loot the fish. */\n Tools.bot.mouseMove(MOUSE_X, MOUSE_Y);\n Tools.bot.keyPress(KeyEvent.VK_SHIFT);\n Tools.bot.mousePress(InputEvent.BUTTON3_DOWN_MASK);\n Tools.bot.mouseRelease(InputEvent.BUTTON3_DOWN_MASK);\n Tools.bot.keyRelease(KeyEvent.VK_SHIFT);\n return true;\n }\n }\n\n return false;\n }", "@Override\n public boolean intersectsAt(Point point){\n if (planeImage.getBoundingBoxAt(currPos).intersects(point)){\n return true;\n }\n else\n return false;\n }", "boolean hasElevation();", "public boolean inside(final Point p)\n\t\t{\n\t\t\tif(obj.contains(p))\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "private boolean isMyPiece(Loc thisSpot) {\n\t\tfor (Loc loc : currentPiece.getLocation()) {\n\t\t\tif (loc.row == thisSpot.row && loc.col == thisSpot.col) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasCoordInfo();", "public synchronized boolean hasAbsoluteSetPoint()\n {\n final String funcName = \"hasAbsoluteSetPoint\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%b\", absSetPoint);\n }\n\n return absSetPoint;\n }", "public boolean isUnderMouse(int x, int y) {\n\t\tif (x >= getX() && x <= getX() + getWidth() && y >= getY() && y <= getY() + getHeight())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean hasRedPoint() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@Override\n public Color getIntensity(Point3D p) {\n /**calculates the angle (zavit) between the dir from light and the L(from light to object).*/\n double cos = dir.dotProduct(getL(p));\n if (cos <= 0) //if the point is behind the light (90 deg or more)\n return Color.BLACK;\n /**His Intensity Color multiplied with the angle(zavit) between the L and _dir.\n * If the factor came out zero so it will (leapes) the number*/\n return super.getIntensity(p).scale(cos);\n }", "public boolean atPosition(float x, float y) {\n return (Math.abs(y-this.y) <= 0.25 || Math.abs(x-this.x) <= 0.25);\n }" ]
[ "0.7300288", "0.60677844", "0.606061", "0.55559856", "0.554468", "0.5523969", "0.54161733", "0.54125184", "0.54082364", "0.53948236", "0.5394392", "0.5376372", "0.537107", "0.53324205", "0.532726", "0.5326398", "0.53236854", "0.5318646", "0.5288224", "0.52745634", "0.5271162", "0.52623814", "0.52594763", "0.5243087", "0.5231316", "0.5178869", "0.5171651", "0.5168711", "0.51531947", "0.5135119", "0.5129793", "0.5118764", "0.51144516", "0.51054716", "0.51050115", "0.5088124", "0.50833315", "0.505487", "0.50347316", "0.50285953", "0.50004864", "0.49983144", "0.49980584", "0.49861765", "0.49829575", "0.4981155", "0.49643448", "0.49643448", "0.49623054", "0.4961859", "0.4960279", "0.49517477", "0.49492773", "0.4946945", "0.49364614", "0.49337608", "0.49277043", "0.49224463", "0.4919272", "0.4914224", "0.49120724", "0.49117166", "0.49088502", "0.49070236", "0.4901363", "0.4898052", "0.48865452", "0.48861352", "0.4879358", "0.48762694", "0.48755336", "0.48751447", "0.48615164", "0.48604327", "0.4858825", "0.48579204", "0.48538554", "0.4842023", "0.484019", "0.48396683", "0.48372924", "0.48332196", "0.48315334", "0.4827334", "0.4824121", "0.4820735", "0.48172048", "0.48044235", "0.48023215", "0.47960392", "0.4794773", "0.47880104", "0.47870895", "0.47831756", "0.4782782", "0.47807252", "0.4778856", "0.47787035", "0.47782528", "0.47760966" ]
0.77294403
0
Determines whether the given Point is illuminated by this light. (including calculation of shadows)
public abstract boolean illuminates(Point3 point, World world);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean illuminates(Point3 point);", "public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }", "public boolean pointWhithin(Point point) {\n\t\treturn false;\n\t}", "private boolean unshaded(Vector l, Vector n, GeoPoint gp, LightSource lightSource) \r\n\t{\r\n\t\tVector lightDirection = l.scale(-1); // from point to light source\r\n//\t\tVector delta = n.scale(n.dotProduct(lightDirection) > 0 ? DELTA : -DELTA);// where we need to move the point\r\n//\t\tPoint3D point = gp.point.add(delta);// moving the point\r\n//\t\tRay lightRay = new Ray(point, lightDirection);// the new ray after the moving\r\n\t\tRay lightRay = new Ray(gp.point, lightDirection, n);\r\n\t\tList<GeoPoint> intersections = scene.geometries.findGeoIntersections(lightRay);\r\n\t\tif (intersections == null)\r\n\t\t\treturn true;// if there are not intersection points - unshadow\r\n\t\tdouble lightDistance = lightSource.getDistance(gp.point);\r\n\t\tfor (GeoPoint g : intersections) {\r\n\t\t\tif (Util.alignZero(g.point.distance(lightRay.getP0()) - lightDistance) <= 0\r\n\t\t\t\t\t&& g.geometry.getMaterial().kT == 0)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t}", "@Override\n public Color getIntensity(Point3D point) {\n\n Color pointLight = super.getIntensity(point); // the point light intensity\n // multiply the dot product between the direction and the L vector\n // (if it's far from direction - it's more weak. if it's close, it's stronger.\n double k = getL(point).dotProduct(getDirection().normalize());\n k = Math.abs(k);\n\n if (k > 1) k = 1;\n\n return new Color((int) (pointLight.getRed() * k), (int) (pointLight.getGreen() * k), (int) (pointLight.getBlue() * k)); // scale and return\n }", "public boolean includesPoint(Point p) {\n double ABC = getArea();\n double PAB = new Triangle(p, p1, p2).getArea();\n double PBC = new Triangle(p, p2, p3).getArea();\n double PAC = new Triangle(p, p1, p3).getArea();\n return abs(ABC - (PAB + PBC + PAC)) < 0.000000001;\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public boolean isIn(Point p)\n {\n \n \treturn isIn(p.x, p.y);\n \t\n //\tboolean cond1 = false;\n // boolean cond2 = false; \n // cond1 = (p.x>=rettangoloX)&&(p.x<=(rettangoloX+larghezza));\n // cond2 = (p.y>=rettangoloY)&&(p.y<=(rettangoloY+altezza));\n // return (cond1&&cond2);\n }", "@Override\n public boolean isLocationFogged(XYCoord coord)\n {\n return isLocationFogged(coord.xCoord, coord.yCoord);\n }", "abstract public boolean isPickedBy(Point p);", "private boolean obligatoryEats(Color pColor){\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if(isBlack(pColor) && !isEmpty(pos) && isBlack(pos) && canEats(pos))\r\n return true;\r\n if(isRed(pColor) && !isEmpty(pos) && isRed(pos) && canEats(pos))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public boolean isPointReached(Point p) {\n return getDistanceAway(p) < MINIMUM_DISTANCE_AWAY;\n }", "public boolean contains(Point point) {\n return this.center.distance(point) <= this.r;\n }", "public boolean isInside(final Tuple3d point) {\n final double distance = this.distanceToPoint(point);\n\n return IntersectionUtils.isGreaterOrEqual(distance, 0.0);\n }", "boolean hasElevation();", "private boolean occluded(LightSource light, Point3D point, Geometry geometry){\n Vector lightDirection = light.getL(point);\n // we want to check the vector from the ray of the camera to the light ray\n // this is the revers direction\n lightDirection.scale(-1);\n\n Point3D geometryPoint = new Point3D(point);\n Vector epsVector = new Vector(geometry.getNormal(point));\n epsVector.scale(2);\n geometryPoint.add(epsVector);\n // create new ray\n Ray lightRay = new Ray(geometryPoint, lightDirection);\n // check for intersection points\n Map<Geometry, List<Point3D>> intersectionPoints = getSceneRayIntersections(lightRay);\n\n // Flat geometry cannot self intersect\n if (geometry instanceof FlatGeometry){\n intersectionPoints.remove(geometry);\n }\n for(Entry<Geometry, List<Point3D>> entry: intersectionPoints.entrySet()){\n if(entry.getKey().getMaterial().getKt() == 0)\n if (!(light instanceof PointLight) ||\n (light instanceof PointLight && point.distance(entry.getValue().get(0)) < point.distance(((PointLight)light).getPosition())))\n return true;\n }\n return false;\n }", "@Override\n public Color getIntensity(Point3D p) {\n /**calculates the angle (zavit) between the dir from light and the L(from light to object).*/\n double cos = dir.dotProduct(getL(p));\n if (cos <= 0) //if the point is behind the light (90 deg or more)\n return Color.BLACK;\n /**His Intensity Color multiplied with the angle(zavit) between the L and _dir.\n * If the factor came out zero so it will (leapes) the number*/\n return super.getIntensity(p).scale(cos);\n }", "public boolean containsPoint( Point p ) {\r\n return (( p.x > drawx-getWidth()/2) && ( p.x < drawx+getWidth()/2) \r\n && ( p.y > drawy-getHeight()/2) && ( p.y < drawy+getHeight()/2));\r\n }", "public boolean isInShape(Point p) \n\t{\n\t\tPoint centre = new Point((int)posX + diam/2, (int)posY + diam/2);\n\t\t//If distance between two points if less than or equal to radius, true is\n\t\t//returned\n\t\treturn p.distance(centre) <= diam/2;\n\t}", "public boolean isPointIncluded() {\n return geometry.almostZero(distance);\n }", "public boolean isAt(Point punto) {\r\n Point inner = toInnerPoint(punto);\r\n for (Point block : innerPiece.getPoints())\r\n \tif (block.X() == inner.X() && block.Y() == inner.Y())\r\n \t\treturn true;\r\n return false;\r\n }", "private boolean checkSurroundingOfPoint(Point p) {\n\t\tPoint check = new Point();\n\t\tcheck.x\t\t= p.x;\n\t\tcheck.y \t= p.y;\n\t\t\n\t\tfor(int y = -1; y <= 1; y++) {\n\t\t\tcheck.y += y;\n\t\t\tfor(int x = -1; x <= 1; x++) {\n\t\t\t\tcheck.x += x;\n\t\t\t\tif(occupiedPositions.contains(check)) return false;\n\t\t\t\t//restore values\n\t\t\t\tcheck.x\t= p.x;\n\t\t\t}\n\t\t\t//restore values\n\t\t\tcheck.y = p.y;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isOn (int x, int y) {\n boolean on = false;\n int xPos = xPosition + radius;\n int yPos = yPosition + radius;\n double tempX = Math.pow(x-xPos, 2);\n double tempY = Math.pow(y-yPos, 2);\n \n double dist = Math.sqrt(tempX + tempY);\n if(dist <= radius) {\n on = true;\n }\n return on;\n }", "public boolean isAsphaltOnTrack(Point p) {\n\t\treturn this.trk.contains(p);\n\t}", "@Override\n\tpublic boolean insideObject(Vector3D p)\n\t{\n\t\treturn (inverse\n\t\t\t\t?(centre.getDifferenceWith(p).getModSquared() > MyMath.square(radius))\n\t\t\t\t:(centre.getDifferenceWith(p).getModSquared() < MyMath.square(radius))\n\t\t\t);\n\t}", "private boolean isInRange(Balloon balloon) {\r\n\t\tfloat xDistance = Math.abs(balloon.getX() - x);\r\n\t\tfloat yDistance = Math.abs(balloon.getY() - y);\r\n\r\n\t\tif (xDistance < range && yDistance < range) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "static Boolean pointInPgm(int x, int y) {\n return (x >= 0 ) && (y >= 0) && (x <= pgmInf.width) && (y <= pgmInf.height);\n }", "public boolean isOver(int x, int y) {\n // if the point is not within any of the edges of the image, we return false\n if ((y < this.y) || (y > (this.y + image.height))\n || ((x < this.x) || (x > (this.x + image.width)))) {\n return false;\n }\n\n // otherwise, (it is somewhere over the image) we return true\n return true;\n\n }", "public boolean isMouseOver(){\n\t\treturn this.contains(Main.camera.getMousePos());\n\t}", "public abstract boolean isHit(int x, int y);", "public boolean isPositionReached(Point p) {\n return isPointReached(p) && isAngleReached(p);\n }", "public boolean isPointAged(SeatopDataPoint point) {\n if (isPointExpired(point)) { return false; }\n return point.ageInSeconds() >= ( agedDuration * unit );\n }", "private boolean findPixel(Location p) {\n\t\treturn !(bst.get(bst.getRoot(), p) == null);\n\t}", "@Override\n public boolean isInView(Vector3d point, double radius)\n {\n if (myLeftClip.isInFront(point, radius) && myRightClip.isInFront(point, radius) && myTopClip.isInFront(point, radius)\n && myBottomClip.isInFront(point, radius))\n {\n Plane earthBisector = new Plane(Vector3d.ORIGIN, myPosition.getLocation());\n if (earthBisector.isInFront(point, radius))\n {\n return true;\n }\n }\n return false;\n }", "public boolean getIsAntHillAt(AntColor color)\r\n\t{\r\n\t\tif (antHill)\r\n\t\t{\r\n\t\t\treturn antHillColor == color;\r\n\t\t} else\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isOver(PVector i_mousePosition){\n\t\tPVector mouseLocal = globalToLocal(i_mousePosition);\t\t\n\t\treturn pointInTriangle(mouseLocal, c1, c2, c3);\n\t}", "@Override\n public boolean intersectsAt(Point point){\n if (planeImage.getBoundingBoxAt(currPos).intersects(point)){\n return true;\n }\n else\n return false;\n }", "boolean hasNormal();", "public double getIllumination(SimpleMatrix normal, SimpleMatrix point) {\n double illumination = intensity * Vectors.dot(\n Vectors.unit(normal),\n Vectors.unit(point.minus(position))\n );\n\n return Math.max(illumination, 0);\n }", "public boolean onPosition(Point p)\n {\n for(Point pellet : pellets) // iterate over all the pellets\n {\n if (pellet.equals(p))\n return true;\n }\n return false;\n }", "public boolean percolates() {\n if (wuf.connected(virtTop, virtBottom)) {\n hasPercolated = true;\n return true;\n }\n \n return false;\n }", "private boolean maybeBelowTracked(Block block) {\n\t\tif (Material.SOIL.equals(block.getType()) || // wheat, carrots, potatoes, beetroot, melon stalk, pumpkin stalk\n\t\t\t\tMaterial.NETHERRACK.equals(block.getType()) || // netherwart\n\t\t\t\tMaterial.SAND.equals(block.getType()) || // cactus, sugarcane\n\t\t\t\tMaterial.END_STONE.equals(block.getType())) { // chorus fruit \n\t\t\treturn true;\n\t\t}\n\t\tBlock up = block.getRelative(BlockFace.UP);\n\t\tif (Material.BROWN_MUSHROOM.equals(up.getType()) || Material.RED_MUSHROOM.equals(up.getType()) || // mushrooms\n\t\t\t\tMaterial.SAPLING.equals(up.getType())) { // saplings\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean containsPoint(Point p) {\n\t\treturn (p.x >= x && p.x <= (x + WIDTH)\n\t\t\t\t&& p.y >= y && p.y <= (y + HEIGHT));\n\t}", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n \n final Point other = (Point) obj;\n if( !(Point.memeReel(this.x, other.getX()) && Point.memeReel(this.y, other.getY())) ) {\n return false;\n }\n\n return true;\n }", "public boolean isMine(int x, int y);", "public boolean containsPoint(Point pt)\n {\n\n // E[O(log(n))]\n if(_lineBVH != null)\n {\n throw new Error(\"Implement me Please!\");\n }\n else\n {\n // O(n).\n return _point_in_polygon_test(pt);\n }\n }", "public boolean isInRange(Point testPt){\n\t\tfor(int i = 0; i < display.size();i++){\n\t\t\tif(testPt.x >= display.get(i).x && testPt.y >= display.get(i).y && testPt.x <= (display.get(i).x + display.get(i).width()) && testPt.y <= (display.get(i).y + display.get(i).height())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean detect(Point p, MapLayer layer);", "public boolean contains(Lover m) {\n PVector loc =m.location;\n // is Lover object is inside of mouse controlled fluid?\n // if (loc.x> mouseX && loc.x < mouseX + w && loc.y > mouseY && loc.y < mouseY+ h) { //creates flyover\n // return true;\n // } \n // is Lover object inside of stationary fluid area? Yes? then go back to if statement and apply force\n if (loc.x> x && loc.x < x + w && loc.y > y && loc.y < y+ h) {\n return true;\n } \n // No? then return fals and do not apply drag force\n else {\n return false;\n }\n }", "public boolean isPointOnTheLeft(Point2d point){\n return direction.y*(point.x-this.point.x)-direction.x*(point.y-this.point.y) < 0;\n }", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "public boolean pointInFlammableLocations(Point point) {\n for (Point location : fireLocations) {\n if (location == point) {\n return true;\n }\n }\n return false;\n }", "boolean hasOrigin();", "boolean hasOrigin();", "boolean hasCoordInfo();", "public boolean contain(Point p) {\n\t\tdouble n1, n2, n3, n4, n5, n6;\n\t\tPlane pl1, pl2, pl3, pl4, pl5, pl6;\n\t\tpl1 = new Plane(A1, B1, C1); // Mat phang A1.B1.C1.D1 (1)\n\t\tpl2 = new Plane(A1, B1, A2); // Mat phang A1.B1.B2.A2 (2)\n\t\tpl3 = new Plane(A1, D1, A2); // Mat phang A1.D1.D2.A2 (3)\n\t\tpl4 = new Plane(A2, pl1.getV()); // Mat phang A2.B2.C2.D2 (1)\n\t\tpl5 = new Plane(C1, pl2.getV()); // Mat phang C1.D1.D2.C2 (2)\n\t\tpl6 = new Plane(B1, pl3.getV()); // Mat phang B1.C1.C2.B2 (3)\n\n\t\tn1 = pl1.doSomething(p);\n\t\tn4 = pl4.doSomething(p);\n\n\t\tif (n1 * n4 > 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tn2 = pl2.doSomething(p);\n\t\tn5 = pl5.doSomething(p);\n\t\tif (n2 * n5 > 0f) {\n\t\t\treturn false;\n\t\t}\n\n\t\tn3 = pl3.doSomething(p);\n\t\tn6 = pl6.doSomething(p);\n\t\tif (n3 * n6 > 0f) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean contains(Point point) {\n\n\t\tif (Math.abs(center.getX() - point.getX()) <= (width / 2) && (Math.abs(center.getY() - point.getY()) <= height /2)) {\n\n\t\t\treturn true;\n\t\t\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}", "default boolean contains(Vector3 point) {\r\n return contains(point.getX(), point.getY(), point.getZ());\r\n }", "public boolean hitObject(BasicObject oppose){\n if (oppose.classOfObejct != classOfObejct){\n if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "public boolean containsPoint(Point p) {\n \treturn\n \t\tp.x >= x &&\n \t\tp.x <= x + width &&\n \t\tp.y >= y &&\n \t\tp.y <= y + height;\n }", "public boolean inside(final Point p)\n\t\t{\n\t\t\tif(obj.contains(p))\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "public boolean contains(RMPoint aPoint)\n{\n // Get line width to be used in contain test\n float lineWidth = getStrokeWidth();\n \n // If polygon or line, make line width effectively at least 8, so users will have a better shot of selecting it\n if(this instanceof RMPolygonShape || this instanceof RMLineShape)\n lineWidth = Math.max(8, getStrokeWidth());\n \n // Get bounds, adjusted for line width\n RMRect bounds = getBoundsInside();\n bounds.inset(-lineWidth/2, -lineWidth/2);\n\n // If point isn't even in bounds rect, just return false\n if(!aPoint.inRect(bounds))\n return false;\n \n // Get shape path in bounds rect\n RMPath path = getPathInBounds();\n \n // Return whether path intersects point\n return path.intersects(aPoint, lineWidth);\n}", "private boolean hitMyPaddle() {\n if (b.numX - 60 <= 0) {\n if ((b.numY <= (this.touchedY + 260)) && (b.numY >= (this.touchedY - 260))) {\n } else {\n this.wentOffWall();\n }\n return true;\n } else {\n return false;\n }\n }", "public boolean isVisible() {\r\n return !((x + width) < ocean.getXmin() || x > ocean.getXmax() || (y + height) < ocean.getYmin()\r\n || y > ocean.getYmax());\r\n }", "public boolean isOnSegment(Point2D point) {\n double x = point.getX();\n double y = point.getY();\n double val = this.a * x + this.b * y + this.c;\n if (val < 0.0) {\n val = -val;\n }\n if (val > EPS) {\n return false;\n }\n\n if ((x < (this.minx - EPS)) || (x > (this.maxx + EPS))) {\n return false;\n }\n if ((y < (this.miny - EPS)) || (y > (this.maxy + EPS))) {\n return false;\n }\n return true;\n }", "public boolean inRange(){\n //System.out.println(\"inRange\");\n return Math.abs(GameView.instance.player.position.x - creationPoint.x) < GameView.instance.cameraSize * attackRange;\n }", "public boolean equals( Object other ) {\n if ( super.equals( other ) && ( other instanceof Point ) ) {\n \tPoint p = (Point)other;\n boolean flagEq = Math.abs( getX() - p.getX() ) < mute &&\n \t \t\t\t Math.abs( getY() - p.getY() ) < mute;\n if ( getCoordinateDimension() == 3 ) {\n \tflagEq = flagEq && Math.abs( getZ() - p.getZ() ) < mute;\n }\n return flagEq;\n }\n\n return false;\n }", "public boolean isGlowing ( ) {\n\t\treturn extract ( handle -> handle.isGlowing ( ) );\n\t}", "public boolean contains(Point p) {\n int winding = 0;\n for (int i = 0; i < N; i++) {\n int ccw = Point.ccw(a[i], a[i+1], p);\n if (a[i+1].y > p.y && p.y >= a[i].y) // upward crossing\n if (ccw == +1) winding++;\n if (a[i+1].y <= p.y && p.y < a[i].y) // downward crossing\n if (ccw == -1) winding--;\n }\n return winding != 0;\n }", "public boolean contains(Point mousePt) {\r\n\t\treturn (x <= mousePt.x && mousePt.x <= (x + width + 1)\t&&\ty <= mousePt.y && mousePt.y <= (y + height + 1));\r\n\t}", "boolean land();", "public boolean percolates() {\n return backwashQuickUnion.connected(virtualTop, virtualBottom);\n }", "@Override\n public boolean isPointEnclosed(Point point) {\n Point bottomRightCorner = findBottomRightCornerPoint();\n Point topLeftCorner = findTopLeftCornerPoint();\n if (((point.getX() >= origin.getX()) && (point.getX() <= bottomRightCorner.getX())) &&\n ((point.getY() >= origin.getY()) && (point.getY() <= topLeftCorner.getY()))) {\n return true;\n }\n return false;\n }", "boolean isInsideScreen() {\n if (_hitbox.length == 1) {\n float r = _hitbox[0].x;\n PVector c = _getCenter();\n return 0 <= c.x + r && c.x - r < width && 0 <= c.y + r && c.y - r < height;\n }\n \n PVector[] points = this._getPoints();\n for(PVector p : points) {\n if(0 <= p.x && p.x < width && 0 <= p.y && p.y < height) {\n return true;\n }\n }\n return false;\n }", "public boolean distLocX(Animal an) {\n return (locX != an.locX);\n }", "@Override\r\n public boolean equals(INavMeshAtom atom) {\r\n if(atom.getClass() == OffMeshPoint.class) {\r\n OffMeshPoint op = (OffMeshPoint) atom;\r\n return (op.navpointId.getStringId().equals(this.navpointId.getStringId()));\r\n }\r\n else return false;\r\n }", "public boolean isProjectile();", "public boolean percolates()\r\n { return uf.find(0) == uf.find(dimension*dimension + 1); }", "boolean hasAltitude();", "private boolean reelIn()\n {\n final Point mouse = MouseInfo.getPointerInfo().getLocation();\n final long START_TS = System.currentTimeMillis(), GIVE_UP_TS = 26000;\n final int CPU_DELAY = 25;\n /* If the user moves his mouse, then we will still have memory of the right coordinates. */\n final int MOUSE_X = mouse.x, MOUSE_Y = mouse.y;\n\n /* Determine how much blue there WAS at the start of this cycle. */\n final double ctrlBlue = Tools.avgBlueProximity(MOUSE_X, MOUSE_Y);\n\n /* As long as the in-game cast is still going, there's hope of catching the fish. */\n while (!interrupted && !Tools.timePassed(START_TS, GIVE_UP_TS))\n {\n /* Sleep to prevent max-CPU usage. */\n Tools.sleep(CPU_DELAY);\n /* Find the average blue where the mouse is */\n final double avgBlue = Tools.avgBlueProximity(MOUSE_X, MOUSE_Y);\n final double diff = Math.abs(ctrlBlue - avgBlue);\n if (Controller.debugMode.get())\n Controller.sendMessage(Lang.EN_DEBUG_COLOR_THRESH.replaceFirst(\"%1\",\n String.format(\"%.2f\", diff))\n .replaceFirst(\"%2\", String.format(\"%.2f\", sensitivityProperty.get())));\n\n /* If the difference in blue changed enough, the bobber just splashed! */\n if (Math.abs(ctrlBlue - avgBlue) >= sensitivityProperty.get())\n {\n /* Shift right click to loot the fish. */\n Tools.bot.mouseMove(MOUSE_X, MOUSE_Y);\n Tools.bot.keyPress(KeyEvent.VK_SHIFT);\n Tools.bot.mousePress(InputEvent.BUTTON3_DOWN_MASK);\n Tools.bot.mouseRelease(InputEvent.BUTTON3_DOWN_MASK);\n Tools.bot.keyRelease(KeyEvent.VK_SHIFT);\n return true;\n }\n }\n\n return false;\n }", "public boolean checkAlienPlacementTile(float x, float y)\r\n/* 471: */ {\r\n/* 472:563 */ if (!tileWalkable(x, y)) {\r\n/* 473:565 */ return false;\r\n/* 474: */ }\r\n/* 475:568 */ AgentModel a = getAgentOnTile(x, y);\r\n/* 476:569 */ if ((a != null) || (((a instanceof DoorModel)) && (!((DoorModel)a).isOpen()))) {\r\n/* 477:571 */ return false;\r\n/* 478: */ }\r\n/* 479:574 */ return true;\r\n/* 480: */ }", "boolean hasRadius();", "boolean hasRadius();", "@Override\n\tpublic boolean isPointEnclosed(Point p)\n\t{\n\t\tdouble[] centre = circleCentre();\n\t\tdouble distance = Math.sqrt((centre[0] - p.x)*(centre[0] - p.x) + (centre[1] - p.y)*(centre[1] - p.y));\n\t\t\n\t\tif(distance <= radius)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "public boolean isFullyExplored();", "boolean hasAuvLoc();", "private boolean isOverRect(Point p) {\n Rectangle r = (Rectangle)component.rect.clone();\n r.grow(PROX_DIST, PROX_DIST);\n return r.contains(p);\n }", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "public boolean isAngleReached(Point p) {\n return Math.abs(getAngleAway(p)) < MINIMUM_ANGLE_AWAY;\n }", "public boolean contains(Point2D.Double p) {\n if(p.x <= middle.x + length/2.0 &&\n p.x >= middle.x - length/2.0 &&\n p.y <= middle.y + length/2.0 &&\n p.y >= middle.y - length/2.0) return true;\n else return false;\n }", "public abstract boolean containsPoint(int x, int y);", "public boolean isHit() { return hit; }", "@Override\n\tpublic boolean isInside(float x, float y, float z) {\n\t\treturn false;\n\t}", "private boolean growSapling(World world, int x, int y, int z, Random rand)\r\n {\r\n \t// Total value of this crop\r\n \tfloat value = 0;\r\n \t\r\n \t// Not bright enough for the sapling to grow.\r\n \tif (world.getBlockLightValue(x, y + 1, z) < SaplingMinimumLight) \r\n \t\treturn true;\r\n \t\r\n \t// Radius to check nearby ground blocks.\r\n \tint r = 2;\r\n \tfor (int i = -r + x; i <= r + x; i++)\r\n \tfor (int k = -r + z; k <= r + z; k++)\r\n \tfor (int j = -2 + y; j <= 0 + y; j++)\r\n \t{\r\n \t\t// Ignore corners, sapling block and mounds next to sapling. Maintain surface gradient!\r\n \t\tif (Math.abs(i - x) <= 1 && j == y && Math.abs(k - z) <= 1) continue;\r\n \t\tif (i == x && j == (y - 1) && k == z) continue;\r\n \t\tif (Math.abs(i - x) == r && Math.abs(k - z) == r) continue;\r\n \t\t\r\n \t\tBlock block = world.getBlock(i, j, k);\r\n \t\tMaterial above = world.getBlock(i, j + 1, k).getMaterial();\r\n \t\tif (SaplingSoilBlocks.contains(block) && (above == Material.air || above == Material.vine || above == Material.plants || above == Material.snow || above == Material.leaves)) \r\n \t\t{\r\n \t\t\t// Light level above soil\r\n \t\t\tint light = world.getBlockLightValue(i, j + 1, k);\r\n\r\n \t\t\t// Light is \"natural\" if consistent over 4 y levels\r\n \t\t\tboolean natural = true;\r\n \t\t\tfor (int l = 2; l <= 4; l++)\r\n \t\t\t\tif (world.getBlockLightValue(i, j + 1, k) != light) \r\n \t\t\t\t\tnatural = false;\r\n \t\t\t\r\n \t\t\tvalue += (float)light * (natural ? 1.0f : 0.75f) * (above == Material.plants || above == Material.snow ? 0.75f : 1.0f) * (above == Material.vine || above == Material.leaves ? 0.5f : 1.0f);\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (rand.nextDouble() < (GrowthMultiplierSapling * 0.25d / Math.pow(2.0d, (300.0d - value) / 75.0d)))\r\n \t\treturn !(new WorldGenKawaiiTree(this)).generate(world, rand, x, y, z);\r\n \t\r\n \treturn true;\r\n }", "public abstract boolean isInterior();", "public boolean hasReachedLEDTarget() {\n\t\tif (closestWhiteLED != null) {\n\t\t\tif (sens.isCloseTo(closestWhiteLED.getTargetX(), closestWhiteLED.getTargetY(), 2)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean inOneQuadrant(double x, double y,\n double llx, double lly,\n double urx, double ury) {\n boolean horCond = llx < x == urx < x;\n boolean verCond = lly < y == ury < y;\n return horCond && verCond;\n }", "public boolean collidepoint(float mX, float mY){\n return super.shape.contains(mX, mY);\n //return isPressed;\n }", "public boolean hasOrbited(Bunch<T> theBunch){\n\t \tdouble currentDis=(PhysicsVector.subtract(theBunch.getPosition(),origin)).magnitude();\n\t \tboolean anOrbit=false;\n\t \t\n\t \tif (currentDis>=displacement){\n\t \t\tif (converge){\n\t \t\t\t// passed through closest approach and is now diverging from origin\n\t \t\t\tanOrbit=true;\n\t \t\t}\n\t \t\tconverge=false;\n\t \t}\n\t \telse{\n\t \t\tconverge=true; // bunch is approaching origin\n\t \t}\n\t \tdisplacement=currentDis;\n\t \treturn anOrbit ;\t \n\t}", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }" ]
[ "0.78371406", "0.6196673", "0.61297244", "0.5929271", "0.5793462", "0.57385975", "0.5655518", "0.55526423", "0.554884", "0.55403376", "0.55200565", "0.54926205", "0.54783946", "0.54702765", "0.545663", "0.54449654", "0.5421809", "0.5419131", "0.5410585", "0.54091024", "0.5408474", "0.5407028", "0.5396333", "0.5374046", "0.5350488", "0.5342203", "0.53320545", "0.5322444", "0.5286995", "0.5282707", "0.52742994", "0.52720404", "0.5261777", "0.52537715", "0.5246982", "0.5243389", "0.51484036", "0.513091", "0.512759", "0.51172405", "0.511271", "0.51071084", "0.510136", "0.50920975", "0.50893116", "0.50709707", "0.50706655", "0.50675565", "0.5067301", "0.506679", "0.50545186", "0.50482625", "0.5038798", "0.5038798", "0.50347596", "0.5033325", "0.50295985", "0.50257194", "0.5025625", "0.5020124", "0.5016507", "0.50163144", "0.49951452", "0.49885458", "0.49877706", "0.4981842", "0.49774033", "0.4976545", "0.49734533", "0.4963873", "0.4962446", "0.49600452", "0.4959916", "0.49591547", "0.4958859", "0.4954785", "0.49468362", "0.49463844", "0.49408734", "0.4928774", "0.49254417", "0.4921379", "0.4921379", "0.4919167", "0.49179778", "0.49145332", "0.49104843", "0.4910117", "0.4910038", "0.4907913", "0.49055958", "0.49045068", "0.49013534", "0.4901247", "0.4899505", "0.489894", "0.48985296", "0.48977825", "0.48957506", "0.4895006" ]
0.7475738
1
Returns a Vector, representing the Direction from the given Point to the source of light.
public abstract Vector3 directionFrom(Point3 point);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vector getDirection(){\n\t\treturn new Vector(_direction);\n\t}", "@Override\n public Vector getL(Point3D point) {\n // the L vector is same as the point light L vector\n return super.getL(point);\n }", "public float getDirection();", "default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }", "public static Direction direction(Point p1, Point p2, Point p3)\n {\n Direction result = Direction.COLLINEAR;\n double cp = crossProduct(p2, p3, p1);\n if (cp < 0.0) {\n result = Direction.RIGHT;\n } else if (cp > 0.0) {\n result = Direction.LEFT;\n }\n return result;\n }", "public static Point2D directionToVector(double directionInDegrees, double length) {\n double directionInRadians = directionInDegrees / 180 * Math.PI;\n Point2D heading = new Point2D(length * Math.sin(directionInRadians), - length * Math.cos(directionInRadians));\n return heading;\n }", "@Generated\n @Selector(\"direction\")\n @ByValue\n public native CGVector direction();", "public double[] vectorTo(double[] pt){\n double[] vecToLight = new double[3];\n vecToLight[0] = pos[0] - pt[0];\n vecToLight[1] = pos[1] - pt[1];\n vecToLight[2] = pos[2] - pt[2];\n return vecToLight;\n }", "double direction (IPoint other);", "public Vector2Dd formVector(Point2Dd pt) {\r\n return (new Vector2Dd(x-pt.x, y-pt.y));\r\n }", "public Direction getDirection(float x1, float y1, float x2, float y2){\n double angle = getAngle(x1, y1, x2, y2);\n return Direction.fromAngle(angle);\n }", "public Ray(Point3D point, Vector lightDirection, Vector n, double DELTA) {\n /**\n * if n.dotProduct(lightDirection) it`s positive (bigger then zero)\n * then add DELTA , else minus DELTA\n */\n Vector delta = n.scale(n.dotProduct(lightDirection) > 0 ? DELTA : - DELTA);\n _p0 = point.add(delta);\n _dir= lightDirection.normalized();\n }", "public double direction(){\n return Math.atan2(this.y, this.x);\n }", "public Vector3f getDirection() {\r\n\t\treturn new Vector3f(mDirection);\r\n\t}", "public Vector3d getDirection() { return mDirection; }", "public Vector getLocation();", "godot.wire.Wire.Vector2 getOrigin();", "static PointDouble reflectionPoint(Line l, PointDouble p) {\n PointDouble b = projection(l, p); // get projection b, of p onto l\n Vec v = vector(p, b); // create a vector v = vector(pb)\n return translate(translate(p, v), v); // return p translated twice by v\n }", "public double getDirectionView();", "public void getDirection (float xDir, float yDir){\n this.xDir = xDir;\n this.yDir = yDir;\n }", "public Vec4 expectDirection() {\n if(isPoint()) throw new IllegalArgumentException(\"expected direction: \" + this);\n return this;\n }", "private DirectionTestResult getDirection() throws SimplexException {\r\n switch(pointCount) {\r\n case 1:\r\n return new DirectionTestResult(a.negate(new Vector2f()));\r\n case 2:\r\n Vector2f ab = b.sub(a);\r\n Vector2f perpAB = new Vector2f(-ab.y,ab.x);\r\n \r\n // check the perpendicular points opposite to vector A\r\n // i.e. towards the origin\r\n // if not, return the negated perpendicular and swap\r\n // points A and B to maintain clockwise rotation.\r\n if (perpAB.dot(a) < 0) {\r\n return new DirectionTestResult(perpAB);\r\n } else {\r\n Vector2f t = a;\r\n a = b;\r\n b = t;\r\n return new DirectionTestResult(perpAB.negate());\r\n }\r\n case 3:\r\n // first check line AC just like case 2\r\n Vector2f ac = c.sub(a);\r\n Vector2f perpAC = new Vector2f(-ac.y,ac.x);\r\n \r\n if (perpAC.dot(a) < 0) {\r\n b = c;\r\n c = null;\r\n pointCount = 2;\r\n return new DirectionTestResult(perpAC);\r\n }\r\n \r\n // now check line CB just like case 2\r\n Vector2f cb = b.sub(c);\r\n Vector2f perpCB = new Vector2f(-cb.y, cb.x);\r\n \r\n if (perpCB.dot(c) < 0) {\r\n a = c;\r\n c = null;\r\n pointCount = 2;\r\n return new DirectionTestResult(perpCB);\r\n }\r\n \r\n // if both checks failed the origin must be inside the\r\n // simplex which means there is a collision so return\r\n // a true directionTestResult\r\n \r\n return new DirectionTestResult();\r\n default:\r\n throw new SimplexException(\"pointCount outside acceptable range\");\r\n }\r\n }", "@Override\n public Vector getFacingVector() {\n double[] rotation = {Math.cos(this.rot), Math.sin(this.rot)};\n Vector v = new Vector(rotation);\n v = VectorUtil.direction(v);\n Vector w = VectorUtil.direction(this.getR());\n v.plus(w);\n return v;\n }", "public Vector3D getTrackingDirection(Point3D point, int pdIndex, boolean direction) {\n\n\tint i = (int)( (point.x / xVoxelDim) );\n\tint j = (int)( (point.y / yVoxelDim) );\n\tint k = (int)( (point.z / zVoxelDim) );\n\n\tVector3D[] pds = image.getPDs(i,j,k);\n\n\tif (direction) {\n\t return getTrackingDirection(point, pds[pdIndex]);\n\t}\n\telse {\n\t return getTrackingDirection(point, pds[pdIndex].negated());\n\t}\n\n }", "public double angleTo(Point point){\n \treturn facingVector.angleDegrees(vectorTo(point));\n }", "public Vector2 getLinearVelocityFromLocalPoint (Vector2 localPoint) {\n\t\ttmp.set(localPoint.x, localPoint.y);\n\t\tVec2 lv = body.getLinearVelocityFromLocalPoint(tmp);\n\t\treturn linVelLoc.set(lv.x, lv.y);\n\t}", "public ForgeDirection toForgeDirection()\n {\n for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)\n {\n if (this.x == direction.offsetX && this.y == direction.offsetY && this.z == direction.offsetZ)\n {\n return direction;\n }\n }\n\n return ForgeDirection.UNKNOWN;\n }", "public int[] direction(Node from, Node to) {\n int dx = to.getX() - from.getX();\n int dy = to.getY() - from.getY();\n int[] direction = {0, 0};\n \n if (dx != 0) {\n direction[0] = dx/Math.abs(dx);\n }\n \n if (dy != 0) {\n direction[1] = dy/Math.abs(dy);\n }\n \n return direction;\n }", "public static Direction getDirection(Point start, Point end)\n \t{\n \t\tif( start.x - end.x > 0) //left\n \t\t{\n \t\t\tif (start.y - end.y < 0) //up\n \t\t\t\treturn Board.Direction.topleft;\n \t\t\telse if (start.y - end.y > 0) //down\n \t\t\t\treturn Board.Direction.botleft;\n \t\t\telse //same .y\n \t\t\t\treturn Board.Direction.left;\n \t\t}\n \t\telse if ( start.x - end.x < 0) //right\n \t\t{\n \t\t\tif (start.y - end.y < 0) //up\n \t\t\t\treturn Board.Direction.topright;\n \t\t\telse if (start.y - end.y > 0) //down\n \t\t\t\treturn Board.Direction.botright;\n \t\t\telse //same .y\n \t\t\t\treturn Board.Direction.right;\n \t\t}\n \t\telse // no x movement (only up or down)\n \t\t{\n \t\t\tif(start.y - end.y < 0)\n \t\t\t\treturn Board.Direction.up;\n \t\t\tif(start.y - end.y > 0)\n \t\t\t\treturn Board.Direction.down;\n \t\t\telse\n \t\t\t\treturn Board.Direction.none; //no movement\n \t\t}\n \t}", "public float distFrom(Point3D point) {\n\n Vector3D diff = point.subtract(pos);\n\n return diff.dot(norm);\n }", "godot.wire.Wire.Vector3 getOrigin();", "int getDirection();", "public Vector getL(Point3D p){\n if (p.equals(_position)) {\n return null;\n }\n return p.subtract(_position).normalize();\n }", "public final Shape getTranslated(Vector fromPoint, Vector toPoint) {\n\t\treturn getCopy().translate(fromPoint, toPoint);\n\t}", "public Direction directionVers(Lutin lutin) {\n return coord.directionsVers(lutin.coord).get(0);\n\n }", "public Velocity changeDirection(double x, double y) {\n if (Double.isNaN(x) || x == 0) {\n x = 1;\n }\n if (Double.isNaN(y) || y == 0) {\n y = 1;\n }\n return new Velocity(this.dx * Math.signum(x), this.dy * Math.signum(y));\n }", "void vectorFromWorld(double px, double py, double pz, DVector3 result);", "void getPosRelPoint(double px, double py, double pz, DVector3 result);", "public void pointToXY(int x, int y) {\n PVector targetVector;\n targetVector = new PVector(x, y);\n direction = (p.degrees(p.atan2(pos.x - (targetVector.x), pos.y - (targetVector.y))))+90;\n if (direction < 0) direction += 360;\n }", "public Vector3fc dir(float x, float y, Vector3f dir) {\n float y1x = nxnyX + (nxpyX - nxnyX) * y;\n float y1y = nxnyY + (nxpyY - nxnyY) * y;\n float y1z = nxnyZ + (nxpyZ - nxnyZ) * y;\n float y2x = pxnyX + (pxpyX - pxnyX) * y;\n float y2y = pxnyY + (pxpyY - pxnyY) * y;\n float y2z = pxnyZ + (pxpyZ - pxnyZ) * y;\n float dx = y1x + (y2x - y1x) * x;\n float dy = y1y + (y2y - y1y) * x;\n float dz = y1z + (y2z - y1z) * x;\n // normalize the vector\n float invLen = Math.invsqrt(dx * dx + dy * dy + dz * dz);\n dir.x = dx * invLen;\n dir.y = dy * invLen;\n dir.z = dz * invLen;\n return dir;\n }", "public double getDirectionMove();", "public double distanceL1(Vector2D p_o)\n {\n return Math.abs(this.x - p_o.x) + Math.abs(this.y - p_o.y);\n }", "public Vector3f getPoint(float t) {\r\n\t\tVector3f point = new Vector3f();\r\n\t\tpoint.scaleAdd(t, mDirection, mOrigin);\r\n\t\treturn point;\r\n\t}", "void turnToPoint(float x, float y) {\n _rotVector.set(x - _x, y - _y, 0);\n _rotVector.setMag(1);\n }", "public static Vector2D fromLine(Point2D start, Point2D end) {\n \n double dx = end.getX() - start.getX();\n double dy = end.getY() - start.getY();\n return new Vector2D(dx,dy);\n \n }", "public int getDirection();", "private Vector3f calculateVectorDirectionBetweenEyeAndCenter() {\n\t\tVector3f br = new Vector3f();\n\n\t\tbr.x = player.getPosition().x - camera.getPosition().x;\n\t\tbr.y = player.getPosition().y - camera.getPosition().y;\n\t\tbr.z = player.getPosition().z - camera.getPosition().z;\n\n\t\treturn br;\n\t}", "private Point extractVectorFromAngle(int arg) {\n double theta = Math.toRadians( 2* (double)arg );\n double dx = Cell.move_dist * Math.cos(theta);\n double dy = Cell.move_dist * Math.sin(theta);\n return new Point(dx, dy);\n }", "public Vector2 getLinearVelocityFromWorldPoint (Vector2 worldPoint) {\n\t\ttmp.set(worldPoint.x, worldPoint.y);\n\t\tVec2 lv = body.getLinearVelocityFromWorldPoint(tmp);\n\t\treturn linVelWorld.set(lv.x, lv.y);\n\t}", "private Direction determineDirection(Point p1, Point p2) {\n\t\tif (p1.y == p2.y) {\n\t\t\tif (p1.x < p2.x) {\n\t\t\t\treturn Direction.RIGHT;\n\t\t\t} else {\n\t\t\t\treturn Direction.LEFT;\n\t\t\t}\n\t\t} else {\n\t\t\tif (p1.y < p2.y) {\n\t\t\t\treturn Direction.DOWN;\n\t\t\t} else {\n\t\t\t\treturn Direction.UP;\n\t\t\t}\n\t\t}\n\t}", "private Ray constructReflectedRay(Vector n, Point3D p, Ray l) { // hish\r\n\t\tVector _n = n;// normal at point\r\n\t\tVector _v = l.get_dir(); // direction of vector camera ->geometry\r\n\t\tdouble vn = _v.dotProduct(_n);\r\n\t\tif (vn == 0)\r\n\t\t\treturn null;\r\n\r\n\t\tVector _r = _v.add(_n.scale(-2 * vn));\r\n\t\treturn new Ray(p, _r, _n);\r\n\t}", "public Point2d getNearestPointOnLine(final Point2d p){\n\n Vector2d orth = MathUtil.getOrthogonalDirection(direction);\n Line other = new Line (p, orth);\n\n Point2d cut = this.cut(other);\n\n if( cut == null){\n System.out.println(\"Line.getNearestPointOnLine failed!!\");\n System.out.println(\"big fail: line is\" + this.point + \"lambda*\" + this.direction + \"; point is: \"+p);\n }\n\n return cut;\n }", "String getDirection();", "public final Shape translate(Vector fromPoint, Vector toPoint) {\n\t\treturn transform(new Translation(fromPoint, toPoint));\n\t}", "private void calculateDirection(){\n\t\tif(waypoints.size() > 0){\n\t\t\tif(getDistanceToWaypoint() <= getSpeed()){\n\t\t\t\tsetPosition(new Vector2(waypoints.remove(0)));\n\t\t\t\tsetCurrentWaypoint(getCurrentWaypoint() + 1);\n\t\t\t}else{\t\t\n\t\t\t\tVector2 target = new Vector2(waypoints.get(0));\n\t\t\t\tVector2 newDirection = new Vector2(target.sub(getPosition())); \n\t\t\t\tsetDirection(newDirection);\n\t\t\t}\n\t\t}else{\n\t\t\tsetDirection(new Vector2(0, 0));\n\t\t}\n\t}", "public final Vector3f getDirection() {\r\n return direction;\r\n }", "public Vector3f getLightPosition();", "public Vector2f getVelocityAtPoint(final Vector2f point);", "public double getDistance(OurPoint p) {\n\t\treturn Math.sqrt(Math.pow(getY() - p.getX(), 2)\n\t\t\t\t+ Math.pow(getY() - p.getY(), 2));\n\t}", "static PointDouble translate(PointDouble p, Vec v) {\n return new PointDouble(p.x + v.x , p.y + v.y);\n }", "public float getDirection()\r\n {\r\n return direction;\r\n }", "public static Point2D.Double project(Point2D.Double sourceLocation, double angle, double length) {\n return new Point2D.Double(sourceLocation.x + Math.sin(angle) * length,\n sourceLocation.y + Math.cos(angle) * length);\n }", "public static float PointDistanceToLine(final Point point, final Point lineStart, final Point lineEnd) {\n Vector rotated = VectorTurnedLeft(Vector(lineStart, lineEnd).normal());\n Vector base = Vector(point, lineStart);\n return abs(dotProduct(base, rotated));\n }", "public static Vec2 reflect(double x, double y, double reflectPointx, double reflectPointy){\n return new Vec2((float) (reflectPointx - x), (float) (reflectPointy - y));\n }", "public Vector getRotationVector(Location l, Block main, TurnDirection dir) {\n\t\tLocation n = l.clone().subtract(main.getLocation());\n\t\tint dz = n.getBlockX();\n\t\tint dx = n.getBlockZ();\n\t\t\n\t\tif (dir == TurnDirection.RIGHT)\n\t\t\tdx *= -1;\n\t\telse\n\t\t\tdz *= -1;\n\t\t\n\t\treturn new Vector(dx, n.getBlockY(), dz);\n\t}", "public static Point OnALine( Point first, Point second, Double distanceFromFirst ) {\n Double vectorX = second.x() - first.x();\n Double vectorY = second.y() - first.y();\n Double vectorZ = second.z() - first.z();\n\n // b. calculate the proportion of hypotenuse\n Double factor = distanceFromFirst /\n Math.sqrt( vectorX * vectorX + vectorY * vectorY + vectorZ * vectorZ );\n\n // c. factor the lengths\n vectorX *= factor;\n vectorY *= factor;\n vectorZ *= factor;\n\n // d. calculate and Draw the new vector,\n return new Point( first.x() + vectorX, first.y() + vectorY, first.z() + vectorZ );\n }", "public Vector vecBetween (Planet other) {\n return new Vector( this.xCoor - other.xCoor, this.yCoor - other.yCoor);\n }", "private int dir(Point p1, Point p2) {\n final int dy = p2.y - p1.y;\n switch (p2.x - p1.x) {\n case -1: {\n switch (dy) {\n case -1:\n return 7;\n case 0:\n return 6;\n default:\n return 5;\n }\n }\n case 0: {\n switch (dy) {\n case -1:\n return 0;\n case 0:\n return -1;\n default:\n return 4;\n }\n }\n default:\n switch (dy) {\n case -1:\n return 1;\n case 0:\n return 2;\n default:\n return 3;\n }\n }\n }", "@Override \n public Vector getLocation() {\n return this.getR();\n }", "public Vector2D toVector2D ( );", "public static int vectorAngle(Point p) {\n \treturn (Math.round((float)Math.toDegrees(Math.atan2(p.x, p.y))));\n\t}", "public Point2D translatePoint( Figure f, Point2D p, Point2D dir);", "public static Leg calculateLeg(Waypoint source, Waypoint destination, double pSpeed )\r\n {\r\n double beta = toRadians( 90-latitudeFromString(source.getLatitude()) );\r\n double alpha = toRadians( 90-latitudeFromString(destination.getLatitude()) );\r\n double gamma = toRadians( longitudeFromString(source.getLongitude()) - longitudeFromString(destination.getLongitude()));\r\n double c = acos(cos(alpha)*cos(beta)+sin(alpha)*sin(beta)*cos(gamma) );\r\n Double distance = toDegrees(c)*60;\r\n Double heading = toDegrees(2*PI -acos( (cos(alpha)- cos(beta)*cos(c)) / (sin(beta)*sin(c))));\r\n \r\n return new Leg(source.getName(), destination.getName(), distance, heading, distance/pSpeed); //TODO: Division by zero abfangen\r\n }", "private PointD getNearestPointOnLine(Vector v, PointD p)\r\n\t{\r\n\t\t//for line of form ax + by + c = 0 and point (x0, y0)\r\n\t\tdouble a = -1*v.getY();\r\n\t\tdouble b = v.getX();\r\n\t\tdouble c = v.getY()*v.getTail().getX() - v.getX()*v.getTail().getY();\r\n\r\n\t\tdouble x0 = p.getX();\r\n\t\tdouble y0 = p.getY();\r\n\t\t\r\n\t\t//nearest point on line is (x1,y1)\r\n\t\tdouble x1 = (b*(b*x0 - a*y0) - a*c )/(a*a + b*b);\r\n\t\tdouble y1 = (a*(-b*x0 + a*y0) - b*c )/(a*a + b*b);\r\n\t\t\r\n\t\treturn new PointD(x1,y1);\r\n\t}", "public Vector2 getLocalPoint (Vector2 worldPoint) {\n\t\ttmp.set(worldPoint.x, worldPoint.y);\n\t\tVec2 lp = body.getLocalPoint(tmp);\n\t\treturn localPoint2.set(lp.x, lp.y);\n\t}", "private Vec3 getLightPosition() {\r\n\t\tdouble elapsedTime = getSeconds() - startTime;\r\n\t\tfloat x = 5.0f * (float) (Math.sin(Math.toRadians(elapsedTime * 50)));\r\n\t\tfloat y = 2.7f;\r\n\t\tfloat z = 5.0f * (float) (Math.cos(Math.toRadians(elapsedTime * 50)));\r\n\t\treturn new Vec3(x, y, z);\r\n\r\n\t\t//return new Vec3(5f,3.4f,5f); // use to set in a specific position for testing\r\n\t}", "public Vector2 getWorldPoint (Vector2 localPoint) {\n\t\ttmp.set(localPoint.x, localPoint.y);\n\t\tVec2 wp = body.getWorldPoint(tmp);\n\t\treturn worldPoint.set(wp.x, wp.y);\n\t}", "public float signedDistance(Vector2f point) {\r\n if (normal == null) {\r\n computeNormal();\r\n }\r\n\r\n return point.subtract(pointA).dot(normal); //.x*m_Normal.x + TestVector.y*m_Normal.y;//DotProduct(TestVector,m_Normal);\r\n }", "public static native int getDirection(int pin) throws RuntimeException;", "public Position2D get2DPoint(Position3D point3D) {\r\n\t\tif(this.onPlane(point3D)) {\r\n\t\t\t\r\n\t\t\tVector3D dirOfPoint = this.pos.getDirection(point3D);\r\n\t\t\tVector3D xDir = this.vecX.proj(dirOfPoint);\r\n\t\t\tVector3D yDir = this.vecY.proj(dirOfPoint);\r\n\t\t\t\r\n\t\t\tPosition2D point2D = new Position2D();\r\n\t\t\t\r\n\t\t\tif (xDir.dot(this.vecX) > 0) {\r\n\t\t\t\tpoint2D.setX(xDir.getLength());\r\n\t\t\t} else {\r\n\t\t\t\tpoint2D.setX(-xDir.getLength());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (yDir.dot(this.vecY) > 0) {\r\n\t\t\t\tpoint2D.setY(yDir.getLength());\r\n\t\t\t} else {\r\n\t\t\t\tpoint2D.setY(-yDir.getLength());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn point2D;\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public Vector minus(Point point){\n\t\tdouble xSubtracted = this.getX()-point.getX();\n\t\tdouble ySubtracted = this.getY()-point.getY();\n\t\treturn new Vector (xSubtracted, ySubtracted);\n\t}", "public Point getPoint(Point start, Direction d)\n \t{\n \t\tPoint end = new Point();\n \t\tswitch(d)\n \t\t{\n \t\tcase up:\n \t\t\tend.y = start.y + 1; //up\n \t\t\tend.x = start.x; //none\n \t\t\tbreak;\n \t\tcase down:\n \t\t\tend.y = start.y - 1; //down\n \t\t\tend.x = start.x; //none\n \t\t\tbreak;\n \t\tcase left:\n \t\t\tend.y = start.y; //none\n \t\t\tend.x = start.x - 1; //left\n \t\t\tbreak;\n \t\tcase right:\n \t\t\tend.y = start.y; //none\n \t\t\tend.x = start.x + 1; //right\n \t\t\tbreak;\n \t\tcase topleft:\n \t\t\tend.y = start.y + 1; //up\n \t\t\tend.x = start.x - 1; //left\n \t\t\tbreak;\n \t\tcase botleft:\n \t\t\tend.y = start.y - 1; //down\n \t\t\tend.x = start.x - 1; //left\n \t\t\tbreak;\n \t\tcase topright:\n \t\t\tend.y = start.y + 1; //up\n \t\t\tend.x = start.x + 1; //right\n \t\t\tbreak;\n \t\tcase botright:\n \t\t\tend.y = start.y - 1; //down\n \t\t\tend.x = start.x + 1; //right\n \t\t\tbreak;\n \t\tcase none:\n \t\t\tend.y = start.y; //none\n \t\t\tend.x = start.x; //none\n \t\t}\n \t\t//might want to check if the point contains negative values\n \t\treturn end;\n \t}", "private Vector3f getPlaneNormal(Vector3f directionVector) {\n\t\tVector3f up = new Vector3f(0, 0, 1);\n\t\tif (directionVector.z == 1 || directionVector.z == -1)\n\t\t\tup.set(0, 1, 0);\n\n\t\tfloat dirX = directionVector.x;\n\t\tfloat dirY = directionVector.y;\n\t\tfloat dirZ = directionVector.z;\n\t\tfloat upX = up.x;\n\t\tfloat upY = up.y;\n\t\tfloat upZ = up.z;\n\n\t\t// right = direction x up\n\t\tfloat rightX, rightY, rightZ;\n\t\trightX = dirY * upZ - dirZ * upY;\n\t\trightY = dirZ * upX - dirX * upZ;\n\t\trightZ = dirX * upY - dirY * upX;\n\t\t// normalize right\n\t\tfloat invRightLength = 1.0f / (float) Math.sqrt(rightX * rightX + rightY * rightY + rightZ * rightZ);\n\t\trightX *= invRightLength;\n\t\trightY *= invRightLength;\n\t\trightZ *= invRightLength;\n\n\t\treturn new Vector3f(rightX, rightY, rightZ);\n\t}", "@Override\n public Vector3 getLocalSupportPointWithMargin(Vector3 direction, Vector3 supportPoint) {\n\n // Compute the support point without the margin\n getLocalSupportPointWithoutMargin(direction, supportPoint);\n\n // Add the margin to the support point\n Vector3 unitDirection = new Vector3(0.0f, -1.0f, 0.0f);\n if (direction.lengthSquare() >= Defaults.MACHINE_EPSILON * Defaults.MACHINE_EPSILON) {\n unitDirection.set(direction).normalize();\n }\n\n return supportPoint.add(unitDirection.multiply(margin));\n }", "protected Vector2 getTargetDir(Vector2 spawnPoint, Vector2 targetPos)\n\t\t{\n\t\tfloat angleToTarget = MathUtils.atan2(targetPos.y - spawnPoint.y,\n\t\t\t\t\t\t\t\t\t\t\t targetPos.x - spawnPoint.x);\n\t\treturn ( new Vector2(MathUtils.cos(angleToTarget),\n\t\t\t\t\t\t\t MathUtils.sin(angleToTarget)) );\n\t\t}", "private Loc nextPoint(Loc l, String direction) {\n\t\tif (direction.equals(\"down\")) {\n\t\t\t// Is at bottom?\n\t\t\t// System.out.println(\"p.getx= \" + l.row);\n\t\t\tif (l.row >= matrixHeight - 1) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row + 1, l.col);\n\t\t} else if (direction.equals(\"left\")) {\n\t\t\tif (l.col <= 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row, l.col - 1);\n\t\t} else { // right\n\t\t\tif (l.col >= matrixWidth - 1) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Loc(l.row, l.col + 1);\n\t\t}\n\t}", "Direction(int offsetLatitude, int offsetLongitude) {\n this(offsetLatitude, offsetLongitude, null);\n }", "public Vector2 toVector2()\n {\n return new Vector2(this.x, this.z);\n }", "Vector getPos();", "public abstract Vector3D getPointForSurfaceCoordinates(double u, double v);", "public abstract Vec2 doorPosition();", "public double getDirectionFace();", "private Double distanceToLine(Vector v, PointD p)\r\n\t{\r\n\t\tPointD nearestPoint = getNearestPointOnLine(v,p);\t\t\r\n\t\t\r\n\t\tdouble x1 = nearestPoint.getX();\r\n\t\tdouble y1 = nearestPoint.getY();\r\n\t\t\r\n\t\tdouble t;\r\n\t\tif(v.getX()>v.getY())//if one component is close to zero, use other one\r\n\t\t\tt = (x1 - v.getTail().getX()) / v.getX();\r\n\t\telse\r\n\t\t\tt = (y1 - v.getTail().getY()) / v.getY();\r\n\t\t\r\n\t\tif(t < 0 || t > 1)//then calculated point is not in line segment\r\n\t\t\treturn null;\r\n\t\t\r\n\t\treturn Math.sqrt((p.getX() - x1)*(p.getX() - x1) + (p.getY() - y1)*(p.getY() - y1));\r\n\t}", "public double distanceToPoint(FieldPoint fieldPoint) {\n double xDifference = Math.abs(getX() + fieldPoint.getX());\n double yDifference = Math.abs(getY() + fieldPoint.getY());\n\n return Math.sqrt(Math.pow(xDifference, 2) + Math.pow(yDifference, 2));\n }", "private static Point2D getUnitVector(Point2D p1, Point2D p2) {\r\n\t\tPoint2D paux = new Point2D.Double(p2.getX() - p1.getX(),\r\n\t\t\t\tp2.getY() - p1.getY());\r\n\t\tdouble v = Math.sqrt(Math.pow(paux.getX(), 2d) +\r\n\t\t\t\tMath.pow(paux.getY(), 2d));\r\n\t\tpaux = new Point2D.Double(paux.getX() / v, paux.getY() / v);\r\n\r\n\t\treturn paux;\r\n\t}", "public DirectionResponse direction(DirectionRequest request) {\n InternalRequest internalRequest = createRequest(request, HttpMethodName.POST, DIRECTION_URL_PATH);\n log.info(\"direction request: {}\", JsonUtils.toJsonString(internalRequest));\n return this.invokeHttpClient(internalRequest, DirectionResponse.class);\n }", "public Point2D getLocation();", "@Override\n public Vector3 getLocalSupportPointWithoutMargin(Vector3 direction, Vector3 supportPoint) {\n\n Vector3 v = direction;\n float sinThetaTimesLengthV = sinTheta * v.length();\n\n if (v.getY() > sinThetaTimesLengthV) {\n supportPoint.set(0.0f, halfHeight, 0.0f);\n } else {\n float projectedLength = Mathematics.Sqrt(v.getX() * v.getX() + v.getZ() * v.getZ());\n if (projectedLength > Defaults.MACHINE_EPSILON) {\n float d = radius / projectedLength;\n supportPoint.set(v.getX() * d, -halfHeight, v.getZ() * d);\n } else {\n supportPoint.set(0.0f, -halfHeight, 0.0f);\n }\n }\n\n return supportPoint;\n }", "private double closestDistanceFromPointToEndlessLine(Vector point, Vector startSegment, Vector endSegment) {\n\t\t// Generate a line out of two points.\n\t\tRay3D gerade = geradeAusPunkten(startSegment, endSegment);\n\t\tVector direction = gerade.getDirection();\n\t\tdouble directionNorm = direction.getNorm();\n\t\t// d(PunktA, (line[B, directionU]) = (B-A) cross directionU durch norm u\n\t\tVector b = gerade.getPoint();\n\t\tVector ba = b.subtract(point);\n\t\tdouble factor = 1.0 / directionNorm; // Geteilt durch geraden länge\n\t\tVector distance = ba.cross(direction).multiply(factor);\n\t\tdouble distanceToGerade = distance.getNorm();\n\t\treturn distanceToGerade;\n\t}", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}" ]
[ "0.6367671", "0.5922243", "0.5903874", "0.58529735", "0.58434033", "0.58333975", "0.5816163", "0.57988125", "0.57678866", "0.57355356", "0.57325846", "0.5704712", "0.56440866", "0.5639096", "0.56195676", "0.5598586", "0.5544156", "0.55363876", "0.5536146", "0.55251706", "0.55179906", "0.55078065", "0.55019265", "0.5496416", "0.54856235", "0.54740655", "0.54589736", "0.5455422", "0.53932065", "0.538357", "0.5366529", "0.5348196", "0.53470963", "0.53228045", "0.5320057", "0.53144276", "0.53046465", "0.5295061", "0.52821344", "0.5270086", "0.52541524", "0.5253209", "0.52287817", "0.52201635", "0.5219504", "0.52154344", "0.5206155", "0.52043605", "0.51830834", "0.51812494", "0.51678205", "0.5161948", "0.51588047", "0.51570654", "0.5155317", "0.51473385", "0.513816", "0.51351845", "0.51085824", "0.50977623", "0.50954705", "0.5088437", "0.50799966", "0.507925", "0.5071677", "0.50651157", "0.50633377", "0.50606465", "0.5059828", "0.5051641", "0.50425106", "0.5038493", "0.5033373", "0.5029277", "0.5022673", "0.501611", "0.5015789", "0.50143063", "0.5013868", "0.50057626", "0.5005624", "0.5002567", "0.49985358", "0.49960473", "0.49957064", "0.49923083", "0.49921125", "0.49843565", "0.49825642", "0.4964054", "0.49600208", "0.49563092", "0.49553034", "0.49444312", "0.49414572", "0.49390155", "0.49368733", "0.49325624", "0.4931923", "0.49288854" ]
0.69833684
0
String dname, String nickName, Integer level, String symptom, String cure
@Override public List<Disease> findDiseaseByInfo(Disease diseaseInfo) { List<Disease> list = diseaseRepository.findByInfo(diseaseInfo.getDname(),diseaseInfo.getNickName(), diseaseInfo.getLevel(),diseaseInfo.getSymptom(),diseaseInfo.getCure()); return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Unit(String name, int calories, String side) {\n super(name);\n this.side = side;\n setStrength(calories);\n setTagged(false);\n bandanas = 1;\n // profile = new Profile();\n setInJail(false);\n column = -1;\n row = -1;\n challenges = 0;\n challengesWon = 0;\n rewards = new ArrayList<Reward>();\n }", "@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}", "public School (){\n name = \"Unknown\";\n address = \"Unknown\";\n level = \"Unknown\";\n info = \"Name: \"+name+\"\\tAddress: \"+address+\"\\tLevel: \"+level;\n }", "public void crystal_description(identified_crystal arg1) {\n\t\tSystem.out.print(arg1.display_keywords(arg1.t2keywords) + arg1.display_keywords(arg1.keywords));\n\t\tSystem.out.print(\"T\" + arg1.crystalTier + \" \" + arg1.crystalType);\n\t\tSystem.out.print(\"(\" + arg1.rating + \")\");\n\t\tSystem.out.println(\" \" + arg1.crystalPercent + \"%\");\n\t\t\n\t}", "public static void Levelinsert (int id,String FQN,String name, String container,int number,String table )\n\t { \n\t \n\t \ttry \n\t { \n\t Statement stmt=null; \n\t ResultSet res=null; \n\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t stmt = (Statement)conn.createStatement(); \n\t res= stmt.executeQuery(\"SELECT * from level \"); \n\n\n\t // 增加数据\n\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t String sql = \"select * from level\";\n\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t \n\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,number) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+number+\"'\"+\")\"); // 增加数据 \n\t if (n > 0) {\n//\t JOptionPane.showMessageDialog(null, \"成功\");\n\t \n\t \n\t } else {\n//\t JOptionPane.showMessageDialog(null, \"失败\");\n\t }\n\t //增加数据结束\n\n\t while (res.next()) \n\t { \n\n\t } \n\t } \n\t \n\t catch(Exception ex) \n\t { \n\t ex.printStackTrace(); \n\t } \n\t}", "public void setSchool (String name, String address, String level){\n this.name = name;\n this.address = address;\n this.level = level;\n this.info = \"Name: \"+name+\"\\tAddress: \"+address+\"\\tLevel: \"+level;\n }", "private void greenord(String m) {\n\n\t\tSystem.out.println(\"Course name is\"+m);\n\t}", "Sorcerer (String cName){\n name = cName;\n hp = 20;\n mana = 100; \n strength = 2;\n vitality = 4;\n energy = 10;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"学号\" + sid + \"名字\" + sname + \"性别\" + sex;\n\t}", "@Override\n\tpublic void mostrarinfo(String nombreclase) {\n\t\tsuper.mostrarinfo(nombreclase);\n\t\tSystem.out.println(\"Corte : \" + corte);\n\t\tSystem.out.println(\"Sexo :\" + sexo);\n\t}", "public Contestant(String n, String c){\n\t\tname = n;\n \tcountry = c;\n\t\tage = 18;\n\t\ttalents = new String[3];\n\t}", "public String toString() {\n\t\treturn super.toString() + \"\\nLevel: \" + getTitle(level) + edu.toString();\n\t}", "@Override\n public String toString() {\n String sexString = \"\";\n\n if (this.sex == \"M\") { //The class can always access it's own variables\n sexString = \"He\";\n } else if (this.sex == \"F\") {\n sexString = \"She\";\n }\n\n return \"It's \" + this.name + \" a \" + this.className + \" . \" +\n sexString + \" has \" + this.health + \" hitpoints left.\";\n }", "public void addDoubt(String dquest,String uid,String cid) throws SQLException {\n\t// TODO Auto-generated method stub\n\t\n\t\tString sql = \"INSERT INTO doubts(DQUEST,UID,CID) VALUES(?,?,?);\";\n\t\t\n\t\tpreparedStatement = conn\n\t\t .prepareStatement(sql);\n\t\t\n\t\tpreparedStatement.setString(1, dquest);\n\t\tpreparedStatement.setString(2, uid);\n\t\tpreparedStatement.setString(3, cid);\n\t\t\n\t\t\n\t\tpreparedStatement.executeUpdate();\n\t\tSystem.out.println(\"doubt Added!\");\n\t}", "public Technician(String name,int number,int lvl, String Dept)\r\n {\r\n super(name,number);\r\n level = lvl;\r\n Department = Dept;\r\n }", "public String showInfoMedi(){\n\t\tString msg = \"\";\n\n\t\tmsg += \"NOMBRE DE LA MEDICINA: \"+name+\"\\n\";\n\t\tmsg += \"LA DOSIS: \"+dose+\"\\n\";\n\t\tmsg += \"COSTO POR DOSIS: \"+doseCost+\"\\n\";\n\t\tmsg += \"FRECUENCIA QUE ESTA DEBE SER APLICADA: \"+frecuency+\"\\n\";\n\n\t\treturn msg;\n\t}", "String getLevelName();", "String getLevelName();", "String getLevelName();", "String levelName();", "@Override\n\tpublic String toString() {\n\t\treturn \"Name : \" + getName() + \", level : \" + level + \", Dni : \" + getDni()\n\t\t + \", Age : \" + getAge() \n\t\t + super.toString()+\"\\n\";\n\t}", "protected UniqueInfo cpui() { return hpcpui(columnCampCode()); }", "public String dameDescripcion(){\n return \"Este empleado tiene un id = \"+getId()+\" con un sueldo de \"+getSueldo();\n }", "public String toString()\r\n {\r\n return super.toString() + \",\" + level + \", \" + Department + \"\\n\";\r\n }", "public void addDetails(String symptom, String diagnosis, String prescription) {\n if (symptom != null) {\n symptoms.add(symptom);\n }\n if (diagnosis != null) {\n diagnoses.add(diagnosis);\n }\n if (prescription != null) {\n prescriptions.add(prescription);\n }\n }", "public Patient(String iD, String givenName, String surName)\n {\n super(iD, givenName, surName); \n }", "public Druid(String name, double lifePoints, double attack) {\n super(name, lifePoints, attack);\n }", "private void populaSexoCat()\n {\n sexoCatDAO.insert(new SexoCat(\"Masculino\"));\n sexoCatDAO.insert(new SexoCat(\"Feminino\"));\n sexoCatDAO.insert(new SexoCat(\"Todos\"));\n }", "String getDoctorName();", "java.lang.String getDegreeName();", "public void university(){\n\t\tSystem.out.println(\"Name:\");\n\t\tString nameRegistered = reader.nextLine();\n\t\tSystem.out.println(\"Nit:\");\n\t\tString nit = reader.nextLine();\n\t\tSystem.out.println(\"Address:\");\n\t\tString address = reader.nextLine();\n\t\tSystem.out.println(\"Contact number:\");\n\t\tString contactNumber = reader.nextLine();\n\t\tSystem.out.println(\"Number of employees:\");\n\t\tint employees = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Value of the actives:\");\n\t\tdouble value = reader.nextDouble();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Legal representative:\");\n\t\tString legalRepresentative = reader.nextLine();\n\t\tSystem.out.println(\"Constitution date:\");\n\t\tSystem.out.println(\"Day:\");\n\t\tint day = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Month:\");\n\t\tint month = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Year:\");\n\t\tint year = reader.nextInt();\n\t\treader.nextLine();\n\t\tDate constitution = new Date(day, month, year);\n\t\tSystem.out.println(\"floors of the building\");\n\t\tint rows = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Type:\");\n\t\tString type = reader.nextLine();\n\t\tSystem.out.println(\"Registry:\");\n\t\tString registry = reader.nextLine();\n\t\tSystem.out.println(\"Number of years accredited:\");\n\t\tint accreditedYears = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Rector name:\");\n\t\tString rectorName = reader.nextLine();\n\t\tSystem.out.println(\"Number of students in stratum 1 and 2:\");\n\t\tint studentsStratum = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Number of students:\");\n\t\tint students = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Position in the saberPro test:\");\n\t\tint nationalPositionPro = reader.nextInt();\n\t\treader.nextLine();\n\t\tUniversity toAdd = new University(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, registry, accreditedYears, rectorName, studentsStratum, students, nationalPositionPro);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }", "@Override\n public String toString() {\n return getAcideAmine()+\", \"+ getCodon() +\", \"+ getNucleotide1()+ \", \"\n + getNucleotide2() +\", \"+ getNucleotide3();\n }", "public Doctor(String name)\n {\n super(name, \"Dr\");\n }", "public void medicine(){\n\t\tSystem.out.println(\"Name:\");\n\t\tString nameRegistered = reader.nextLine();\n\t\tSystem.out.println(\"Nit:\");\n\t\tString nit = reader.nextLine();\n\t\tSystem.out.println(\"Address:\");\n\t\tString address = reader.nextLine();\n\t\tSystem.out.println(\"Contact number:\");\n\t\tString contactNumber = reader.nextLine();\n\t\tSystem.out.println(\"Number of employees:\");\n\t\tint employees = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Value of the actives:\");\n\t\tdouble value = reader.nextDouble();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Legal representative:\");\n\t\tString legalRepresentative = reader.nextLine();\n\t\tSystem.out.println(\"Constitution date:\");\n\t\tSystem.out.println(\"Day:\");\n\t\tint day = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Month:\");\n\t\tint month = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Year:\");\n\t\tint year = reader.nextInt();\n\t\treader.nextLine();\n\t\tDate constitution = new Date(day, month, year);\n\t\tSystem.out.println(\"floors of the building\");\n\t\tint rows = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Type:\");\n\t\tString type = reader.nextLine();\n\t\tSystem.out.println(\"Sanitary registration:\");\n\t\tString sanitaryRegistration = reader.nextLine();\n\t\tSystem.out.println(\"Status:\");\n\t\tSystem.out.println(\"1. valid\");\n\t\tSystem.out.println(\"2. not renewed\");\n\t\tint theStatus = reader.nextInt();\n\t\treader.nextLine();\n\t\tboolean status = false;\n\t\tif(theStatus == 1){\n\t\t\tstatus = true;\n\t\t}\n\t\tSystem.out.println(\"Modality:\");\n\t\tString modality = reader.nextLine();\n\t\tSystem.out.println(\"Expiration date:\");\n\t\tSystem.out.println(\"Day:\");\n\t\tint expirationDay = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Month:\");\n\t\tint expirationMonth = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Year:\");\n\t\tint expirationYear = reader.nextInt();\n\t\treader.nextLine();\n\t\tDate expiration = new Date(expirationDay, expirationMonth, expirationYear);\n\t\tMedicine toAdd = new Medicine(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, sanitaryRegistration, status, modality, expiration);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "public String toString(){\n return \"NAME: \"+this.name+\" ROLL: \"+this.roll+\" MALE: \"+this.male;\r\n }", "public CheeseConnoisseur(String name, double money, Cheese hold) {\n this.name = name;\n this.money = money;\n this.hold = hold;\n }", "protected String describeLevel(DCPlayer dCPlayer) {\n\t\tif (dCPlayer == null)\n\t\t\treturn \"Failed\"; // TODO add failure code\n\t\t\n\t\tString description = \"no skill description\";\n\t\t// Variables used in skill descriptions\n\t\tString initiator = Util.getCleanName(mInitator);\n\t\tString output = Util.getCleanName(mOutput);\n\t\t\n\t\tdouble effectAmount = getEffectAmount(dCPlayer);\n\t\tdouble elfAmount = getEffectAmount(mNormalLevel);\n\t\tboolean moreThanOne = (effectAmount > 1);\n\t\tString effectLevelColor = effectLevelColor(dCPlayer.getSkill(this).getLevel());\n\t\tString toolType = toolType();\n\t\t\n\t\tswitch(mType){\n\t\tcase BLOCKDROP:\n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Break a &2%s &6and %s%.2f &2%s&6 are created\",\n\t\t\t\t\tinitiator, effectLevelColor, effectAmount, output);\n\t\t\tbreak;\n\t\tcase MOBDROP:\n\t\t\tif (mID == 850 || mID == 851) {\n\t\t\t\tdescription = String.format(\n\t\t\t\t\t\t\"&6Zombies drop about %s%.2f &2%s\",\n\t\t\t\t\t\teffectLevelColor, effectAmount, output);break;\n\t\t\t}\n\t\t\tdescription = String\n\t\t\t.format(\"&6Enemies that drop &2%s &6leave about %s%.2f&6\",\n\t\t\t\t\toutput, effectLevelColor, effectAmount, output);break;\n\t\tcase SWORDDURABILITY: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Using &2%s &6removes about %s%.2f &6durability\",\n\t\t\t\t\ttoolType, effectLevelColor, effectAmount);break;\n\t\tcase PVPDAMAGE: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6You do %s%d&6%% &6of normal &2%s &6damage when fighting players\",\n\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100),toolType);break;\n\t\tcase PVEDAMAGE: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6You do %s%d&6%% &6of normal &2%s &6damage when fighting mobs\",\n\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100),toolType);break;\n\t\tcase EXPLOSIONDAMAGE: \n\t\t\tif (moreThanOne) {\n\t\t\t\tdescription = String.format(\n\t\t\t\t\t\t\"&6You take %s%d%% more &6damage from explosions\",\n\t\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100 - 100));break;\n\t\t\t} else {\n\t\t\t\tdescription = String.format(\n\t\t\t\t\t\t\"&6You take %s%d%% less &6damage from explosions\",\n\t\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100 - 100));break;\n\t\t\t}\n\t\tcase FIREDAMAGE:\n\t\t\tif (moreThanOne) {\n\t\t\t\tdescription = String.format(\n\t\t\t\t\t\t\"&6You take %s%d%% more &6damage from fire\",\n\t\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100 - 100));break;\n\t\t\t} else {\n\t\t\t\tdescription = String.format(\n\t\t\t\t\t\t\"&6You take %s%d%% less &6damage from fire\",\n\t\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100 - 100));break;\n\t\t\t}\n\t\tcase FALLDAMAGE: \n\t\t\tif (moreThanOne) {\n\t\t\t\tdescription = String.format(\n\t\t\t\t\t\t\"&6You take %s%d%% more &6damage from falling\",\n\t\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100 - 100));break;\n\t\t\t} else {\n\t\t\t\tdescription = String.format(\n\t\t\t\t\t\t\"&6You take %s%d%% less &6damage from falling\",\n\t\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100 - 100));break;\n\t\t\t}\n\t\tcase FALLTHRESHOLD: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Fall damage less than %s%d &6does not affect you.\",\n\t\t\t\t\teffectLevelColor,(int) effectAmount);break;\n\t\tcase PLOWDURABILITY: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Using &2%s &6removes about %s%.2f &6durability\",\n\t\t\t\t\ttoolType, effectLevelColor, effectAmount);break;\n\t\tcase TOOLDURABILITY: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Using &2%s &6removes about %s%.2f &6durability\",\n\t\t\t\t\ttoolType, effectLevelColor, effectAmount);break;\n\t\tcase EAT: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6You gain %s%.2f &6hearts (not &e%.2f&6) when you eat &2%s\",\n\t\t\t\t\teffectLevelColor, effectAmount/2, elfAmount/2, initiator);break;\n\t\tcase CRAFT: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6You craft %s%.0f &2%s &6instead of &e%.0f\",\n\t\t\t\t\teffectLevelColor, effectAmount, output, elfAmount);break;\n\t\tcase PLOW: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6You gain %s%.2f &6seeds instead of &e%.2f &6when you plow grass\",\n\t\t\t\t\teffectLevelColor, effectAmount, elfAmount);break;\n\t\tcase DIGTIME: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&a%.0f%%&6 of the time &2%s &6break &2%s &6instantly \",\n\t\t\t\t\teffectAmount * 100, toolType, initiator);\n\t\t\tbreak;\n\t\tcase BOWATTACK: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Your Arrows do %s%.0f &6hp damage (half hearts)\",\n\t\t\t\t\teffectLevelColor, effectAmount);break;\n\t\tcase VEHICLEDROP: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6DISABLED: When you break a boat &6approx. %s%.2f &2%s&6 are created\",\n\t\t\t\t\t\t\teffectLevelColor, effectAmount, output);break;\n\t\tcase VEHICLEMOVE: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Your boat travels %s%d%% &6faster than normal\",\n\t\t\t\t\teffectLevelColor, (int) (effectAmount * 100 - 100));break;\n\t\tcase CITIZENBLOCKS: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6You contribute %s%.2f &6to max town size\",\n\t\t\t\t\teffectLevelColor, effectAmount);break;\n\t\tcase TOWNBLOCKS: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6As a town mayor your town can claim no more than %s%.2f &6blocks, \" +\n\t\t\t\t\t\"or the sum of your residents' citizen skills\",\n\t\t\t\t\teffectLevelColor, effectAmount);break;\n\t\tcase BOWDEFEND: \t\t\t\n\t\t\tdescription = String.format(\n\t\t\t\t\"&6Each piece of &2Leather Armor&6 gives %s%.0f%% &6protection against projectiles\",\n\t\t\t\teffectLevelColor,effectAmount * 25);break;\n\t\tcase SUFFOCATEDEFEND:\n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Each piece of &2Iron Armor&6 gives %s%.0f%% &6protection against suffocation\",\n\t\t\t\t\teffectLevelColor,effectAmount * 25);break;\n\t\tcase LAVADEFEND: \n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Each piece of &2Gold Armor&6 gives %s%.0f%% &6protection against lava\",\n\t\t\t\t\teffectLevelColor,effectAmount * 25);break;\n\t\tcase DROWNDEFEND:\n\t\t\tdescription = String.format(\n\t\t\t\t\t\"&6Each piece of &2Diamond Armor&6 gives %s%.0f%% &6protection against drowning\",\n\t\t\t\t\teffectLevelColor,effectAmount * 25);break;\n\t\tcase SPECIAL: \n\t\tdefault:\n\t\t\tdescription = \"&6This Effect description is not yet implemented: \"\n\t\t\t\t\t+ mType.toString();\n\t\t}\n\n\t\treturn description;\n\t}", "public void addDoctor(String name, String lastname, String userName, String pass, String secAns)\r\n {\r\n\t try{\r\n\t\t // command to Insert is called with parameters\r\n\t String command = \"INSERT INTO DOCTORDATA (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,SECURITYQN,SECURITYANS)\"+\r\n\t\t\t \"VALUES ('\"+name+\"', '\"+lastname+\"', '\"+userName+\"', '\"+pass+\"', '\"+\"What is Your favorite food?\"+\"', '\"+secAns+\"');\";\r\n\t stmt.executeUpdate(command);\r\n\t \r\n\t \r\n\t } catch (SQLException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t}\r\n\t \r\n }", "public String writeDetails ()\n {\n String memberData = \"\";\n memberData = memberData.concat(fname);\n memberData = memberData.concat(\",\");\n memberData = memberData.concat(sname);\n memberData = memberData.concat(\",\");\n memberData = memberData.concat(Float.toString(mark));\n return memberData;\n }", "String effect(Dueler d) {\n\t\tif (d != null) {\n\t\t\treturn d.drinkPure();\n\t\t} else {\n\t\t\treturn \"No dueler in this position\";\n\t\t}\n\t}", "String diagnosis(String patient) {\n return String.format(\"The doctor %s says that %s is sick.\", this.getFullName(), patient);\n }", "public void addPatient(Patient P)\r\n {\r\n\t int age =0;\r\n\t String secQ =\"What is your favorite food?\";\r\n\t String newPat = \"INSERT INTO PATIENTDATA (FIRSTNAME,LASTNAME,AGE,USERNAME,PASSWORD,SECURITYQN,SECURITYANS,\"+\r\n\t\t\t \t\t \"SYMPTOM1,SYMPTOM2,SYMPTOM3,SYMPTOM4,SYMPTOM5,SYMPTOM6,SYMPTOM7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM1_1,PrevSYMPTOM1_2,PrevSYMPTOM1_3,PrevSYMPTOM1_4,PrevSYMPTOM1_5,PrevSYMPTOM1_6,PrevSYMPTOM1_7,\"+\r\n \t\t\t\t\t\"PrevSYMPTOM2_1,PrevSYMPTOM2_2,PrevSYMPTOM2_3,PrevSYMPTOM2_4,PrevSYMPTOM2_5,PrevSYMPTOM2_6,PrevSYMPTOM2_7,\"+\r\n\t\t\t \t\t \"SYMPTOM1Thresh,SYMPTOM2Thresh,SYMPTOM3Thresh,SYMPTOM4Thresh,SYMPTOM5Thresh,SYMPTOM6Thresh,SYMPTOM7Thresh, DOCTORSNAME, NOTIFICATION ) \"; //added notification\r\n\t newPat = newPat+\"VALUES ('\"+P.firstName+\"', '\"+P.lastName+\"', \"+age+\", '\"+P.userName+\"', '\"+P.password+\"', '\"+secQ+\"', '\"+P.securityQuestionAnswer+\"',\"\r\n\t\t\t \t\t +P.getEnterSymptomLevel()[0]+\",\"+P.getEnterSymptomLevel()[1]+\",\"+P.getEnterSymptomLevel()[2]+\",\"+P.getEnterSymptomLevel()[3]+\",\"+P.getEnterSymptomLevel()[4]+\",\"+P.getEnterSymptomLevel()[5]+\",\"+P.getEnterSymptomLevel()[6]+\r\n\t\t\t \t\t\t\",\" +P.getPreviousSymptomLevel1()[0]+\",\"+P.getPreviousSymptomLevel1()[1]+\",\"+P.getPreviousSymptomLevel1()[2]+\",\"+P.getPreviousSymptomLevel1()[3]+\",\"+P.getPreviousSymptomLevel1()[4]+\",\"+P.getPreviousSymptomLevel1()[5]+\",\"+P.getPreviousSymptomLevel1()[6]+\",\"\r\n\t\t\t \t\t\t+P.getPreviousSymptomLevel2()[0]+\",\"+P.getPreviousSymptomLevel2()[1]+\",\"+P.getPreviousSymptomLevel2()[2]+\",\"+P.getPreviousSymptomLevel2()[3]+\",\"+P.getPreviousSymptomLevel2()[4]+\",\"+P.getPreviousSymptomLevel2()[5]+\",\"+P.getPreviousSymptomLevel2()[6]+\",\"\r\n\t\t\t \t\t\t+P.getSymptomsThreshold()[0]+\",\"+P.getSymptomsThreshold()[1]+\",\"+P.getSymptomsThreshold()[2]+\",\"+P.getSymptomsThreshold()[3]+\",\"+P.getSymptomsThreshold()[4]+\",\"+P.getSymptomsThreshold()[5]+\",\"+P.getSymptomsThreshold()[6]+\",'\"+P.getPatientsDoctor()+\"',0);\";\r\n\t \r\n\t try {\r\n\t\tstmt.executeUpdate(newPat);\r\n\t} catch (SQLException e) {\r\n\t\t\r\n\t\te.printStackTrace();\r\n\t}\r\n }", "public String toString()\n\t{\n\t\tStringBuilder sb = new StringBuilder(\"Suspect: \");\n\t\t\n\t\tsb.append(\"disease = \").append(disease).append(\"; \");\n\t\tsb.append(\"visit = \").append(visit).append(\".\");\n\t\t\n\t\treturn sb.toString();\n\t}", "Etudiant(String prenom, String nom, double note) {\n this.prenom = prenom;\n this.nom = nom;\n this.note = note;\n\n addNote(note);\n addEtudiant();\n\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\n\tnew VetClinic();\n\t\n\t// WELCOME TO MY CODE: MAIRA LORENA WALTERO GUEVARA \n\t// This code is for demonstration purposes for my application for Graduate Software Engineer (Dublin)in DATALEX \n\t\n\t// MY CLINIC IS DIVIDED IN TWO SUPER CLASES: \n\t// 1. STAFF AND 2. ANIMALS \n\t\n\t// 1. STAFF HAS 3 CHILDREN: \n\t// 1.1 ADMINISTRATIVE STAFF AND 1.2 MEDICAL STAFF\n\t// 1.1 ADMININSTRATIVE STAFF HAS 3 CHILDS: \n\t//1.1.1 HR (id=229 -230) , 1.1.2 IT (id=226-228) AND 1.1.3 RECEPTIONIST (id=221-225)\n\t\n\t// 1.2. MEDICAL STAFF HAS 3 CHILDREN: \n\t//1.2.1 SMALL ANIMALS VETS (id= 111 - 125) , 1.2.2 LARGE ANIMALS VETS (id= 126 - 130) AND LABORATORIANS (id= 131 - 140) \n\t//1.2.1 SMALL ANIMALS VETS is only attending small animals = pets \n\t//1.2.2 LARGE ANIMALS VETS is only attending large animals = livestock animals \n\t//1.2.3 LABORATORIANS are attending both type of animals but only if they need. \n\t\n\t//2. ANIMALS HAS TWO SUBCLASSES: \n\t//2.1 COMPANION ANIMALS AND 2.2 LIVESTOCK ANIMALS \n\t//2.1 COMPANION ANIMALS HAS 3 SUBCLASSES:\n\t//2.1.2 CAT , 2.1.2 DOG AND 2.1.3 RABBIT \n\t//2.2 LIVESTOCK ANIMALS HAS TWO SUBCLASSES: \n\t//2.2.1 CATTLE AND 2.2.2 SHEEP \n\t\n\t// THE ARE TREE TYPES OF CLASES WHO CONTAIN THE METHODS IN ORDER TO CREATE THE FUNTIONS \n\t// 1. READING FILES , 2. MAIN CLASS OF METHODS AND 3. PRINT AND QUESTION METHODS\n\t\n\t// 1. READING FILES: \n\t// 1.1 INFOANIMALS AND INFOSTAFF : IN HERE THE METHOD READ THE FILE AND IN SOME CASES CREATE AN ARRAY LIST WITH RANDOM ELEMENTS \n\t// 1.2 MAIN CLASS OF METHOS: IN HERE THERE ARE THE METHODS TO CREATE THE INTANCES, POPULATE THE QUEUES, ASSING TASKS AND DO THE SEARCHS \n\t// 1.3 PRINT AND QUESTION METHODS: THIS CONTAIN THE METHODS TO ASK TO THE USER QUESTIONS AND PRINT THE ANSWER USING THE METHODS INSIDE OF INFORMATION CLASS\n\t}", "public static void main(String[] args) {\n String exclamation1 = \"Ouch!\";\n String exclamation2 = \"Hoorah!\";\n String exclamation3 = \"Amazing!\";\n String adverb1 = \"stupidly\";\n String adverb2 = \"happily\";\n String adverb3 = \"shamefully\";\n String noun1 = \"car\";\n String noun2 = \"book\";\n String noun3 = \"bird\";\n String adjective1 = \"tall\";\n String adjective2 = \"smart\";\n String adjective3 = \"funny\";\n System.out.println( exclamation1+ \" he said \" + adverb1 +\n \" as he jumped into his convertible \" + noun1 +\n \" and drove off with his \" + adjective1 + \" wife.\");\n\n\n\n\n }", "public Master(String name, String namesake, char sex, int debut,String image) {\n\t\tthis.name = name;\n\t\tthis.namesake = namesake;\n\t\tthis.debut = debut;\n\t\tthis.sex=sex;\n\t\tthis.image=image;\n\t}", "private String createDistrictName(String districtLine){\n if(districtLine.contains(\"Representative\")) {\n return \"State House District \" + districtLine.split(\" \")[districtLine.split(\" \").length-1];\n }\n else if(districtLine.contains(\"Senator\")){\n return \"State Senate District \" + districtLine.split(\" \")[districtLine.split(\" \").length-1];\n }\n else{\n return null;\n }\n }", "public Skill(String skillName, double skillDamage, int skillManaCost, double skillHeal){\n name = skillName;\n damage = skillDamage;\n manaCost = skillManaCost;\n heal = skillHeal;\n//sets up skills to return as their name.\n }", "public String toString()\n\t{\n\t\treturn \"Faculty \"+super.toString()+\" exp in yrs \"+expInYears+\" expert in \"+sme;\n\t}", "public void firstSem4() {\n chapter = \"firstSem4\";\n String firstSem4 = \"You're sitting at your computer - you can't sleep, and your only companions are \"+student.getRmName()+\"'s \" +\n \"snoring and Dave Grohl, whose kind face looks down at you from your poster. Your head is buzzing with everything you've \" +\n \"seen today.\\tA gentle 'ding' sounds from your computer, and you click your email tab. It's a campus-wide message \" +\n \"from the president, all caps, and it reads as follows:\\n\\t\" +\n \"DEAR STUDENTS,\\n\" +\n \"AS YOU MAY HAVE HEARD, THERE HAVE BEEN SEVERAL CONFIRMED INTERACTIONS WITH THE CAMPUS BEAST. THESE INTERACTIONS\" +\n \" RANGE FROM SIGHTINGS (17) TO KILLINGS (6). BE THIS AS IT MAY, REST ASSURED THAT WE ARE TAKING EVERY NECESSARY \" +\n \"PRECAUTION TO ENSURE STUDENT WELL-BEING. WE ARE ALL DEDICATED TO MAKING \"+(student.getCollege().getName()).toUpperCase()+\n \" A SAFE, INCLUSIVE ENVIRONMENT FOR ALL. TO CONTRIBUTE, I ASK THAT YOU DO YOUR PART, AND REPORT ANY SIGHTINGS, MAIMINGS,\" +\n \" OR KILLINGS TO PUBLIC SAFETY WITHIN A REASONABLE AMOUNT OF TIME. ENJOY YOUR STUDIES!\\nTOODOLOO,\\nPRESIDENT DOUG\";\n getTextIn(firstSem4);\n }", "java.lang.String getMent();", "public Nodo (String d, Nodo n){\n\t\tdato = d;\n\t\tsiguiente=n;\n\t}", "@Override\n public String toString() {\n return \"[D]\" + super.toString() + \"(by:\" + dueDate + \")\";\n }", "public String getSuit(){ return this.suit; }", "public String toString(){ \r\n\t\t// commented out XP line\r\n\t\t// is a different version of printing out the xp\r\n\t\t// that sets each interval to a [0 - bracket limit for that level].\r\n\t\t// for example, if creature levels up to 2 with exactly 200xp (0xp --> 200xp), \r\n\t\t// with the cumulative xp being 200xp\r\n\t\t// it would display 0/275\r\n\t\t// likewise, if that same creature got an additional 280xp (0-->280) added to its total\r\n\t\t// it would display 5xp/350xp\r\n\r\n\t\tif(this.getIsSpecial()){\r\n\t\t\treturn \"Level \" + this.getLevel() + \" \" + this.species +\r\n\t\t\t\t\t\"\\n+++++++++++++++\" + \r\n\t\t\t\t\t\"\\n!!! Special !!!\" +\r\n\t\t\t\t\t\"\\nNAME: \" + this.getName() +\r\n\t\t\t\t\t\"\\nHP: \" + this.getHitPoints() + \"/\" + this.getMaxHitPoints() +\r\n\t\t\t\t\t\"\\nATK: \" + this.getAttackRating() + \r\n\t\t\t\t\t\"\\nDEF: \" + this.getDefenseRating() + \r\n\t\t\t\t\t\"\\nXP: \" + this.getExperiencePoints() + \"/\" + calcLevel(1,0) + \r\n\t\t\t\t\t//\"\\nXP: \" + (this.getExperiencePoints() - calcPreviousLevel(1,0)) + \"/\" + (200 + ((this.getLevel()-1) * 75)) + \r\n\t\t\t\t\t\"\\nXP VAL: \" + this.getExperienceValue() + \"\\n\";\r\n\t\t\t\t\t//\"Attacks: \" + printAttacks() + \"\\n\";\r\n\t\t}\r\n\t\treturn \"Level \" + this.getLevel() + \" \" + this.species +\r\n\t\t\t\t\"\\n+++++++++++++++\" + \r\n\t\t\t\t\"\\nNAME: \" + this.getName() +\r\n\t\t\t\t\"\\nHP: \" + this.getHitPoints() + \"/\" + this.getMaxHitPoints() +\r\n\t\t\t\t\"\\nATK: \" + this.getAttackRating() + \r\n\t\t\t\t\"\\nDEF: \" + this.getDefenseRating() + \r\n\t\t\t\t\"\\nXP: \" + this.getExperiencePoints() + \"/\" + calcLevel(1,0) + \r\n\t\t\t\t//\"\\nXP: \" + (this.getExperiencePoints() - calcPreviousLevel(1,0)) + \"/\" + (200 + ((this.getLevel()-1) * 75)) +\r\n\t\t\t\t\"\\nXP VAL: \" + this.getExperienceValue() + \"\\n\";\r\n\t\t\t\t//\"Attacks: \" + printAttacks() + \"\\n\";\r\n\r\n\r\n\r\n\t}", "public QuestEntity(String questName) {\r\n this.questName = questName;\r\n }", "public String displayEstatics() throws IOException {\n\t\t\n\t\tMap<String, Integer> atk = this.shortAttack();\n\t\tMap<String, Integer> dmg = this.causeDamage();\n\t\t\n\t\tString html = \"\";\n\t\thtml +=\"<div class='statiscs'>\";\n\t\thtml += \"<span><strong>Classe</strong> : \" + this.nome + \"</span><br>\";\n\t\thtml += \"<span><strong>Level</strong> : \" + this.level + \"</span><br>\";\n\t\thtml += \"<span><strong>Força</strong> : \" + this._str + \" (\" + this.getBonus(this._str) + \")</span><br>\";\n\t\thtml += \"<span><strong>Destreza</strong> : \" + this._dex + \" (\" + this.getBonus(this._dex) + \") </span><br>\";\n\t\thtml += \"<span><strong>Constituição</strong> : \" + this._con + \" (\" + this.getBonus(this._con) + \") </span><br>\";\n\t\thtml += \"<span><strong>Inteligência</strong> : \" + this._int + \" (\" + this.getBonus(this._int) + \") </span><br>\";\n\t\thtml += \"<span><strong>Sabedoria</strong> : \" + this._wis + \" (\" + this.getBonus(this._wis) + \") </span><br>\";\n\t\thtml += \"<span><strong>Carisma</strong> : \" + this._cha + \" (\" + this.getBonus(this._cha) + \") </span><br>\";\n\t\thtml += \"<span><strong>Arma</strong> : \" + this.weapon.getName() + \"</span><br>\";\n\t\thtml += \"<span><strong>Dado Base</strong> : \" + this.weapon.getDice() + \"</span><br>\";\n\t\thtml += \"<span><strong>Valor Ataque</strong> : \" + atk.get(\"damage\") + \" ( dado ) \" + atk.get(\"dice\") + \" + bba \" + atk.get(\"bba\") + \" + bonus \" + atk.get(\"bonus\") + \" )</span><br>\";\n\t\thtml += \"<span><strong>Dano com a Arma</strong> : \" + dmg.get(\"total\") + \" (dado \" + dmg.get(\"dice\") + \" + bonus \" + dmg.get(\"bonus\") + \") </span><br>------<br>\";\n\t\thtml += \"</div>\";\n\t\t\n\t\treturn html;\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\treturn belong+\"-\"+name;\n\t}", "public Case(String nom, Case suivante) {\n this.nom = nom;\n setSuivante(suivante);\n }", "public Dialogue(String d, Choice c1, Choice c2, Choice c3, Choice c4) {\r\n\t\tdialogueBefore = d;\r\n\t\tchoices[0] = c1;\r\n\t\tchoices[1] = c2;\r\n\t\tchoices[2] = c3;\r\n\t\tchoices[3] = c4;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn name+\" : \"+ weight +\" KG \"+(isMale?\", ─đ\":\", ┼«\")+ \", \"+education;\n\t}", "public HighScore (String name)\n {\n this.name = name;\n this.score = 0;\n this.level = \"level 1\";\n }", "public SimpleCitizen(){\n super();\n information = \"let's help to find mafias and take them out\";\n }", "@Override\r\n\tpublic String getDailyStudy() {\n\t\treturn \"Practice Expilliarmus and Work on the patronus charm\";\r\n\t}", "private void greenstype(String l) {\n\t\t\n\t\tSystem.out.println(\"Course type is\"+l);\n\n\t}", "public Tooltip(@Nonnull NetCommReader reader) throws IOException {\n name = reader.readString();\n rareness = reader.readUByte();\n description = reader.readString();\n craftedBy = reader.readString();\n type = reader.readString();\n level = reader.readUByte();\n usable = reader.readUByte() == 1;\n weight = reader.readUShort();\n worth = new Money(reader.readUInt());\n qualityText = reader.readString();\n durabilityText = reader.readString();\n durabilityValue = reader.readUByte();\n diamondLevel = reader.readUByte();\n emeraldLevel = reader.readUByte();\n rubyLevel = reader.readUByte();\n sapphireLevel = reader.readUByte();\n amethystLevel = reader.readUByte();\n obsidianLevel = reader.readUByte();\n topazLevel = reader.readUByte();\n bonus = reader.readUByte();\n }", "public Medication(String name, String sg, LocalDate fd, int cp){\n medName = name;\n sig = sg;\n fillDate = fd;\n copay = cp;\n }", "@Override\n public String toString() {\n return \"rollno:\" + rollno + \"and name : \" + name;\n }", "String getSupName();", "public Shield(String name,int levelRequired){\n\t\tsuper(name,levelRequired);\n\t\titemId = 2;\n\t\tprice = (levelRequired*50)/40*60;\n\t\tsalePrice = (int)(price*0.75);\n\t\tprimaryStat = levelRequired*3/5 + (int)(Math.random()*5+1);\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\tString camp = \"\";\r\n\t\ttry {\r\n\t\t\tif (campLeased != null) camp = \" Camp \" + campLeased.getCampName() + \" Leased\";\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// swallow exceptions such as LazyInitialization Exception\r\n\t\t}\r\n\t\tString company = \"\";\r\n\t\ttry {\r\n\t\t\tif (companyLeasing != null) company = \" by \" + companyLeasing.getCompanyName();\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// swallow exceptions such as LazyInitialization Exception\r\n\t\t}\r\n\t\tString id = \"Camp Lease: ID=\" + this.getId();\r\n\t\tString years = \" (\" + beginYear + \" - \" + endYear + \")\";\r\n\t\treturn id + camp + company + years;\r\n\t}", "public Die(String name_) {\n\t\tthis.name = name_;\n\t\tthis.numSides = 6;\n\t}", "public void createGrade(String name,int year, String subject, String assessment, String achievement,String knowledge,String skill){\n try{\n String query = \"INSERT INTO `coitdatabase`.`grade` (`studentName`, `stuYear`, `subjectName`, `asseName`, `grade`, `knowledge`, `skill`) VALUES ('\"+name+\"', '\"+year+\"', '\"+subject+\"', '\"+assessment+\"', '\"+achievement+\"', '\"+knowledge+\"', '\"+skill+\"');\";\n st.executeUpdate(query);\n }catch(Exception ex){\n System.out.println(\"Error in create grade \"+ ex);\n }\n }", "public void afficherInfo(String str1) {\n System.out.println(this.personnage);\n afficherMenuPerso();\n }", "public Warrior(String n)\n {\n\tname = n;\n\tHP = 1300;\n\tstr = 1000;\n\tdef = 400;\n\tdmg = 0.5;\n }", "public void setCidade(String cidade) {// Altera o nome da cidade.\r\n\t\tthis.cidade = cidade;\r\n\t}", "public void set_info() {\n System.out.println(\"The name of the donor is \" + donor_name);\n System.out.println(\"The rating of the donor is \" + donor_rating); //display\n }", "public void setMurderInfo(String murder, String weapon, String scene){\n\t\tmord.setPadding(new Insets(0,4,4,4));\n\t\tString scenePred;\n\t\tString weaponPred;\n\t\t\n\t\tif(scene.equals(\"hall\") || scene.equals(\"kitchen\") || scene.equals(\"library\")){\n\t\t\tscenePred = \" in der \";\n\t\t} else {\n\t\t\tscenePred = \" im \";\n\t\t}\n\t\t\n\t\tif(weapon.equals(\"spanner\")){\n\t\t\tweaponPred = \" mit der \";\n\t\t} else {\n\t\t\tweaponPred = \" mit dem \";\n\t\t}\n\t\t\n\t\tswitch(murder){\n\t\tcase \"blue\":\n\t\t\tmurder = \"Baronin von Porz\";\n\t\t\tbreak;\n\t\tcase \"yellow\":\n\t\t\tmurder = \"Oberst von Gatow\";\n\t\t\tbreak;\n\t\tcase \"red\":\n\t\t\tmurder = \"Fräulein Gloria\";\n\t\t\tbreak;\n\t\tcase \"green\":\n\t\t\tmurder = \"Reverend Grün\";\n\t\t\tbreak;\n\t\tcase \"white\":\n\t\t\tmurder = \"Frau Weiß\";\n\t\t\tbreak;\n\t\tcase \"purple\":\n\t\t\tmurder = \"Professor Bloom\";\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tswitch(scene){\n\t\tcase \"hall\":\n\t\t\tscene = \"Eingangshalle\";\n\t\t\tbreak;\n\t\tcase \"ballroom\":\n\t\t\tscene = \"Musikzimmer\";\n\t\t\tbreak;\n\t\tcase \"billiard\":\n\t\t\tscene = \"Schachzimmer\";\n\t\t\tbreak;\n\t\tcase \"conservatory\":\n\t\t\tscene = \"Wintergarten\";\n\t\t\tbreak;\n\t\tcase \"diningroom\":\n\t\t\tscene = \"Speisezimmer\";\n\t\t\tbreak;\n\t\tcase \"kitchen\":\n\t\t\tscene = \"Küche\";\n\t\t\tbreak;\n\t\tcase \"library\":\n\t\t\tscene = \"Bibliothek\";\n\t\t\tbreak;\n\t\tcase \"lounge\":\n\t\t\tscene = \"Salon\";\n\t\t\tbreak;\t\n\t\tcase \"study\":\n\t\t\tscene = \"Arbeitszimmer\";\n\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\tswitch(weapon){\n\t\tcase \"candlestick\":\n\t\t\tweapon = \"Kerzenständer\";\n\t\t\tbreak;\n\t\tcase \"dagger\":\n\t\t\tweapon = \"Dolch\";\n\t\t\tbreak;\n\t\tcase \"pipe\":\n\t\t\tweapon = \"Heizungsrohr\";\n\t\t\tbreak;\n\t\tcase \"revolver\":\n\t\t\tweapon = \"Revolver\";\n\t\t\tbreak;\n\t\tcase \"rope\":\n\t\t\tweapon = \"Seil\";\n\t\t\tbreak;\n\t\tcase \"spanner\":\n\t\t\tweapon = \"Rohrzange\";\n\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\tmord.setText(\"Es war \"+ murder + scenePred + scene + weaponPred + weapon + \".\");\n\t\tmord.setStyle(\"-fx-text-fill:white\");\n\t\tmord.setFont(Font.font(15));\n\t}", "@Override\n public String getAction() {\n return \"SELECT S.name, S.level, S.coolDown, E.effect, S.manaCost FROM hasskill AS H,\"+\n \" playerchar AS P, skill AS S, skilleffect as E WHERE P.name='\"+ name +\n \"' AND H.character = P.charid AND H.skill = S.name AND E.skill = S.name\";\n }", "public static void questionnaire() {\n\t\tboolean flag = true;\n\t\tString a = null;\n\t\t//donor's username\n\t\tflag = true;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tusername = JOptionPane.showInputDialog(null,\"Enter your username: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\tif (username.equals(\"null\")) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t }\n\t\t\t\tflag = false;\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a username.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t flag = true;\n\t\t\t}\t\n\t\t}while (flag);\n\t\ttry {\n\t\t\tResultSet rs = Messages.connect().executeQuery(\"SELECT * FROM Questionnaire \");\n\t\t\twhile (rs.next()) {\n\t\t\t\tint qid = rs.getInt(\"Q_id\");\n\t\t\t\tString r = rs.getString(\"Question\");\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (qid == 1) {\n\t\t\t\t\t\t\tflag = true;\n \t \t\t\t\t\tObject[] opt = {\"Male\", \"Female\"};\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tint g = JOptionPane.showOptionDialog(null,\"Choose your gender: \", \"SIGN UP\", JOptionPane.YES_NO_OPTION,\n\t\t\t\t\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE, null, opt, null);\n\t\t\t\t\t\t\t\t\tif (g == 0) {\n\t\t\t\t\t\t\t\t\t\tgender = \"male\";\n\t\t\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t} else if (g == 1){\n\t\t\t\t\t\t\t\t\t\tgender = \"female\";\n\t\t\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (NullPointerException e1) {\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose your gender\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}while (flag);\n\t\t\t\t\t\t\ta = gender;\n\t\t\t\t\t\t} else if (((qid >= 2) && (qid<=12)) || (qid == 14)) {\n\t\t\t\t\t\t\ta = JOptionPane.showInputDialog(null, qid + \". \" + r, \"QUESTIONNAIRE\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t\tif (a.equals(null)) {\n\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint p = JOptionPane.showConfirmDialog(null, qid + \". \" + r, \"QUESTIONNAIRE\", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t\ta = String.valueOf(p);\n\t\t\t\t\t\t\tif (p == -1) {\n\t\t\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please insert your answer\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tflag = true;\n\t\t\t\t\t}\n\t\t\t\t} while (flag);\n\t\t\t\tif (checkQuestion(qid, a) == false) {\n\t\t\t\t\t//delete data from data base\n\t\t\t\t\tint d = Messages.connect().executeUpdate(\"DELETE FROM Answers WHERE B_Username ='\" + username + \"'\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"We regret to inform you that you are not compatible as a blood donor.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} else {\n\t\t\t\t\tinsertAnswers(username, qid, a);\n\t\t\t\t}\n\t\t\t}\n\t\t\trs.close();\n\t\t\tMessages.connect().close();\n\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\t}", "public Rogue(String name) {\r\n\t\tsuper(name);\r\n\t\tthis.name +=\" the Rogue\";\r\n\t\tthis.attackPower = 50;\r\n\t\tthis.maxHP = 35;\r\n\t\tthis.hp = this.maxHP;\r\n\t}", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "public void dataView(String nom, String apell1, String apell2, String dni,\n String num, String inttype){\n\n System.out.println(\"Datos personales\");\n System.out.println(\"\");\n System.out.println(\"Nombre: \"+nom);\n System.out.println(\"Primer Apellido: \"+apell1);\n System.out.println(\"Segundo Apellido: \"+apell2);\n System.out.println(\"Dni: \"+dni);\n System.out.println(\"Numero de cuenta: \"+num);\n System.out.println(\"Tipo de interes: \"+inttype);\n System.out.println(\"\");\n}", "public String getCouseName() {\n return couseName;\n }", "public String name_data(String name)\r\n/* 14: */ {\r\n/* 15:27 */ if (name == \"gr_id\") {\r\n/* 16:27 */ return this.config.id.name;\r\n/* 17: */ }\r\n/* 18:28 */ String[] parts = name.split(\"c\");\r\n/* 19: */ try\r\n/* 20: */ {\r\n/* 21:32 */ if (parts[0].equals(\"\"))\r\n/* 22: */ {\r\n/* 23:33 */ int index = Integer.parseInt(parts[1]);\r\n/* 24:34 */ return ((ConnectorField)this.config.text.get(index)).name;\r\n/* 25: */ }\r\n/* 26: */ }\r\n/* 27: */ catch (NumberFormatException localNumberFormatException) {}\r\n/* 28:38 */ return name;\r\n/* 29: */ }", "public void setInfo(String name, int id, double gpa){\n this.name=name;\n this.id=id;\n this.gpa=gpa;\n\n }", "@Override\n public String toString() {\n\n //convert cents to dollars using cents2dollarsAndCents\n String output = DessertShoppe.cents2dollarsAndCents(this.getCost());\n //create string storing cost in a string \n String costLength = Integer.toString(this.getCost());\n //find spacing needed between name and cost in reciept by subtracting 30(total spaces) by \n //length of name and length of cost\n int spacing = 30 - super.getName().length() - costLength.length() - 1;\n //loop through an add a space each time up to \"spacing\" integer\n for (int i = 0; i < spacing; i++) {\n output = \" \" + output;\n }\n //return name of cookie along with cost along with the right format posting amount of pounds with cost per pound\n return this.weight + \" lbs. \" + \"@ $\" + DessertShoppe.cents2dollarsAndCents(this.pricePerLbs) + \" /lb.\\n\" + this.getName() + output;\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"Eduction [id = %d, level = %s]\", id, level);\n\t}", "@Override\n public String getLevel(){ //this is the toString() method!\n level = \"Platinum\";\n return level;\n }", "abstract String moodString();", "@Override\r\n public String toString()\r\n {\r\n return \"Professor: name=\" + name + \" and id=\" + id;\r\n }", "public String getName() {\n return dishName;\n }", "public void GetNom(Verbum w){\r\n\t\tDSElement<Terminus> ending = inflects.first;\r\n\t\tint variant = w.variant;\r\n\t\tint variant2 = -2;\r\n\t\tint cd = w.cd;\r\n\t\tString gender = w.gender;\r\n\t\tString form = \"\";\r\n\t\tint count = inflects.size(); // failsafe counter\r\n\t\twhile(count > 0){\r\n\t\t\tTerminus end = ending.getItem();\r\n\t\t\tif(w.pos.equals(\"V\")) { //VERB\r\n\t\t\t\tif(w.cd==2){\r\n\t\t\t\t\tif(w.type.equals(\"DEP\")){\r\n\t\t\t\t\t\tw.nom = w.form1 + \"eor\";\r\n\t\t\t\t\t\tw.nomFormLengh = 3;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tw.nom = w.form1 + \"eo\";\r\n\t\t\t\t\t\tw.nomFormLengh = 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(w.type.equals(\"DEP\")){\r\n\t\t\t\t\t\tw.nom = w.form1 + \"or\";\r\n\t\t\t\t\t\tw.nomFormLengh = 3;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tw.nom = w.form1 + \"o\";\r\n\t\t\t\t\t\tw.nomFormLengh = 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t} else if(w.pos.equals(\"N\") && end.pos.equals(\"N\")) { //NOUN\r\n\t\t\t\t/* Some special cases */\r\n\t\t\t\tif(cd == 3 && variant == 1){ //Common lots of cases\r\n\t\t\t\t\tvariant = 0;\r\n\t\t\t\t\tvariant2 = 1;\r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 2 && variant == 1){ //Common lots of cases\r\n\t\t\t\t\tvariant = 0;\r\n\t\t\t\t\tvariant2 = 1;\r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 3) {\r\n\t\t\t\t\tw.nom = w.form1;\r\n\t\t\t\t\tw.nomFormLengh = 0;\r\n\t\t\t\t\treturn; //return nom. s. 3rd decl.\r\n\t\t\t\t}\r\n\t\t\t\t/* END */\r\n\t\t\t\tif (end.wordcase != null && end.number != null){\r\n\t\t\t\t\tif(end.cd == cd && (end.variant == variant || end.variant == variant2) && \r\n\t\t\t\t\t\t\tend.wordcase.equals(\"NOM\") && end.number.equals(\"S\") && \r\n\t\t\t\t\t\t\tend.gender.equals(gender)) {\r\n\t\t\t\t\t\tform = w.form1;\r\n\t\t\t\t\t\tw.nom = form + end.ending;\r\n\t\t\t\t\t\tw.nomFormLengh = end.ending.length()+1;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(end.cd == cd && (end.variant == variant || end.variant == variant2) && \r\n\t\t\t\t\t\t\tend.wordcase.equals(\"NOM\") && end.number.equals(\"S\") &&\r\n\t\t\t\t\t\t\tend.gender.equals(\"X\")) {\r\n\t\t\t\t\t\tform = w.form1;\r\n\t\t\t\t\t\tw.nom = form + end.ending;\r\n\t\t\t\t\t\tw.nomFormLengh = end.ending.length()+1;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(end.cd == cd && (end.variant == variant || end.variant == variant2) && \r\n\t\t\t\t\t\t\tend.wordcase.equals(\"NOM\") && end.number.equals(\"S\") && \r\n\t\t\t\t\t\t\tend.gender.equals(\"C\")) {\r\n\t\t\t\t\t\tform = w.form1;\r\n\t\t\t\t\t\tw.nom = form + end.ending;\r\n\t\t\t\t\t\tw.nomFormLengh = end.ending.length()+1;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if(w.pos.equals(\"ADJ\") && end.pos.equals(\"ADJ\")) {\r\n\t\t\t\t/* The different declensions and variations */\r\n\t\t\t\tif(cd == 1 && (variant == 1 || variant == 3 || variant == 5)) {\r\n\t\t\t\t\tw.nom = w.form1 + \"us\";\r\n\t\t\t\t\tw.nomFormLengh = 3;\r\n\t\t\t\t\treturn; \r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 1 && (variant == 2 || variant == 4)){\r\n\t\t\t\t\tw.nom = w.form1;\r\n\t\t\t\t\tw.nomFormLengh = 0;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 0 && variant == 0 && w.type.equals(\"COMP\")) {\r\n\t\t\t\t\tw.nom = w.form1 + \"or\";\r\n\t\t\t\t\tw.nomFormLengh = 3;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 0 && variant == 0 && w.type.equals(\"SUPER\")) {\r\n\t\t\t\t\tw.nom = w.form1 + \"mus\";\r\n\t\t\t\t\treturn; \r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 2 && variant == 1) {\r\n\t\t\t\t\tw.nom = w.form1 + \"e\";\r\n\t\t\t\t\tw.nomFormLengh = 2;\r\n\t\t\t\t\treturn; \r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 2 && variant == 2) {\r\n\t\t\t\t\tw.nom = w.form1 + \"a\";\r\n\t\t\t\t\tw.nomFormLengh = 2;\r\n\t\t\t\t\treturn; \r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 2 && variant == 3) {\r\n\t\t\t\t\tw.nom = w.form1 + \"es\";\r\n\t\t\t\t\tw.nomFormLengh = 3;\r\n\t\t\t\t\treturn; \r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 2 && (variant == 6 || variant == 7)) {\r\n\t\t\t\t\tw.nom = w.form1 + \"os\";\r\n\t\t\t\t\tw.nomFormLengh = 3;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 2 && variant == 8) {\r\n\t\t\t\t\tw.nom = w.form1 + \"on\";\r\n\t\t\t\t\tw.nomFormLengh = 3;\r\n\t\t\t\t\treturn; \r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 3 && (variant == 1 || variant == 3 || variant == 6)) {\r\n\t\t\t\t\tw.nom = w.form1;\r\n\t\t\t\t\tw.nomFormLengh = 0;\r\n\t\t\t\t\treturn; \r\n\t\t\t\t}\r\n\t\t\t\tif(cd == 3 && variant == 2) {\r\n\t\t\t\t\tw.nom = w.form1 + \"is\";\r\n\t\t\t\t\tw.nomFormLengh = 3;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t/* END */\t\t\t\t\r\n\t\t\t} else if(w.pos.equals(\"ADV\") && end.pos.equals(\"ADV\")) {\r\n\t\t\t\tw.nom = w.form1;\r\n\t\t\t\tw.nomFormLengh = 0;\r\n\t\t\t\treturn; \r\n\t\t\t}\r\n\t\t\tending = ending.getNext();\r\n\t\t\tif(ending == null)\r\n\t\t\t\tending = inflects.first;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t\tw.nom = w.form1;\r\n\t\tw.nomFormLengh = 0;\r\n\t\treturn;\r\n\t}", "public Contestant(String n, String c, int a){\n\t\tname = n;\n\t\tcountry = c;\n\t\tage = a;\n\t\ttalents = new String[3];\n\t}", "private void displayUserInfo(String name) {\n\t\tString username = null;\n\t\tPattern p = Pattern.compile(\"\\\\[(.*?)\\\\]\");\n\t\tMatcher m = p.matcher(name);\n\t\tif (m.find())\n\t\t{\n\t\t username = m.group(1);\n\t\t lastClickedUser = username;\n\t\t}\n\t\tUser u = jdbc.get_user(username);\n\t\ttextFirstName.setText(u.get_firstname());\n\t\ttextLastName.setText(u.get_lastname());\n\t\ttextUsername.setText(u.get_username());\n\t\tif (u.get_usertype() == 1) {\n\t\t\trdbtnAdminDetails.setSelected(true);\n\t\t} else if (u.get_usertype() == 2) {\n\t\t\trdbtnManagerDetails.setSelected(true);\n\t\t} else {\n\t\t\trdbtnWorkerDetails.setSelected(true);\n\t\t}\n\t\tif (u.get_email() != null) {textEmail.setText(u.get_email());} else {textEmail.setText(\"No Email Address in Database.\");}\n\t\tif (u.get_phone() != null) {textPhone.setText(u.get_phone());} else {textPhone.setText(\"No Phone Number in Database.\");}\t\t\t\t\n\t\tcreateQualLists(u.get_userID());\n\t}", "@Override\r\n//displays the property of defensive players to console\r\npublic String toString() {\r\n\t\r\n\tdouble feet = getHeight()/12;\r\n\tdouble inches = getHeight()%12;\r\n\t\r\n\treturn \"\\n\" + \"\\nDefensive Player: \\n\" + getName() \r\n\t+ \"\\nCollege: \" + getCollege() \r\n\t+ \"\\nHighschool: \" + getHighschool() \r\n\t+ \"\\nAge: \" + getAge() \r\n\t+ \"\\nWeight: \" + getWeight() \r\n\t+ \"\\nHeight: \" + feet + \" ft\" + \" \" + inches + \" in\" \r\n\t+ \"\\nTeam Number: \" + getNumber() \r\n\t+ \"\\nExperience: \" + getExperience()\r\n\t+ \"\\nTeam: \" + getTeam() \r\n\t+ \"\\nPosition: \" +getPosition() \r\n\t+ \"\\nTackles : \" + getTackles() \r\n\t+ \"\\nSacks: \" +getSacks() \r\n\t+ \"\\nInterceptions: \" + getInterceptions();\r\n}", "public Die(String name_, int numSides_) {\n\t\tthis.name = name_;\n\t\tthis.numSides = numSides_;\n\t}", "public String descriere(){\r\n\t\treturn \"Flori\";\r\n\t}", "public static void schoolInfo(Player player) {\n\t\t\n\t}" ]
[ "0.5339481", "0.53244174", "0.53119534", "0.5196121", "0.5179437", "0.51331574", "0.5124915", "0.5109708", "0.5083", "0.50501335", "0.5034404", "0.50327", "0.5019594", "0.5016253", "0.5010465", "0.50087285", "0.50011283", "0.50011283", "0.50011283", "0.4998636", "0.49901456", "0.49871737", "0.49797714", "0.49744123", "0.49736583", "0.49323937", "0.4930383", "0.49299207", "0.49189493", "0.49179146", "0.49171147", "0.4914045", "0.49100187", "0.49060583", "0.4895359", "0.48945066", "0.48941013", "0.4891527", "0.4868644", "0.48647848", "0.48531592", "0.4850907", "0.484659", "0.48311457", "0.48222932", "0.48191556", "0.48101693", "0.48100534", "0.48038727", "0.48025876", "0.47916564", "0.47797304", "0.4774446", "0.47738916", "0.47731254", "0.47702637", "0.47682318", "0.476746", "0.47650105", "0.47641212", "0.47609085", "0.4757843", "0.47526756", "0.47523206", "0.47496378", "0.47464103", "0.4742323", "0.4741016", "0.4739835", "0.47394133", "0.47388738", "0.47377127", "0.47303608", "0.47267047", "0.4725716", "0.4719388", "0.47173184", "0.47167817", "0.47153002", "0.47148946", "0.4714713", "0.47145694", "0.47142878", "0.471128", "0.47102165", "0.4706463", "0.470587", "0.4699007", "0.46980682", "0.46980503", "0.46968144", "0.46952474", "0.46945825", "0.4690363", "0.46890894", "0.46874446", "0.468559", "0.46808997", "0.46799982", "0.4679424", "0.46784726" ]
0.0
-1
Convert an innerJunction of outerJunctions given as an array of terms into a Set of XJunctions.
private Set<XJunction> convertInnerJunctionOfOuterJunctionsToSet(final Term[] inputInnerJunction) { final Set<XJunction> result = new HashSet<>(); for (final Term inputInnerJunct : inputInnerJunction) { final Term[] inputOuterJunction = getOuterJuncts(inputInnerJunct); try { result.add(new XJunction(inputOuterJunction)); } catch (final AtomAndNegationException e) { // do nothing, we omit this outerJunction because it is // equivalent to the neutral element of the inner connective // (true for ∧, false for ∨) } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Set<String> findAllChildrenAndParent( Collection<OntologyTerm> ontologyTerms ) {\n if ( this.ontologies.isEmpty() ) {\n resetOntologies();\n }\n Set<String> phenotypesFoundAndChildren = new HashSet<String>();\n\n for ( OntologyTerm ontologyTerm : ontologyTerms ) {\n // add the parent term found\n assert ontologyTerm.getUri() != null;\n phenotypesFoundAndChildren.add( ontologyTerm.getUri() );\n\n // add all children of the term\n for ( OntologyTerm ontologyTermChildren : ontologyTerm.getChildren( false ) ) {\n assert ontologyTermChildren.getUri() != null;\n phenotypesFoundAndChildren.add( ontologyTermChildren.getUri() );\n }\n }\n return phenotypesFoundAndChildren;\n }", "public static Set asSet(Object[] items) {\r\n \t\r\n \tSet set = new HashSet(items.length);\r\n \tfor (int i=0; i<items.length; i++) {\r\n \t\tset.add(items[i]);\r\n \t}\r\n \treturn set;\r\n }", "set.addAll(Arrays.asList(a));", "public static Set<String> getEntities(Relation[] relations) {\n Set<String> entities = new TreeSet<>();\n\n for(Relation relation: relations) {\n entities.addAll(getEntities(relation));\n }\n\n return entities;\n }", "static public Set setFlatten(Object source) {\n\t\tSet result = new HashSet();\n\t\tif ( source instanceof Collection ) {\n\t\t\tIterator it = ((Collection)source).iterator();\n\t\t\twhile ( it.hasNext() ) {\n\t\t\t\tObject elem = it.next();\n\t\t\t\tif ( elem instanceof Collection ) {\n\t\t\t\t\tresult.addAll( setFlatten(elem));\n\t\t\t\t} else {\n\t\t\t\t\tresult.add(elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "Set<X> toSet();", "public static <T> Set<T> convertArrayToSet(T array[]) \r\n { \r\n \r\n // Create the Set by passing the Array \r\n // as parameter in the constructor \r\n Set<T> set = new HashSet<>(Arrays.asList(array)); \r\n \r\n // Return the converted Set \r\n return set; \r\n }", "public final TIntSet query(Envelope envelope) {\n final TIntSet ret = new TIntHashSet();\n visit(envelope, false, (bin, mapKey) -> {\n ret.addAll(bin);\n return false;\n });\n return ret;\n }", "public ArrayList<Predicate> expandInConjunctiveFormula(){\n\t\tArrayList<Predicate> formula = new ArrayList<Predicate>();\n\t\t\n\t\t// (x, (0,2)) (y,1) \n\t\t//holds positions of the vars\n\t\tHashtable<String,ArrayList<String>> pos = new Hashtable<String,ArrayList<String>>();\n\t\t//(const3, \"10\")\n\t\t//holds vars that have constants assigned\n\t\tHashtable<String,String> constants = new Hashtable<String,String>();\n\t\t\n\t\tRelationPredicate p = this.clone();\n\t\t//rename each term to a unique name\n\t\tfor(int i=0; i<p.terms.size(); i++){\n\t\t\tTerm t = p.terms.get(i);\n\t\t\tt.changeVarName(i);\n\n\t\t}\n\t\tformula.add(p);\n\n\t\tArrayList<String> attrsOld = getVarsAndConst();\n\t\tArrayList<String> attrsNew = p.getVarsAndConst();\n\n\t\t\n\t\tfor(int i=0; i<attrsOld.size(); i++){\n\t\t\tTerm t = terms.get(i);\n\t\t\tif(t instanceof ConstTerm){\n\t\t\t\t//get the constant value\n\t\t\t\tconstants.put(attrsNew.get(i),t.getVal());\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> posVals = pos.get(attrsOld.get(i));\n\t\t\tif(posVals==null){\n\t\t\t\tposVals=new ArrayList<String>();\n\t\t\t\tpos.put(attrsOld.get(i),posVals);\n\t\t\t}\n\t\t\tposVals.add(String.valueOf(i));\n\n\t\t}\n\t\t\n\t\t//System.out.println(\"Position of attrs=\" + pos + \" Constants= \" + constants);\n\t\n\t\t//deal with var equality x0=x2\n\t\tIterator<String> it = pos.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString key = (String)it.next();\n\t\t\tArrayList<String> vals = pos.get(key);\n\t\t\tif(vals.size()>1){\n\t\t\t\t//add x0=x2 & x2=x9, etc\n\t\t\t\tfor(int i=1; i<vals.size(); i++){\n\t\t\t\t\tBuiltInPredicate p1 = new BuiltInPredicate(MediatorConstants.EQUALS);\n\t\t\t\t\t//p1.addTerm(new VarTerm(key+vals.get(i)));\n\t\t\t\t\t//p1.addTerm(new VarTerm(key+vals.get(i+1)));\n\t\t\t\t\tVarTerm v1 = new VarTerm(key);\n\t\t\t\t\tv1.changeVarName(Integer.valueOf(vals.get(i-1)).intValue());\n\t\t\t\t\tp1.addTerm(v1);\n\t\t\t\t\tVarTerm v2 = new VarTerm(key);\n\t\t\t\t\tv2.changeVarName(Integer.valueOf(vals.get(i)).intValue());\n\t\t\t\t\tp1.addTerm(v2);\n\t\t\t\t\tformula.add(p1);\n\t\t\t\t\t//i=i+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//deal with constants\n\t\tit = constants.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString key = (String)it.next();\n\t\t\tString val = constants.get(key);\n\t\t\t//it's a constant\n\t\t\t//add const3=\"10\"\n\t\t\tBuiltInPredicate p1 = new BuiltInPredicate(MediatorConstants.EQUALS);\n\t\t\tp1.addTerm(new VarTerm(key));\n\t\t\tp1.addTerm(new ConstTerm(val));\n\t\t\tformula.add(p1);\n\t\t}\n\t\treturn formula;\n\t}", "HashSet<String> removeDuplicates(ArrayList<String> words) {\n\t\tHashSet<String> keywords = new HashSet<String>();\n\t\tkeywords.addAll(words);\n\t\treturn keywords;\n\t}", "static ArrayList<XTupleSet> getCompleteTupleSets(String rel, ArrayList<String> rels, Connection dbConn) throws SQLException {\n\t\n\t// evaluate tables\n\tXTable targetTable = new XTable(rel, dbConn);\n\tArrayList<XTable> otherTables = new ArrayList<XTable>();\n\tfor (int i = 0; i < rels.size(); i++) {\n\t if (!rel.equals(rels.get(i))) { // exclude the target table\n\t\totherTables.add(new XTable(rels.get(i), dbConn));\n\t }\n\t}\n\t\n\tArrayList<XTupleSet> complete = new ArrayList<XTupleSet>();\n\tArrayList<XTupleSet> inComplete = new ArrayList<XTupleSet>();\n\t\n\tfor (int i = 0; i < targetTable.size(); i++) {\n\t inComplete.add(new XTupleSet(targetTable.getTuple(i))); // line 3-4\n\t}\n\t\n\twhile (!inComplete.isEmpty()) {\n\t XTupleSet tupleSet = pop(inComplete);\n\t \n\t // check all other tuples which are JCC with is tuple set. Line 7-8\n\t for (XTable table : otherTables) {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t XTuple tuple = table.getTuple(i);\n\t\t if (tupleSet.jcc(tuple) && (!tupleSet.contains(tuple))) {\n\t\t\ttupleSet.add(tuple);\n\t\t\t// here, we should break, because there can not be\n\t\t\t// two tuples in a single table which are JCC with\n\t\t\t// the same tuple set.\n\t\t\tbreak;\n\t\t }\n\t\t}\n\t }\n\t \n\t // Line 9 - 20\n\t for (XTable table : otherTables) { // Line 9\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t XTuple tuple = table.getTuple(i);\n\t\t if (!tupleSet.contains(tuple)) { // Line 9\n\t\t\tXTupleSet prime = getPrime(tuple, tupleSet); // Line 11\n\t\t\t\n\t\t\tif (prime.hasTupleFrom(targetTable)) { // Line 12\n\t\t\t boolean inserted = false; // Line 13\n\t\t\t if (isInComplete(prime, complete)) {\n\t\t\t\tinserted = true; // Line 15\n\t\t\t\tfor (int j = 0 ; j < inComplete.size(); i++) { // Line 16\n\t\t\t\t XTupleSet ts = inComplete.get(j); // Line 16\n\t\t\t\t if (prime.jcc(ts)) { // Line 17\n\t\t\t\t\tts.addAll(prime);\n\t\t\t\t\tinserted = true;\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\tif (!inserted) {\n\t\t\t\t inComplete.add(prime);\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t \n\t // Line 22\n\t complete.add(tupleSet);\n\t}\n\t\n\treturn complete;\n }", "public static <F> /*@ pure @*/ /*@ non_null @*/\n JMLObjectSet<F> convertFrom(/*@ non_null @*/ F[] a)\n {\n /*@ non_null @*/ JMLObjectSet<F> ret = EMPTY;\n for (int i = 0; i < a.length; i++) {\n ret = ret.insert(a[i]);\n }\n return ret;\n }", "public static List<HashSet<Index>> findSetsOfOnes(int[][] twoDArray){\n Matrix matrix = new Matrix(twoDArray);\n List<HashSet<Index>> filtered = new ArrayList<>();\n mapOfOnes = getMapOfOnes(matrix, twoDArray);\n\n // Iterate over the map of indices\n // For each index find it's connected component,\n // then changing it's value to 0 in order to avoid duplications\n // Using auxiliary function: findingConnectedComponent.\n for(Map.Entry<Index, Integer> entry : mapOfOnes.entrySet()) {\n\n if (entry.getValue() == 1) {\n mapOfOnes.put(entry.getKey(), 0);\n HashSet<Index> temp = new HashSet<>(findingConnectedComponent(twoDArray, entry.getKey()));\n filtered.add(temp);\n }\n }\n // Sorting the list\n return filtered.stream()\n .sorted(Comparator.comparing(HashSet::size)).collect(Collectors.toList());\n }", "public static UIDSet[] createUIDSets(long[] uids) {\n\tif (uids == null)\n\t return null;\n\tList<UIDSet> v = new ArrayList<>();\n\tint i,j;\n\n\tfor (i=0; i < uids.length; i++) {\n\t UIDSet ms = new UIDSet();\n\t ms.start = uids[i];\n\n\t // Look for contiguous elements\n\t for (j=i+1; j < uids.length; j++) {\n\t\tif (uids[j] != uids[j-1] +1)\n\t\t break;\n\t }\n\t ms.end = uids[j-1];\n\t v.add(ms);\n\t i = j-1; // i gets incremented @ top of the loop\n\t}\n\tUIDSet[] uidset = new UIDSet[v.size()];\t\n\treturn v.toArray(uidset);\n }", "public static Hashtable<String,Thought> buildWordSet(Vector<Thought> words) {\r\n\t\tHashtable<String,Thought> ret = new Hashtable<String,Thought>();\r\n\t\tfor(Thought word : words) {\r\n\t\t\tret.put(word.representation, word);\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public Set<String> hyponyms(String word) {\n HashSet<String> allhyponyms = new HashSet<String>();\n int maxV = synset.size();\n // int maxV = 0;\n // for (Integer i : synset.keySet()) {\n // if (maxV < i) {\n // maxV = i;\n // }\n // }\n // maxV += 1;\n Digraph digraph = new Digraph(maxV);\n\n // ArrayList<Integer> hypoKeys = new ArrayList<Integer>();\n // for (int i = 0; i < hyponym.size(); i++) {\n // hypoKeys.add(hyponym.get(0).get(i));\n // }\n \n for (ArrayList<Integer> a : hyponym) {\n int key = a.get(0);\n for (int j = 1; j < a.size(); j++) {\n digraph.addEdge(key, a.get(j));\n }\n }\n\n // get synonyms (in same synset), ex. given \"jump\", will get \"parachuting\" as well as \"leap\"\n ArrayList<String> strArray = new ArrayList<String>();\n for (Integer k : getSynsetKeys(word)) {\n strArray.addAll(synset.get(k));\n }\n for (String str : strArray) {\n allhyponyms.add(str);\n }\n\n // for each int from set<int> with all synset IDS\n for (Integer s : GraphHelper.descendants(digraph, getSynsetKeys(word))) {\n for (String t : synset.get(s)) {\n allhyponyms.add(t);\n }\n }\n return allhyponyms;\n }", "@Override\r\n\tpublic MySet intersectSets(MySet[] t) {\r\n\t\tallElements = new ArrayList<Integer>();\r\n\r\n\t\t\r\n\t\tfor(Object element: t[0]) {\r\n\t\t\tallElements.add(element);\r\n\t\t}\r\n\t\r\n\t\tfor(Object e: allElements) {\r\n\t\t\tInteger c = map.getOrDefault(e, 0);\r\n\t\t\tmap.put((E)e, c + 1);\r\n\t\t}\r\n\t\t\r\n\t\tMySet<E> returnSet = (MySet<E>) new Set2<Integer>();\r\n\t\tfor(Map.Entry<E, Integer> entry :map.entrySet())\r\n\t\t\tif(entry.getValue() >= dataSet[0].length) // check\r\n\t\t\t\treturnSet.add(entry.getKey());\r\n\t\t\r\n\t\t\r\n\t\treturn returnSet;\r\n\t}", "protected Vector combinePaths (Component [] activePaths)\n {\n HashSet set = new HashSet();\n for (int i=0; i < activePaths.length; i++) {\n set.addAll(activePaths[i].getNodes());\n } // for i\n return new Vector(set);\n\n }", "public Set<String> hyponyms(String word) {\n hypernymSet = new TreeSet<String>();\n firstsIDset = new HashSet<Integer>();\n for (String[] synStrings : sFile.values()) {\n for (String synset : synStrings) {\n if (synset.equals(word)) {\n for (String synset2 : synStrings) {\n hypernymSet.add(synset2);\n }\n for (Integer key : sFile.keySet()) {\n if (sFile.get(key).equals(synStrings)) {\n firstsIDset.add(key);\n }\n }\n }\n }\n }\n\n sIDset = GraphHelper.descendants(theDigraph, firstsIDset);\n for (Integer id : sIDset) {\n synsetWordStrings = sFile.get(id);\n for (String word2 : synsetWordStrings) {\n hypernymSet.add(word2);\n }\n }\n return hypernymSet;\n }", "private Set<E> toSet(Node<E> n) {\n Set<E> result = new HashSet<>();\n toSet(result, n);\n return result;\n }", "private static Set<String> m23475a(String[] strArr) {\n if (strArr == null || strArr.length == 0) {\n return Collections.emptySet();\n }\n HashSet hashSet = new HashSet(strArr.length);\n for (String str : strArr) {\n hashSet.add(str);\n }\n return hashSet;\n }", "public Set<Coordinate> getAllSurroundingCellsAsCoordinates() {\n Set<MapCoordinate> mapCoordinates = getAllSurroundingCellsAsMapCoordinatesStartingFromTopLeft(1);\n return mapCoordinates\n .stream()\n .map(mapCoordinate -> mapCoordinate.toCoordinate())\n .collect(\n Collectors.toSet()\n );\n }", "public Set<String> filterEntities(Set<String> superset) {\n Set<String> set = new HashSet<String>(); set.addAll(superset);\n // Check to see if any of the relationships are typed... if so, we'll have to do the typed conversions...\n for (int i=0;i<active_relationships.size();i++) {\n\t String relationship = active_relationships.get(i);\n\t if (relationshipFromTyped(relationship)) addTypedStrings(set, relationshipFromHeader(relationship));\n\t if (relationshipToTyped(relationship)) addTypedStrings(set, relationshipToHeader(relationship));\n\t} \n\t// Retain all...\n\tset.retainAll(visible_entities);\n\treturn set;\n }", "private void convertOuterJoinstoJoinsIfPossible(\n List<Quadruple<Integer, Integer, JoinOperator, Integer>> outerJoinsDependencyList) {\n int i, j;\n boolean changes = true;\n while (changes) {\n changes = false;\n for (i = 0; i < outerJoinsDependencyList.size(); i++) {\n Quadruple<Integer, Integer, JoinOperator, Integer> tr1 = outerJoinsDependencyList.get(i);\n if (tr1.getThird().getOuterJoin()) {\n for (j = 0; j < outerJoinsDependencyList.size(); j++) {\n Quadruple<Integer, Integer, JoinOperator, Integer> tr2 = outerJoinsDependencyList.get(j);\n if ((i != j) && !(tr2.getThird().getOuterJoin())) {\n if ((tr1.getSecond().equals(tr2.getFirst())) || (tr1.getSecond().equals(tr2.getSecond()))) {\n outerJoinsDependencyList.get(i).getThird().setOuterJoin(false);\n changes = true;\n }\n }\n }\n }\n }\n }\n\n // now remove all joins from the list, as we do not need them anymore! We only need the outer joins\n for (i = outerJoinsDependencyList.size() - 1; i >= 0; i--) {\n if (!outerJoinsDependencyList.get(i).getThird().getOuterJoin()) { // not an outerjoin\n outerJoinsDependencyList.remove(i);\n }\n }\n\n if (outerJoinsDependencyList.size() == 0) {\n for (i = buildSets.size() - 1; i >= 0; i--) {\n buildSets.remove(i); // no need for buildSets if there are no OJs.\n }\n }\n }", "public final Set<MindObject> getComponents(){\n Set<MindObject> components = new HashSet<>();\n\n components.add(this);\n\n for (MindObject subComponent: getDirectSubComponents()){\n components.add(subComponent);\n components.addAll(subComponent.getDirectSubComponents());\n }\n\n return components;\n }", "private static Set<ARGState> removeSet(Set<ARGState> elements) {\n Set<ARGState> toWaitlist = new LinkedHashSet<ARGState>();\n int i=0;\n for (ARGState ae : elements) {\n if(ae.getParents()!=null){\n for (ARGState parent : ae.getParents()) {\n if (!elements.contains(parent)) {\n toWaitlist.add(parent);\n }\n }\n if(ae.getChildren()!=null)\n ae.removeFromARG();\n else\n ae.setDestroyed(true);\n }\n\n // ae.setNull();\n }\n return toWaitlist;\n }", "private List<Set<String>> getSubSets(Set<String> set) {\n\t\tString[] setArray = set.toArray(new String[0]);\n\t\tList<Set<String>> result = new ArrayList<Set<String>>();\n\t\tfor(int i = 0; i < setArray.length; i++){\n\t\t\tSet<String> subSet = new HashSet<String>();\n\t\t\tfor(int j = 0; j < setArray.length; j++){\n\t\t\t\tif(j != i) subSet.add(setArray[j]);\n\t\t\t}\n\t\t\tresult.add(subSet);\n\t\t}\n\t\treturn result;\n\t}", "private static Set<Item> multiSetIntersection(List<Set<Item>> setList) {\n Set<Item> interQrels = new HashSet<>(setList.get(0));\r\n \r\n for (int i = 1; i< setList.size();i++) {\r\n interQrels.retainAll(setList.get(i)); // intersection with two (and one)\r\n }\r\n\r\n return interQrels;\r\n }", "private InternalQuery<G> setupCores(final InternalQuery<G> query) {\n\t\tfinal Iterator<Variable<G>> undistVarIterator = query.getUndistVars()\n\t\t\t\t.iterator();\n\t\tif (!undistVarIterator.hasNext()) {\n\t\t\treturn query;\n\t\t}\n\t\tfinal DisjointSet<Object> coreVertices = new DisjointSet<Object>();\n\t\tfinal List<QueryAtom<G>> toRemove = new ArrayList<QueryAtom<G>>();\n\n\t\tfinal InternalQuery<G> transformedQuery = query\n\t\t\t\t.apply(new ResultBindingImpl<G>());\n\n\t\twhile (undistVarIterator.hasNext()) {\n\t\t\tfinal Term<G> a = undistVarIterator.next();\n\n\t\t\tcoreVertices.add(a);\n\n\t\t\tfor (final QueryAtom<G> atom : query.findAtoms(\n\t\t\t\t\tQueryPredicate.PropertyValue, null, a, null)) {\n\t\t\t\tcoreVertices.add(atom);\n\t\t\t\tcoreVertices.union(a, atom);\n\n\t\t\t\tfinal Term<G> a2 = atom.getArguments().get(2);\n\t\t\t\tif (query.getUndistVars().contains(a2)) {\n\t\t\t\t\tcoreVertices.add(a2);\n\t\t\t\t\tcoreVertices.union(a, a2);\n\t\t\t\t}\n\t\t\t\ttransformedQuery.remove(atom);\n\t\t\t}\n\t\t\tfor (final QueryAtom<G> atom : query.findAtoms(\n\t\t\t\t\tQueryPredicate.PropertyValue, null, null, a)) {\n\t\t\t\tcoreVertices.add(atom);\n\t\t\t\tcoreVertices.union(a, atom);\n\n\t\t\t\tfinal Term<G> a2 = atom.getArguments().get(0);\n\t\t\t\tif (query.getUndistVars().contains(a2)) {\n\t\t\t\t\tcoreVertices.add(a2);\n\t\t\t\t\tcoreVertices.union(a, a2);\n\t\t\t\t}\n\t\t\t\ttransformedQuery.remove(atom);\n\t\t\t}\n\n\t\t\tfor (final QueryAtom<G> atom : query.findAtoms(QueryPredicate.Type,\n\t\t\t\t\tnull, a)) {\n\t\t\t\tcoreVertices.add(atom);\n\t\t\t\tcoreVertices.union(a, atom);\n\t\t\t\ttransformedQuery.remove(atom);\n\t\t\t}\n\t\t}\n\n\t\tfinal Map<Variable<G>, Set<G>> map = new HashMap<Variable<G>, Set<G>>();\n\t\tfinal Map<Variable<G>, InternalQuery<G>> map2 = new HashMap<Variable<G>, InternalQuery<G>>();\n\n\t\tfor (final Set<Object> set : coreVertices.getEquivalenceSets()) {\n\t\t\tfinal InternalQuery<G> coreQuery = new QueryImpl<G>(kb);\n\t\t\tfor (final Object a : set) {\n\t\t\t\tif (a instanceof QueryAtom) {\n\t\t\t\t\tfinal QueryAtom<G> queryAtom = (QueryAtom<G>) a;\n\t\t\t\t\ttransformedQuery.remove(queryAtom);\n\t\t\t\t\tcoreQuery.add(queryAtom);\n\t\t\t\t\tfor (final Term<G> t : queryAtom.getArguments()) {\n\t\t\t\t\t\tif (query.getDistVars().contains(t)) {\n\t\t\t\t\t\t\tcoreQuery.addDistVar(t.asVariable());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (final Variable<G> distVar : coreQuery.getDistVars()) {\n\t\t\t\tSet<G> s = map.get(distVar);\n\t\t\t\tInternalQuery<G> s2 = map2.get(distVar);\n\n\t\t\t\tif (s == null) {\n\t\t\t\t\ts = new HashSet<G>();\n\t\t\t\t\tmap.put(distVar, s);\n\t\t\t\t}\n\n\t\t\t\tif (s2 == null) {\n\t\t\t\t\tmap2.put(distVar, coreQuery.apply(Collections\n\t\t\t\t\t\t\t.<Variable<G>, Term<G>> emptyMap()));\n\t\t\t\t} else {\n\t\t\t\t\tfor (final QueryAtom<G> atom : coreQuery.getAtoms()) {\n\t\t\t\t\t\ts2.add(atom);\n\t\t\t\t\t}\n\n\t\t\t\t\ts2.addDistVar(distVar);\n\t\t\t\t\ts2.addResultVar(distVar);\n\t\t\t\t}\n\n\t\t\t\ts.add(coreQuery.rollUpTo(distVar, new HashSet<Term<G>>()));\n\t\t\t}\n\t\t}\n\n\t\tfor (final Variable<G> var : map.keySet()) {\n\t\t\ttransformedQuery\n\t\t\t\t\t.Core(var, f.wrap(f.objectIntersectionOf(map.get(var))),\n\t\t\t\t\t\t\tmap2.get(var));\n\t\t\ttransformedQuery.addDistVar(var);\n\t\t\ttransformedQuery.addResultVar(var);\n\t\t}\n\n\t\treturn transformedQuery;\n\t}", "Boolean superset(MultiSet<X> s);", "public static void main (String[]args){\n String[] test = {\"1, 3, 4, 7, 13\", \"1, 2, 4, 13, 15\"};\n Stream<String> testStrings = Arrays.stream(test);\n testStrings.map(s -> s.split(\",\"))\n .flatMap(Arrays::stream).distinct()\n .collect(Collectors.toList())\n .forEach(System.out::print);\n //FindIntersection(test);\n //System.out.println(LongWord(test));\n\n }", "private Set<CharacteristicValueObject> ontology2CharacteristicValueObject( Collection<OntologyTerm> ontologyTerms ) {\n\n Set<CharacteristicValueObject> characteristicsVO = new HashSet<CharacteristicValueObject>();\n\n for ( OntologyTerm ontologyTerm : ontologyTerms ) {\n CharacteristicValueObject phenotype = new CharacteristicValueObject( ontologyTerm.getLabel().toLowerCase(),\n ontologyTerm.getUri() );\n characteristicsVO.add( phenotype );\n }\n return characteristicsVO;\n }", "public Set<String> hyponyms(String word) {\n HashSet<String> set = new HashSet<String>();\n for (Integer id: synsets.keySet()) {\n TreeSet<String> hs = synsets.get(id);\n if (hs.contains(word)) {\n for (String s: hs) {\n set.add(s);\n }\n TreeSet<Integer> ids = new TreeSet<Integer>();\n ids.add(id);\n Set<Integer> desc = GraphHelper.descendants(dg, ids);\n for (Integer i: desc) {\n for (String s: synsets.get(i)) {\n set.add(s);\n }\n }\n }\n }\n return set;\n }", "public ZYSet<ElementType> union(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n result.add(e);\n }\n for(ElementType e :otherSet){\n result.add(e);\n }\n \n return result;\n }", "public Set<Edge<V>> edgeSet();", "DisjointSet getDisjoint();", "public ZYSet<ElementType> intersection(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n if(otherSet.contains(e)){\n result.add(e);\n }\n }\n return result;\n }", "private Object[] result(List<Object> set)\n {\n state.put(RESULTS_SET, set);\n\n Expression[] result = compilation.getExprResult();\n\n // Use first element only (if there are any). Should be same in other \"group-by\" components\n Object element = set != null && !set.isEmpty() ? set.get(0) : null;\n state.put(candidateAlias, element);\n\n Object[] r = new Object[result.length];\n for (int j=0; j<result.length; j++)\n {\n r[j] = result[j].evaluate(evaluator);\n }\n\n return r;\n }", "private Set<Integer> getSynsetKeys(String word) {\n HashSet<Integer> kset = new HashSet<Integer>();\n\n for (ArrayList<String> o : synsetRev.keySet()) {\n for (String p : o) {\n if (p.equals(word)) {\n kset.add(synsetRev.get(o));\n }\n }\n }\n return kset;\n }", "static void arrayToSet()\n\t{\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\tString arr[] = {\"A\",\"B\",\"C\",\"D\",\"E\",\"A\"};\n\t\t\t\n\t\t\toList = Arrays.asList(arr);\n\t\t\tSystem.out.println(\"List: \"+oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>(oList);\n\t\t\t\n\t\t\tSystem.out.println(\"Set: \"+oSet);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet = null;\n\t\t}\n\t}", "public static <T> Set<T> array2Set(T[] array) {\n\t\treturn new HashSet<T>(Arrays.asList(array));\n\t}", "public static <T> ImmutableSet<T> asSetWithoutNulls(T... elements) {\n return Arrays.stream(elements).filter(Objects::nonNull).collect(toImmutableSet());\n }", "Set<E> getForwardNeighbors();", "private ArrayList<ArrayList<ComparableExpression>> relationToTuples(HashMap<ComparableExpression,\n HashSet<ComparableExpression>> rel) {\n ArrayList<ArrayList<ComparableExpression>> list = new ArrayList<>();\n for (Map.Entry<ComparableExpression, HashSet<ComparableExpression>> mapEntry : rel.entrySet()) {\n ComparableExpression c1 = mapEntry.getKey();\n for (ComparableExpression c2 : mapEntry.getValue()) {\n list.add(new ArrayList<>(Arrays.asList(c1, c2)));\n }\n }\n return list;\n }", "private static <T> Collection<Set<T>> partitionWithComparator(\n Collection<T> elements, Comparator<T> equivalenceRelation) {\n // TODO(bazel-team): (2009) O(n*m) where n=|elements| and m=|eqClasses|; i.e.,\n // quadratic. Use Tarjan's algorithm instead.\n List<Set<T>> eqClasses = new ArrayList<>();\n for (T element : elements) {\n boolean found = false;\n for (Set<T> eqClass : eqClasses) {\n if (equivalenceRelation.compare(eqClass.iterator().next(),\n element) == 0) {\n eqClass.add(element);\n found = true;\n break;\n }\n }\n if (!found) {\n Set<T> eqClass = new HashSet<>();\n eqClass.add(element);\n eqClasses.add(eqClass);\n }\n }\n return eqClasses;\n }", "public int subarrayBitwiseORs(int[] A) {\n HashSet<Integer> ans = new HashSet<>();\n HashSet<Integer> tmp1 = new HashSet<>();\n for(int x : A) {\n HashSet<Integer> tmp2 = new HashSet<>();\n tmp2.add(x);\n \n // Now OR x with every contiguous combination with x at the end\n // ie {1,2,x} --> {1|2|x}, {2|x}, {x}\n //\n // A = {1,2,4}\n // x = 4\n // tmp1 = { [2]=2, [1|2]=3 }\n // tmp2 = { 4=4, 4|[2]=6, 4|[1|2]=7 }\n // ans = { [1]=1, [2]=2, [1|2]=3, [4]=4, [2|4]=6, [1|2|4]=7 }\n for(int y : tmp1) {\n tmp2.add(x | y);\n }\n ans.addAll(tmp2);\n tmp1 = tmp2;\n }\n return ans.size();\n }", "static TreeSet<Conjunction> parseConjunctions(Scanner data){\n\t\tArrayList<String[]> raw = parseDataToArray(data);\n\t\tTreeSet<Conjunction> output = new TreeSet<Conjunction>();\n\n\t\tfor(String[] current : raw){ //iterate over each line from the original file.\n\n\t\t\tif(current.length != Values.CONJUNCTION_DATA_ARRAY_LENGTH_CORRECT){\n\t\t\t\tSystem.err.println(\"Error parsing a line.\");\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//System.out.println(\"Raw: \" + Arrays.toString(current));\n\n\t\t\t//current[] contains a split based on tabs. Generally {chapter, nom/gen/gender, definition}.\n\n\t\t\tint chapter = 0;\n\t\t\tString Conjunction = null;\n\t\t\tArrayList<String> definitions = new ArrayList<String>();\n\n\t\t\t//Values.betterStringArrayPrint(current);\n\n\t\t\ttry{ //try to read a noun, assuming that the chapter IS specified\n\t\t\t\tchapter = Integer.parseInt(current[0]);\n\t\t\t\tConjunction = current[1];\n\t\t\t\tList<String> tempDefinitions = Arrays.asList(current[2].split(\",|;\")); //definitions\n\t\t\t\tdefinitions.addAll(tempDefinitions);\n\t\t\t} catch(Exception e){\n\t\t\t\tSystem.err.println(\"Could not read a line!\");\n\t\t\t\tcontinue; //We can't make a noun out of the botrked line.\n\t\t\t}\n\t\t\ttrimAll(definitions);\n\t\t\tConjunction currentConjunction = new Conjunction(Conjunction, chapter, definitions);\n\t\t\tSystem.out.println(\"Added: \" + currentConjunction);\n\t\t\toutput.add(currentConjunction);\n\t\t}\n\n\t\treturn output;\n\t}", "public static ArrayList<Predicate> generatePredicates(ArrayList<Relation> relations, int numVars){\n\t\tArrayList<Predicate> predicateSet = new ArrayList<Predicate>();\n\n\t\tfor (Relation r : relations){\n\t\t\t//get all variable tuples, attach to relation name\n\t\t\tchar[][] varTuples = fillVars(r.arity(), numVars);\n\n\t\t\tfor (char[] tuple : varTuples){\n\t\t\t\tPredicate p = new Predicate(r, tuple);\n\t\t\t\tpredicateSet.add(p);\n\t\t\t}\n\t\t}\n\t\treturn predicateSet;\n\t}", "public static final HashSet set (Object ... items) {\r\n HashSet result = new HashSet();\r\n for (int i=0; i<items.length; i++) {\r\n result.add(items[i]);\r\n }\r\n return result;\r\n }", "default Stream<Triple> witnesses(Triple... elements) {\n Set<Triple> toBeMatched = new HashSet<>(Arrays.asList(elements));\n return apex().carrier().elements().filter(witnes -> {\n return toBeMatched.stream().allMatch(target -> {\n return projections().anyMatch(morphism -> morphism.apply(witnes).map(target::equals).orElse(false));\n });\n });\n }", "public static Set<Tag> getTagSet(String... strings) {\n return Arrays.stream(strings)\n .map(Tag::new)\n .collect(Collectors.toSet());\n }", "public static Set<Tag> getTagSet(String... strings) {\n return Arrays.stream(strings)\n .map(Tag::new)\n .collect(Collectors.toSet());\n }", "public static Set<Tag> getTagSet(String... strings) {\n return Arrays.stream(strings)\n .map(Tag::new)\n .collect(Collectors.toSet());\n }", "private static int[][] make_subtypes(Type[] alltypes) {\n int[][] subs = new int[alltypes.length][];\n int[] tmp = new int[alltypes.length];\n for( int i=0; i<subs.length; i++ ) {\n int len=0;\n for( int j=0; j<subs.length; j++ )\n if( i!=j && alltypes[i].isa(alltypes[j]) )\n tmp[len++]=j; // isa numbers are sorted by increasing 'j'\n subs[i] = Arrays.copyOfRange(tmp,0,len);\n }\n return subs;\n }", "private ISet<String> getKeySet(IList<String> words) {\n\t\tISet<String> keySet = new ChainedHashSet<String>();\n\t\tfor (String word: words) {\n\t\t\tkeySet.add(word);\n\t\t}\n\t\treturn keySet;\n }", "public void setTerms(Term[] terms) { this.terms = terms; }", "public TermToVertexCount[] getSubTermVertexMappings(String term)\n {\n /* String is not valid as-is.\n * \n * Replace and split words into parts.\n */\n term = term.replace('-', ' ');\n String [] arr = term.split(\" \");\n\n /* Remove common words */\n for(int i = 0; i < arr.length; i++)\n {\n if(arr[i].equals(\"and\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"or\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"to\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"be\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"the\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"a\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"of\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"on\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"in\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"for\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"with\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"by\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"into\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"an\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"is\"))\n {\n arr[i] = \"\";\n }\n else if(arr[i].equals(\"no\"))\n {\n arr[i] = \"\";\n }\n }//end: for(i)\n\n /* Create String array without common terms */\n int size = 0;\n for(int i = 0; i < arr.length; i++)\n {\n if(!arr[i].equals(\"\") && stem)\n { // Stem if required\n arr[i] = PorterStemmerTokenizerFactory.stem(arr[i]);\n }\n \n // Check for valid term\n if(!arr[i].equals(\"\") && getVertexMappings(arr[i]) != null)\n {\n size++;\n }\n }//end: for(i)\n \n if(size == 0)\n { /* No valid terms found */\n return null;\n }\n \n /* At least one valid term was found */\n TermToVertexCount[] words = new TermToVertexCount[size];\n int pos = 0;\n \n for(int i = 0; i < arr.length; i++)\n {\n // Check for valid term\n if(!arr[i].equals(\"\"))\n {\n // Get mappings for sub-term\n TermToVertexCount[] temp = getVertexMappings(arr[i]);\n \n if(temp != null)\n {\n words[pos] = temp[0];\n pos++;\n }//end: if(temp)\n \n }//end: if(!arr[i])\n }//end: for(i)\n \n return words; \n }", "protected Set<VALUEIN> createSetForNeighbors(final boolean isSetForPrimary) {\n return new HashSet<>();\n }", "Stream<BaseEdge> findEdges(final String[] ids);", "Set<CyEdge> getExternalEdgeList();", "private boolean moveSingletonsOutwards(final XJunction innerJunction,\r\n\t\t\t\t\tfinal Set<XJunction> innerJunctionOfOuterJunctions) throws AtomAndNegationException {\r\n\t\t\t\tboolean someSingletonContained = false;\r\n\t\t\t\tfinal Iterator<XJunction> it = innerJunctionOfOuterJunctions.iterator();\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\tfinal XJunction outerJunction = it.next();\r\n\t\t\t\t\tif (outerJunction.size() == 1) {\r\n\t\t\t\t\t\tfinal Entry<Term, Polarity> singleton = outerJunction.entrySet().iterator().next();\r\n\t\t\t\t\t\tinnerJunction.add(singleton.getKey(), singleton.getValue());\r\n\t\t\t\t\t\tsomeSingletonContained = true;\r\n\t\t\t\t\t\tit.remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn someSingletonContained;\r\n\t\t\t}", "public static ArrayList<Expression> extractDisjunct(Expression e){\n\t\tArrayList<Expression> result = new ArrayList<Expression>();\n\t\tif (!(e instanceof OrExpression))\n\t\t\tresult.add(e);\n\t\telse \n\t\t\taddDisjunct(result,e);\n\t\treturn result;\n\t}", "public VertexSet intersection(VertexSet ot) {\r\n\t\tVertexSet ans = new VertexSet();\r\n\t\tint i1=0,i2=0;\r\n\t\twhile(i1<this.size() & i2 < ot.size()) {\r\n\t\t\tint a1=this.at(i1), a2 = ot.at(i2);\r\n\t\t\tif(a1==a2) {\r\n\t\t\t\tans.add(a1); i1++; i2++;}\r\n\t\t\telse if(a1<a2) {i1++;}\r\n\t\t\telse i2++;\r\n\t\t}\r\n\t\treturn ans;\r\n\t}", "public Collection<URI> getDirectDisjointWiths(final URI term) {\n //preconditions\n assert term != null : \"term must not be null\";\n\n final Collection<URI> disjointWithTerms = new ArrayList<>();\n final Integer id = uriToIdDictionary.get(RDFUtility.formatResource(term));\n if (id != null) {\n final List<Integer> disjointWiths = disjointWithDictionary.get(id);\n if (disjointWiths != null) {\n for (final Integer disjointWith : disjointWiths) {\n disjointWithTerms.add(RDFUtility.makeURIFromAlias(uris.get(disjointWith)));\n }\n }\n }\n return disjointWithTerms;\n }", "public static void powerSet(ArrayList<Integer> set) {\n HashSet<ArrayList<Integer>> output = new HashSet<ArrayList<Integer>>();\n output.add(new ArrayList<Integer>());\n for(Integer a : set) {\n HashSet<ArrayList<Integer>> new_subsets = new HashSet<ArrayList<Integer>>();\n ArrayList<Integer> el_set = new ArrayList<Integer>(a);\n new_subsets.add(el_set);\n for(ArrayList<Integer> subset: output) {\n ArrayList<Integer> new_subset = new ArrayList<Integer>(subset);\n new_subset.add(a);\n new_subsets.add(new_subset);\n }\n if(new_subsets.size() > 0) {\n output.addAll(new_subsets);\n }\n }\n for(ArrayList<Integer> subset: output) {\n System.out.print(\"{\");\n for(Integer el: subset) {\n System.out.print(el + \",\");\n }\n System.out.println(\"}\");\n }\n }", "static SortedSet<Integer> getSet(int[] array){\n SortedSet<Integer> result = new TreeSet<Integer>();\n for (int i=0; i<array.length; i++){\n result.add(array[i]);\n }\n return result;\n }", "private List<RexNode> preprocessRangePredicates(List<RexNode> conjuncts, List<SchemaPath> fieldNames, RexBuilder rexBuilder,\n Set<RexNode> combinedRangePredicates) {\n Map<SchemaPath, List<RexNode>> colToRangePredicateMap = new HashMap<>();\n List<RexNode> nonRangePredList = new ArrayList<RexNode>();\n for (RexNode pred : conjuncts) {\n if (pred.isA(RANGE_PREDICATE)) {\n SchemaPath col = getColumn(pred, fieldNames);\n if (col != null) {\n List<RexNode> predList = null;\n if ((predList = colToRangePredicateMap.get(col)) != null) {\n predList.add(pred);\n } else {\n predList = new ArrayList<>();\n predList.add(pred);\n colToRangePredicateMap.put(col, predList);\n }\n }\n } else {\n nonRangePredList.add(pred);\n }\n }\n\n List<RexNode> newPredsList = new ArrayList<>();\n newPredsList.addAll(nonRangePredList);\n\n // for the predicates on same column, combine them into a single conjunct\n for (Map.Entry<SchemaPath, List<RexNode>> entry : colToRangePredicateMap.entrySet()) {\n List<RexNode> predList = entry.getValue();\n if (predList.size() >= 1) {\n if (predList.size() > 1) {\n RexNode newPred = RexUtil.composeConjunction(rexBuilder, predList, false);\n newPredsList.add(newPred);\n // also save this newly created predicate in a separate set for later use\n combinedRangePredicates.add(newPred);\n } else {\n newPredsList.add(predList.get(0));\n }\n }\n }\n return newPredsList;\n }", "public static void main(String[] args) {\n Set<Inner> set = new HashSet<>();\n System.out.println(set.add(new Inner(\"A\")));\n System.out.println(set.add(new Inner(\"A\")));\n System.out.println(set.add(new Inner(\"A\")));\n\n System.out.println(set);\n }", "public static <T> Set<T> AsSet(@NonNull T... ts) {\n return Create_UnModifiableSet_By_InputElements(new HashSet<T>(), ts);\n }", "public Set<String> hyponyms(String word) {\n Set<Integer> synIDs = new TreeSet<Integer>();\n Set<Integer> synKeys = synsetMap.keySet();\n for (Integer id : synKeys) {\n if (synsetMap.get(id).contains(word)) {\n synIDs.add(id);\n }\n }\n Set<Integer> hypIDs = GraphHelper.descendants(g, synIDs);\n Set<String> result = new TreeSet<String>();\n\n for (Integer i : hypIDs) {\n ArrayList<String> al = synsetMap.get(i);\n result.addAll(al);\n }\n return result;\n }", "public Set<MindObject> getDirectSubComponents(){\n return new HashSet<>();\n }", "private boolean[][] makeSet(int[] sol, int n) {\n boolean[][] ret = new boolean[n][universalSetSize];\n int r = 0;\n for (int i = 0; i < n; i++) { // Row\n int row = sol[i];\n System.arraycopy(input[row], 0, ret[r], 0, input[i].length);\n r++;\n }\n return ret;\n }", "public void unifyAccessPaths(Set roots) {\n LinkedList worklist = new LinkedList();\n for (Iterator i = roots.iterator(); i.hasNext(); ) {\n worklist.add(i.next());\n }\n while (!worklist.isEmpty()) {\n Node n = (Node) worklist.removeFirst();\n if (n instanceof UnknownTypeNode) continue;\n unifyAccessPathEdges(n);\n for (Iterator i = n.getAccessPathEdges().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n FieldNode n2 = (FieldNode) e.getValue();\n Assert._assert(n2 != null);\n if (roots.contains(n2)) continue;\n worklist.add(n2); roots.add(n2);\n }\n for (Iterator i=n.getNonEscapingEdges().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry) i.next();\n Object o = e.getValue();\n if (o instanceof Node) {\n Node n2 = (Node)o;\n Assert._assert(n2 != null);\n if (roots.contains(n2)) continue;\n worklist.add(n2); roots.add(n2);\n } else {\n Set s = NodeSet.FACTORY.makeSet((Set) o);\n for (Iterator j = s.iterator(); j.hasNext(); ) {\n Object p = j.next();\n Assert._assert(p != null);\n if (roots.contains(p)) j.remove();\n }\n if (!s.isEmpty()) {\n worklist.addAll(s); roots.addAll(s);\n }\n }\n }\n }\n }", "@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //Declare return SetInterface\n SetInterface<T> answer = new ArraySet();\n //Add the items from the calling ArraySet to the return Set\n for (int i = 0; i < this.numItems; i++){\n answer.addItem(arr[i]);\n }\n //Convert the other set to an array in case it isnt and to \n //ease iteration\n T[] other = rhs.toArray();\n //Add the items from RHS to return Set\n for (int j = 0; j < rhs.getSize(); j++){\n answer.addItem(other[j]);\n }\n //Return the answer\n return answer; \n }", "private boolean hasFilterClass(Set<OWLClassAxiom> axioms, Set<OWLClass> rootTerms) {\n if (axioms != null && !axioms.isEmpty()) {\n for (OWLClassAxiom ax : axioms) {\n if (ax instanceof OWLEquivalentClassesAxiom) {\n Set<OWLClass> signature = ax.getClassesInSignature();\n for (OWLClass sigCls : signature) {\n NodeSet<OWLClass> superClasses = reasoner.getSuperClasses(sigCls, false);\n for(OWLClass root : rootTerms) {\n if (superClasses.containsEntity(root)) {\n return true;\n }\n }\n }\n }\n }\n }\n return false;\n }", "public static List<Synset> getAllMeronymSynset(IndexWord word) throws JWNLException {\n List<Synset> result=new ArrayList<>();\n\n for(Synset wordSynset:word.getSenses()){\n PointerTargetTree hyponyms = PointerUtils.getInstance().getInheritedMeronyms(wordSynset,4,4);\n PointerTargetTreeNode rootnode = hyponyms.getRootNode();\n LinkedList<PointerTargetTreeNode> stack = new LinkedList<>();\n if(rootnode==null){\n return result;\n }\n stack.add(rootnode);\n while(!stack.isEmpty()){\n PointerTargetTreeNode node = stack.pollLast();\n result.add(node.getSynset());\n PointerTargetTreeNodeList childList = node.getChildTreeList();\n if(childList!=null){\n for(int i=0;i<childList.size();i++){\n stack.add((PointerTargetTreeNode)childList.get(i));\n }\n }\n\n }\n\n }\n\n return result;\n }", "private void trimX() {\n\t\tint indexIntoBranches = 0;\n\t\tfor (int i = 0; i < this.branches.size(); i++) {\n\t\t\tif (this.branches.get(i).size() == this.numXVertices) {\n\t\t\t\tindexIntoBranches = i;\n\t\t\t}\n\t\t}\n\n\t\tthis.allX = (ArrayList) this.branches.get(indexIntoBranches).clone(); // We need this for a set difference above\n\n\t\tfor (int k = 0; k < this.branches.get(indexIntoBranches).size(); k++) {\n\t\t\tfor (int j = 0; j < this.branches.get(indexIntoBranches).size(); j++) {\n\t\t\t\t// Ignore if the index is the same - otherwise remove the edges\n\t\t\t\tif (!(k == j)) {\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(k)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(j));\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(j)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean[] asSetOfBool() {\n boolean[] rslt = new boolean[this.value.length];\n for (int i=0; i<this.value.length; i++) rslt[i] = this.value[i];\n return rslt;\n }", "private Collection<Node> keepOnlySetElement(Collection<Node> nodes) {\n Set<Node> elements = new HashSet<>();\n for (Node node : nodes) {\n Edge originalEdge = synchronizer().getOriginalEdge(node);\n if ((originalEdge != null && !boundaries.edges.contains(originalEdge))\n || !boundaries.nodes.contains(node)) {\n elements.add(node);\n }\n }\n return elements;\n }", "void setDisjoint(DisjointSet disjoint);", "abstract CharArraySet build();", "public Collection getSuperclassesOfIntersection(OWLClass[] clses, ReasonerTaskListener taskListener) throws DIGReasonerException;", "static Set<Term> rewriteAll(Set<Term> terms, Set<Equation> allEquations, Map<Term, Term> steps, boolean rewriteRight, boolean rewriteLeft) {\n Set<Term> toAdd = new HashSet<>();\n\n for (Term term : terms) {\n for (Equation eq : allEquations) {\n for (Term subterm : term.getUniqueSubterms()) {\n // Try left\n if (rewriteRight) {\n // Try left\n Map<Variable, Term> sub = eq.getLeft().getSubstitution(subterm, new HashMap<>());\n\n if (sub != null) {\n Term rewriteGoal = eq.getRight();\n Term newT = rewriteTerm(steps, term, subterm, sub, rewriteGoal);\n toAdd.add(newT);\n }\n }\n\n if (rewriteLeft) {\n // Try right\n Map<Variable, Term> sub2 = eq.getRight().getSubstitution(subterm, new HashMap<>());\n\n if (sub2 != null) {\n Term newt = eq.getLeft();\n toAdd.add(rewriteTerm(steps, term, subterm, sub2, newt));\n }\n }\n }\n }\n }\n\n return toAdd;\n }", "public void createSet(String element) {\n\t\t\n\t\tSet<String> set = new HashSet<String>();\n\t\tset.add(element);\n\t\t\n\t\tMap<String, Set<String>> map = new HashMap<String, Set<String>>();\t\t\n\t\tmap.put(element, set);\n\t\t\n\t\tdisjointSet.add(map);\n\t\n\t}", "private static <T> Set<T> Create_UnModifiableSet_By_InputElements(@NonNull Set<T> set, @NonNull T... ts) {\n for (T t : ts) {\n set.add(t);\n }\n\n return Collections.unmodifiableSet(set);\n }", "public abstract NestedSet<Artifact> auxiliary();", "private boolean checksetunions(Set<String> set, HashMap<String, ArrayList<String>> c) {\n\t\tObject[] ckeys = c.keySet().toArray();\r\n\t\tfor (int i = 0; i < c.keySet().size(); i++) {\r\n\t\t\tif (c.get(ckeys[i]).containsAll(set)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void fillDistinctRules(){\n\tint totRules =0;\n\tfor(int i=1;i<ConditionTree.length;i++){\n\t\tif((!ConditionTree[i][1].equals(ConditionTree[i-1][1])) && ConditionTree[i][4].equals(\"String\")){\n\t\t\ttotRules++;\n\t\t}\n\t}\n\n\tdistinctRules = new String[totRules][2];\n\n\t//filling distinct rules array first column i-e rules names only\n\tint disRulIndex = 0;\n\tfor(int i=1;i<ConditionTree.length;i++){\n\t\tif((!ConditionTree[i][1].equals(ConditionTree[i-1][1])) && ConditionTree[i][4].equals(\"String\")){\n\t\t\tdistinctRules[disRulIndex][0] = ConditionTree[i][1];\n\t\t\tdisRulIndex++;\n\t\t}\n\t}\n\t\n\t\n\t\n\tfor(int a=0;a<distinctRules.length;a++){\n\t\tdistinctRules[a][1] = \"\";\n\t\tfor(int i=0;i<ConditionTree.length;i++){\n\t\t\tif(distinctRules[a][0].equals(ConditionTree[i][1])){\n\t\t\t\tdistinctRules[a][1] += ConditionTree[i][3] + \",\";\n\t\t\t}\n\t\t}\n\t\t//removing the last comma\n\t\tdistinctRules[a][1] = distinctRules[a][1].substring(0, distinctRules[a][1].length()-1);\n//\t\tSystem.out.println(distinctRules[a][0] + \" : \" + distinctRules[a][1]);\n\t}\n}", "public Set<String> getFilterTerms() {\n\t\tSet<String> filterTerms = new HashSet<String>();\n\t\tfor(String filters : sessionBean.getFilters()) {\n\t\t\t// split by 0 or more spaces, followed by either 'and','or', comma or more spaces\n\t\t\tString[] filterTermsArray = filters.split(\"\\\\s*(and|or|,)\\\\s*\");\n\t\t\tCollections.addAll(filterTerms, filterTermsArray);\n\t\t}\n\t\treturn filterTerms;\n\t}", "int[] getEdgesIncidentTo(int... nodes);", "private HashSet<String> buildsetofterms(String filename)\r\n\t{\r\n\t\tString readLine, terms[];\r\n HashSet<String> fileTerms = new HashSet<String>();\r\n try \r\n {\r\n BufferedReader reader = new BufferedReader(new FileReader(filename));\r\n while ((readLine = reader.readLine()) != null)\r\n {\r\n terms = (readLine.toLowerCase().replaceAll(\"[.,:;'\\\"]\", \" \").split(\" +\"));\r\n for (String term : terms)\r\n {\r\n if (term.length() > 2 && !term.equals(\"the\"))\r\n fileTerms.add(term);\r\n }\r\n }\r\n }\r\n catch(IOException e){\r\n e.printStackTrace();\r\n }\r\n return fileTerms;\r\n }", "public Set (ArrayList<String> inputArray) { // Constructor, taking in an ArrayList\n\t\tstringArray = inputArray;\n\t\t// Setting that passed ArrayList to our private variable\n\t}", "public static void main(String[] args) {\n String s1 = \"ShivaniKashyap\";\n char[] chararray = s1.toCharArray();\n LinkedHashSet set = new LinkedHashSet();\n LinkedHashSet newset = new LinkedHashSet();\n for(int i=0;i<chararray.length;i++)\n {\n if( !set.add(chararray[i]))\n {\n newset.add(chararray[i]);\n\n }\n\n }\n System.out.println(newset);\n }", "private void initializeTBoxAxioms(Set<OWLSubClassOfAxiom> normalizedAxioms) {\n\t\tfor (OWLSubClassOfAxiom axiom : normalizedAxioms) {\n\t\t\tOWLClassExpression subClass = axiom.getSubClass();\n\t\t\tOWLClassExpression superClass = axiom.getSuperClass();\n\n\t\t\tif ((subClass.getClassExpressionType().equals(ClassExpressionType.OBJECT_INTERSECTION_OF)\n\t\t\t\t\t\t|| subClass.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS) || subClass.isOWLThing())\n\t\t\t\t\t\t&& (superClass.getClassExpressionType().equals(ClassExpressionType.OBJECT_UNION_OF)\n\t\t\t\t\t\t\t\t\t|| superClass.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS) || superClass.isOWLNothing())) {\n\n\t\t\t\tif (subClass.getClassExpressionType().equals(ClassExpressionType.OBJECT_INTERSECTION_OF))\n\t\t\t\t\tfor (OWLClassExpression conjunct : subClass.asConjunctSet())\n\t\t\t\t\t\tif (!conjunct.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS))\n\t\t\t\t\t\t\tSystem.out.println(\"WARNING!!! Unrecognized OBJECT_INTERSECTION_OF subclass at initializeTBoxAxioms at NFSRIQOntology.java\" + \"\\n\" + \" -> \" + axiom\n\t\t\t\t\t\t\t\t\t\t+ \" -> \" + subClass.getClassExpressionType() + \"\\n -> \" + subClass + \"\\n\");\n\n\t\t\t\tif (subClass.getClassExpressionType().equals(ClassExpressionType.OBJECT_UNION_OF))\n\t\t\t\t\tfor (OWLClassExpression disjunct : superClass.asDisjunctSet())\n\t\t\t\t\t\tif (!disjunct.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS))\n\t\t\t\t\t\t\tSystem.out.println(\"WARNING!!! Unrecognized OBJECT_UNION_OF subclass at initializeTBoxAxioms at NFSRIQOntology.java\" + \"\\n\" + \" -> \" + axiom + \" -> \"\n\t\t\t\t\t\t\t\t\t\t+ superClass.getClassExpressionType() + \"\\n -> \" + superClass + \"\\n\");\n\n\t\t\t\tintDisjAxioms.add(axiom);\n\n\t\t\t} else if (subClass.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS)) {\n\n\t\t\t\tswitch (Srd.conceptTypeToString(superClass)) {\n\t\t\t\tcase Srd.allValuesFrom + Srd.className:\n\t\t\t\tcase Srd.allValuesFrom + Srd.bottom:\n\t\t\t\t\t// A sqs forall R.B\n\t\t\t\t\tunivAxioms.add(axiom);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Srd.maxCardinality + Srd.className:\n\t\t\t\tcase Srd.maxCardinality + Srd.top:\n\t\t\t\t\t// A sqs < n R.B\n\t\t\t\t\tmaxCardAxioms.add(axiom);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Srd.minCardinality + Srd.className:\n\t\t\t\tcase Srd.minCardinality + Srd.top:\n\t\t\t\t\t// A sqs > n R.B\n\t\t\t\t\tminCardAxioms.add(axiom);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"WARNING!!! Unrecognized superClass ClassExpressionType at initializeAxioms at NFSRIQOntology.java\" + \"\\n\" + \" -> \" + axiom + \"\\n\" + \" -> \"\n\t\t\t\t\t\t\t\t+ superClass.getClassExpressionType() + \"\\n -> \" + superClass + \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"WARNING!!! Unrecognized type of axiom at initializeTBoxAxioms at NFSRIQOntology.java\" + \"\\n\" + \" -> \" + axiom + \"\\n\");\n\n\t\t}\n\t}", "public static ArrayList<Set<String>> getConnectedComponentsInDistrict(\n District district,\n HashMap<String, PrecinctNeighborRelation> precinctNeighborRelationMap) {\n // ( precinctGeoId : PrecinctNeighborRelation } pair in precinctNeighborRelationMap\n\n // first, build from -> to_list hash map\n HashMap<String, ArrayList<String>> fromToList = new HashMap<>();\n for(PrecinctNeighborRelation pnr : precinctNeighborRelationMap.values()) {\n ArrayList<NeighborData> ndList = pnr.getNeighborDataList();\n ArrayList<String> toGeoidList = new ArrayList<>();\n for(NeighborData nd : ndList)\n toGeoidList.add(nd.getToGeoId());\n fromToList.put(pnr.getFromGeoId(), toGeoidList);\n }\n\n Set<Precinct> precinctsOfDistrict = district.getPrecincts();\n\n ArrayList<String> pgeoidsOfDistrict = new ArrayList<>();\n ArrayList<Set<String>> connectedComponentList = new ArrayList<>();\n HashMap<String, Set<String>> referenceToItsSet = new HashMap<>();\n\n for(Precinct p : precinctsOfDistrict) {\n Set<String> connectedComponent = new HashSet<>();\n connectedComponent.add(p.getGeoId());\n connectedComponentList.add(connectedComponent);\n referenceToItsSet.put(p.getGeoId(), connectedComponent);\n pgeoidsOfDistrict.add(p.getGeoId());\n }\n\n for(Precinct p : precinctsOfDistrict) {\n ArrayList<String> toGeoidList = fromToList.get(p.getGeoId());\n Set<String> itsSet = referenceToItsSet.get(p.getGeoId());\n for(String neighborGeoid : toGeoidList) {\n // if the neighbor is in same district\n // if itsSet not yet contains the neighbor\n if(pgeoidsOfDistrict.contains(neighborGeoid)\n && !itsSet.contains(neighborGeoid)) {\n // neighbors set will be removed from the memory\n Set<String> neighborsSet = referenceToItsSet.get(neighborGeoid);\n for(String elementFromNeighborSet : neighborsSet) {\n referenceToItsSet.put(elementFromNeighborSet, itsSet);\n itsSet.add(elementFromNeighborSet);\n }\n connectedComponentList.remove(neighborsSet);\n }\n }\n }\n\n // stubbed\n// Set<Precinct> oneset = new HashSet<>();\n// ArrayList<Set<Precinct>> listSizeOne = new ArrayList<>();\n// listSizeOne.add(oneset);\n if(connectedComponentList.size() > 1) {\n //System.out.println(\"District: \" + district.getGeoId() + \" has \" + connectedComponentList.size() + \" components\");\n }\n return connectedComponentList;\n }", "private Set buildSet(String attrName, Map attributes, Set resultSet) {\n Set vals = (Set) attributes.get(attrName);\n if ((vals != null) && !vals.isEmpty()) {\n resultSet.addAll(vals);\n }\n return (resultSet);\n }", "public TrustingMonotonicArraySet(T[] elements) {\n this();\n\n for (T element : elements) {\n add(element);\n }\n }", "public static <V> LinkedHashSet<V> asSet(V... values) {\n LinkedHashSet<V> ans = new LinkedHashSet<V>();\n for (int i = 0; i < values.length; i++)\n ans.add(values[i]);\n return ans;\n }", "public BSTSet intersection(BSTSet s) {\n int[] thisArray = BSTToArray();\n int[] sArray = s.BSTToArray();\n int[] interArray = justDuplicates(thisArray, sArray);\n\n sortArray(interArray);\n\n return new BSTSet(interArray);\n }", "public void convertCartesianToJoin(){\n\n //Remove the nodes that are representing the cartesian products and a condition to a join operation\n canonicalTree.createStack(canonicalTree.getRootNode());\n Stack<TreeStructure.Node<String>> stack = canonicalTree.getStack();\n TreeStructure.Node<String> node;\n\n while (!stack.empty()) {\n node = stack.pop();\n //if the node is a cartesian product and it does not only hold \"X\" and then change it to join operation remove the \"X\" and add the condition!\n if(node.getNodeStatus() == CARTESIAN_NODE_STATUS && !node.getData().equalsIgnoreCase(\"X\")){\n node.setNodeData(\"⨝\" + node.getData().replace(\"X\", \" \"));\n node.setNodeStatus(JOIN_NODE_STATUS);\n }\n }\n }" ]
[ "0.48401353", "0.47285298", "0.46359354", "0.45793688", "0.45697838", "0.455683", "0.449281", "0.4467505", "0.44540146", "0.44311765", "0.44177786", "0.44079015", "0.43974894", "0.4364984", "0.43533078", "0.43347725", "0.43168247", "0.4305188", "0.42970517", "0.42940322", "0.4281941", "0.42774552", "0.4270707", "0.42651153", "0.42555365", "0.42425913", "0.42324", "0.4214341", "0.42116997", "0.42080995", "0.42053288", "0.42031842", "0.4199111", "0.4186717", "0.41848683", "0.41784838", "0.41782954", "0.41769585", "0.41683626", "0.41627455", "0.41586947", "0.4158202", "0.41524693", "0.4146846", "0.413549", "0.41351995", "0.4134972", "0.41316426", "0.41258618", "0.4124126", "0.41232482", "0.41232482", "0.41232482", "0.41167232", "0.41165823", "0.41101825", "0.40810046", "0.4080225", "0.40744248", "0.40706965", "0.40694883", "0.40533257", "0.4051466", "0.40382698", "0.4038239", "0.40331474", "0.40296158", "0.40280357", "0.40266016", "0.40173823", "0.40124634", "0.4009484", "0.40069017", "0.40029013", "0.39972797", "0.39971414", "0.39947692", "0.39861774", "0.39853913", "0.39853394", "0.39845046", "0.3983859", "0.39694187", "0.39667574", "0.39667115", "0.39403763", "0.3939874", "0.3937354", "0.39305332", "0.39153522", "0.39144018", "0.391318", "0.39126945", "0.3912149", "0.39039117", "0.3899968", "0.38986138", "0.38970435", "0.38965338", "0.3892917" ]
0.78178847
0
Remove from innerJunctionOfOuterJunctions all XJunctions that are singletons and move their elements to innerJunction.
private boolean moveSingletonsOutwards(final XJunction innerJunction, final Set<XJunction> innerJunctionOfOuterJunctions) throws AtomAndNegationException { boolean someSingletonContained = false; final Iterator<XJunction> it = innerJunctionOfOuterJunctions.iterator(); while (it.hasNext()) { final XJunction outerJunction = it.next(); if (outerJunction.size() == 1) { final Entry<Term, Polarity> singleton = outerJunction.entrySet().iterator().next(); innerJunction.add(singleton.getKey(), singleton.getValue()); someSingletonContained = true; it.remove(); } } return someSingletonContained; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Set<XJunction> convertInnerJunctionOfOuterJunctionsToSet(final Term[] inputInnerJunction) {\r\n\t\t\tfinal Set<XJunction> result = new HashSet<>();\r\n\t\t\tfor (final Term inputInnerJunct : inputInnerJunction) {\r\n\t\t\t\tfinal Term[] inputOuterJunction = getOuterJuncts(inputInnerJunct);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tresult.add(new XJunction(inputOuterJunction));\r\n\t\t\t\t} catch (final AtomAndNegationException e) {\r\n\t\t\t\t\t// do nothing, we omit this outerJunction because it is\r\n\t\t\t\t\t// equivalent to the neutral element of the inner connective\r\n\t\t\t\t\t// (true for ∧, false for ∨)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}", "public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}", "private void trimX() {\n\t\tint indexIntoBranches = 0;\n\t\tfor (int i = 0; i < this.branches.size(); i++) {\n\t\t\tif (this.branches.get(i).size() == this.numXVertices) {\n\t\t\t\tindexIntoBranches = i;\n\t\t\t}\n\t\t}\n\n\t\tthis.allX = (ArrayList) this.branches.get(indexIntoBranches).clone(); // We need this for a set difference above\n\n\t\tfor (int k = 0; k < this.branches.get(indexIntoBranches).size(); k++) {\n\t\t\tfor (int j = 0; j < this.branches.get(indexIntoBranches).size(); j++) {\n\t\t\t\t// Ignore if the index is the same - otherwise remove the edges\n\t\t\t\tif (!(k == j)) {\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(k)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(j));\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(j)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected boolean removeAxiomEdgesOfNoSingleton(Graph<String, DefaultEdge> g,\n\t\t\tMap<DefaultEdge, Set<OWLAxiom>> createdByAxioms, Map<DefaultEdge, Set<OWLAxiom>> labels,\n\t\t\tIterator<DefaultEdge> edgeIterator) {\n\t\t// Make the graph listenable\n\t\tListenableGraph<String, DefaultEdge> lGraph = new DefaultListenableGraph(g);\n\n\t\t// A flag if atleast one axiom labelled edge was removed\n\t\tboolean removedAxiomEdge = false;\n\n\t\t// Create a connectivity inspector, to count the singletons before the removals and\n\t\t// add the inspector as a listener\n\t\tConnectivityInspector<String, DefaultEdge> ciOrg = new ConnectivityInspector<>(g);\n\t\tint oldNumOfSingletons = 0;\n\t\tfor (Set<String> cc : ciOrg.connectedSets()) {\n\t\t\tif (cc.size() < 2) {\n\t\t\t\toldNumOfSingletons++;\n\t\t\t}\n\t\t}\n\t\tlGraph.addGraphListener(ciOrg);\n\n\t\t// Counter for the singletons after the removal\n\t\tint newNumOfSingletons = 0;\n\n\t\t// For each edge in the iterator\n\t\twhile (edgeIterator.hasNext()) {\n\n\t\t\t// Remove the edge\n\t\t\tGraphRemovalUndo undoer = removeAxiomEdgesOf(lGraph, createdByAxioms, labels, edgeIterator.next());\n\n\t\t\t// Count the number of singletons\n\t\t\tfor (Set<String> cc : ciOrg.connectedSets()) {\n\t\t\t\tif (cc.size() < 2) {\n\t\t\t\t\tnewNumOfSingletons++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there are more singletons than before undo the removal\n\t\t\tif (oldNumOfSingletons != newNumOfSingletons) {\n\t\t\t\tundoer.undo();\n\t\t\t} else {\n\t\t\t\t// Else print the removed axiom if the flag is set\n\t\t\t\tif (Settings.PRINT_REMOVED_AXIOMS) {\n\t\t\t\t\tfor (OWLAxiom ax : undoer.getAxiom()) {\n\t\t\t\t\t\tSystem.out.println(OntologyDescriptor.getCleanNameOWLObj(ax));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tremovedAxiomEdge = true;\n\t\t\t}\n\t\t\t// Reset the counter\n\t\t\tnewNumOfSingletons = 0;\n\t\t}\n\n\t\treturn removedAxiomEdge;\n\t}", "private void convertOuterJoinstoJoinsIfPossible(\n List<Quadruple<Integer, Integer, JoinOperator, Integer>> outerJoinsDependencyList) {\n int i, j;\n boolean changes = true;\n while (changes) {\n changes = false;\n for (i = 0; i < outerJoinsDependencyList.size(); i++) {\n Quadruple<Integer, Integer, JoinOperator, Integer> tr1 = outerJoinsDependencyList.get(i);\n if (tr1.getThird().getOuterJoin()) {\n for (j = 0; j < outerJoinsDependencyList.size(); j++) {\n Quadruple<Integer, Integer, JoinOperator, Integer> tr2 = outerJoinsDependencyList.get(j);\n if ((i != j) && !(tr2.getThird().getOuterJoin())) {\n if ((tr1.getSecond().equals(tr2.getFirst())) || (tr1.getSecond().equals(tr2.getSecond()))) {\n outerJoinsDependencyList.get(i).getThird().setOuterJoin(false);\n changes = true;\n }\n }\n }\n }\n }\n }\n\n // now remove all joins from the list, as we do not need them anymore! We only need the outer joins\n for (i = outerJoinsDependencyList.size() - 1; i >= 0; i--) {\n if (!outerJoinsDependencyList.get(i).getThird().getOuterJoin()) { // not an outerjoin\n outerJoinsDependencyList.remove(i);\n }\n }\n\n if (outerJoinsDependencyList.size() == 0) {\n for (i = buildSets.size() - 1; i >= 0; i--) {\n buildSets.remove(i); // no need for buildSets if there are no OJs.\n }\n }\n }", "public void updateChildNodes() {\n\t\tList<FTNonLeafNode> nodesToRemove = new ArrayList<FTNonLeafNode>();\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tList<FTNode> childNodesToRemove = new ArrayList<FTNode>();\n\t\t\tfor (String childName : intermediateNode.childNodes.keySet()) {\n\t\t\t\tif (intermediateNodes.containsKey(childName)) {\n\t\t\t\t\t// update child node if it has child node\n\t\t\t\t\tFTNonLeafNode childNode = intermediateNodes.get(childName);\n\t\t\t\t\tif ((childNode instanceof FTOrNode) || (childNode instanceof FTAndNode)) {\n\t\t\t\t\t\tintermediateNode.addChildNode(childName, intermediateNodes.get(childName));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// if parent node is an OR node\n\t\t\t\t\t\t// remove this child\n\t\t\t\t\t\tif (intermediateNode instanceof FTOrNode) {\n\t\t\t\t\t\t\tchildNodesToRemove.add(childNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if parent node is an AND node\n\t\t\t\t\t\t// remove the parent node and child node\n\t\t\t\t\t\t// and set their values to false in case they are referenced by other nodes\n\t\t\t\t\t\telse if (intermediateNode instanceof FTAndNode) {\n\t\t\t\t\t\t\tnodesToRemove.add(intermediateNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t\t// mark the nodes as they are not getting removed till after the loop\n\t\t\t\t\t\t\tintermediateNode.resolved = true;\n\t\t\t\t\t\t\tintermediateNode.nodeValue = false;\n\t\t\t\t\t\t\tchildNode.resolved = true;\n\t\t\t\t\t\t\tchildNode.nodeValue = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tintermediateNode.removeChildNodes(childNodesToRemove);\n\t\t\t// if no child node left for this intermediate node,\n\t\t\t// then its parent node should remove this intermediate node as well\n\t\t}\n\t\t// remove the no child nodes\n\t\tfor (FTNonLeafNode node : nodesToRemove) {\n\t\t\tintermediateNodes.remove(node.nodeName);\n\t\t}\n\t}", "public void removeAllElements() {\n for (int i = 0; i < OLast; i++) O[i] = null;\n ON = OLast = 0;\n Gap = -1;\n }", "private Element removeSubElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findSubElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element sub = (Element)elems.get(i);\n\n removeSubElement(sub);\n }\n\n return p_seg;\n }", "public void cleanUpDuplicatedStructures() throws Exception {\n\t\tif (currentDeployedStructs == null)\n\t\t\treturn;\n\t\t\n\t\tSet<DeployedPhysicalStructure> duplicatedStructsToBeRemoved = findDuplicatedStructures(currentDeployedStructs);\n\t\t\n\t\t// now let us remove the duplicated ones! they exist in the DB because currentDeployedStructs is guaranteed to always reflect what's deployed in the DB\n\t\tfor (DeployedPhysicalStructure p : duplicatedStructsToBeRemoved) {\n\t\t\tlog.status(LogLevel.WARNING, \"found a repeated deployed structure, going to remove it: \" + p.getSchema() +\".\"+ p.getBasename());\n\t\t\tdropPhysicalStructure(dbConnection, p.getSchema(), p.getBasename());\n\t\t}\t\t\n\t}", "private void removeTraversedComponents(){\n // hack for not traversing and focusing Window on JDK1.4\n traversableComponents.remove(parent);\n \n Iterator i = traversedComponents.iterator();\n while(i.hasNext()){\n traversableComponents.remove(i.next());\n }\n }", "public ArrayList<ArrayList<String>> removeDOF(ArrayList<ArrayList<String>> outer) {\r\n\t\tScanner s = new Scanner(System.in);\r\n\t\tSystem.out.println(\"What's the position of the data you would like to delete?\");\r\n\t\tint pos = s.nextInt();\r\n\t\tArrayList<ArrayList<String>> list1 = new ArrayList<ArrayList<String>>(outer);\r\n\t\tfor (int i = 0; i < list1.size(); i++) {\r\n\t\t\tlist1.get(i).remove(pos);\r\n\t\t}\r\n\t\treturn list1;\r\n\t}", "public void removeDups(Instance instance) {\n ArrayList<Instance> toRemove = backRelation.get(instance);\n if(toRemove == null)\n return;\n for (Instance remove : toRemove) {\n relatedInstances.get(remove).remove(instance);\n toLink.remove(remove.getId());\n }\n backRelation.remove(instance);\n\n }", "@Test\n public void testRemoveAll_Not_Empty_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(1);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 1;\n assertEquals(expectedResult, instance.size());\n\n }", "public void clearNeighborhoods()\n\t{\n\t\tfor (int i=0; i<numberOfNeighborhoods; i++)\n\t\t{\n\t\t\t(listOfNeighborhoods.get(i)).clear();\n\t\t}\n\t}", "private static Set<ARGState> removeSet(Set<ARGState> elements) {\n Set<ARGState> toWaitlist = new LinkedHashSet<ARGState>();\n int i=0;\n for (ARGState ae : elements) {\n if(ae.getParents()!=null){\n for (ARGState parent : ae.getParents()) {\n if (!elements.contains(parent)) {\n toWaitlist.add(parent);\n }\n }\n if(ae.getChildren()!=null)\n ae.removeFromARG();\n else\n ae.setDestroyed(true);\n }\n\n // ae.setNull();\n }\n return toWaitlist;\n }", "@Test\n public void testRemoveAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "public void cancelJoinsNLEGJoin() {\n\n List<String> currEG = null;\n List<String> currOuterTP = null;\n\n for (int keyOuter : mapTmpEGtoAllTPs.keySet()) {\n\n if (mapEGtoCancel.get(keyOuter) != null) {\n\n currEG = mapTmpEGtoAllTPs.get(keyOuter);\n\n for (int i = 0; i < currEG.size(); i += 3) {\n\n currOuterTP = new LinkedList<>(currEG.subList(i, i + 3));\n //BUUUUUUUUUUUUG check if it is a ontology\n if (!currOuterTP.get(0).contains(\"?\") && !currOuterTP.get(0).contains(\"#\")\n || !currOuterTP.get(2).contains(\"?\") && !currOuterTP.get(2).contains(\"#\")) {\n\n myDedUtils.cancelDTP(currOuterTP);\n for (int j = i + 3; j < currEG.size(); j += 3) {\n\n totalPairs--;\n }\n }\n\n }\n }\n\n }\n\n }", "public void cleanUpConnections()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < this.electricityNetworks.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tthis.electricityNetworks.get(i).cleanUpArray();\r\n\r\n\t\t\t\tif (this.electricityNetworks.get(i).conductors.size() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.electricityNetworks.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tFMLLog.severe(\"Failed to clean up wire connections!\");\r\n\t\t}\r\n\t}", "public void removeOddSubtrees () {\n\t\t// TODO\n\t\tif (root == null) return; \n if (root.key % 2 != 0) {\n root = null;\n }\n removeOddSubtrees(root);\n }", "public void simplify()\n\t\t{\n\t\t\tfor(int o = 0; o < theOperands.length; o++)\n\t\t\t{\n\t\t\t\tif(!(theOperands[o] instanceof ExpressionSearch))\n\t\t\t\t\tcontinue;\n\t\t\t\tExpressionSearch exp = (ExpressionSearch) theOperands[o];\n\t\t\t\texp.simplify();\n\t\t\t\tif(exp.getOperandCount() == 0)\n\t\t\t\t{\n\t\t\t\t\tremove(o);\n\t\t\t\t\to--;\n\t\t\t\t}\n\t\t\t\tif(exp.and == and)\n\t\t\t\t{\n\t\t\t\t\tSearch [] newOps = new Search [theOperands.length + exp.theOperands.length - 1];\n\t\t\t\t\tSystem.arraycopy(theOperands, 0, newOps, 0, o);\n\t\t\t\t\tSystem.arraycopy(exp.theOperands, 0, newOps, o, exp.theOperands.length);\n\t\t\t\t\tSystem.arraycopy(theOperands, o + 1, newOps, o + exp.theOperands.length,\n\t\t\t\t\t\ttheOperands.length - o - 1);\n\t\t\t\t\tfor(Search op : exp.theOperands)\n\t\t\t\t\t\tif(op instanceof CompoundSearch)\n\t\t\t\t\t\t\t((CompoundSearch) op).setParent(this);\n\t\t\t\t\to += exp.theOperands.length - 1;\n\t\t\t\t\ttheOperands = newOps;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void removeEdgeJointPointDest(Vector<Edge> edges) {\n\t\tfor (Edge e: edges) {\n\t\t\t\tEdge currentEdge = e;\n\t\t\t\tremoveEdge(e);\n\t\t\t\twhile (shapes.contains(currentEdge.getDest()) && currentEdge.getDest() instanceof JoinPoint) {\n\t\t\t\t\tJoinPoint join = (JoinPoint) currentEdge.getDest();\n\t\t\t\t\tshapes.remove(join);\n\t\t\t\t\tcurrentEdge = (Edge) join.getDest();\n\t\t\t\t\tremoveEdge(currentEdge);\n\t\t\t\t}\n\t\t}\n\t}", "public void remove(InnerSubscription<T> innerSubscription) {\r\n InnerSubscription<T>[] innerSubscriptionArr;\r\n InnerSubscription[] innerSubscriptionArr2;\r\n do {\r\n innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n int length = innerSubscriptionArr.length;\r\n if (length == 0) {\r\n break;\r\n }\r\n int i = -1;\r\n int i2 = 0;\r\n while (true) {\r\n if (i2 >= length) {\r\n break;\r\n } else if (innerSubscriptionArr[i2] == innerSubscription) {\r\n i = i2;\r\n break;\r\n } else {\r\n i2++;\r\n }\r\n }\r\n if (i >= 0) {\r\n if (length == 1) {\r\n innerSubscriptionArr2 = EMPTY;\r\n } else {\r\n InnerSubscription[] innerSubscriptionArr3 = new InnerSubscription[(length - 1)];\r\n System.arraycopy(innerSubscriptionArr, 0, innerSubscriptionArr3, 0, i);\r\n System.arraycopy(innerSubscriptionArr, i + 1, innerSubscriptionArr3, i, (length - i) - 1);\r\n innerSubscriptionArr2 = innerSubscriptionArr3;\r\n }\r\n } else {\r\n return;\r\n }\r\n } while (!this.subscribers.compareAndSet(innerSubscriptionArr, innerSubscriptionArr2));\r\n }", "private void fixInnerParent(BaleElement be)\n{\n BaleAstNode sn = getAstChild(be);\n while (cur_parent != cur_line && sn == null) {\n cur_parent = cur_parent.getBaleParent();\n cur_ast = cur_parent.getAstNode();\n sn = getAstChild(be);\n }\n\n // now see if there are any internal elements that should be used\n while (sn != null && sn != cur_ast && sn.getLineLength() == 0) {\n BaleElement.Branch nbe = createInnerBranch(sn);\n if (nbe == null) break;\n addElementNode(nbe,0);\n nbe.setAstNode(sn);\n cur_parent = nbe;\n cur_ast = sn;\n sn = getAstChild(be);\n }\n}", "static void wipeLocations(){\n\t \tfor (int i= 0; i < places.length; i++){\n\t\t\t\tfor (int j = 0; j < places[i].items.size(); j++)\n\t\t\t\t\tplaces[i].items.clear();\n\t\t\t\tfor (int k = 0; k < places[i].receptacle.size(); k++)\n\t\t\t\t\tplaces[i].receptacle.clear();\n\t \t}\n\t \tContainer.emptyContainer();\n\t }", "public static void removeNotRequiredSiblings(GroupConditions gc){\r\n\t\tif(gc == null){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tgc.getChildren().forEach(sn->{\r\n\t\t\tif(sn instanceof GroupConditions){\r\n\t\t\t\tGroupConditions child = GroupConditions.class.cast(sn);\r\n\t\t\t\tremoveNotRequiredSiblings(child);\r\n\t\t\t}\r\n\t\t\tif(sn instanceof FilterCondition){\r\n\t\t\t\tFilterCondition fc = FilterCondition.class.cast(sn);\r\n\t\t\t\tSelectExpression se = fc.findFirstByType(SelectExpression.class);\r\n\t\t\t\tif(se != null){\r\n\t\t\t\t\tremoveNotRequiredSiblings(se.findFirstByType(Where.class));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tgc.getChildren().removeIf(sn->sn instanceof GroupConditions && sn.getChildren().isEmpty());\r\n\t\t\r\n\t\tint size = gc.getChildren().size();\r\n\t\tint endIdx = size-1;\r\n\t\tList<int[]> found = childrenOperatorIndex(gc);\r\n\t\t// start with Operator, or end with, or within middle but there are multiple\r\n\t\tList<int[]> match = found.stream().filter(i-> i[0] == 0 || i[1] == endIdx || i[1] - i[0] > 0).collect(Collectors.toList());\r\n\t\tSet<Integer> set = new LinkedHashSet<>();\r\n\t\tmatch.forEach(i->{\r\n\t\t\tint start = i[0];\r\n\t\t\tint end = i[1];\r\n\t\t\tif(i[0] == 0 || i[1] == endIdx){\r\n\t\t\t\tfor(; start <= end; start++){\r\n\t\t\t\t\tset.add(start);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(; start < end; start++){// last one not included\r\n\t\t\t\t\tset.add(start);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tList<Integer> idx = new LinkedList<>(set);\r\n\t\tCollections.reverse(idx);\r\n\t\tSystem.out.println(idx);\r\n\t\tidx.forEach(i->{\r\n\t\t\tgc.getChildren().remove(i.intValue());\r\n\t\t});\r\n\t}", "void removeIsPartOf(WrappedIndividual oldIsPartOf);", "public void clearContainerElements() {\n nestedElements.clear();\n }", "void unsetFurtherRelations();", "public void unsetIntersectingRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(INTERSECTINGROADWAYREF$20);\r\n }\r\n }", "private Element removeHiElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findHiElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element hi = (Element)elems.get(i);\n\n removeHiElement(hi);\n }\n\n return p_seg;\n }", "public void removeAllElementInsertionMaps()\n {\n list.removeAllElements();\n }", "private static void removeAllElementsInContainer()\n {\n DefaultTableModel dm = (DefaultTableModel) JSoundsMainWindowViewController.table.getModel();\n for (int i = dm.getRowCount() - 1; i >= 0; i--) {\n dm.removeRow(i);\n } \n }", "public void trimRoutes(){\n Station firstStation = null;\n Station s = null;\n Link link = null;\n if (trainState instanceof TrainReady)\n s = ((TrainReady) trainState).getStation();\n if (trainState instanceof TrainArrive)\n link = ((TrainArrive) trainState).getLink();\n if (trainState instanceof TrainDepart)\n link = ((TrainDepart) trainState).getLink();\n\n if (trainState instanceof TrainReady){\n firstStation = s;\n } else if (trainState instanceof TrainArrive){\n firstStation = link.getTo();\n } else if (trainState instanceof TrainDepart){\n firstStation = link.getFrom();\n }\n\n Iterator<Route> routeIterator = routes.iterator();\n while (routeIterator.hasNext()) {\n Route route = routeIterator.next();\n Iterator<Link> iter = route.getLinkList().iterator();\n while (iter.hasNext()){\n Link track = iter.next();\n if (!track.getFrom().equals(firstStation))\n iter.remove();\n else\n break;\n }\n if (route.getLinkList().size() == 0) {\n routeIterator.remove();\n }\n }\n }", "public void removeAllBonds(Atom baseAtom, Atom extension){\n if (extension == null)\n throw new IllegalArgumentException(\"extension atom cannot be null\");\n //TODO: Write recursive function to through the whole bond 'tree' and remove starting from the top\n }", "public void resetReversePoison() {\n\n Set<AS> prevAdvedTo = this.adjOutRib.get(this.asn * -1);\n\n if (prevAdvedTo != null) {\n for (AS pAS : prevAdvedTo) {\n pAS.withdrawPath(this, this.asn * -1);\n }\n }\n\n this.adjOutRib.remove(this.asn * -1);\n\n this.botSet = new HashSet<>();\n }", "void removeNeighbor(IsisNeighbor isisNeighbor);", "public void unsetSldAll()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SLDALL$6, 0);\n }\n }", "private void removeOpRecursive(Operator<?> operator) {\n List<Operator<?>> parentOperators = new ArrayList<Operator<?>>();\n for (Operator<?> op : operator.getParentOperators()) {\n parentOperators.add(op);\n }\n for (Operator<?> parentOperator : parentOperators) {\n Preconditions.checkArgument(parentOperator.getChildOperators().contains(operator),\n \"AssertionError: parent of \" + operator.getName() + \" doesn't have it as child.\");\n parentOperator.removeChild(operator);\n if (parentOperator.getNumChild() == 0) {\n removeOpRecursive(parentOperator);\n }\n }\n }", "void removeContains(WrappedIndividual oldContains);", "public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}", "public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}", "public final AstValidator.nested_distinct_return nested_distinct() throws RecognitionException {\n AstValidator.nested_distinct_return retval = new AstValidator.nested_distinct_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree DISTINCT379=null;\n AstValidator.nested_op_input_return nested_op_input380 =null;\n\n\n CommonTree DISTINCT379_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:600:17: ( ^( DISTINCT nested_op_input ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:600:19: ^( DISTINCT nested_op_input )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n DISTINCT379=(CommonTree)match(input,DISTINCT,FOLLOW_DISTINCT_in_nested_distinct3174); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DISTINCT379_tree = (CommonTree)adaptor.dupNode(DISTINCT379);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(DISTINCT379_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_nested_op_input_in_nested_distinct3176);\n nested_op_input380=nested_op_input();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, nested_op_input380.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public void removeAllInternetRadioStationOwner() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERNETRADIOSTATIONOWNER);\r\n\t}", "public void removeScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j].isScenery())\n\t\t\t\t\tgrid[i][j]=null;\n\t\t\t}\n\t\t}\n\t}", "private void removeNoMoreExistingOriginalEdges() {\n for (MirrorEdge mirrorEdge : directEdgeMap.values()) {\n if (!originalGraph.has(mirrorEdge.original)) {\n for (Edge segment : mirrorEdge.segments) {\n mirrorGraph.forcedRemove(segment);\n reverseEdgeMap.remove(segment);\n }\n for (Node bend : mirrorEdge.bends) {\n mirrorGraph.forcedRemove(bend);\n reverseEdgeMap.remove(bend);\n }\n directEdgeMap.remove(mirrorEdge.original);\n }\n }\n }", "final void makeNonRecursive() { this.unboundedBoundSymbols = null; }", "public void removeAllElements();", "private void removeEdgeJointPointSource(Vector<Edge> edges) {\n\t\tfor (Edge e: edges) {\n\t\t\tEdge currentEdge = e;\n\t\t\tremoveEdge(e);\n\t\t\twhile (shapes.contains(currentEdge.getSource()) && currentEdge.getSource() instanceof JoinPoint) {\n\t\t\t\tJoinPoint join = (JoinPoint) currentEdge.getSource();\n\t\t\t\tshapes.remove(join);\n\t\t\t\tcurrentEdge = (Edge) join.getSource();\n\t\t\t\tremoveEdge(currentEdge);\n\t\t\t}\n\t\t}\n\t}", "public void remove(ArrayList<Instance> removeDups) {\n for (Instance causedInstance : removeDups) {\n ArrayList<Instance> tmp = backRelation.get(causedInstance);\n for (Instance dupInstance : tmp) {\n relatedInstances.get(dupInstance);\n toLink.remove(dupInstance.getId());\n instances.remove(dupInstance);\n }\n backRelation.remove(causedInstance);\n }\n\n }", "@Test\n public void testRemoveAll_Size_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "public void unsetIntersectRoadwayPI()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(INTERSECTROADWAYPI$22);\r\n }\r\n }", "void removeHasPart(WrappedIndividual oldHasPart);", "@DeleteMapping(\"ElementWebService/removeAll\")\n\tpublic void removeAll() {\n\t\telementService.removeAll();\n\t}", "public Set<Coordinate> getAllSurroundingCellsAsCoordinates() {\n Set<MapCoordinate> mapCoordinates = getAllSurroundingCellsAsMapCoordinatesStartingFromTopLeft(1);\n return mapCoordinates\n .stream()\n .map(mapCoordinate -> mapCoordinate.toCoordinate())\n .collect(\n Collectors.toSet()\n );\n }", "public void flatten () {\n String tags2 = tags.toString();\n tags.delete (0, tags.length());\n int e2 = 0;\n int s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n while (s2 < tags2.length()) {\n e2 = indexOfNextSeparator (tags2, s2, true, true, slashToSeparate);\n merge (tags2.substring (s2, e2));\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n }\n }", "private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }", "private static void removeBrackets(Element currentElement) {\r\n\t\tfor (Element removeBraces : currentElement.select(\":matchesOwn(\\\\((.*?)\\\\))\")) { // Removes characters in brackets\r\n\t\t\tremoveBraces.html(removeBraces.html().replaceAll(\"\\\\([^()]*\\\\)\", \"\"));\r\n\t\t}\r\n\t}", "private void trimEntities() {\n \t\tList<String> chainIds = getActiveEntities();\n \t\tif (chainIds.size() > 0) {\n \t\t\tfor (Iterator<Atom> iter = atomVector.iterator();iter.hasNext();) {\n \t\t\t\tAtom atom = iter.next();\n \t\t\t\tif (!chainIds.contains(atom.chain_id)) {\n \t\t\t\t\titer.remove();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public int removeStones(int[][] stones) {\n int len = stones.length;\n int[] parent = new int[len];\n Arrays.fill(parent, -1);\n Map<Integer, Integer> xmap = new HashMap<>();\n Map<Integer, Integer> ymap = new HashMap<>();\n for(int i = 0; i < len; i++) {\n int[] stone = stones[i];\n int x = stone[0];\n if(!xmap.containsKey(x)){\n xmap.put(x, i);\n } else {\n parent[x] = xmap.get(x);\n }\n int y = stone[1];\n if(!ymap.containsKey(y)){\n ymap.put(y, i);\n } else {\n parent[y] = ymap.get(y);\n }\n\n union(x, y, xmap, ymap, parent);\n }\n int count = 0;\n for(int i : parent){\n if(i == -1) count++;\n }\n return len - count;\n }", "public void removeWalls(Cell neighbor){\n int col2 = col - neighbor.col;\n if(col2 == 1){ // neighbor is to the left of current cell\n walls[3] = false;\n neighbor.walls[1] = false;\n } else if(col2 == -1){ // neighbor is to the right of current cell\n walls[1] = false;\n neighbor.walls[3] = false;\n }\n\n int row2 = row - neighbor.row;\n if(row2 == 1) { // neighbor is above current cell\n walls[0] = false;\n neighbor.walls[2] = false;\n } else if (row2 == -1){ // neighbor is below current cell\n walls[2] = false;\n neighbor.walls[0] = false;\n }\n }", "public void remove(AnyType x) {\n\t\troot = remove(x, root);\n\t}", "@Override\n\tpublic void removeAll() {\n\t\tif(isEmpty())\n\t\t\treturn;\n\t\t// Remove until the frontier is empty\n\t\twhile(!isEmpty())\n\t\t\tfrontier.removeFirst();\n\t}", "protected void xremove(Node<T> u) {\n\t\tif (u == r) {\n\t\t\tremove();\n\t\t} else {\n\t\t\tif (u == u.parent.left) {\n\t\t\t\tu.parent.left = nil;\n\t\t\t} else {\n\t\t\t\tu.parent.right = nil;\n\t\t\t}\n\t\t\tu.parent = nil;\n\t\t\tr = merge(r, u.left);\n\t\t\tr = merge(r, u.right);\n\t\t\tr.parent = nil;\n\t\t\tn--;\n\t\t}\n\t}", "void removeHas(WrappedIndividual oldHas);", "@Test\n public void testRemoveAll_Not_Empty() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(1);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 1;\n assertEquals(expectedResult, instance.size());\n\n }", "private void deleteConnections() {\n for (int i = 0; !this.sourceConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.sourceConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n\n for (int i = 0; !this.targetConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.targetConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n }", "public void filter11Relations() {\n this.relations.removeIf(relationship -> !relationship.isOneToOne());\n }", "private void compressRightSingleTonPairs(final S a) {\n Function<Pair<S, S>, Consumer<GPairRecord<S, S>>> consumerFunction = p -> new ArrayList<>()::add;\n Predicate<S> leftPredicate = nonTerminal -> doLeftPop(nonTerminal, head -> head.isTerminal() && head.equals(a));\n Predicate<S> rightPredicate = nonTerminal -> doRightPop(nonTerminal, tail -> tail.isTerminal() && !tail.equals(a));\n pop(phase + 1, leftPredicate, rightPredicate, consumerFunction);\n List<GPairRecord<S, S>> records = getPairs(p -> !p.a.equals(a) && p.b.equals(a));\n sortPairs(records);\n compressNonCrossingPairs(records);\n }", "private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }", "public void unsetWholeTbl()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WHOLETBL$2, 0);\n }\n }", "public Object[] unWrap(Object jaxbObject, ArrayList<String> childNames) throws JAXBWrapperException;", "public void remove( AnyType x )\r\n\t{\r\n\t\troot = remove( x, root );\r\n\t}", "public List<NamespaceJunction> junctions() {\n return this.junctions;\n }", "void removeNeighbors();", "public void filter1NRelations() {\n this.relations.removeIf(Relationship::isOneToOne);\n }", "public void resetBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tbuilding.reset();\n\t\t}\n\t}", "void retainOutlineAndBoundaryGrid() {\n\t\tfor (final PNode child : getChildrenAsPNodeArray()) {\n\t\t\tif (child != selectedThumbOutline && child != yellowSIcolumnOutline && child != boundary) {\n\t\t\t\tremoveChild(child);\n\t\t\t}\n\t\t}\n\t\tcreateOrDeleteBoundary();\n\t}", "public void removeAll(String s) {\n for (int i = 0; i < size; i++) {\n if (elements[i] == s) {\n elements[i] = null;\n }\n }\n }", "public void removeAllInterpretedBy() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INTERPRETEDBY);\r\n\t}", "public void unsetInternal()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(INTERNAL$4, 0);\n }\n }", "private static void stripTrivialCycles(CFG cfg) {\n\t\tCollection<SDGEdge> toRemove = new LinkedList<SDGEdge>();\n\t\tfor (SDGEdge e : cfg.edgeSet()) {\n\t\t\tif (e.getSource().equals(e.getTarget())) {\n\t\t\t\ttoRemove.add(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcfg.removeAllEdges(toRemove);\n\t}", "public void removeVehicles() {\r\n numberOfVehicles = 0;\r\n for (Lane lane : lanes) {\r\n lane.removeVehicles();\r\n }\r\n }", "public void removeAll() {\n\t\tsynchronized (mNpcs) {\n\t\t\tmNpcs = Collections.synchronizedList(new ArrayList<Npc>());\n\t\t\tmDemonCount = 0;\n\t\t\tmHumanCount = 0;\n\t\t}\n\t}", "private void duplicateTags(Topology topology) {\n // This one pass implementation is dependent on Edges being\n // topologically sorted - ancestor Edges appear before their descendants.\n for (Edge e : topology.graph().getEdges()) {\n Object o = e.getTarget().getInstance();\n if (o instanceof Peek || o instanceof FanOut) {\n duplicateTags(e);\n }\n }\n }", "public ArrayList<ArrayList<String>> removeItem(ArrayList<ArrayList<String>> outer) {\r\n\t\tScanner s = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Which specific data would you like to delete? Please type the position of the field and position of the data\");\r\n\t\tint posf = s.nextInt();\r\n\t\tint pos = s.nextInt();\r\n\t\tArrayList<ArrayList<String>> list3 = new ArrayList<ArrayList<String>>(outer);\r\n\t\tlist3.get(posf-1).remove(pos);\r\n\t\treturn list3;\r\n\t}", "public void deleteDoubles() {\r\n\t for (int j = 0; j < this.size()-1; j++) {\r\n\t for (int i = j+1; i < this.size(); i++) {\r\n\t if (this.get(i).equals(this.get(j))) {\r\n\t this.remove(i);\r\n\t i--;\r\n\t }\r\n\t }\r\n\t }\r\n\t }", "public void removePlaces(){\n List<Place> copies = new ArrayList<>(places);\n for(Place p : copies){\n p.reset();\n }\n }", "private List<KnowledgeElement> getWebhookRootElements(KnowledgeElement element) {\n\t\tList<KnowledgeElement> webhookRootElements = new ArrayList<KnowledgeElement>();\n\t\tKnowledgeGraph graph = KnowledgeGraph.getInstance(projectKey);\n\t\tList<KnowledgeElement> linkedElements = Graphs.neighborListOf(graph, element);\n\t\tlinkedElements.add(element);\n\t\tfor (KnowledgeElement linkedElement : linkedElements) {\n\t\t\tif (elementIds.contains(linkedElement.getId())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telementIds.add(linkedElement.getId());\n\t\t\tString type = linkedElement.getTypeAsString();\n\t\t\tfor (String rootType : rootTypes) {\n\t\t\t\tif (rootType.equalsIgnoreCase(type)) {\n\t\t\t\t\twebhookRootElements.add(linkedElement);\n\t\t\t\t}\n\t\t\t}\n\t\t\twebhookRootElements.addAll(getWebhookRootElements(linkedElement));\n\t\t}\n\t\treturn webhookRootElements;\n\t}", "private void compressLeftSingleTonPairs(final S a) {\n Function<Pair<S, S>, Consumer<GPairRecord<S, S>>> consumerFunction = p -> new ArrayList<>()::add;\n Predicate<S> leftPredicate = nonTerminal -> doLeftPop(nonTerminal, head -> head.isTerminal() && !head.equals(a));\n Predicate<S> rightPredicate = nonTerminal -> doRightPop(nonTerminal, tail -> tail.isTerminal() && tail.equals(a));\n pop(phase + 1, leftPredicate, rightPredicate, consumerFunction);\n List<GPairRecord<S, S>> records = getPairs(p -> p.a.equals(a) && !p.b.equals(a));\n sortPairs(records);\n compressNonCrossingPairs(records);\n }", "private static void simplify (GraphUndirected<NodeCppOSM, EdgeCppOSM> osmGraph) {\n \t\tfinal Iterator<NodeCppOSM> iteratorNodes = osmGraph.getNodes().iterator();\n \t\twhile (iteratorNodes.hasNext()) {\n \t\t\tfinal NodeCppOSM node = iteratorNodes.next();\n \t\t\tif (node.getDegree() == 2) {\n \t\t\t\t// get the ids of the two connected nodes\n \t\t\t\tfinal Long currentNodeId = node.getId();\n \t\t\t\tfinal List<EdgeCppOSM> edges = node.getEdges();\n \t\t\t\tfinal EdgeCppOSM edge1 = edges.get(0);\n \t\t\t\tfinal EdgeCppOSM edge2 = edges.get(1);\n \t\t\t\tfinal Long node1id = edge1.getNode1().getId() == (currentNodeId) ? edge1.getNode2().getId() : edge1.getNode1().getId();\n \t\t\t\tfinal Long node2id = edge2.getNode1().getId() == (currentNodeId) ? edge2.getNode2().getId() : edge2.getNode1().getId();\n \t\t\t\tif (currentNodeId == node1id){\n \t\t\t\t\t// we are in a loop and do not erase ourself\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// concat the list in the right way\n \t\t\t\tList<WayNodeOSM> newMetaNodes = concatMetanodes(edge1.getMetadata().getNodes(), edge2.getMetadata().getNodes(), currentNodeId);\n \t\t\t\t// add a new edge\n \t\t\t\t// TODO: Handle way properly - what would name be in this context?\n \t\t\t\t// TODO: names\n \t\t\t\tosmGraph.getNode(node1id).connectWithNodeWeigthAndMeta(osmGraph.getNode(node2id), edge1.getWeight() + edge2.getWeight(),\n\t\t\t\t\t\tnew WayOSM(0, WayOSM.WayType.UNSPECIFIED, edge1.getMetadata().getName()+edge2.getMetadata().getName(), newMetaNodes));\n \t\t\t\t// remove the old node\n \t\t\t\t// do this manually because we otherwise corrupt the iterator\n \t\t\t\tnode.removeAllEdges();\n \t\t\t\titeratorNodes.remove();\n \t\t\t}\n \t\t}\n \t}", "public void purgeRelations() {\n this.purged = true;\n for (AS tCust : this.customers) {\n tCust.providers.remove(this);\n tCust.purgedNeighbors.add(this.asn);\n }\n for (AS tProv : this.providers) {\n tProv.customers.remove(this);\n tProv.purgedNeighbors.add(this.asn);\n }\n for (AS tPeer : this.peers) {\n tPeer.peers.remove(this);\n tPeer.purgedNeighbors.add(this.asn);\n }\n }", "public void removeDuplicateAffixes()\n\t{\n\t\tinfixes = cleanInfix(infixes);\n\t\tthis.prefixes = removeDuplicateAffix(prefixes);\n\t\tthis.infixes = removeDuplicateAffix(infixes);\n\t\tthis.suffixes = removeDuplicateAffix(suffixes);\n\t}", "public Hashtable<Integer, Hashtable<String, Obs>> remove_handovers(Hashtable<Integer, Hashtable<String, Obs>> obs,\n\t\t\tHashtable<Integer, ArrayList<Integer>> vor_neighbours) {\n\n\t\tHashtable<Integer, Hashtable<String, Obs>> tmp_obs = new Hashtable<>();\n\n\t\tfor (Map.Entry<Integer, Hashtable<String, Obs>> entrySet : obs.entrySet()) {\n\t\t\tInteger usr_key = entrySet.getKey();\n\t\t\tHashtable<String, Obs> obs_raw_data = entrySet.getValue();\n\t\t\tHashtable<String, Obs> tmp_obs_raw_data = new Hashtable<>();\n\t\t\tfor (Map.Entry<String, Obs> obs_raw_entrySet : obs_raw_data.entrySet()) {\n\n\t\t\t\tString day_key = obs_raw_entrySet.getKey();\n\t\t\t\tObs day_val = obs_raw_entrySet.getValue();\n\n\t\t\t\tString[] twrs = day_val.getSeq().split(CLM);\n\t\t\t\tString[] tstamps = day_val.getTimeStamp().split(CLM);\n\n\t\t\t\tString handled_twrs = twrs[0];\n\t\t\t\tString handled_tstamps = tstamps[0];\n\n\t\t\t\tfor (int i = 0; i < tstamps.length - 1; i++) {\n\t\t\t\t\tString tstamp = tstamps[i];\n\t\t\t\t\tString htstamp = tstamps[i + 1];\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Tue 19 May 2015 07:10:49 AM JST to be completed .......\n\t\t\t\t\t * <-- for a sequence of observations:\n\t\t\t\t\t * {{x0,t0},{x1,t1},{x2,t2},{x3,t3},...{xn,tn}}\n\t\t\t\t\t *\n\t\t\t\t\t * if(t1=t2) then handover(x2|x1) else if((x1 is neighbor to\n\t\t\t\t\t * x2 )&& (x1==x3)) then handover(x2) end if --!>\n\t\t\t\t\t */\n\t\t\t\t}\n\t\t\t\ttmp_obs_raw_data.put(day_key, new Obs(handled_twrs, handled_tstamps));\n\n\t\t\t}\n\t\t\ttmp_obs.put(usr_key, tmp_obs_raw_data);\n\n\t\t}\n\t\treturn tmp_obs;\n\t}", "private void resize() {\n Couple[] tmp = new Couple[2 * associations.length];\n System.arraycopy(associations, 0, tmp, 0, associations.length);\n associations = tmp;\n }", "public void removeDuplication() {\r\n\t\t//checks if the array contains any elements\r\n\t\tif (!isEmpty()) {\t//contains elements\r\n\t\t\t//loop to execute for every element in the array\r\n\t\t\tfor (int i=0;i<size-1;i++) {\r\n\t\t\t\tObject element=list[i];\t//to store value of element in array\r\n\t\t\t\t//loop to execute for every element after the current element in the list\r\n\t\t\t\tfor (int j=i+1;j<size;j++) {\r\n\t\t\t\t\t//checks if there is are 2 elements in the list with the same value\r\n\t\t\t\t\tif (element==list[j]) {\r\n\t\t\t\t\t\tremove(j);\t//calls function to remove that element from array\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\t//contains 0 elements\r\n\t\t\tSystem.out.println(\"List is empty!\");\r\n\t\t}\r\n\t}", "public void removeAll()\n {\n this.front = null;\n this.rear = null;\n }", "public void removeFound() {\n\t\tString[] unique = Arrays.stream(this.bestCombination).distinct().toArray(String[]::new);\n\t\tint numToRemove = unique.length;\n\t\tint newLength = foundRequest.length - numToRemove; // newLength is equal to foundRequest length - unique length\n\t\t// create new array tempArr of same size as foundRequest\n\t\tString[][] tempArr = new String[this.foundRequest.length][this.foundRequest[0].length];\n\t\t// copy values of of foundRequest to tempArr\n\t\tSystem.arraycopy(foundRequest, 0, tempArr, 0, this.foundRequest.length);\n\n\t\t// set foundRequest to new size [newLength[original foundRequest size]\n\t\tthis.foundRequest = new String[newLength][this.foundRequest[0].length];\n\t\tint i = 0;\n\t\tfor (String[] row : tempArr) { // goes through row\n\t\t\tif (checkRowToCopy(row)) { // if row must be copied:\n\t\t\t\t// copies values of row to foundRequest\n\t\t\t\tSystem.arraycopy(row, 0, this.foundRequest[i++], 0, row.length);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void removeAllInner() throws DaoManagerException {\n\t\t\n\t}", "public node simplify() {\n node n = null;\n Object[] o = children().toArray();\n int l = o.length;\n if ( l == 1 )\n return (node) o[0];\n\n node orr = (node) o[0];\n node atmost1 = (node) o[0];\n\n for ( int i=1; i<l; i++ ) {\n orr = new or( orr, (node) o[i] );\n atmost1 = new atmostone( atmost1, (node) o[i] );\n }\n node result = (new and(orr, atmost1)).simplify();\n return result;\n }", "public void removeSubtree(ARGState e) {\n Set<ARGState> toWaitlist = removeSubtree0(e);\n\n for (ARGState ae : toWaitlist) {\n mReached.reAddToWaitlist(ae);\n }\n }" ]
[ "0.7027492", "0.49945712", "0.49783248", "0.4955152", "0.48425013", "0.48009104", "0.47946298", "0.4751611", "0.4686053", "0.4655701", "0.46120724", "0.46015903", "0.4576601", "0.45584312", "0.45101428", "0.45094123", "0.44911107", "0.44656524", "0.44546583", "0.44403064", "0.44224024", "0.44130498", "0.438873", "0.43853226", "0.4382985", "0.43646055", "0.43552184", "0.43549886", "0.4353925", "0.43502188", "0.43362725", "0.43346414", "0.43299574", "0.43208107", "0.4317819", "0.4317044", "0.43128133", "0.43085754", "0.42973518", "0.42962497", "0.42962497", "0.42769557", "0.42712596", "0.4268215", "0.42678726", "0.4263616", "0.42524976", "0.42492363", "0.42392483", "0.42366976", "0.42195463", "0.421895", "0.4216675", "0.42108923", "0.4210029", "0.42021963", "0.4201205", "0.41911006", "0.41858116", "0.4184333", "0.4180449", "0.417158", "0.41709453", "0.41680995", "0.41673443", "0.41672948", "0.4166774", "0.41591263", "0.41556826", "0.4155455", "0.41536182", "0.4151231", "0.41440454", "0.41402537", "0.41311887", "0.4121551", "0.4115905", "0.4112299", "0.41114336", "0.41006696", "0.40975887", "0.40957204", "0.4084705", "0.40844786", "0.40749687", "0.4069689", "0.40695047", "0.40682408", "0.40569338", "0.40545353", "0.40453446", "0.40406242", "0.40383232", "0.40366304", "0.40343437", "0.40325648", "0.40179503", "0.40151116", "0.40038475", "0.400383" ]
0.7536334
0
Create all the components
private void initialize(){ imgurURL = new JTextField("", 20); JLabel label = new JLabel("Imgur URL"); download = new JButton("Download"); savePath = new JButton("Set Download Path"); //Done creating components //Set component attributes setLayout(new FlowLayout()); setSize(575, 65); setResizable(false); add(label); add(imgurURL); add(download); add(savePath); //Done setting component attributes setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JFrame.setDefaultLookAndFeelDecorated(true); setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }", "private void createUIComponents() {\n }", "private void createComponents() {\n\t\tbuttons = new Button[9];\r\n\t\tfor (int i = 0; i < 9; i++) {\r\n\t\t\tbuttons[i] = new Button();\r\n\t\t}\r\n\r\n\t\t// Initialize components\r\n\t\tplayAgainButton = new Button(\"Play Again\");\r\n\t\tquitButton = new Button(\"Quit\");\r\n\r\n\t\t// Initialize layouts\r\n\t\tgameButtonGrid = new GridPane();\r\n\t\tgameButtonGrid.setStyle(\"-fx-background-color:Aquamarine;\");\r\n\t\tbottomButtonsHBox = new HBox();\r\n\t\tbottomButtonsHBox.setStyle(\"-fx-background-color:LightSlateGray;\");\r\n\t\tsceneVBox = new VBox();\r\n\t\t\r\n\t\t//Game components\r\n\t\tgameInfo = new GameInfo();\r\n\t}", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createdComponent() {\r\n\r\n\t\tloadImage();\r\n\t\tresizeImage();\r\n\t\ttry {\r\n\t\t\tif (customFont == null) {\r\n\t\t\t\tcustomFont = FontLoader.getInstance().getXenipa();\r\n\t\t\t\tif (customFont == null) {\r\n\t\t\t\t\tcustomFont = new FontLoader().importFont();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (FontFormatException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (InstantiationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IllegalAccessException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (UnsupportedLookAndFeelException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.init();\r\n\t\tthis.createpanel1();\r\n\t\tthis.createpanel2();\r\n\t\tthis.createpanel3();\r\n\t\tthis.createpanel4();\r\n\t\tthis.revalidate();\r\n\t}", "private void makeComponents() {\n Font font = new Font(\"Open Sans\", Font.PLAIN, 14);\n\n //Create The buttons and configure their visual design.\n searchArea.setFont(font);\n searchArea.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(4, 7, 4, 7, DrawAttribute.lightblue), BorderFactory.createRaisedBevelBorder()));\n searchArea.setBounds(20, 20, 300, 37);\n searchArea.setActionCommand(\"searchAreaInput\");\n\n makeFrontGUIButtons();\n }", "private void createComponents()\n\t{\n\t\t// Create search results' table header\n\t\tm_ResultHeader = new PrinterLabel(1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\"PRINTER\",\"VENDOR\",\"TENSION (ksi)\",\"COMPRESSION (ksi)\",\"IMPACT (lb-ft)\",\"MATERIALS\",\"TOLERANCE (in)\",\"FINISH (\\u00B5in)\", false);\n\t\tm_ResultHeader.setBackground(Color.lightGray);\n\t\t// Add tool tips for long header categories before adding to GUI\n\t\tm_ResultHeader.getMaterials().setToolTipText(\"Range of Materials\");\n\t\tm_PrinterList = ToolBox.generatePrinterList();\n\t}", "public void createComponents()\n {\n VBox col = new VBox(SPACING);\n\n Label lblStatus = new Label(\"Machine Status\");\n lblStatus.getStyleClass().add(\"bordered-titled-title\");\n\n lblCurrFile = new Label(\"No File Currently Loaded\");\n lblConnection = new Label(\"Not Connected\");\n\n btnConnect = new Button(\"Connect to Machine\");\n btnConnect.setOnAction(new ConnectEventHandler());\n //btnConnect.getStyleClass().add(\"glass-grey\");\n\n ivConnection = new ImageView(\n new Image(getClass().getResourceAsStream(\"/Resources/Not Connected.png\")));\n\n lblMachineStatus = new Label(\"Status: Good\");\n HBox r1 = new HBox(SPACING);\n r1.getChildren().addAll(lblConnection, ivConnection);\n\n col.getChildren().addAll(btnConnect, r1, lblCurrFile, lblMachineStatus);\n getChildren().addAll(lblStatus, col);\n\n }", "private void createComponents() {\n view = new JPanel(new GridBagLayout());\n\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1;\n constraints.weighty = 1;\n constraints.fill = GridBagConstraints.BOTH;\n\n view.add(new JPanel(), constraints);\n\n constraints.gridy = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 1;\n constraints.weighty = 4;\n constraints.weightx = 6;\n view.add(renderMain(), constraints);\n\n constraints.gridx = 2;\n constraints.weightx = 1;\n constraints.weighty = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 0;\n constraints.gridy = 2;\n view.add(renderBottom(), constraints);\n\n registerEvents();\n }", "protected void createComponents() {\n sampleText = new JTextField(20);\n displayArea = new JLabel(\"\");\n displayArea.setPreferredSize(new Dimension(200, 75));\n displayArea.setMinimumSize(new Dimension(200, 75));\n }", "@SuppressWarnings(\"unchecked\")\n private void create() {\n components.clear();\n\n if (content != null) {\n content.clearChildren();\n }\n else {\n content = new Container();\n content.setInsets(INSETS);\n }\n\n GuiComponent guiComponent = (GuiComponent) getReflectedItem().getValue();\n\n // let the user choose which type of backgroundComponent they want.\n Label label = content.addChild(new Label(\"Type\"), 0, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n Container backgroundTypeContainer = content.addChild(new Container(), 0, 1);\n\n ColorRGBA oldColor = BackgroundUtils.getBackgroundColor(guiComponent);\n\n Button colorOnlyBgButton = backgroundTypeContainer.addChild(new Button(\"Color Only\"), 0, 0);\n colorOnlyBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof QuadBackgroundComponent)) {\n setValue(new QuadBackgroundComponent(oldColor));\n create();\n }\n });\n\n Button colorAndImageBgButton = backgroundTypeContainer.addChild(new Button(\"Color and Image\"), 0, 1);\n colorAndImageBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof TbtQuadBackgroundComponent)) {\n setValue(BackgroundComponents.gradient(oldColor));\n create();\n }\n });\n\n if (guiComponent instanceof QuadBackgroundComponent) {\n\n try {\n\n Method getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n // margin\n getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 2, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 2, 1);\n components.add(marginComponent);\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n else if (guiComponent instanceof TbtQuadBackgroundComponent) {\n\n TbtQuadBackgroundComponent backgroundComponent = (TbtQuadBackgroundComponent) guiComponent;\n\n try {\n Method getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n label = content.addChild(new Label(\"Image\"), 2, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n Button browseImageButton = content.addChild(new Button(\"Select Background Image...\"), 2, 1);\n browseImageButton.setTextVAlignment(VAlignment.Center);\n browseImageButton.addClickCommands(source -> {\n\n JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n jfc.setDialogTitle(\"Select a Background Image...\");\n jfc.setMultiSelectionEnabled(false);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n jfc.addChoosableFileFilter(filter);\n int returnValue = jfc.showOpenDialog(null);\n\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n\n File file = jfc.getSelectedFile();\n\n\n try {\n\n byte[] imageData = Files.readAllBytes(file.toPath());\n byte[] stringData = Base64.getEncoder().encode(imageData);\n\n String imageString = new String(stringData);\n\n // PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n // panelBackground.setBase64Image(imageString);\n\n Texture texture = new TextureUtils().fromBase64(imageString);\n\n backgroundComponent.setTexture(texture);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n });\n\n // margin\n getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 3, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 3, 1);\n components.add(marginComponent);\n\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n\n//\n// this.content = new RollupPanel(\"\", contentContainer, null);\n// this.content.setOpen(false);\n//\n// // background Image\n// Container bgImageContainer = contentContainer.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.Last, FillMode.Last)), 0, 0);\n// Label bgImageLabel = bgImageContainer.addChild(new Label(\"Background Image\"), 0, 0);\n// bgImageLabel.setTextVAlignment(VAlignment.Center);\n// bgImageLabel.setInsets(new Insets3f(0.0F, 2.0F, 0.0F, 5.0F));\n// Button browseImageButton = bgImageContainer.addChild(new Button(\"Browse...\"), 0, 1);\n// Button removeImageButton = bgImageContainer.addChild(new Button(\"Remove\"), 0, 2);\n// bgImageContainer.addChild(new Container(), 0, 3);\n//\n// browseImageButton.addClickCommands(source -> {\n//\n// JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n// jfc.setDialogTitle(\"Select a Background Image...\");\n// jfc.setMultiSelectionEnabled(false);\n// jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n// jfc.setAcceptAllFileFilterUsed(false);\n// FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n// jfc.addChoosableFileFilter(filter);\n// int returnValue = jfc.showOpenDialog(null);\n//\n// if (returnValue == JFileChooser.APPROVE_OPTION) {\n//\n// File file = jfc.getSelectedFile();\n//\n// try {\n// byte[] imageData = Files.readAllBytes(file.toPath());\n// byte[] stringData = Base64.getEncoder().encode(imageData);\n//\n// String imageString = new String(stringData);\n//\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(imageString);\n//\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// }\n//\n// });\n//\n// removeImageButton.addClickCommands(source -> {\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(\"\");\n// });\n//\n//\n// try {\n//\n// // color\n// Method get = PanelBackground.class.getMethod(\"getColor\");\n// Method set = PanelBackground.class.getMethod(\"setColor\", ColorRGBA.class);\n//\n// ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(getReflectedProperty().getValue(), get, set);\n// bgColorComponent.setPropertyName(\"Color\");\n// contentContainer.addChild(bgColorComponent.getPanel());\n// components.add(bgColorComponent);\n//\n// // insetTop\n// get = PanelBackground.class.getMethod(\"getInsetTop\");\n// set = PanelBackground.class.getMethod(\"setInsetTop\", int.class);\n//\n// IntComponent insetTopComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetTopComponent.setPropertyName(\"Inset Top\");\n// contentContainer.addChild(insetTopComponent.getPanel());\n// components.add(insetTopComponent);\n//\n// // insetLeft\n// get = PanelBackground.class.getMethod(\"getInsetLeft\");\n// set = PanelBackground.class.getMethod(\"setInsetLeft\", int.class);\n//\n// IntComponent insetLeftComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetLeftComponent.setPropertyName(\"Inset Left\");\n// contentContainer.addChild(insetLeftComponent.getPanel());\n// components.add(insetLeftComponent);\n//\n// // insetBottom\n// get = PanelBackground.class.getMethod(\"getInsetBottom\");\n// set = PanelBackground.class.getMethod(\"setInsetBottom\", int.class);\n//\n// IntComponent insetBottomComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetBottomComponent.setPropertyName(\"Inset Bottom\");\n// contentContainer.addChild(insetBottomComponent.getPanel());\n// components.add(insetBottomComponent);\n//\n// // insetRight\n// get = PanelBackground.class.getMethod(\"getInsetRight\");\n// set = PanelBackground.class.getMethod(\"setInsetRight\", int.class);\n//\n// IntComponent insetRightComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetRightComponent.setPropertyName(\"Inset Right\");\n// contentContainer.addChild(insetRightComponent.getPanel());\n// components.add(insetRightComponent);\n//\n// // zOffset\n// get = PanelBackground.class.getMethod(\"getzOffset\");\n// set = PanelBackground.class.getMethod(\"setzOffset\", float.class);\n//\n// FloatComponent zOffsetComponent = new FloatComponent(getReflectedProperty().getValue(), get, set);\n// zOffsetComponent.setPropertyName(\"Z-Offset\");\n// contentContainer.addChild(zOffsetComponent.getPanel());\n// components.add(zOffsetComponent);\n//\n// } catch (NoSuchMethodException e) {\n// e.printStackTrace();\n// }\n\n\n }", "private void createUIComponents() {\n editor = createEditor(project, document);\n splitter = new JBSplitter(0.4f);\n ((JBSplitter) splitter).setFirstComponent(editor.getComponent());\n// ((JBSplitter) splitter).setSecondComponent();\n }", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }", "private void addComponents() {\n gbc.anchor = GridBagConstraints.EAST;\n addComponent(lblName, 0, 0, 1);\n addComponent(lblDay, 0, 1, 1);\n addComponent(lblMonth, 0, 2, 1);\n addComponent(lblTime, 0, 5, 1);\n addComponent(lblDuration, 0, 6, 1);\n gbc.anchor = GridBagConstraints.WEST;\n addComponent(txtName, 1, 0, 1);\n addComponent(cmbDay, 1, 1, 1);\n addComponent(cmbMonth, 1, 2, 1);\n addComponent(radSelectTime, 1, 3, 1);\n addComponent(radAutoTime, 1, 4, 1);\n addComponent(cmbTime, 1, 5, 1);\n addComponent(cmbDuration, 1, 6, 1);\n gbc.anchor = GridBagConstraints.CENTER;\n addComponent(btnSubmit, 0, 7, 2);\n }", "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "private void crearComponentes(){\n\tjdpFondo.setSize(942,592);\n\t\n\tjtpcContenedor.setSize(230,592);\n\t\n\tjtpPanel.setTitle(\"Opciones\");\n\tjtpPanel2.setTitle(\"Volver\");\n \n jpnlPanelPrincilal.setBounds(240, 10 ,685, 540);\n \n }", "private void initComponents() {\n LOOGER.info(\"Get init components\");\n this.loadButton = new JButton(\"Load\");\n this.fillButton = new JButton(\"Fill\");\n this.deleteButton = new JButton(\"Delete\");\n this.setLayout(new FlowLayout());\n LOOGER.info(\"components exit\");\n }", "private void instanciarComponentes() {\n\t\t\n\t\tpainelTopo = new JPanel(new FlowLayout());\n\t\tpainelTopo.setBackground(Color.LIGHT_GRAY);\n\t\tlbInicial = new JLabel(\"De: \");\n\t\tlbFinal = new JLabel(\"Até: \");\n\t\tlabelTabuadoDo = new JLabel(\"Tabuada do: \");\n\t\ttxtInicial = new JTextField(10);\n\t\ttxtFinal = new JTextField(10);\n\t\ttxtNumero = new JTextField(10);\n\t\tbuttonCalcular = new JButton(\"Calcular\");\n\t\tpainelCentro = new JPanel(new FlowLayout());\n\t}", "private void buildComponents() {\r\n buildJMenuBar();\r\n setJMenuBar( gameBar );\r\n\r\n buildScorePanel();\r\n buildInfoPanel();\r\n\r\n getContentPane().add( scorePanel, \"North\" );\r\n getContentPane().add( infoPanel, \"South\" );\r\n }", "private void createComponents() {\n \n Dimension thisSize = this.getSize();\n \n this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));\n \n ArrayList<Integer> numbers = new ArrayList<>();\n for (int i = 0; i < recordCount; ++i) {\n numbers.add(i);\n }\n \n recordList = new JList(numbers.toArray());\n recordList.addListSelectionListener(selectionListener);\n JScrollPane listPane = new JScrollPane(recordList);\n listPane.setPreferredSize(new Dimension(thisSize.width / 3, thisSize.height));\n \n select(0, 0);\n \n this.add(listPane);\n \n recordForm = new RecordForm(fields, thisSize);\n entryForm = new JScrollPane(recordForm);\n \n this.add(entryForm);\n \n selectionAction = WAITING_ON_SELECTION;\n \n }", "private void createUIComponents() {\n this.removeAll();\n this.setLayout(new GridBagLayout());\n\n selectionListener = e -> update();\n\n categorySet_panel = new DataObject_DisplayList<>(database.getSchema(), CategorySet.class, new Full_Set<>(database, CategorySet.class), false, this);\n categorySet_panel.addControlButtons(new CategorySet_ElementController(database, this));\n categorySet_panel.getMainPanel().getListSelectionModel().addListSelectionListener(selectionListener);\n\n virtualCategory_set = new OneParent_Children_Set<>(VirtualCategory.class, null);\n virtualCategory_elementController = new VirtualCategory_ElementController(database, this);\n virtualCategory_panel = new DataObject_DisplayList<>(database.getSchema(), VirtualCategory.class, virtualCategory_set, false, this);\n virtualCategory_panel.addControlButtons(virtualCategory_elementController);\n virtualCategory_panel.getMainPanel().getListSelectionModel().addListSelectionListener(selectionListener);\n\n categoryToCategorySet_set = new OneParent_Children_Set<>(CategoryToCategorySet.class, null);\n categoryToCategorySet_elementController = new CategoryToCategorySet_ElementController(database, this);\n categoryToCategorySet_panel = new DataObject_DisplayList<>(database.getSchema(), CategoryToCategorySet.class, categoryToCategorySet_set, false, this);\n categoryToCategorySet_panel.addControlButtons(categoryToCategorySet_elementController);\n\n categoryToVirtualCategory_set = new OneParent_Children_Set<>(CategoryToVirtualCategory.class, null);\n categoryToVirtualCategory_elementController = new CategoryToVirtualCategory_ElementController(database, this);\n categoryToVirtualCategory_panel = new DataObject_DisplayList<>(database.getSchema(), CategoryToVirtualCategory.class, categoryToVirtualCategory_set, false, this);\n categoryToVirtualCategory_panel.addControlButtons(categoryToVirtualCategory_elementController);\n\n GridBagConstraints gridBagConstraints = new GridBagConstraints();\n gridBagConstraints.fill = GridBagConstraints.BOTH;\n gridBagConstraints.weightx = 1;\n gridBagConstraints.weighty = 1;\n gridBagConstraints.gridheight = 2;\n\n gridBagConstraints.gridx = 0;\n this.add(categorySet_panel, gridBagConstraints);\n\n gridBagConstraints.gridheight = 1;\n gridBagConstraints.gridx = 1;\n this.add(virtualCategory_panel, gridBagConstraints);\n\n gridBagConstraints.weighty = 2;\n this.add(categoryToCategorySet_panel, gridBagConstraints);\n\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.weighty = 1;\n gridBagConstraints.gridx = 2;\n this.add(categoryToVirtualCategory_panel, gridBagConstraints);\n }", "private void create() {\n\t\tGridLayout grid = new GridLayout(3,2);\n\t\tthis.setLayout(grid);\n\t\tthis.setBackground(Color.WHITE);\n\t\t\n\t\tadd(new JLabel(\"Username/Library Card #:\", SwingConstants.LEFT), grid);\n\t\tusername.setPreferredSize(new Dimension(1, 12));\n\t\tadd(username,grid);\n\t\t\n\t\tadd(new JLabel(\"Password:\", SwingConstants.LEFT), grid);\n\t\tadd(password, grid);\n\t\t\n\t\tLoginAction();\n\t\tadd(submit, grid);\n\t}", "private void createUIComponents() {\n billboardJList = new JList<>();\n model = new DefaultListModel<>();\n\n for (Billboard billboard : billboardList) {\n model.addElement(billboard.getBillboardName());\n }\n\n billboardJList.setModel(model);\n\n previewBillboardContentsFrame = new JFrame();\n previewBillboardContentsFrame.setPreferredSize(new Dimension(500, 500));\n }", "private void buildGUI() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setBorder(LineBorder.createGrayLineBorder());\n\t\tadd(panel);\n\t\t\n\t\taddRootPaneListener();\n\t\taddLoginComp();\n\t\taddButtons();\n\t\taddTitle();\n\t}", "private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}", "private void createUIComponents() {\n table = new ShareTraderTable();\n }", "private void criarComponentes() {\n\n add(criarPainelNorte(), BorderLayout.NORTH);\n add(criarPainelCentro(), BorderLayout.CENTER);\n add(criarPainelSul(), BorderLayout.SOUTH);\n }", "private void initComponents() {\n rootLayout = new Grid();\n rootLayout.setWidth(new Extent(100, Extent.PERCENT));\n rootLayout.setSize(2);\n add(rootLayout);\n Empsn_Label= new nextapp.echo2.app.Label();\n Empsn_Label.setText(\"N_TIME_BEAR.EMPSN\");\n rootLayout.add(Empsn_Label);\n \n Empsn_DscField = new dsc.echo2app.component.DscField();\n Empsn_DscField.setId(\"Empsn_DscField\");\n Empsn_DscField.setWidth(new Extent(4, Extent.CM));\n rootLayout.add(Empsn_DscField);\n \n\t}", "private void createComponents() {\r\n // create a title\r\n indexTitle = new JLabel(\"Indexing\");\r\n indexTitle.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\r\n dirUrl = new JTextField();\r\n dirUrl.setColumns(70);\r\n dirUrl.setEditable(false);\r\n\r\n openDir = new JButton(\"Open Dir\");\r\n fileChooser = new JFileChooser();\r\n\r\n startIndexing = new JButton(\"Start\");\r\n startIndexing.setPreferredSize(new Dimension(95, 22));\r\n\r\n indexProgress = new JProgressBar();\r\n //progressBar.setStringPainted(true);\r\n // progressBar.setString(\"Indexing State..\");\r\n\r\n addExistingCheck = new JCheckBox();\r\n }", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "private void crearComponentes() {\n setTitle(\"Nueva Persona\");\r\n setDefaultLookAndFeelDecorated(true);\r\n try {\r\n //UIManager.setLookAndFeel(\"javax.swing.plat.metal.MetalLookAndFeel\");\r\n UIManager.setLookAndFeel(\"javax.swing.plaf.nimbus.NimbusLookAndFeel\");\r\n } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | UnsupportedLookAndFeelException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n int numBorder;\r\n numBorder = 20;\r\n\r\n jPrincipal = new JPanel(new BorderLayout());\r\n jPrincipal.setBorder(new EmptyBorder(numBorder, numBorder, numBorder, numBorder));\r\n add(jPrincipal);\r\n\r\n JPcontent = new JPanel();\r\n JPcontent.setLayout(new BoxLayout(JPcontent, BoxLayout.PAGE_AXIS));\r\n numBorder = 10;\r\n\r\n JPanel nom = new JPanel();\r\n JPcontent.add(nom);\r\n nom.add(new JLabel(\"Nom: \"));\r\n JTxtFldNom = new JTextField(28);\r\n JTxtFldNom.addComponentListener(null);\r\n nom.add(JTxtFldNom);\r\n\r\n JPanel primerCognom = new JPanel();\r\n JPcontent.add(primerCognom);\r\n primerCognom.add(new JLabel(\"Primer cognom: \"));\r\n JTxtFldPrimerCognom = new JTextField(22);\r\n JTxtFldPrimerCognom.addComponentListener(null);\r\n primerCognom.add(JTxtFldPrimerCognom);\r\n\r\n JPanel segonCognom = new JPanel();\r\n JPcontent.add(segonCognom);\r\n segonCognom.add(new JLabel(\"Segon cognom: \"));\r\n JTxtFldSegonCognom = new JTextField(22);\r\n JTxtFldSegonCognom.addComponentListener(null);\r\n segonCognom.add(JTxtFldSegonCognom);\r\n\r\n JPanel nif = new JPanel();\r\n JPcontent.add(nif);\r\n nif.add(new JLabel(\"NIF: \"));\r\n JTxtFldNIF = new JTextField(28);\r\n JTxtFldNIF.addComponentListener(null);\r\n nif.add(JTxtFldNIF);\r\n\r\n JPanel numeroSS = new JPanel();\r\n JPcontent.add(numeroSS);\r\n numeroSS.add(new JLabel(\"Número SS: \"));\r\n JTxtFldNumeroSS = new JTextField(24);\r\n JTxtFldNumeroSS.addComponentListener(null);\r\n numeroSS.add(JTxtFldNumeroSS);\r\n\r\n JPanel telf = new JPanel();\r\n JPcontent.add(telf);\r\n telf.add(new JLabel(\"Teléfon: \"));\r\n JTxtFldTelf = new JTextField(26);\r\n JTxtFldTelf.addComponentListener(null);\r\n telf.add(JTxtFldTelf);\r\n\r\n JPanel ciutat = new JPanel();\r\n JPcontent.add(ciutat);\r\n ciutat.add(new JLabel(\"Ciutat: \"));\r\n JTxtFldCiutat = new JTextField(27);\r\n JTxtFldCiutat.addComponentListener(null);\r\n ciutat.add(JTxtFldCiutat);\r\n\r\n JPanel codiPostal = new JPanel();\r\n JPcontent.add(codiPostal);\r\n codiPostal.add(new JLabel(\"Codi postal: \"));\r\n JTxtFldCodiPostal = new JTextField(24);\r\n JTxtFldCodiPostal.addComponentListener(null);\r\n codiPostal.add(JTxtFldCodiPostal);\r\n\r\n JPanel carrer = new JPanel();\r\n JPcontent.add(carrer);\r\n carrer.add(new JLabel(\"Direcció: \"));\r\n JTxtFldCarrer = new JTextField(27);\r\n JTxtFldCarrer.addComponentListener(null);\r\n carrer.add(JTxtFldCarrer);\r\n\r\n if (clase == 0) {\r\n metge();\r\n }\r\n\r\n JPanel boto = new JPanel();\r\n boto.setBorder(new EmptyBorder(0, 0, 8, 0));\r\n JPcontent.add(boto);\r\n\r\n// jBtnCancelar = new JButton(\"Cancelar\");\r\n// boto.add(jBtnCancelar);\r\n// jBtnCancelar.addActionListener(new BotonesCrearPersona(clase));\r\n JBtnCrea = new JButton(\"Crear\");\r\n boto.add(JBtnCrea);\r\n JBtnCrea.addActionListener(new BotonesCrearPersona(clase));\r\n\r\n jPrincipal.add(JPcontent, BorderLayout.CENTER);\r\n\r\n pack();\r\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n this.setLocation(dim.width / 2 - this.getSize().width / 2, dim.height / 2 - this.getSize().height / 2);\r\n }", "private void iniciarComponentesInterface() {\n\t\tPanelchildren panelchildren = new Panelchildren();\r\n\t\tpanelchildren.setParent(this);\r\n\t\tlistBox = new Listbox();\r\n\t\tlistBox.setHeight(\"300px\");\r\n\t\tlistBox.setCheckmark(true);\r\n\t\tlistBox.setMultiple(false);\r\n\t\tlistBox.setParent(panelchildren);\r\n\t\tListhead listHead = new Listhead();\r\n\t\tlistHead.setParent(listBox);\r\n\t\tListheader listHeader = new Listheader(\"Projeto\");\r\n\t\tlistHeader.setParent(listHead);\r\n\r\n\t\t// Botões OK e Cancelar\r\n\t\tDiv div = new Div();\r\n\t\tdiv.setParent(panelchildren);\r\n\t\tdiv.setStyle(\"float: right;\");\r\n\t\tSeparator separator = new Separator();\r\n\t\tseparator.setParent(div);\r\n\t\tButton botaoOK = new Button(\"OK\");\r\n\t\tbotaoOK.addEventListener(\"onClick\", new EventListenerOK());\r\n\t\tbotaoOK.setWidth(\"100px\");\r\n\t\tbotaoOK.setStyle(\"margin-right: 5px\");\r\n\t\tbotaoOK.setParent(div);\r\n\t\tButton botaoCancelar = new Button(\"Cancelar\");\r\n\t\tbotaoCancelar.addEventListener(\"onClick\", new EventListenerCancelar());\r\n\t\tbotaoCancelar.setWidth(\"100px\");\r\n\t\tbotaoCancelar.setParent(div);\r\n\t}", "public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}", "private void createWidgets() {\n\t\tgrid = new GridPane();\n\t\ttxtNickname = new TextField();\n\t\ttxtPort = new TextField();\n\t\ttxtAdress = new TextField();\n\n\t\tlblNick = new Label(\"Nickname\");\n\t\tlblNickTaken = new Label();\n\t\tlblPort = new Label(\"Port\");\n\t\tlblAdress = new Label(\"Adress\");\n\t\tlblCardDesign = new Label(\"Carddesign\");\n\n\t\tbtnLogin = new Button(\"\");\n\t\timageStart = new Image(BTNSTARTWOOD, 85, 35, true, true);\n\t\timvStart = new ImageView();\n\n\t\tcardDesignOptions = FXCollections.observableArrayList(\n\t\t\t\t\"original design\", \"pirate design\", \"graveyard design\");\n\t\tcomboBoxCardDesign = new ComboBox<String>(cardDesignOptions);\n\n\t\tcomboBoxCardDesign\n\t\t\t\t.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ListCell<String> call(ListView<String> list) {\n\t\t\t\t\t\treturn new ExtCell();\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t}", "private void createUIComponents() {\n bt1 = new JButton(\"Hola\");\n }", "void instantiateComponents();", "private void createUIComponents() {\n this.selectorApplication = new AzureArtifactComboBox(project, true);\n this.selectorApplication.refreshItems();\n }", "private void addComponents() {\n //this.getContentPane().add(new ViewDeckComputer(), BorderLayout.NORTH);\n createTopPanel();\n createCentralPanel();\n createBottomPanel();\n }", "public RegisterComponents()\n\t{\n\t\tsetLayout(new BorderLayout(0, 20));\n\n\t\t/*\n\t\tdocumentation on gridBagConstraint: \n\t\thttps://docs.oracle.com/javase/tutorial/uiswing/layout/gridbag.html\n\t\t*/\n\n\t\t// following methos add the labels and textfields to the panel\n\n\t\tdispCompFirstName();\n\t\tdispCompLastName();\n\t\tdispCompRoomNo();\n\t\tdispCompPhone();\n\t\tdispCompStudentID();\n\t\tdispCompCreatePass();\n\t\tdispCompConfirmPass();\n\n\t\t// the textfield added from above methods are resized via method componentResized()\n\n\t\t// this listens for resize events\n\t\taddComponentListener(this);\n add(compPanel, \"North\");\n\t}", "private void createWidgets() {\n\n\t\tJPanel filmPanel = createFilmPanel();\n\t\tJPanel musicPanel = createMusicPanel();\n\t\tJPanel unclassPanel = createUnclassifiedPanel();\n\n\t\tthis.add(filmPanel);\n\t\tthis.add(musicPanel);\n\t\tthis.add(unclassPanel);\n\t}", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "private void addComponents() {\n LOOGER.info(\"Get add Components Entry\");\n // Adding loadButton to first row.\n this.add(loadButton);\n\n // Adding fillButton to first row.\n this.add(fillButton);\n\n // Adding deleteButton to first row.\n this.add(deleteButton);\n LOOGER.info(\"add Components exit\");\n }", "public void manageComponent() {\n menu = new JMenuBar();\n mainbox = new JScrollPane();\n toolbox = new JPanel();\n paintBox = new JPanel();\n optionbox = new JPanel();\n statusbar = new JPanel();\n paintModule = new PaintModule();\n\n // component setting\n createToolBox(toolbox);\n createMenu(menu);\n createOptionBox(optionbox);\n createStatusBar(statusbar);\n this.setLayout(new BorderLayout());\n\n // add component to container\n paintBox.add(paintModule);\n mainbox.setViewportView(paintBox);\n\n\n this.add(menu, BorderLayout.NORTH);\n this.add(mainbox, BorderLayout.CENTER);\n this.add(toolbox, BorderLayout.WEST);\n this.add(optionbox, BorderLayout.EAST);\n this.add(statusbar, BorderLayout.SOUTH);\n\n }", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "public void iniciarComponentes(){\n\n crearPanel();\n colocarBotones();\n \n }", "public ComponentsFactory() {\n\t\tsuper();\n\t}", "private void createUIComponents() {\n valueTextField = new JTextField();\n FixedService f = new FixedService();\n valueTextField.setText(\"£ \" + f.getPrice(\"Fixed\"));\n valueTextField.setBorder(new EmptyBorder(0, 0, 0, 0));\n }", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new FormLayout(\"fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow\", \"center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow\"));\n panel.add(panel1);\n panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null));\n final JLabel label1 = new JLabel();\n label1.setHorizontalAlignment(11);\n label1.setText(\"<html><b>Directory</b></html>\");\n label1.setToolTipText(\"The start directory containing child directories (or raw files directly) that will be processed\");\n CellConstraints cc = new CellConstraints();\n panel1.add(label1, cc.xy(1, 1));\n final JLabel label2 = new JLabel();\n label2.setHorizontalAlignment(11);\n label2.setText(\"<html><b>File name regex</b></html>\");\n label2.setDisplayedMnemonic('R');\n label2.setDisplayedMnemonicIndex(19);\n label2.setToolTipText(\"A regular expression used to match the file name of the raw files that need to be processed\");\n panel1.add(label2, cc.xy(1, 3));\n final JLabel label3 = new JLabel();\n label3.setHorizontalAlignment(11);\n label3.setText(\"Starting date\");\n label3.setToolTipText(\"Only files with a modification date later then the starting date will be processed\");\n panel1.add(label3, cc.xy(1, 5));\n final JLabel label4 = new JLabel();\n label4.setHorizontalAlignment(11);\n label4.setText(\"<html>Number of threads</html>\");\n label4.setDisplayedMnemonic('T');\n label4.setDisplayedMnemonicIndex(16);\n label4.setToolTipText(\"The number of worker threads used for collecting the raw files and processing them\");\n panel1.add(label4, cc.xy(1, 7));\n panel1.add(spinnerThreads, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new BorderLayout(1, 0));\n panel1.add(panel2, cc.xy(3, 1));\n labelDirectory = new JLabel();\n labelDirectory.setIcon(new ImageIcon(getClass().getResource(\"/images/nok.png\")));\n labelDirectory.setInheritsPopupMenu(false);\n labelDirectory.setMaximumSize(new Dimension(350, 16));\n labelDirectory.setMinimumSize(new Dimension(350, 16));\n labelDirectory.setPreferredSize(new Dimension(350, 16));\n labelDirectory.setText(\"<html><i>no directory configured</i></html>\");\n panel2.add(labelDirectory, BorderLayout.CENTER);\n buttonDirectory = new JButton();\n buttonDirectory.setHorizontalTextPosition(0);\n buttonDirectory.setIcon(new ImageIcon(getClass().getResource(\"/images/add.png\")));\n buttonDirectory.setMaximumSize(new Dimension(24, 24));\n buttonDirectory.setMinimumSize(new Dimension(24, 24));\n buttonDirectory.setPreferredSize(new Dimension(24, 24));\n buttonDirectory.setText(\"\");\n panel2.add(buttonDirectory, BorderLayout.EAST);\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new BorderLayout(1, 0));\n panel1.add(panel3, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n textFieldRegex = new JTextField();\n textFieldRegex.setText(\"^.*\\\\.raw$\");\n panel3.add(textFieldRegex, BorderLayout.CENTER);\n buttonRegex = new JButton();\n buttonRegex.setHorizontalTextPosition(0);\n buttonRegex.setIcon(new ImageIcon(getClass().getResource(\"/images/search.png\")));\n buttonRegex.setMaximumSize(new Dimension(24, 24));\n buttonRegex.setMinimumSize(new Dimension(24, 24));\n buttonRegex.setPreferredSize(new Dimension(24, 24));\n buttonRegex.setText(\"\");\n panel3.add(buttonRegex, BorderLayout.EAST);\n panelDate = new JPanel();\n panelDate.setLayout(new BorderLayout(0, 0));\n panel1.add(panelDate, cc.xy(3, 5));\n checkBoxUnique = new JCheckBox();\n checkBoxUnique.setText(\"Enforce unique run names\");\n checkBoxUnique.setMnemonic('U');\n checkBoxUnique.setDisplayedMnemonicIndex(8);\n panel1.add(checkBoxUnique, cc.xyw(1, 9, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n label2.setLabelFor(textFieldRegex);\n label4.setLabelFor(spinnerThreads);\n }", "void createComponent() {\n\t\t//Initialize all components\n\t\tsetLayout(new BorderLayout());\n\t\ttextEditor = new JTextArea();\n\t\terrorTextArea = new JTextArea();\n\t\topenButton = new JButton(\"Open\");\n\t\tsaveButton = new JButton(\"Save\");\n\t\tfindButton = new JButton(\"Find\");\n\t\treplaceButton = new JButton(\"Replace\");\n\t\tcompileButton = new JButton(\"Compile\");\n\t\trunButton = new JButton(\"Run\");\n\t\tfindField = new JTextField();\n\t\treplaceField = new JTextField();\n\t\tfontSizeItems = new Integer[17];\n\t\tfontStyle = new JComboBox<>(fontStyleItems);\n\t\tfinder = new ArrayList<>();\n\t\t\n\t\t//Assigns values to components\n\t\ttextEditor.setTabSize(2);\n\t\tint index = 0;\n\t\tfor(int i=8;i<=40;i+=2) {\n\t\t\tfontSizeItems[index] = i;\n\t\t\tindex++;\n\t\t}\n\t\tfontSize = new JComboBox<>(fontSizeItems);\n\t\tfontSize.setSelectedIndex(2);\n\t\terrorTextArea.setText(\"Error outputs here...\");\n\t\terrorTextArea.setEditable(false);\n\t\terrorTextArea.setFont(new Font(null, 0, 17));\n\t\terrorTextArea.setLineWrap(true);\n\t\terrorTextArea.setWrapStyleWord(true);\n\t\t\n\t\topenButton.setPreferredSize(optionSize);\n\t\tsaveButton.setPreferredSize(optionSize);\n\t\tfindButton.setPreferredSize(optionSize);\n\t\treplaceButton.setPreferredSize(optionSize);\n\t\t\n\t\thighlighter = textEditor.getHighlighter();\n\t\t\n\t\t//Add all components to panels\n\t\tJScrollPane scrollPane = new JScrollPane(textEditor);\n\t\tJPanel navigationPanel = new JPanel(new BorderLayout());\n\t\tJPanel optionsPanel = new JPanel(new GridLayout(2,5,5,5));\n\t\tJPanel executePanel = new JPanel(new GridLayout(2,1));\n\t\tJPanel errorPanel = new JPanel(new BorderLayout());\n\t\t\n\t\toptionsPanel.add(openButton);\n\t\toptionsPanel.add(fontSize);\n\t\toptionsPanel.add(findField);\n\t\toptionsPanel.add(findButton);\n\t\t\n\t\toptionsPanel.add(saveButton);\n\t\toptionsPanel.add(fontStyle);\n\t\toptionsPanel.add(replaceField);\n\t\toptionsPanel.add(replaceButton);\n\t\t\n\t\texecutePanel.add(compileButton);\n\t\texecutePanel.add(runButton);\n\t\t\n\t\terrorPanel.add(errorTextArea);\n\t\t\n\t\tnavigationPanel.add(optionsPanel,BorderLayout.CENTER);\n\t\tnavigationPanel.add(errorPanel, BorderLayout.SOUTH);\n\t\t\n\t\t//Add panels to the main frame\n\t\tthis.add(scrollPane,BorderLayout.CENTER);\n\t\tthis.add(navigationPanel, BorderLayout.SOUTH);\n\t\tthis.add(executePanel, BorderLayout.EAST);\n\t}", "private void createUIComponents() {\n\n String[] criterios = {\"Nombre\",\"Identificación\"};\n DefaultListModel modelo = new DefaultListModel();\n criterioBusquedaComboBox = new JComboBox(criterios);\n tablaCitas = new JTable();\n tablaBusqueda = new JTable();\n tableModel = (DefaultTableModel) tablaCitas.getModel();\n tableModelBusqueda = (DefaultTableModel) tablaBusqueda.getModel();\n scrollerTable = new JScrollPane(tablaCitas, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n scrollerBusqueda = new JScrollPane(tablaBusqueda, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n guardarInformacionButton = new JButton(\"Guardar información\");\n guardarInformacionButton.setVisible(false);\n }", "public void setUpComponents() {\n for (int i = 1; i <= 31; i++) {\n cmbDay.addItem(String.format(\"%02d\", i));\n }\n\n for (int i = 0; i <= 11; i++) {\n cmbMonth.addItem(monthNames[i]);\n }\n\n updateTimeComboBox();\n\n updateDurationComboBox();\n\n cmbDay.setSelectedIndex(initialDay.getDay() - 1);\n cmbMonth.setSelectedIndex(initialDay.getMonth());\n\n if (formType.equals(\"Edit\")) {\n txtName.setText(eventToEdit.getName());\n cmbTime.setSelectedIndex(eventToEdit.getStartTime() - usedTimes.size());\n cmbDuration.setSelectedIndex(eventToEdit.getDuration() - 1);\n }\n\n cmbTime.addItemListener(new MyItemListener());\n cmbDay.addItemListener(new MyItemListener());\n cmbMonth.addItemListener(new MyItemListener());\n radAutoTime.addActionListener(new TimeHandler());\n radSelectTime.addActionListener(new TimeHandler());\n\n buttonGroup.add(radSelectTime);\n buttonGroup.add(radAutoTime);\n\n frame.setLayout(new GridBagLayout());\n gbc.insets = new Insets(5, 5, 5, 5);\n addComponents();\n\n btnSubmit.addActionListener(new EventHandler());\n frame.getRootPane().setDefaultButton(btnSubmit);\n\n buildFrame();\n }", "private void initComponents(){\n\t\n\t\tthis.setLayout(null);\n\t\t\n\t\tscreensize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\n\t\tlogo = new JLabel(getLogoIcon(), JLabel.CENTER); // 500x50\n\t\t\n\t\toptionList = new JComboBox();\n\t\t\n\t\tcreate = new JButton(\"Create\");\n\t\tclose = new JButton(\"Close\");\n\t\t\n\t\tcreate.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcreateActionPerformed(evt);\n\t\t\t}\n\t\t});\n\t\t\n\t\tclose.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcloseActionPerformed(evt);\n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "protected void addComponents() {\n JPanel contentPanel = new JPanel();\n contentPanel.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.insets = new Insets(5, 5, 5, 5);\n\n addFront(contentPanel, c);\n addBack(contentPanel, c);\n addTag(contentPanel, c);\n\n addButtons(contentPanel, c);\n\n add(contentPanel);\n }", "private void buildUI() {\n initComponents();\n\n FormLayout layout = new FormLayout(\"3dlu, pref:grow, 3dlu\",\n \"3dlu, pref, 3dlu, pref, 3dlu, fill:0:grow\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n CellConstraints cc = new CellConstraints();\n\n // Toolbar\n JPanel toolbar = createToolBar();\n toolbar.setOpaque(false);\n builder.add(toolbar, cc.xy(2, 2));\n builder.addSeparator(null, cc.xyw(1, 4, 2));\n\n // Main panel in scroll pane\n JPanel mainPanel = buildMainPanel();\n mainPanel.setOpaque(false);\n JScrollPane scrollPane = new JScrollPane(mainPanel);\n scrollPane.setOpaque(false);\n scrollPane.getVerticalScrollBar().setUnitIncrement(10);\n UIUtil.removeBorder(scrollPane);\n builder.add(scrollPane, cc.xyw(1, 6, 2));\n\n uiComponent = builder.getPanel();\n }", "private void createUIComponents() {\n String[] columns = {\"ID\", \"Name\", \"Longitude\", \"Latitude\"};\n List<City> cities = DataManager.getDataManager().getAllCities();\n\n // Create table\n DefaultTableModel tableModel = new DefaultTableModel(columns, 0);\n dataTable = new JTable(tableModel);\n\n // Fill table\n tableModel.addRow(new Object[] {\"ID\", \"Name\", \"Long\", \"Lat\"});\n for (int i = 0; i < cities.size(); i++) {\n City curCity = cities.get(i);\n tableModel.addRow(new Object[] {\n i,\n curCity.getName(),\n curCity.getLongitude(),\n curCity.getLatitude()\n });\n }\n dataTable.setVisible(false);\n }", "private void addComponents() {\n\t\tadd(newGame);\n\t\tadd(nameLabel);\n\t\tadd(nameField);\n\t\tadd(addPlayer);\n\t\tadd(gameTextPane);\n\t\tadd(playGame);\t\n\t\tadd(takeTurn);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//v0.1.1 change\n\t}", "private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}", "private void startComponents(){\n\n if(isAllowed(sentinel)){\n SentinelComponent sentinelComponent = new SentinelComponent(getInstance());\n sentinelComponent.getCanonicalName();\n }\n\n if(isAllowed(\"fileserver\")){\n FileServer fileServer = new FileServer(getInstance());\n fileServer.getCanonicalName();\n }\n\n if(isAllowed(\"manager\")){\n ManagerComponent Manager = new ManagerComponent(getInstance());\n Manager.getCanonicalName();\n }\n\n// if(isAllowed(\"sdk\")){\n// SDK sdk = new SDK(getInstance());\n// sdk.getCanonicalName();\n// }\n\n if(isAllowed(\"centrum\")){\n CentrumComponent centrum1 = new CentrumComponent(getInstance(), null);\n centrum1.getCanonicalName();\n }\n\n }", "public void addComponents(){\n add(spelerIDLabel);\n add(typeLabel);\n add(codeLabel);\n add(heeftBetaaldLabel);\n\n add(spelerIDField);\n add(typeField);\n add(codeField);\n add(heeftBetaaldField);\n\n add(klaarButton);\n add(terugButton);\n\n }", "public void createContents(){\n\t\t// Creates control for ScrolledCompositeController controlItemSCSCLC\n\t\tcontrolItemSCSCLC = new ScrolledCompositeController(\"controlItemSC\", coreController, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tsetDirtyManagement(false);\n\t\t\t\t\tgetComposite().setLayout(new MigLayout(\"wrap 2\",\"[align right]10[fill,grow]\",\"[]\"));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Creates control for LabelController background$1LBL\n\t\tbackground$1LBL = new LabelController(\"background$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"background\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateBackground(this);\n\t\t// Creates control for LabelController backgroundImage$1LBL\n\t\tbackgroundImage$1LBL = new LabelController(\"backgroundImage$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"backgroundImage\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateBackgroundImage(this);\n\t\t// Creates control for LabelController bounds$1LBL\n\t\tbounds$1LBL = new LabelController(\"bounds$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"bounds\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateBounds(this);\n\t\t// Creates control for LabelController capture$1LBL\n\t\tcapture$1LBL = new LabelController(\"capture$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"capture\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateCapture(this);\n\t\t// Creates control for LabelController containerBackground$1LBL\n\t\tcontainerBackground$1LBL = new LabelController(\"containerBackground$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerBackground\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerBackground(this);\n\t\t// Creates control for LabelController containerBackgroundImage$1LBL\n\t\tcontainerBackgroundImage$1LBL = new LabelController(\"containerBackgroundImage$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerBackgroundImage\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerBackgroundImage(this);\n\t\t// Creates control for LabelController containerBounds$1LBL\n\t\tcontainerBounds$1LBL = new LabelController(\"containerBounds$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerBounds\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerBounds(this);\n\t\t// Creates control for LabelController containerCapture$1LBL\n\t\tcontainerCapture$1LBL = new LabelController(\"containerCapture$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerCapture\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerCapture(this);\n\t\t// Creates control for LabelController containerFocus$1LBL\n\t\tcontainerFocus$1LBL = new LabelController(\"containerFocus$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerFocus\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerFocus(this);\n\t\t// Creates control for LabelController containerFont$1LBL\n\t\tcontainerFont$1LBL = new LabelController(\"containerFont$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerFont\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerFont(this);\n\t\t// Creates control for LabelController containerForeground$1LBL\n\t\tcontainerForeground$1LBL = new LabelController(\"containerForeground$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerForeground\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerForeground(this);\n\t\t// Creates control for LabelController containerLayoutData$1LBL\n\t\tcontainerLayoutData$1LBL = new LabelController(\"containerLayoutData$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerLayoutData\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerLayoutData(this);\n\t\t// Creates control for LabelController containerLocation$1LBL\n\t\tcontainerLocation$1LBL = new LabelController(\"containerLocation$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerLocation\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerLocation(this);\n\t\t// Creates control for LabelController containerMenu$1LBL\n\t\tcontainerMenu$1LBL = new LabelController(\"containerMenu$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerMenu\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerMenu(this);\n\t\t// Creates control for LabelController containerRedraw$1LBL\n\t\tcontainerRedraw$1LBL = new LabelController(\"containerRedraw$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerRedraw\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerRedraw(this);\n\t\t// Creates control for LabelController containerSize$1LBL\n\t\tcontainerSize$1LBL = new LabelController(\"containerSize$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerSize\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerSize(this);\n\t\t// Creates control for LabelController containerStyle$1LBL\n\t\tcontainerStyle$1LBL = new LabelController(\"containerStyle$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerStyle\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerStyle(this);\n\t\t// Creates control for LabelController editable$1LBL\n\t\teditable$1LBL = new LabelController(\"editable$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"editable\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateEditable(this);\n\t\t// Creates control for LabelController enabled$1LBL\n\t\tenabled$1LBL = new LabelController(\"enabled$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"widget\", \"enabled\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateEnabled(this);\n\t\t// Creates control for LabelController focus$1LBL\n\t\tfocus$1LBL = new LabelController(\"focus$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"focus\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateFocus(this);\n\t\t// Creates control for LabelController font$1LBL\n\t\tfont$1LBL = new LabelController(\"font$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"font\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateFont(this);\n\t\t// Creates control for LabelController foreground$1LBL\n\t\tforeground$1LBL = new LabelController(\"foreground$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"foreground\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateForeground(this);\n\t\t// Creates control for LabelController layoutData$1LBL\n\t\tlayoutData$1LBL = new LabelController(\"layoutData$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"layoutData\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateLayoutData(this);\n\t\t// Creates control for LabelController location$1LBL\n\t\tlocation$1LBL = new LabelController(\"location$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"location\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateLocation(this);\n\t\t// Creates control for LabelController menu$1LBL\n\t\tmenu$1LBL = new LabelController(\"menu$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"menu\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateMenu(this);\n\t\t// Creates control for LabelController orientation$1LBL\n\t\torientation$1LBL = new LabelController(\"orientation$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"orientation\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateOrientation(this);\n\t\t// Creates control for LabelController redraw$1LBL\n\t\tredraw$1LBL = new LabelController(\"redraw$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"redraw\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateRedraw(this);\n\t\t// Creates control for LabelController size$1LBL\n\t\tsize$1LBL = new LabelController(\"size$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"size\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateSize(this);\n\t\t// Creates control for LabelController style$1LBL\n\t\tstyle$1LBL = new LabelController(\"style$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"widget\", \"style\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateStyle(this);\n\t\t// Creates control for LabelController tabs$1LBL\n\t\ttabs$1LBL = new LabelController(\"tabs$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"tabs\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateTabs(this);\n\t\t// Creates control for LabelController text$1LBL\n\t\ttext$1LBL = new LabelController(\"text$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"text\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateText(this);\n\t\t// Creates control for LabelController textLimit$1LBL\n\t\ttextLimit$1LBL = new LabelController(\"textLimit$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"textLimit\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateTextLimit(this);\n\t\t// Creates control for LabelController toolTipText$1LBL\n\t\ttoolTipText$1LBL = new LabelController(\"toolTipText$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"widget\", \"toolTipText\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateToolTipText(this);\n\t\t// Creates control for LabelController visible$1LBL\n\t\tvisible$1LBL = new LabelController(\"visible$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"visible\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateVisible(this);\n\t}", "private void addComponents() {\n\t\t\n\t\t// prima riga di lettere\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t\t\t\n\t\t/* la scacchiera ha l'oringine 0,0 in basso a sinistra\n\t\t * mentre la griglia si riempie di elementi dall'alto\n\t\t * percio' il for delle x (j) cresce mentre popoliamo le celle (bottoni)\n\t\t * mentre il for delle y (i) decresce man mano che passiamo di riga in riga */\n\t\tfor (int i = 7; i >= 0; i--)\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tif (j == 0 || j == 9)\n\t\t\t\t\tadd(numberLabel(i + 1));\n\t\t\t\telse\n\t\t\t\t\tadd(buttons[j - 1][i]);\n\t\t\t}\n\t\t\n\t\t// ultima riga (uguale alla prima)\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t}", "private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }", "private void geometry()\n\t\t{\n\t\t\t// JComponent : Instanciation\n\t\tthis.jPanelAction = new JPanelAction();\n\t\tthis.jPanelCommande = new JPanelCommande(jPanelAction);\n\n\t\t\t// Layout : Specification\n\t\t\t{\n\t\t\tBorderLayout borderLayout = new BorderLayout();\n\t\t\tsetLayout(borderLayout);\n\n\t\t\t// flowlayout.setHgap(20);\n\t\t\t// flowlayout.setVgap(20);\n\t\t\t}\n\n\t\t// JComponent : add\n\t\tthis.add(this.jPanelAction, BorderLayout.CENTER);\n\t\tthis.add(this.jPanelCommande, BorderLayout.SOUTH);\n\t\t}", "private void initComponents() {\n // Create the RGB and the HSB radio buttons.\n createRgbHsbButtons();\n\n \n \n ColorData initial = new ColorData(new RGB(255, 255, 255), 255);\n\n // Create the upper color wheel for the display.\n upperColorWheel = new ColorWheelComp(shell, this, upperWheelTitle);\n // upperColorWheel.setColor(colorArray.get(0));\n upperColorWheel.setColor(initial);\n\n // Create the color bar object that is displayed\n // in the middle of the dialog.\n colorBar = new ColorBarViewer(shell, this, sliderText, cmapParams);\n\n // Create the lower color wheel for the display.\n lowerColorWheel = new ColorWheelComp(shell, this, lowerWheelTitle);\n // lowerColorWheel.setColor(colorArray.get(colorArray.size() - 1));\n lowerColorWheel.setColor(initial);\n\n // Create the bottom control buttons.\n createBottomButtons();\n }", "private void initcomponent() {\n\r\n\t}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel.setForeground(new Color(-1));\n sectionTitle = new JLabel();\n Font sectionTitleFont = this.$$$getFont$$$(\"Droid Sans\", Font.BOLD, 18, sectionTitle.getFont());\n if (sectionTitleFont != null) sectionTitle.setFont(sectionTitleFont);\n this.$$$loadLabelText$$$(sectionTitle, ResourceBundle.getBundle(\"language\").getString(\"title_resources\"));\n panel.add(sectionTitle, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final DefaultListModel defaultListModel1 = new DefaultListModel();\n resourceList.setModel(defaultListModel1);\n resourceList.setSelectionMode(1);\n scrollPane1.setViewportView(resourceList);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));\n publishButton = new JButton();\n publishButton.setEnabled(false);\n this.$$$loadButtonText$$$(publishButton, ResourceBundle.getBundle(\"language\").getString(\"button_publishResource\"));\n panel1.add(publishButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n pullButton = new JButton();\n pullButton.setEnabled(false);\n this.$$$loadButtonText$$$(pullButton, ResourceBundle.getBundle(\"language\").getString(\"button_pullResource\"));\n panel1.add(pullButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "protected void initializeComponents() {\n\t\t/* Create fonts for information nodes */\n\t\tFont titleFont = Font.font(\"Arial\", FontWeight.BOLD, 18);\n\t\tFont descriptionFont = Font.font(\"Arial\", 14);\n\t\t/* Configure information nodes */\n\t\tconfigureTitle(titleFont);\n\t\tconfigureDescription(descriptionFont);\n\t\tconfigureIconContainer();\n\t\tconfigureWindow();\n\t\t/* set scene */\n\n\t\tgetContent().add(notificationContainer);\n\t}", "private void initComponents() {\r\n\r\n\t\tjPanel1 = new javax.swing.JPanel();\r\n\t\tlblCreateHeroName = new javax.swing.JLabel();\r\n\t\ttxtCreateName = new javax.swing.JTextField();\r\n\t\tbtnCreateHero = new javax.swing.JButton();\r\n\r\n\t\tsetDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\r\n\t\tjPanel1.setBackground(new java.awt.Color(51, 51, 0));\r\n\t\tjPanel1.setLayout(null);\r\n\r\n\t\tlblCreateHeroName.setFont(new java.awt.Font(\"Tahoma\", 1, 12)); // NOI18N\r\n\t\tlblCreateHeroName.setForeground(new java.awt.Color(153, 153, 0));\r\n\t\tlblCreateHeroName.setText(\"Name:\");\r\n\t\tjPanel1.add(lblCreateHeroName);\r\n\t\tlblCreateHeroName.setBounds(170, 40, 60, 15);\r\n\r\n\t\ttxtCreateName.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtCreateName.setText(\"Todor\");\r\n\t\tjPanel1.add(txtCreateName);\r\n\t\ttxtCreateName.setBounds(50, 90, 290, 30);\r\n\r\n\t\tbtnCreateHero.setText(\"DO IT\");\r\n\t\tbtnCreateHero.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(final java.awt.event.ActionEvent evt) {\r\n\t\t\t\tbtnCreateHeroActionPerformed();\r\n\t\t\t}\r\n\t\t});\r\n\t\tjPanel1.add(btnCreateHero);\r\n\t\tbtnCreateHero.setBounds(160, 140, 70, 23);\r\n\r\n\t\tfinal javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n\t\tgetContentPane().setLayout(layout);\r\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE));\r\n\t\tlayout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n\t\t\t\t.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE));\r\n\r\n\t\tpack();\r\n\t}", "private void createElements() {\n\n\t\tBorderLayout manager = new BorderLayout();\n\t\tthis.setLayout(manager);\n\t\tthis.manager = manager;\n\t\tJLabel title = new JLabel(\"Welcome!\"); //change to display customer name\n\t\ttitle.setFont(new Font(title.getName(), Font.BOLD, 24));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tthis.add(title, BorderLayout.PAGE_START);\n\n\t\t//left Option panel\n\t\tJPanel optPanel = new JPanel();\n\t\toptPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\t\toptPanel.setPreferredSize(new Dimension (200,500));\n\t\toptPanel.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tJButton newApt = new JButton(\"Check Rented Media\");\n\t\tnewApt.addActionListener(controller);\n\t\tnewApt.setActionCommand(\"rented\");\n\t\tJButton viewApt = new JButton(\"Rent Media\");\n\t\tviewApt.addActionListener(controller);\n\t\tviewApt.setActionCommand(\"newRent\");\n\t\tJButton close = new JButton(\"Exit Program\");\n\t\tclose.addActionListener(controller);\n\t\tclose.setActionCommand(\"close\");\n\t\tc.weighty = 1;\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.ipady = 10;\n\t\tc.insets = new Insets(20,0,0,0);\n\t\tc.gridy = 0;\n\t\toptPanel.add(newApt, c);\n\t\tc.gridy = 1;\n\t\toptPanel.add(viewApt, c);\n\t\tc.gridy = 2;\n\t\toptPanel.add(close, c);\n\t\tthis.add(optPanel, BorderLayout.LINE_START);\n\n\t\tJPanel placeHolder = new JPanel();\n\t\tthis.add(placeHolder, BorderLayout.CENTER);\n\n\t\tJLabel pointsLbl = new JLabel (\"The customer has \" + controller.getCustomerPoints() +\n\t\t\t\t\" loyalty points.\");\n\t\tthis.pointsLbl = pointsLbl;\n\t\tpointsLbl.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tthis.add(pointsLbl, BorderLayout.PAGE_END);\n\t\tthis.validate();\n\t\tthis.repaint();\n\n\t}", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "private void agregarComponentes() {\n JButton botonEstudiante = new JButton(\"Estudiante\");\r\n JButton botonDocente = new JButton(\"Docente\");\r\n JButton botonEquipo = new JButton(\"Equipo\");\r\n\r\n botonEstudiante.addActionListener(new OyenteListaEstudiante(this));\r\n botonDocente.addActionListener(new OyenteListaDocente(this));\r\n botonEquipo.addActionListener(new OyenteListaEquipo(this));\r\n\r\n // crea objeto Box para manejar la colocación de areaConsulta y\r\n // botonEnviar en la GUI\r\n Box boxNorte = Box.createHorizontalBox();\r\n boxNorte.add(botonDocente);\r\n boxNorte.add(botonEstudiante);\r\n boxNorte.add(botonEquipo);\r\n\r\n // crea delegado de JTable para modeloTabla\r\n tablaDatosIngresdos = new JTable();\r\n add(boxNorte, BorderLayout.NORTH);\r\n\r\n add(new JScrollPane(tablaDatosIngresdos), BorderLayout.CENTER);\r\n\r\n }", "private void addComponents(){\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.anchor = GridBagConstraints.WEST;\n constraints.insets = new Insets(5, 5, 5, 5);\n constraints.fill = GridBagConstraints.BOTH;\n \n // Add components to the panel\n // Note>> the constraints are applied to both panels\n constraints.gridx = 0;\n constraints.gridy = 0; \n subPanel1.add(onDo1, constraints); // Add button to pane 1\n\n constraints.gridx = 1;\n subPanel1.add(onDo2, constraints); // Add button to pane 1\n \n constraints.gridx = 0;\n constraints.gridy = 1; \n subPanel1.add(onDo3, constraints); // Add button to pane 1\n subPanel2.add(l1, constraints); // Add button to pane 2\n \n constraints.gridx = 1;\n constraints.gridy = 1;\n subPanel1.add(onDo4, constraints); // Add button to pane 1\n \n\n // Set border for sub panel 1 \n subPanel1.setBorder(BorderFactory.createTitledBorder(\n BorderFactory.createEtchedBorder(), \"Events\"));\n \n // Set border for sub panel 2 \n subPanel2.setBorder(BorderFactory.createTitledBorder(\n BorderFactory.createEtchedBorder(), \"Debug\"));\n }", "public void initComponents() {\n Iterator<Component> itComponent = this.components.iterator();\n while (itComponent.hasNext()) {\n itComponent.next().init(this);\n }\n\n Iterator<Script> itScript = this.scripts.iterator();\n while (itScript.hasNext()) {\n itScript.next().init(this);\n }\n System.out.println(this.owner.id + \" : \" + this.components.toString() + \" \" + this.scripts.toString());\n\n }", "void fillInnerParts() {\n // TODO: change the method to get each category panel\n adminPanel = new CategoryPanel(logic.getUiTaskList().getAdminList(), \"Admin\");\n categoryPanelPlaceholder.getChildren().add(adminPanel.getRoot());\n topicPanel = new CategoryPanel(logic.getUiTaskList().getTopicList(), \"Topic\");\n categoryPanelPlaceholder.getChildren().add(topicPanel.getRoot());\n ipPanel = new CategoryPanel(logic.getUiTaskList().getIpList(), \"Ip\");\n categoryPanelPlaceholder.getChildren().add(ipPanel.getRoot());\n tpPanel = new CategoryPanel(logic.getUiTaskList().getTpList(), \"Tp\");\n categoryPanelPlaceholder.getChildren().add(tpPanel.getRoot());\n refreshTitle();\n\n int currentWeekNumber = AppUtil.getCurrentWeekNumber().getWeekValueInt();\n Double num = (double) currentWeekNumber / (double) 13;\n progressBar.setProgress(num);\n\n weekDisplay = new WeekDisplay(currentWeekNumber);\n\n weekDisplayPlaceholder.getChildren().add(weekDisplay.getRoot());\n\n feedbackBox = new FeedbackBox();\n feedbackBoxPlaceholder.getChildren().add(feedbackBox.getRoot());\n CommandBox commandBox = new CommandBox(this::executeCommand); // bottom of Ace CS2103/T\n commandBoxPlaceholder.getChildren().add(commandBox.getRoot());\n }", "private void initializeComponent() throws Exception {\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.radioPurchased = new System.Windows.Forms.RadioButton();\n this.radioSold = new System.Windows.Forms.RadioButton();\n this.radioAll = new System.Windows.Forms.RadioButton();\n this.textSnDesc = new System.Windows.Forms.TextBox();\n this.label7 = new System.Windows.Forms.Label();\n this.butRefresh = new OpenDental.UI.Button();\n this.textDateStart = new OpenDental.ValidDate();\n this.textDateEnd = new OpenDental.ValidDate();\n this.butPrint = new OpenDental.UI.Button();\n this.butAdd = new OpenDental.UI.Button();\n this.gridMain = new OpenDental.UI.ODGrid();\n this.butClose = new OpenDental.UI.Button();\n this.groupBox1.SuspendLayout();\n this.SuspendLayout();\n //\n // label1\n //\n this.label1.Location = new System.Drawing.Point(12, 6);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(170, 39);\n this.label1.TabIndex = 7;\n this.label1.Text = \"This list tracks equipment for payment of property taxes.\";\n this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\n //\n // groupBox1\n //\n this.groupBox1.Controls.Add(this.butRefresh);\n this.groupBox1.Controls.Add(this.textDateStart);\n this.groupBox1.Controls.Add(this.textDateEnd);\n this.groupBox1.Location = new System.Drawing.Point(424, 3);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(257, 42);\n this.groupBox1.TabIndex = 23;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"Date Range\";\n //\n // radioPurchased\n //\n this.radioPurchased.Location = new System.Drawing.Point(695, 3);\n this.radioPurchased.Name = \"radioPurchased\";\n this.radioPurchased.Size = new System.Drawing.Size(93, 18);\n this.radioPurchased.TabIndex = 23;\n this.radioPurchased.Text = \"Purchased\";\n this.radioPurchased.UseVisualStyleBackColor = true;\n this.radioPurchased.Click += new System.EventHandler(this.radioPurchased_Click);\n //\n // radioSold\n //\n this.radioSold.Location = new System.Drawing.Point(695, 18);\n this.radioSold.Name = \"radioSold\";\n this.radioSold.Size = new System.Drawing.Size(93, 18);\n this.radioSold.TabIndex = 24;\n this.radioSold.Text = \"Sold\";\n this.radioSold.UseVisualStyleBackColor = true;\n this.radioSold.Click += new System.EventHandler(this.radioSold_Click);\n //\n // radioAll\n //\n this.radioAll.Checked = true;\n this.radioAll.Location = new System.Drawing.Point(695, 33);\n this.radioAll.Name = \"radioAll\";\n this.radioAll.Size = new System.Drawing.Size(93, 18);\n this.radioAll.TabIndex = 25;\n this.radioAll.TabStop = true;\n this.radioAll.Text = \"All\";\n this.radioAll.UseVisualStyleBackColor = true;\n this.radioAll.Click += new System.EventHandler(this.radioAll_Click);\n //\n // textSnDesc\n //\n this.textSnDesc.Location = new System.Drawing.Point(285, 19);\n this.textSnDesc.Name = \"textSnDesc\";\n this.textSnDesc.Size = new System.Drawing.Size(133, 20);\n this.textSnDesc.TabIndex = 39;\n this.textSnDesc.TextChanged += new System.EventHandler(this.textSn_TextChanged);\n //\n // label7\n //\n this.label7.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;\n this.label7.Location = new System.Drawing.Point(174, 19);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(105, 20);\n this.label7.TabIndex = 38;\n this.label7.Text = \"SN/Descipt/Loc\";\n this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;\n //\n // butRefresh\n //\n this.butRefresh.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butRefresh.setAutosize(true);\n this.butRefresh.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butRefresh.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butRefresh.setCornerRadius(4F);\n this.butRefresh.Location = new System.Drawing.Point(172, 12);\n this.butRefresh.Name = \"butRefresh\";\n this.butRefresh.Size = new System.Drawing.Size(78, 24);\n this.butRefresh.TabIndex = 23;\n this.butRefresh.Text = \"Refresh\";\n this.butRefresh.Click += new System.EventHandler(this.butRefresh_Click);\n //\n // textDateStart\n //\n this.textDateStart.Location = new System.Drawing.Point(6, 16);\n this.textDateStart.Name = \"textDateStart\";\n this.textDateStart.Size = new System.Drawing.Size(77, 20);\n this.textDateStart.TabIndex = 21;\n //\n // textDateEnd\n //\n this.textDateEnd.Location = new System.Drawing.Point(89, 15);\n this.textDateEnd.Name = \"textDateEnd\";\n this.textDateEnd.Size = new System.Drawing.Size(77, 20);\n this.textDateEnd.TabIndex = 22;\n //\n // butPrint\n //\n this.butPrint.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.butPrint.setAutosize(true);\n this.butPrint.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butPrint.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butPrint.setCornerRadius(4F);\n this.butPrint.Image = Resources.getbutPrint();\n this.butPrint.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;\n this.butPrint.Location = new System.Drawing.Point(385, 550);\n this.butPrint.Name = \"butPrint\";\n this.butPrint.Size = new System.Drawing.Size(75, 24);\n this.butPrint.TabIndex = 8;\n this.butPrint.Text = \"Print\";\n this.butPrint.Click += new System.EventHandler(this.butPrint_Click);\n //\n // butAdd\n //\n this.butAdd.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.butAdd.setAutosize(true);\n this.butAdd.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butAdd.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butAdd.setCornerRadius(4F);\n this.butAdd.Image = Resources.getAdd();\n this.butAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;\n this.butAdd.Location = new System.Drawing.Point(141, 550);\n this.butAdd.Name = \"butAdd\";\n this.butAdd.Size = new System.Drawing.Size(75, 24);\n this.butAdd.TabIndex = 6;\n this.butAdd.Text = \"Add\";\n this.butAdd.Click += new System.EventHandler(this.butAdd_Click);\n //\n // gridMain\n //\n this.gridMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));\n this.gridMain.setHScrollVisible(false);\n this.gridMain.Location = new System.Drawing.Point(12, 51);\n this.gridMain.Name = \"gridMain\";\n this.gridMain.setScrollValue(0);\n this.gridMain.Size = new System.Drawing.Size(777, 490);\n this.gridMain.TabIndex = 5;\n this.gridMain.setTitle(\"Equipment\");\n this.gridMain.setTranslationName(null);\n this.gridMain.CellDoubleClick = __MultiODGridClickEventHandler.combine(this.gridMain.CellDoubleClick,new OpenDental.UI.ODGridClickEventHandler() \n { \n public System.Void invoke(System.Object sender, OpenDental.UI.ODGridClickEventArgs e) throws Exception {\n this.gridMain_CellDoubleClick(sender, e);\n }\n\n public List<OpenDental.UI.ODGridClickEventHandler> getInvocationList() throws Exception {\n List<OpenDental.UI.ODGridClickEventHandler> ret = new ArrayList<OpenDental.UI.ODGridClickEventHandler>();\n ret.add(this);\n return ret;\n }\n \n });\n //\n // butClose\n //\n this.butClose.setAdjustImageLocation(new System.Drawing.Point(0, 0));\n this.butClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n this.butClose.setAutosize(true);\n this.butClose.setBtnShape(OpenDental.UI.enumType.BtnShape.Rectangle);\n this.butClose.setBtnStyle(OpenDental.UI.enumType.XPStyle.Silver);\n this.butClose.setCornerRadius(4F);\n this.butClose.Location = new System.Drawing.Point(714, 550);\n this.butClose.Name = \"butClose\";\n this.butClose.Size = new System.Drawing.Size(75, 24);\n this.butClose.TabIndex = 2;\n this.butClose.Text = \"&Close\";\n this.butClose.Click += new System.EventHandler(this.butClose_Click);\n //\n // FormEquipment\n //\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;\n this.ClientSize = new System.Drawing.Size(801, 585);\n this.Controls.Add(this.textSnDesc);\n this.Controls.Add(this.label7);\n this.Controls.Add(this.radioAll);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.radioSold);\n this.Controls.Add(this.radioPurchased);\n this.Controls.Add(this.butPrint);\n this.Controls.Add(this.label1);\n this.Controls.Add(this.butAdd);\n this.Controls.Add(this.gridMain);\n this.Controls.Add(this.butClose);\n this.Name = \"FormEquipment\";\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n this.Text = \"Equipment\";\n this.Load += new System.EventHandler(this.FormEquipment_Load);\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.ResumeLayout(false);\n this.PerformLayout();\n }", "public void createComponents(JComponent panel) {\r\n\t\t// Array display\r\n\t\tpanel.setLayout(new FlowLayout());\r\n\t\tpanel1.setLayout(new BorderLayout());\r\n\t\tcanvas.addMouseListener(aml);\r\n\t\tcanvas.addMouseMotionListener(aml);\r\n\t\tpanel1.add(canvas);\r\n\t\tpanel1.add(instr, BorderLayout.NORTH);\r\n\t\t\r\n\t\tpanel.add(panel1);\r\n\r\n\t\t// Controls\r\n\t\tpanel2.setLayout(new GridLayout(5, 2));\t\r\n\t\t\r\n\t\tJButton createArrayButton = new JButton(\"Create Customized Array\");\r\n\t\tpanel2.add(createArrayButton);\r\n\t\tcreateArrayButton.addActionListener(new createArrayListener());\r\n\r\n\t\tJButton changeValueButton = new JButton(\"Change Element Value\");\r\n\t\tpanel2.add(changeValueButton);\r\n\t\tchangeValueButton.addActionListener(new changeValueListener());\r\n\r\n\t\tJButton accessButton = new JButton(\"Access Element\");\r\n\t\tpanel2.add(accessButton);\r\n\t\taccessButton.addActionListener(new accessListener());\r\n\t\t\r\n\t\tJButton findButton = new JButton(\"Search Element\");\r\n\t\tpanel2.add(findButton);\r\n\t\tfindButton.addActionListener(new findListener());\r\n\t\t\r\n\t\tJButton clearButton = new JButton(\"Clear Previous Content\");\r\n\t\tpanel2.add(clearButton);\r\n\t\tclearButton.addActionListener(new ClearListener());\t\r\n\t\t\r\n\t\tpanel.add(panel2);\t\r\n\t}", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "private void inicialitzarComponents() {\n\t\tsetLayout(new BorderLayout(0, 0));\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setOpaque(false);\n\t\tadd(panel, BorderLayout.NORTH);\n\n\t\tBox verticalBox = Box.createVerticalBox();\n\t\tverticalBox.setOpaque(false);\n\t\tpanel.add(verticalBox);\n\n\t\tJPanel panel_2 = new JPanel();\n\t\tpanel_2.setOpaque(false);\n\t\tverticalBox.add(panel_2);\n\n\t\tJPanel panel_3 = new JPanel();\n\t\tpanel_3.setOpaque(false);\n\t\tverticalBox.add(panel_3);\n\n\t\tJLabel lblNewLabel = new JLabel(nomUsuari);\n\t\tlblNewLabel.setFont(lblNewLabel.getFont().deriveFont(30f));\n\t\tpanel_3.add(lblNewLabel);\n\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setOpaque(false);\n\t\tadd(panel_1, BorderLayout.CENTER);\n\n\t\tBox verticalBox_1 = Box.createVerticalBox();\n\t\tverticalBox_1.setOpaque(false);\n\t\tpanel_1.add(verticalBox_1);\n\n\t\tJPanel panel_4 = new JPanel();\n\t\tpanel_4.setOpaque(false);\n\t\tverticalBox_1.add(panel_4);\n\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Peces girades:\");\n\t\tpanel_4.add(lblNewLabel_1);\n\n\t\tJLabel lblNewLabel_2 = new JLabel(String.valueOf(records.get(\"pecesGirades\")));\n\t\tpanel_4.add(lblNewLabel_2);\n\n\t\tJPanel panel_5 = new JPanel();\n\t\tpanel_5.setOpaque(false);\n\t\tverticalBox_1.add(panel_5);\n\n\t\tJLabel lblNewLabel_3 = new JLabel(\"Partides blanques guanyades:\");\n\t\tpanel_5.add(lblNewLabel_3);\n\n\t\tJLabel lblNewLabel_4 = new JLabel(String.valueOf(records.get(\"partidesBlanquesGuanyades\")));\n\t\tpanel_5.add(lblNewLabel_4);\n\n\t\tJPanel panel_6 = new JPanel();\n\t\tpanel_6.setOpaque(false);\n\t\tverticalBox_1.add(panel_6);\n\n\t\tJLabel lblNewLabel_5 = new JLabel(\"Partides negres guanyades:\");\n\t\tpanel_6.add(lblNewLabel_5);\n\n\t\tJLabel lblNewLabel_6 = new JLabel(String.valueOf(records.get(\"partidesNegresGuanyades\")));\n\t\tpanel_6.add(lblNewLabel_6);\n\n\t\tpanellRanking.setLayout(new BorderLayout());\n\t\tpanellRanking.add(menu, BorderLayout.NORTH);\n\t\tpanellRanking.add(taulaHoritzontal, BorderLayout.CENTER);\n\t\tpanellRanking.setBorder(BorderFactory.createLineBorder(Color.white, 4));\n\t\tJPanel panel_7 = new JPanel();\n\t\tpanel_7.setOpaque(false);\n\t\tpanel_7.setSize(20, 20);\n\t\tpanel_7.add(panellRanking);\n\t\tverticalBox_1.add(panel_7);\n\t}", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "private void buildUIElements() {\n uiCamera = new OrthographicCamera( Global.WINDOW_WIDTH, Global.WINDOW_HEIGHT );\n uiViewport = new ExtendViewport( Global.WINDOW_WIDTH, Global.WINDOW_HEIGHT, uiCamera );\n\n //Build the table.\n uiStage = new Stage( uiViewport );\n rootTable = new Table( VisUI.getSkin() );\n uiStage.addActor( rootTable );\n rootTable.setFillParent( true );\n rootTable.left().top();\n\n //Fill up the healthMeter is images to be used as healthBars.\n for ( int i = 0; i < 20; i++ ) {\n healthMeter.add( new Image( healthBars.findRegion( \"highHealth\" ) ) );\n }\n }" ]
[ "0.83671254", "0.7790667", "0.7782525", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.77672344", "0.7569768", "0.75361806", "0.75196326", "0.7476622", "0.7457161", "0.7394407", "0.7330253", "0.72942543", "0.7204707", "0.7187445", "0.71632856", "0.71632856", "0.71434313", "0.7142615", "0.71306956", "0.7053508", "0.7041303", "0.70361805", "0.70066786", "0.70032495", "0.69863623", "0.698475", "0.69828194", "0.69618917", "0.69401485", "0.69178194", "0.69134176", "0.6891269", "0.68732214", "0.685768", "0.68296945", "0.6823924", "0.68186194", "0.68009275", "0.67839444", "0.6783376", "0.6778425", "0.67777306", "0.67722887", "0.6769864", "0.6752991", "0.67367405", "0.67137945", "0.67026204", "0.6690379", "0.66629463", "0.6661845", "0.66606593", "0.6653469", "0.6634066", "0.66253394", "0.66211456", "0.6619691", "0.66158175", "0.66035134", "0.6592915", "0.6555432", "0.6552246", "0.6547957", "0.6541425", "0.65365106", "0.65355426", "0.6527891", "0.6522288", "0.6510672", "0.6507198", "0.65061784", "0.6489726", "0.64869285", "0.6473522", "0.6465598", "0.6455486", "0.6453313", "0.64497346", "0.64443743", "0.64426315", "0.6441299", "0.6433028", "0.64312875", "0.6429935" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { ImgurDownloadWindow w = new ImgurDownloadWindow(); w.buttonListeners(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Remove um insumo da encomenda
public void removerEncomendaInsumo(int insumoId){ Encomenda_insumoController encomenda_insumoController = new Encomenda_insumoController(); System.out.println(insumoId); encomenda_insumoController.setup(); String resposta = encomenda_insumoController.delete(insumoId); encomendaController = new EncomendaController(); encomendaController.setup(); if(!resposta.equals("ok")) { exibirMsgErro(resposta); return; } getAllEncomendas(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeGuest(Invitato in){\n AssegnamentiTavolo.remove(in);\n num_posti++;\n openAssignment();\n }", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "public void removeEmpleado(){\n //preguntar al empleado si realmente eliminar o no al objeto empleado\n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, \"<html>\"\n + \"¿Deseas remover el empleado del sistema?<br> \"\n + \"<b>OJO: EL EMPLEADO SERÁ ELIMINADO PERMANENTEMENTE.</b> \"\n + \"</html>\",\n new Callback<Boolean>(){\n @Override\n public void execute(Boolean[] answer) {\n //si la respuesta fue YES=true, remover al empleado y limpiar el formulario\n if(answer[0]){\n mEmpleado.remove();\n clear();\n }\n //si la respuesta es NO=false, no hacer nada\n }\n }\n );\n \n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public void removerInicio() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n this.primeiro = this.primeiro.irParaProximo();\n this.total--;\n break;\n }\n }", "@Override\n\tpublic void remover(Agendamento agendamento) {\n\t\t\n\t}", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "@Override\r\n\tpublic void eliminar(IndicadorActividadEscala iae) {\n\r\n\t}", "@Override\n\tpublic void excluirIngresso(Ingresso ingresso) throws DBException {\n\t\t\n\t}", "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "@Override\n\tpublic void excluir(Produto entidade) {\n\n\t}", "@Override\r\n\tpublic void excluir(Evento evento) {\n\t\trepository.delete(evento);\r\n\t}", "public void excluirInteresse(String nome, String tituloImovel) {\n\t\tString sql = \"DELETE FROM interesse WHERE titulo ='\" +tituloImovel+\"' AND nomeInteressado ='\"+nome+\"'\";\n\t\ttry{\n\t\t\tPreparedStatement stmt = conexaoBD.prepareStatement(sql); \n\t\t\tstmt.execute();\n\t\t\tstmt.close();\n\t\t\tJOptionPane.showMessageDialog(null, \"Interesse excluído\");\n\t\t}catch(Exception e) {\n\t\t\tSystem.out.println(e.getMessage()); \n\t\t}\n\t}", "public void excluir() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Excluir(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente excluido com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"Não é possível excluir um cliente que tenha uma venda associado!\");\n e.printStackTrace();\n }\n }", "public void eliminar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.remove(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "public void eliminaEdificio() {\n this.edificio = null;\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "public void EliminarElmento(int el) throws Exception{\n if (!estVacia()) {\n if (inicio == fin && el == inicio.GetDato()) {\n inicio = fin = null;\n } else if (el == inicio.GetDato()) {\n inicio = inicio.GetSiguiente();\n } else {\n NodoDoble ante, temporal;\n ante = inicio;\n temporal = inicio.GetSiguiente();\n while (temporal != null && temporal.GetDato() != el) {\n ante = ante.GetSiguiente();\n temporal = temporal.GetSiguiente();\n }\n if (temporal != null) {\n ante.SetSiguiente(temporal.GetSiguiente());\n if (temporal == fin) {\n fin = ante;\n }\n }\n }\n }else{\n throw new Exception(\"No existen datos por borrar!!!\");\n }\n }", "void incluir(Entidade entidade);", "@Override\n\tpublic void excluir(Cliente o) {\n\t\t\n\t}", "@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}", "@Override\r\n\tpublic void excluir(Telefone vo) throws Exception {\n\t\t\r\n\t}", "public void delete(Amministratore a){\r\n\tEntityManagerFactory emf= Persistence.createEntityManagerFactory(\"esercitazione-unit\");\r\n\tthis.em= emf.createEntityManager();\r\n\tEntityTransaction et= em.getTransaction();\r\n\tet.begin();\r\n\tem.remove(em.contains(a)? a: em.merge(a));\r\n\tet.commit();\r\n\tem.close();\r\n\temf.close();\r\n\t}", "@Override\n\tpublic void RemoverCarrinho(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "public void eliminarTermino() {\n System.out.println(\"......................\");\n System.out.println(\"Eliminar Termino Academico\");\n int i = 1;\n Entrada entrada = new Entrada();\n for (Termino t : Termino.terminos) {\n System.out.println(i + \". \" + t);\n i++;\n }\n if (i != 1) {\n int opc;\n do {\n opc = entrada.Entera(\"Ingrese opcion(1-\" + (i - 1) + \"): \");\n if (!(opc >= 1 && opc <= (i - 1))) {\n System.out.println(\"opcion no valida\");\n }\n } while (!(opc >= 1 && opc <= (i - 1)));\n Termino.terminos.remove(opc - 1);\n System.out.println(\"Termino Eliminado\");\n } else {\n System.out.println(\"No existen terminos\");\n }\n }", "public void remove(Ejemplar ej);", "@Transactional\n\tpublic void excluir(Fabricante fabricanteSelecionado) throws NegocioException{\n\t\tFabricante fabricanteTemp= em.find(Fabricante.class, fabricanteSelecionado.getCodigo());\n\t\t\n\t\tem.remove(fabricanteTemp);\n\t\tem.flush();\n\t}", "public int eliminardelFinal(){\n int elemento = fin.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n fin = fin.ant;\n fin.sig = null;\n }\n return elemento;\n \n \n }", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "private void remover() {\n int confirma = JOptionPane.showConfirmDialog(null, \"Tem certeza que deseja remover este cliente\", \"Atenção\", JOptionPane.YES_NO_OPTION);\n if (confirma == JOptionPane.YES_OPTION) {\n String sql = \"delete from empresa where id=?\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpId.getText());\n int apagado = pst.executeUpdate();\n if (apagado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa removida com sucesso!\");\n txtEmpId.setText(null);\n txtEmpNome.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }\n }", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "public void excluirConta(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException ;", "public void removerDeContenedor() {\n\t\tthrow new NotImplementedException();\r\n\t}", "private void excluir(String text) { \n try{\n //Variaveis de sessao\n Session s = HibernateUtil.getSessionFactory().openSession();\n s.beginTransaction();\n //sql \n Query q = s.createSQLQuery(\"delete from estacionamento where placa = \"+text);\n //execulta e grava\n q.executeUpdate();\n s.getTransaction().commit();\n \n //exeção //nao conectou // erro\n }catch(HibernateException e){\n JOptionPane.showConfirmDialog(null, \"erro :\"+e );\n }\n \n \n \n \n }", "public int eliminarAlFinal(){\n int edad = fin.edad;\n if(fin==inicio){\n inicio=fin=null;\n }else{\n Nodo auxiliar=inicio;\n while(auxiliar.siguiente!=fin){\n auxiliar=auxiliar.siguiente;\n }\n fin=auxiliar;\n fin.siguiente=null;\n }\n return edad;\n }", "@Override\n\tpublic boolean eliminaDipendente() {\n\t\treturn false;\n\t}", "@Override\n public boolean excluirRegistro() {\n this.produto.excluir();\n return true;\n }", "@Override\n\tpublic void excluir() {\n\t\t\n\t}", "@Override\n public void remove() throws IOException {\n int i = listEnterprisePanel.getTableListE().getSelectedRow(); // chọn hàng để xóa\n if (i >= 0) {\n String strID = listEnterprisePanel.getTableListE().getValueAt(i, 1).toString().trim(); // lấy ID\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(strID); // Tìm kiếm Enterprise theo ID\n content.set(Collections.singleton(enterprise), null);\n enterpriseBN.deleteEnterprise(enterprise);\n model.removeRow(i);\n loadData();\n }\n\n }", "public void excluirUltimaLinha() {\n valor = venda.BuscaultValor(ultimacod) - ultimoValor;\n int tempqte = venda.BuscaQte(ultimacod) + ultimaQte;\n SubMatRemove(ultimoValor, Double.parseDouble(jTxtSubTotal.getText()));\n AtulizaBanco(ultimacod, fun.getMatricula(), valor, tempqte);\n ((DefaultTableModel) jTable1.getModel()).removeRow(jTable1.getRowCount() - 1);\n }", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "@Override\n\tpublic void quitar(Alumno alumno) {\n\t\tcomision.remove(alumno);\n\t}", "public void eliminarEmpleado(String nroDocEmpleado) throws Exception {\n if (this.empleados.containsKey(nroDocEmpleado)) {\r\n this.generarAuditoria(\"BAJA\", \"EMPLEADO\", nroDocEmpleado, \"\", GuiIngresar.getUsuario());\r\n this.empleados.remove(nroDocEmpleado);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"El cajero no Existe\");\r\n }\r\n //return retorno;\r\n }", "private void excluirAction() {\r\n Integer i = daoPedido.excluir(this.pedidoVO);\r\n\r\n if (i != null && i > 0) {\r\n msg = activity.getString(R.string.SUCCESS_excluido, pedidoVO.toString());\r\n Toast.makeText(activity, msg + \"(\" + i + \")\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"DB_INFO\", \"Sucesso ao Alterar: \" + this.pedidoVO.toString());\r\n\r\n// this.adapter.remove(this.pedidoVO);\r\n this.refreshData(2);\r\n } else {\r\n msg = activity.getString(R.string.ERROR_excluir, pedidoVO.toString());\r\n Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show();\r\n Log.e(\"DB_INFO\", \"Erro ao Excluir: \" + this.pedidoVO.toString());\r\n }\r\n }", "public void excluirContaImopostosDeduzidos(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException;", "@Override\r\n\tpublic void eliminar(Long idRegistro) {\n\t\t\r\n\t}", "@Override\n\tpublic void eliminar(Seccion seccion) {\n\t\tentity.getTransaction().begin();\n\t\tentity.remove(seccion);\n\t\tentity.getTransaction().commit();\n\t}", "public void removerPorReferencia(int referencia){\n if (buscar(referencia)) {\n // Consulta si el nodo a eliminar es el pirmero\n if (inicio.getEmpleado().getId() == referencia) {\n // El primer nodo apunta al siguiente.\n inicio = inicio.getSiguiente();\n // Apuntamos con el ultimo nodo de la lista al inicio.\n ultimo.setSiguiente(inicio);\n } else{\n // Crea ua copia de la lista.\n NodoEmpleado aux = inicio;\n // Recorre la lista hasta llegar al nodo anterior\n // al de referencia.\n while(aux.getSiguiente().getEmpleado().getId() != referencia){\n aux = aux.getSiguiente();\n }\n if (aux.getSiguiente() == ultimo) {\n aux.setSiguiente(inicio);\n ultimo = aux;\n } else {\n // Guarda el nodo siguiente del nodo a eliminar.\n NodoEmpleado siguiente = aux.getSiguiente();\n // Enlaza el nodo anterior al de eliminar con el\n // sguiente despues de el.\n aux.setSiguiente(siguiente.getSiguiente());\n // Actualizamos el puntero del ultimo nodo\n }\n }\n // Disminuye el contador de tama�o de la lista.\n size--;\n }\n }", "public void localizarEremoverProdutoCodigo(Prateleira prat){\r\n //instacia um auxiliar para procura\r\n Produto mockup = new Produto();\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser removido\" ));\r\n mockup.setCodigo(Codigo); \r\n \r\n //informa que caso encontre o produto remova o da arraylist\r\n boolean resultado = prat.getPrateleira().remove(mockup);\r\n if(resultado){\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" Removido\");\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" não encontrado\");\r\n }\r\n }", "public void remover(Usuario u) {\n listaUse.remove(u);\n\n }", "public void eliminar(ListaConArreglo nodosMaquina){\n\t\tmodAdmin.eliminar( nodosMaquina);\n\t\tif(!ModAdmin.existe){\n\t\t\tSystem.err.println(\"El dominio indicado no existe en la base\");\n\t\t}\n\t\tModAdmin.existe=false;\n\t}", "public void excluirClienteConta(Integer idFaturamentoGrupo , Integer anoMesReferencia) throws ErroRepositorioException ;", "public void EliminarTodosLosEnemigos() {\n\t\tlistaDeEnemigos.removeAll(listaDeEnemigos);\n\t}", "@Override\n\tpublic void eliminar() {\n\n\t}", "public CensoCCVnoREMExcluidos() {\n this.nombre = \"\";\n this.apellidom = \"\";\n this.apellidop = \"\";\n this.rut = \"\";\n this.edad = 0;\n this.razon_exclusion = \"\";\n }", "public void borrarTodo(){\n diccionario.clear();\n }", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "public void removerEstudante(String estudante_nome) {\n this.getWritableDatabase().delete(\"estudante\", \"nome_estudante = '\" + estudante_nome + \"'\", null);\n }", "@Override\n\tpublic void RemoverCupons(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "@Override\r\n public void removeAll() {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n Query query = em.createQuery(\"DELETE FROM Assunto \");\r\n query.executeUpdate();\r\n em.getTransaction().commit();\r\n }", "public void eliminar(DetalleArmado detallearmado);", "public void eliminar(String sentencia){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(sentencia);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public void excluir(Filme f) {\r\n\r\n //Pegando o gerenciador de acesso ao BD\r\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Iniciar a transação\r\n gerenciador.getTransaction().begin();\r\n\r\n //Para excluir tem que dar o merge primeiro para \r\n //sincronizar o ator do BD com o ator que foi\r\n //selecionado na tela\r\n f = gerenciador.merge(f);\r\n\r\n //Mandar sincronizar as alterações \r\n gerenciador.remove(f);\r\n\r\n //Commit na transação\r\n gerenciador.getTransaction().commit();\r\n\r\n }", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}", "public void supprimerEmpruntsParEleve(int indice_eleve) {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\trequete.execute(\"DELETE FROM emprunts WHERE id_eleve = \" + indice_eleve + \" AND date_rendu is not null\");\n\t\t\trafraichir_tableau();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void removerContato() {\n\t\tSystem.out.println(\"Digite o número do contato que deseja remover: \");\n\t\tint numeroContato = scanner.nextInt();\n\t\tlistaDeContatos.remove(numeroContato);\n\t}", "public void deleteAnio()\r\n {\r\n this._has_anio= false;\r\n }", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void eliminar() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n clientefacadelocal.remove(userFound);\n FacesContext fc = FacesContext.getCurrentInstance();\n fc.getExternalContext().redirect(\"../index.xhtml\");\n System.out.println(\"Usuario Eliminado\");\n } else {\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n System.out.println(\"Error al eliminar el cliente \" + e);\n }\n }", "public void eliminar(Producto producto) throws BusinessErrorHelper;", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }", "public CensoPSAMExcluidos() {\n this.nombre = \"\";\n this.apellidom = \"\";\n this.apellidop = \"\";\n this.rut = \"\";\n this.edad = 0;\n this.razon_exclusion = \"\";\n }", "public void eliminarCompraComic();", "@Transactional\n void remove(DataRistorante risto);", "void eliminarPedidosUsuario(String idUsuario);", "public static void supprimerEnseignant(int id) {\n EntityManager em = GestionFactory.factory.createEntityManager();\n\n // Recherche\n @SuppressWarnings(\"unchecked\")\n Query query = em.createQuery(\n \"SELECT e FROM Enseignant e WHERE e.idEnseignant = :idEnseignant\")\n .setParameter(\"idEnseignant\", id);\n\n Enseignant enseignant = (Enseignant) query.getSingleResult();\n List<Module> listeModules = enseignant.getModules();\n\n for(int i=0;i < listeModules.size();i++){\n listeModules.get(i).setEnseignant(null);\n ModuleDAO.update(listeModules.get(i));\n }\n\n em.getTransaction().begin();\n em.remove(enseignant);\n em.getTransaction().commit();\n\n em.close();\n\n }", "@FXML\n\tpublic void handleExcluir(MouseEvent event) {\n\t\tif(colNome.getCellData(jtvIngredienteTable.getSelectionModel().getSelectedIndex()) != null){\n\t\t\tingredienteService = new IngredienteService();\n\t\t\tIngrediente ingrediente = jtvIngredienteTable.getSelectionModel().getSelectedItem();\n\t\t\tingredienteService.delete(ingrediente.getId());\n\t\t\tatualizarTable();\n\t\t}else{\n\t\t\tScreenUtils.janelaInformação(spDialog, Internationalization.getMessage(\"header_erro3\"), Internationalization.getMessage(\"item_nao_selecionado\"), Internationalization.getMessage(\"erro_button2\"));\n//\t\t\tScreenUtils.janelaInformação(spDialog, \"Ops\", \"Por favor, selecione um item.\", \"Sem problemas\");\n\t\t}\n\t}", "public void remove(Aluno a) {\n\t\ttry {\n\t\t\tConnection con = DBUtil.getInstance().getConnection();\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"DELETE FROM Aluno WHERE idAluno = ? \");\n\t\t\tstmt.setInt(1, a.getNumero());\n\t\t\tstmt.executeUpdate();\n\t\t\tJOptionPane.showMessageDialog(null,\"Removido com sucesso!\");\n\t\t} \n\t\tcatch(com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Numero ja existe\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\t catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Erro no Sql, verifique a senha, ou o banco\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\n\t\t\t}\n\n\t\t}", "@Override\r\n\tpublic void remove(int codigoLivro) throws BaseDadosException {\n\t\t\r\n\t}", "public void removerFinal() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n ElementoLista elementoTemporarioAnteriorAtual = this.primeiro;\n ElementoLista elementoTemporarioAtual = this.primeiro.irParaProximo();\n for (int i = 1; i < totalElementos(); i++) {\n elementoTemporarioAnteriorAtual = elementoTemporarioAtual;\n elementoTemporarioAtual = elementoTemporarioAtual.irParaProximo();\n }\n\n this.ultimo = elementoTemporarioAnteriorAtual;\n this.ultimo.definirProximo(null);\n this.total--;\n }\n //this.ultimo = this.ultimo.irParaAnterior();\n //this.ultimo.definirProximo(null);\n }", "public void eliminar(Long id) throws AppException;", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "public void vaciar(){\n\t\tingredientes.clear();\n\t}", "public void removerCarro() {\n\n if (carrosCadastrados.size() > 0) {//verifica se existem carros cadastrados\n listarCarros();\n System.out.println(\"Digite o id do carro que deseja excluir\");\n int idCarro = verifica();\n for (int i = 0; i < carrosCadastrados.size(); i++) {\n if (carrosCadastrados.get(i).getId() == idCarro) {\n if (carrosCadastrados.get(i).getEstado()) {//para verificar se o querto está sendo ocupado\n System.err.println(\"O carrp está sendo utilizado por um hospede nesse momento\");\n } else {\n carrosCadastrados.remove(i);\n System.err.println(\"cadastro removido\");\n }\n }\n\n }\n } else {\n System.err.println(\"Não existem carros cadastrados\");\n }\n }", "@Override\n public void eliminarElemento(Object elemento) {\n database.delete(elemento);\n }", "public boolean eliminar() {\r\n if (colaVacia()) {\r\n return false;\r\n }\r\n\r\n if (ini == fin) {\r\n ini = fin = -1;\r\n } else {\r\n ini++;\r\n }\r\n\r\n return true;\r\n }", "private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }", "public void deleteTbagendamento() {\n\n if (agendamentoLogic.removeTbagendamento(tbagendamentoSelected)) {\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento removido com sucesso.\");\n listTbagendamentos = agendamentoLogic.findAllTbagendamentoFromCurrentDay();\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falha ao remover agendamento.\");\n }\n\n }", "public int eliminardelfinal(){\n int elemento=fin.dato;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n fin=fin.anterior;\n fin.siguiente=null;}\n return elemento;\n }", "public void excluir(){\n\t\tSystem.out.println(\"\\n*** Excluindo Registro\\n\");\n\t\ttry{\n\t\t\tpacienteService.excluir(getPaciente());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(\"Registro Deletado com Sucesso!!\")); //Mensagem de validacao \n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(\"** Erro ao deletar: \"+e.getMessage());\n\t\t\tatualizarTela();\n\t\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\t\tfacesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Erro ao deletar o paciente: \"+e.getMessage(), \"\")); //Mensagem de erro \n\t\t\t\n\t\t}\n\t}", "public String eliminarEstudiante(HttpServletRequest request,String codEstudiante){\n String salida=\"\";\n if(request==null){\n return \"\";\n }\n if(connection!=null && codEstudiante!=null && codEstudiante.length()>0){\n try {\n StringBuilder query=new StringBuilder();\n query.append(\"delete from estudiante \");\n query.append(\" where idestudiante=? \");\n deleteEstudiante=connection.prepareStatement(query.toString());\n //pasando el parametro\n deleteEstudiante.setInt(1, Integer.parseInt(codEstudiante));\n //ejecutando la consulta\n int nroRegistros=deleteEstudiante.executeUpdate();\n if(nroRegistros==1){\n salida=\"Registro Eliminado de forma correcta\";\n }\n else{\n salida=\"Existo un error al tratar de eliminar el registro\";\n }\n } catch (SQLException e) {\n salida=\"Existo un error SQL\";\n System.out.println(\"Error en el proceso \");\n e.printStackTrace();\n }\n }\n return salida;\n }", "public void removerClienteDoBanco(){\n\t\tdao.removerCliente(doCadastroController);\r\n\t}", "@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }", "public void eliminarDatos(EstructuraContratosDatDTO estructuraNominaSelect) {\n\t\t\n\t}", "protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tZonSecciData zonSecci = new ZonSecciData();\n\t\t\tzonSecci.setId(new Integer(claves.nextToken()));\n\t\t\t//zonSecci.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(zonSecci);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad ZonSecci\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad ZonSecci\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"ZonSecciLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}" ]
[ "0.6754007", "0.6695396", "0.66104126", "0.6590461", "0.6588394", "0.6576323", "0.65618205", "0.65248847", "0.65216255", "0.65162015", "0.65114963", "0.6506896", "0.6505557", "0.65055484", "0.6490193", "0.6471168", "0.64540654", "0.6416346", "0.6388495", "0.6370613", "0.6307303", "0.62974936", "0.62908673", "0.629025", "0.62413496", "0.6230772", "0.62222177", "0.6204429", "0.6202721", "0.6201558", "0.61971897", "0.6176566", "0.6173042", "0.61710835", "0.6168272", "0.61480474", "0.61427", "0.6142618", "0.61147505", "0.6110972", "0.6108332", "0.6105393", "0.6101434", "0.6091965", "0.60862106", "0.60846084", "0.6075662", "0.6074547", "0.60708284", "0.6068665", "0.60653126", "0.60587007", "0.605862", "0.60559857", "0.60482943", "0.6042306", "0.6040298", "0.60259247", "0.60257626", "0.60158926", "0.60156476", "0.6006762", "0.6004654", "0.6004097", "0.6002913", "0.6002029", "0.6000691", "0.59922266", "0.59843886", "0.5981814", "0.5969209", "0.59606683", "0.5960664", "0.59498405", "0.5944959", "0.5942124", "0.5940488", "0.59354126", "0.5929656", "0.592683", "0.59260345", "0.5917384", "0.59132063", "0.591144", "0.5900204", "0.5896871", "0.5888054", "0.5886495", "0.588328", "0.5878578", "0.5876951", "0.5874484", "0.5872751", "0.5871711", "0.58629066", "0.58605695", "0.5858403", "0.58581257", "0.5857851", "0.5854363" ]
0.77864975
0
Lista todos os encomendas com nome e telefone semelhantes aos digitados
public void getEncomenda(String nome, String telefone) { encomendas = encomendaController.read(nome.toUpperCase().trim(), telefone.trim()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Telefono> getTelefonos(String dni);", "public static void gereCandidatos() {\n\t\tString idE, titulo, op, numCandidatos, nomeP;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint check = 0, num, i;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tString msgServer = \"\";\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao a qual pretende adicionar uma lista de candidatos:\");\n\t\tidE = sc.nextLine();\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o titulo da lista:\");\n\t\t\ttitulo = sc.nextLine();\n\t\t\tif(verificarLetras(titulo) && titulo.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO titulo apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nO que pretende fazer?\\n(1) Adicoes (2) Remocoes\");\n\t\t\top = sc.nextLine();\n\t\t\tif(op.equals(\"1\") || op.equals(\"2\")) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 2\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\tswitch(op) {\n\t\t\tcase \"1\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a adicionar:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\tint tries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.adicionaCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a remover:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\ttries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.removeCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}", "public String listarSensores(){\r\n String str = \"\";\r\n for(PacienteNuvem x:pacientes){//Para cada paciente do sistema ele armazena uma string com os padroes do protocolo de comunicação\r\n str += x.getNick()+\"-\"+x.getNome()+\"#\";\r\n }\r\n return str;\r\n }", "public static void main(String[] args) {\n\r\n\t\tBeneficiadoDAO dao = new BeneficiadoDAO();\r\n\t\tList<Beneficiado> lista1 = new ArrayList<>();\r\n\t\tList<Beneficiado> lista2 = new ArrayList<>();\r\n\t\tList<String> telefones1 = new ArrayList<String>();\r\n\t\tList<String> telefones2 = new ArrayList<String>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlista1 = dao.listarTelefonesCelular1(\"iraja\");\r\n\t\t\tfor (int i = 0; i < lista1.size(); i++) {\r\n\t\t\t\ttelefones1.add(lista1.get(i).getTelefoneCelular1());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlista2 = dao.listarTelefonesCelular2(\"iraja\");\r\n\t\t\tfor (int i = 0; i < lista2.size(); i++) {\r\n\t\t\t\ttelefones2.add(lista2.get(i).getTelefoneCelular2());\r\n\t\t\t}\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tfor (String string : telefones1) {\r\n\t\t\tSystem.out.println(string.toString());\r\n\t\t}\r\n\t\t\r\n\t\tfor (String string : telefones2) {\r\n\t\t\tSystem.out.println(string.toString());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(telefones1.size());\r\n\t\tSystem.out.println(telefones2.size());\r\n\r\n\t\t//System.out.println(\"Depois da comparação \"+lista.size());\r\n\r\n\t\t/*for (int i = 0; i < lista.size(); i++) {\r\n\t\t\tString aux1 = new String();\r\n\t\t\tString aux2 = new String();\r\n\t\t\t\r\n\t\t\taux1 = lista.get(i).getTelefoneCelular1();\r\n\t\t\taux2 = lista.get(i).getTelefoneCelular2();\r\n\t\t\t\r\n\t\t\tif(!aux1.equals(\"null\")){\r\n\t\t\t\ttelefones.add(\"21\"+aux1);\r\n\t\t\t}\r\n\t\t\t//else if(!aux2.equals(null)){\r\n\t\t\t\t//telefones.add(\"21\"+aux2);\r\n\t\t\t\r\n\t\t\t//}\r\n\t\t\t*/\r\n\t}", "public static List<Endereco> listar() {\n\t\t\tConnection conexao = ConectaPostgreSQL.geraConexao();\n\t\t\t// variavel lista de ass\n\t\t\tList<Endereco> acessos = new ArrayList<Endereco>();\n\t\t\t// executa o SQL no banco de endereco\n\t\t\tStatement consulta = null;\n\t\t\t// contém os endereco consultado da tabela\n\t\t\tResultSet resultado = null;\n\t\t\t// objeto as\n\t\t\t// Endereco as = null;\n\t\t\t// consulta SQL\n\t\t\tString sql = \"select distinct * from Endereco\";\n\t\t\ttry {\n\t\t\t\t// consulta => objeto que executa o SQL no banco de endereco\n\t\t\t\tconsulta = conexao.createStatement();\n\t\t\t\t// resultado => objeto que contém os endereco consultado da tabela\n\t\t\t\t// Endereco\n\t\t\t\tresultado = consulta.executeQuery(sql);\n\t\t\t\t// Lê cada as\n\n\t\t\t\twhile (resultado.next()) {\n\t\t\t\t\tEndereco endereco = new Endereco();\n\t\t\t\t\tendereco.setBairro(resultado.getString(\"bairro\"));\n\t\t\t\t\tendereco.setCep(resultado.getString(\"cep\"));\n\t\t\t\t\tendereco.setCidade(resultado.getString(\"cidade\"));\n\t\t\t\t\tendereco.setEstado(resultado.getString(\"estado\"));\n\t\t\t\t\tendereco.setNumero(resultado.getInt(\"numero\"));\n\t\t\t\t\tendereco.setRua(resultado.getString(\"rua\"));\n\t\t\t\t\t// insere o as na lista\n\t\t\t\t\tacessos.add(endereco);\n\n\t\t\t\t}\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new RuntimeException(\"Erro ao buscar um acesso a serviços: \" + e);\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tconsulta.close();\n\t\t\t\t\tresultado.close();\n\t\t\t\t\tconexao.close();\n\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\tthrow new RuntimeException(\"Erro ao fechar a conexao \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// retorna lista de ass\n\t\t\treturn acessos;\n\t\t}", "private static List<String> getEmailList(){\n List<String> lista = new ArrayList<>();\n lista.add(\"[email protected]\");\n lista.add(\"[email protected].\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected].\");\n lista.add(\"meu#[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[[email protected]\");\n lista.add(\"<[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n\n lista.add(\"[email protected]\");\n lista.add(\"[email protected]\");\n\n\n return lista;\n\n }", "@Override\n\tpublic String getContactos(String nickName) throws RemoteException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList<String> lista = bbdd.loadContactos(nickName);\n\t\tfor(String nombre : lista){\n\t\t\tsb.append(nombre + \"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public List<ActDetalleActivo> listarPorSerial(String serial,String amie, int estado,Integer anio,int estadoActivo);", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "@Override\n\tpublic String detalheEleicao(Eleicao eleicao) throws RemoteException {\n\t\tString resultado = \"\";\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy:MM:dd hh:mm\");\n\t\tdataEleicao data_atual = textEditor.dataStringToData(dateFormat.format(new Date()));\n\t\tif (!data_atual.maior_data(textEditor.dataStringToData(eleicao.getDataInicio()))) {\n\t\t\tresultado += \"\\nTítulo eleição: \"+eleicao.getTitulo()+\" - Data início: \"+eleicao.getDataInicio()+\" - Data fim: \"+ eleicao.getDataFim();\n\t\t\tresultado += \"\\nEleição ainda não iniciada.\";\n\t\t\tfor(Candidatos candTemp: eleicao.getCandidatos()) {\n\t\t\t\tif(candTemp.getTipo().equalsIgnoreCase(\"lista\")) {\n\t\t\t\t\tLista lista = (Lista) candTemp;\n\t\t\t\t\tresultado += \"\\nNúmero candidato: \"+lista.getId()+\" - Nome lista: \"+lista.getNome()+\" Membros: \"+lista.getLista_pessoas();\n\t\t\t\t\tfor(PessoaLista pessoalista : lista.getLista_pessoas()) {\n\t\t\t\t\t\tresultado += \"\\n\\tCC: \"+pessoalista.getPessoa().getNcc()+\" - Cargo: \"+pessoalista.getCargo()+ \" - Nome: \"+pessoalista.getPessoa().getNome();\n\t\t\t\t\t}\n\t\t\t\t\tresultado += \"\\n\";\n\t\t\t\t}else {\n\t\t\t\t\tCandidatoIndividual cand = (CandidatoIndividual) candTemp;\n\t\t\t\t\tresultado += \"\\nNúmero candidato: \"+cand.getId()+\" - Nome: \"+cand.getPessoa().getNome()+\" - CC: \"+cand.getPessoa().getNcc();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (data_atual.maior_data(textEditor.dataStringToData(eleicao.getDataFim()))) {\n\t\t\t\tresultado += \"\\nTítulo eleição: \"+eleicao.getTitulo()+\" - Data início: \"+eleicao.getDataInicio()+\" - Data fim: \"+ eleicao.getDataFim();\n\t\t\t\tresultado += \"\\nEleição terminada.\";\n\t\t\t\tresultado += \"\\nVotos em branco/nulos: \"+eleicao.getnVotoBNA();\n\t\t\t\tfor(Candidatos candTemp: eleicao.getCandidatos()) {\n\t\t\t\t\tif(candTemp.getTipo().equalsIgnoreCase(\"lista\")) {\n\t\t\t\t\t\tLista lista = (Lista) candTemp;\n\t\t\t\t\t\tresultado += \"\\nNúmero candidato: \"+lista.getId()+\" - Nome lista: \"+lista.getNome()+\" Membros: \"+lista.getLista_pessoas()+\"Votos: \"+lista.getnVotos();\n\t\t\t\t\t\tresultado += \"\\n\";\n\t\t\t\t\t}else {\n\t\t\t\t\t\tCandidatoIndividual cand = (CandidatoIndividual) candTemp;\n\t\t\t\t\t\tresultado += \"\\nNúmero candidato: \"+cand.getId()+\" - Nome: \"+cand.getPessoa().getNome()+\" - CC: \"+cand.getPessoa().getNcc()+\" - Votos: \"+cand.getnVotos();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(eleicao.getDataInicio()+\"-\"+eleicao.getDataFim()+\": A decorrer\");\n\t\t\t}\n\t\t}\n\t\treturn resultado;\n\t\n\t}", "public void tocarTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" está tocando!\");\n notificarTodos();\n }", "public static List getAllNames() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT naziv FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"naziv\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "public List<FilmeAtor> buscarFilmesAtoresPeloNomeFilmeOuNomeAtor(String nomeFilmeOuAtor) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a WHERE f.nome like :nomeFilme or a.nome like :nomeAtor\",\r\n FilmeAtor.class);\r\n\r\n consulta.setParameter(\"nomeFilme\", nomeFilmeOuAtor + \"%\");\r\n consulta.setParameter(\"nomeAtor\", nomeFilmeOuAtor + \"%\");\r\n \r\n return consulta.getResultList();\r\n\r\n }", "public static void main(String[] args) throws Exception {\n\t\tLista<Contato> vetor = new Lista<Contato>(20);\n\t\tLinkedList<Contato> listaEncadeada = new LinkedList<Contato>();\n\n\t\tContato c1 = new Contato(\"c1\", \"111-1111\", \"[email protected]\");\n\t\tContato c2 = new Contato(\"c2\", \"222-2222\", \"[email protected]\");\n\t\tContato c3 = new Contato(\"c3\", \"333-3333\", \"[email protected]\");\n\t\tContato c4 = new Contato(\"c4\", \"444-2344\", \"[email protected]\");\n\t\tContato c5 = new Contato(\"c5\", \"555-5585\", \"[email protected]\");\n\t\tContato c6 = new Contato(\"c6\", \"111-1911\", \"[email protected]\");\n\t\tContato c7 = new Contato(\"c7\", \"222-2322\", \"[email protected]\");\n\t\tContato c8 = new Contato(\"c8\", \"333-3333\", \"[email protected]\");\n\t\tContato c9 = new Contato(\"c9\", \"454-4644\", \"[email protected]\");\n\t\tContato c10 = new Contato(\"c10\", \"515-5235\", \"[email protected]\");\n\t\tContato c11 = new Contato(\"c11\", \"131-1411\", \"[email protected]\");\n\t\tContato c12 = new Contato(\"c12\", \"252-2672\", \"[email protected]\");\n\t\tContato c13 = new Contato(\"c13\", \"313-3433\", \"[email protected]\");\n\t\tContato c14 = new Contato(\"c14\", \"433-4334\", \"[email protected]\");\n\t\tContato c15 = new Contato(\"c15\", \"535-5355\", \"[email protected]\");\n\t\tContato c16 = new Contato(\"c16\", \"161-1516\", \"[email protected]\");\n\t\tContato c17 = new Contato(\"c17\", \"272-2272\", \"[email protected]\");\n\t\tContato c18 = new Contato(\"c18\", \"383-3993\", \"[email protected]\");\n\t\tContato c19 = new Contato(\"c19\", \"141-4949\", \"[email protected]\");\n\t\tContato c20 = new Contato(\"c20\", \"565-5565\", \"[email protected]\");\n\t\tContato c21 = new Contato(\"c21\", \"616-1611\", \"[email protected]\");\n\t\tContato c22 = new Contato(\"c22\", \"212-2121\", \"[email protected]\");\n\t\tContato c23 = new Contato(\"c23\", \"131-1331\", \"[email protected]\");\n\t\tContato c24 = new Contato(\"c24\", \"424-4444\", \"[email protected]\");\n\t\tContato c25 = new Contato(\"c25\", \"565-5555\", \"[email protected]\");\n\t\tContato c26 = new Contato(\"c26\", \"111-1611\", \"[email protected]\");\n\t\tContato c27 = new Contato(\"c27\", \"282-1252\", \"[email protected]\");\n\t\tContato c28 = new Contato(\"c28\", \"323-3433\", \"[email protected]\");\n\t\tContato c29 = new Contato(\"c29\", \"544-4464\", \"[email protected]\");\n\t\tContato c30 = new Contato(\"c30\", \"155-5455\", \"[email protected]\");\n\n\t\ttry {\n\t\t\t// ex5\n\t\t\tvetor.adiciona(c1);\n\t\t\tvetor.adiciona(c2);\n\t\t\tvetor.adiciona(c3);\n\t\t\tvetor.adiciona(c4);\n\t\t\tvetor.adiciona(c5);\n\t\t\tvetor.adiciona(c6);\n\t\t\tvetor.adiciona(c7);\n\t\t\tvetor.adiciona(c8);\n\t\t\tvetor.adiciona(c9);\n\t\t\tvetor.adiciona(c10);\n\t\t\tvetor.adiciona(c11);\n\t\t\tvetor.adiciona(c12);\n\t\t\tvetor.adiciona(c13);\n\t\t\tvetor.adiciona(c14);\n\t\t\tvetor.adiciona(c15);\n\t\t\tvetor.adiciona(c16);\n\t\t\tvetor.adiciona(c17);\n\t\t\tvetor.adiciona(c18);\n\t\t\tvetor.adiciona(c19);\n\t\t\tvetor.adiciona(c20);\n\t\t\tvetor.adiciona(c21);\n\t\t\tvetor.adiciona(c22);\n\t\t\tvetor.adiciona(c23);\n\t\t\tvetor.adiciona(c24);\n\t\t\tvetor.adiciona(c25);\n\t\t\tvetor.adiciona(c26);\n\t\t\tvetor.adiciona(c27);\n\t\t\tvetor.adiciona(c28);\n\t\t\tvetor.adiciona(c29);\n\t\t\tvetor.adiciona(c30);\n\t\t\t// ex3\n\t\t\tvetor.removerT(\"111-1111\");\n\t\t\t//ex4-vetor.RemoverTudo();\n\t\t\t\n\t\t\tSystem.out.println(vetor);\n\t\t\t// ex1\n\t\t\tSystem.out.println(\"Confirmar se o elemento na lista existe:\" + vetor.contem(c2));\n\t\t\t// ex2\n\t\t\tSystem.out.println(\"Retornar a posicao do elemento, se retornar -1 que dizer que o elemento não existe:\"\n\t\t\t\t\t+ vetor.indicio(c2));\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// ex6\n\t\tlistaEncadeada.add(c1);\n\t\tlistaEncadeada.add(c2);\n\t\tlistaEncadeada.add(c3);\n\t\tlistaEncadeada.add(c4);\n\t\tlistaEncadeada.add(c5);\n\t\tlistaEncadeada.add(c6);\n\t\tlistaEncadeada.add(c7);\n\t\tlistaEncadeada.add(c8);\n\t\tlistaEncadeada.add(c9);\n\t\tlistaEncadeada.add(c10);\n\t\tlistaEncadeada.add(c11);\n\t\tlistaEncadeada.add(c12);\n\t\tlistaEncadeada.add(c13);\n\t\tlistaEncadeada.add(c14);\n\t\tlistaEncadeada.add(c15);\n\t\tlistaEncadeada.add(c16);\n\t\tlistaEncadeada.add(c17);\n\t\tlistaEncadeada.add(c18);\n\t\tlistaEncadeada.add(c19);\n\t\tlistaEncadeada.add(c20);\n\t\tlistaEncadeada.add(c21);\n\t\tlistaEncadeada.add(c22);\n\t\tlistaEncadeada.add(c23);\n\t\tlistaEncadeada.add(c24);\n\t\tlistaEncadeada.add(c25);\n\t\tlistaEncadeada.add(c26);\n\t\tlistaEncadeada.add(c27);\n\t\tlistaEncadeada.add(c28);\n\t\tlistaEncadeada.add(c29);\n\t\tlistaEncadeada.add(c30);\n\n\t\tSystem.out.println(listaEncadeada);\n\n\t}", "public List<ReceitaDTO> listarReceitas() {\n return receitaOpenHelper.listar();\n }", "List<T> buscarTodosComNomeLower();", "public Vendedor buscarVendedorPorNome(String nome);", "public List getChamado(String servico) {\r\n Solicitacoes e = chamadoHandler(servico);\r\n\r\n List<ChamadoEnderecos> consultas = new ArrayList<>();\r\n String sql = \"SELECT DISTINCT\\n\"\r\n + \"\tpid.cod_pid,\\n\"\r\n + \" pid.nome_estabelecimento,\\n\"\r\n + \" endereco.descricao,\\n\"\r\n + \" endereco.numero,\\n\"\r\n + \" endereco.bairro,\\n\"\r\n + \" endereco.complemento,\\n\"\r\n + \" municipio.nome_municipio,\\n\"\r\n + \" municipio.uf,\\n\"\r\n + \" municipio.cod_IBGE,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \" INNER JOIN contato on \t(pid.cod_pid = contato.PID_cod_pid)\\n\"\r\n + \" INNER JOIN endereco on \t(pid.cod_pid = endereco.PID_cod_pid)\\n\"\r\n + \" INNER JOIN telefone on \t(contato.id_contato = telefone.Contato_id_contato)\\n\"\r\n + \" INNER JOIN municipio on \t(endereco.Municipio_cod_IBGE = municipio.cod_IBGE)\\n\"\r\n + \" INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" \\n\"\r\n + \" \\n\"\r\n + \" WHERE solicitacoes.em_chamado= 3 and servico.id_servico=\" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n \r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n consultas.add(new ChamadoEnderecos(rs.getString(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getString(4),\r\n rs.getString(5),\r\n rs.getString(6),\r\n rs.getString(7),\r\n rs.getString(8),\r\n rs.getString(9),\r\n rs.getString(10)\r\n ));\r\n\r\n }\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return consultas;\r\n }", "public List<Cliente> buscarTodos(String nomeBusca) {\n\t\treturn clienteDAO.buscarTodos(nomeBusca);\n\t}", "public static List<Cliente> consultarCliente(String caracteres) {\n\t\treturn daocliente.consultarCliente(caracteres);\n\t}", "protected String inicializarCamposComunes() {\r\n\t\tString listCamposFiltro = \"\";\r\n\r\n\t\tif(getId() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Id\").concat(\", \");\r\n\t\t}\r\n\t\tif(getObservaciones() != null && getObservaciones().length() >0){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Observaciones\").concat(\", \");\r\n\t\t}\r\n\t\tif(getActivo() != null && getActivo().length() > 0){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Activo [\").concat(getActivo()).concat(\"], \");\r\n\t\t}\r\n\t\tif(getFechaBajaDesde() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Baja Desde\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaBajaHasta() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Baja Hasta\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaAltaDesde() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Alta Desde\").concat(\", \");\r\n\t\t}\r\n\t\tif(getFechaAltaHasta() != null){\r\n\t\t\tlistCamposFiltro = listCamposFiltro.concat(\"Fecha Alta Hasta\").concat(\", \");\r\n\t\t}\r\n\r\n\t\treturn listCamposFiltro;\r\n\t}", "public List<NotaDeCredito> procesar();", "public List<DocumentoEntrata> getListaNoteCreditoEntrataFiglio(){\n\t\treturn getListaDocumentiEntrataFiglioByTipoGruppo(TipoGruppoDocumento.NOTA_DI_CREDITO);\n\t}", "public List<EntradaDeMaterial> buscarEntradasDisponibles(Almacen a);", "public static void criaListaCandidatos() {\n\t\tScanner sc = new Scanner(System.in);\t\n\t\tString id, numCandidatos, nomePessoa, nomeLista, tipoLista;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tint check = 0, num, i;\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao a qual pretende adicionar uma lista de candidatos:\");\n\t\tid = sc.nextLine();\n\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira numero de elementos (Min. 2):\");\n\t\t\tnumCandidatos = sc.nextLine();\n\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\tif (Integer.parseInt(numCandidatos) >= 2) {\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tnum = Integer.parseInt(numCandidatos);\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o nome da lista:\");\n\t\t\tnomeLista = sc.nextLine();\n\t\t\tif(verificarLetras(nomeLista) && nomeLista.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nEm que tipo se insere a lista?\\n(1) Estudantes (2) Funcionarios (3) Docentes\");\n\t\t\ttipoLista = sc.nextLine();\n\t\t\tif(verificarNumeros(tipoLista)) {\n\t\t\t\tif ( (tipoLista.equals(\"1\")) || (tipoLista.equals(\"2\")) || (tipoLista.equals(\"3\")) ) {\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 3\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o nome do presidente:\");\n\t\t\tnomePessoa = sc.nextLine();\n\t\t\tif(verificarLetras(nomePessoa) && nomePessoa.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tPessoa p = new Pessoa(nomePessoa);\n\t\tlistaCandidatos.add(p);\t\n\t\tnum--;\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o nome do vice-presidente:\");\n\t\t\tnomePessoa = sc.nextLine();\n\t\t\tif(verificarLetras(nomePessoa) && nomePessoa.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tPessoa novap = new Pessoa(nomePessoa);\n\t\tlistaCandidatos.add(novap);\t\n\t\tnum--;\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tfor (i=0; i<num;i++) {\n\t\t\tdo {\n\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento seguinte:\");\n\t\t\t\tnomePessoa = sc.nextLine();\n\t\t\t\tif(verificarLetras(nomePessoa) && nomePessoa.length()>0) {\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t}\n\t\t\t}while(check==0);\n\t\t\tPessoa novaPessoa = new Pessoa(nomePessoa);\n\t\t\tlistaCandidatos.add(novaPessoa);\n\t\t\tcheck = 0;\n\t\t}\n\t\t\n\t\tString msgServer = \"\";\n\t\t\n\t\tcheck = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tmsgServer = rmiserver.criaLista(id, tipoLista, nomeLista, listaCandidatos);\n\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI alteraFac\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t}", "private List getContactNames() {\n List<Contact> contacts = new ArrayList<>();\n // Get the ContentResolver\n ContentResolver cr = getContentResolver();\n // Get the Cursor of all the contacts\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n while (cursor.moveToNext()) {\n\n\n //Sjekker om kontakt har et tlf nummer\n String hasNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n String contactName = \"\";\n if (hasNumber.equals(\"1\")) {\n contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n Contact contact = new Contact(contactName);\n contacts.add(contact);\n\n\n }\n }\n cursor.close();\n return contacts;\n }", "public void listarHospedes() {\n System.out.println(\"Hospedes: \\n\");\n if (hospedesCadastrados.isEmpty()) {\n// String esta = hospedesCadastrados.toString();\n// System.out.println(esta);\n System.err.println(\"Não existem hospedes cadastrados\");\n } else {\n String esta = hospedesCadastrados.toString();\n System.out.println(esta);\n // System.out.println(Arrays.toString(hospedesCadastrados.toArray()));\n }\n\n }", "public void buscarPessoa(){\n\t\tstrCelular = CareFunctions.limpaStrFone(strCelular);\n\t\t System.out.println(\"Preparar \" + strCelular);//\n\t\t \n\t\tif (strCelular.trim().length() > 0){\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tList<Usuario> lstusuario = usuarioDAO.listPorcelular(strCelular);\n\t\t\tSystem.out.println(\"Buscou \" + lstusuario.size());\n\t\t\tsetBooIdentifiquese(false);\n\t\t\tif (lstusuario.size() > 0){\n\t\t\t\tusuario = lstusuario.get(0);\n\t\t\t\tsetBooSelecionouUsuario(true);\n\t\t\t}else{\n\t\t\t\tsetBooSelecionouUsuario(false);\t\t\t\t\n\t\t\t\tsetBooCadastrandose(true);\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setUsu_celular(strCelular);\n\t\t\t}\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Ahoe\", \"Bem Vindo\"));\t\n\t\t}else{\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Você deve informar o Celular\", \"Não foi possível pesquisar\"));\t\t\t\n\t\t}\n\t}", "public String imprimirListaFormateada() {\n\t\t// Cuando quieran unir un monton de cadenas\n\t\tStringBuilder provLis = new StringBuilder();\n\t\tfor (Proveedor provTmp : BdMemoria.proveedores) {\n\t\t\tif (provTmp != null) {\n\t\t\t\tprovLis.append(provTmp.getIdProveedor()).append(\"-\").append(provTmp.getNombreProv())\n\t\t\t\t\t\t.append(\" !! \");\n\t\t\t}\n\n\t\t}\n\t\treturn provLis.toString();\n\t}", "public void chekcAllPhoneNumbers() {\n\t\t\n\t\tif(remaining!=-9999999 && remaining!=0)\n\t\t{\n\t\t\tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\t\tcon);\n\t \n\t\t\t\t\t// create alert dialog\n\t\t \t\t\talertDialog = alertDialogBuilder.setTitle(\"Please wait\")\n\t\t\t\t\t\t.setMessage(\"Already an update is going on.\")\n\t\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t\t.setPositiveButton(\"Ok.\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t\talertDialog.dismiss();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }).create();\n\t \n\t\t\t\t\t// show it\n\t\t\t\t\talertDialog.show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tUri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n\t\t\tString[] projection = new String[] {ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,\n\t\t\t ContactsContract.CommonDataKinds.Phone.NUMBER};\n\n\t\t\tCursor people = getContentResolver().query(uri, projection, null, null, null);\n\n\t\t\tint indexName = people.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);\n\t\t\tint indexNumber = people.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);\n\n\t\t\tint total_size = people.getCount();\n\t\t\tif(total_size<=0)\n\t\t\t{\n\t\t\t\tsetSupportProgressBarIndeterminateVisibility(false);\n\t\t\t\tToast.makeText(con, \"No contacts found.\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpeople.moveToFirst();\n\t\t\t\tdo {\n\t\t\t\t\t String name = people.getString(indexName);\n\t\t\t\t\t String number = people.getString(indexNumber);\n\t\t\t\t\t number = (new To_international(con)).change_to_international(number);\n\t\t\t\t\t if(number!=null)\n\t\t\t\t\t {\n\t\t\t\t\t \tvalid_name.add(name);\n\t\t\t\t\t \tvalid_number.add(number);\n\t\t\t\t\t }\n\t\t\t\t} while (people.moveToNext());\n\t\t\t\t\n\t\t\t\tLog.d(\"size\", \"\"+valid_name.size());\n\t\t\t\t\n\t\t\t\tif(valid_name.size()>0)\n\t\t\t\t{\n\t\t\t\t\tif(valid_name.size()>10)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = valid_name.size();\n\t\t\t\t\t\tremaining = valid_name.size();\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tfor(int i=0;i<valid_name.size();i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparse_phone_number_query();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = valid_name.size();\n\t\t\t\t\t\tremaining = valid_name.size();\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tfor(int i=0;i<valid_name.size();i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparse_phone_number_query();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsetSupportProgressBarIndeterminateVisibility(false);\n\t\t\t\t\tToast.makeText(con, \"No friends found in contacts.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\t\t\t\n\t}", "public String listarTemas(){\n String respuesta=\"\";\n for(int i=0;i<temas.length;i++){\n respuesta+=\"\\n\"+temas[i];\n }\n return respuesta;\n }", "public void listarNominasEmpleadoProfundidad(int idMecanico) throws BusinessException;", "public List<String> pntremuneracion(ReportePlazaDTO reportePlazaDTO) {\n List<CustomOutputFile> lista = new ArrayList<CustomOutputFile>();\n List<String> listaString = new ArrayList<String>();\n\n String qnaCaptura = reportePlazaDTO.getQnaCaptura();\n String qnaCaptura2 = \"\";\n\n if (new Integer(qnaCaptura) % 2 == 0) {\n qnaCaptura2 = String.valueOf((new Integer(qnaCaptura) - 1));\n } else {\n qnaCaptura2 = qnaCaptura;\n }\n\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypntRemuneracion(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"Tipo de integrante del sujeto obligado,Clave o nivel del puesto,Denominación del puesto,Denominación del cargo,Área de adscripción,Nombre completo del servidor público y/o toda persona que desempeñe un empleo cargo o comisión y/o ejerzan actos de autoridad,Sexo,Remuneración mensual bruta,Remuneración mensual neta,Percepciones adicionales en efectivo,Percepciones adicionales en especie,Periodicidad,Ingresos,Sistemas de compensación,Periodicidad,Gratificaciones,Periodicidad,Primas,Periodicidad,Comisiones,Periodicidad,Dietas,Periodicidad,Bonos,Periodicidad,Estímulos,Periodicidad,Apoyos económicos,Periodicidad,Prestaciones económicas,Prestaciones en especie,Periodicidad,Otro tipo de percepción,Fec valida,Area responsable,Año,Fec actualiza,Nota\");\n\n if (lista != null) {\n for (CustomOutputFile row: lista) {\n listaString.add(row.getRegistro());\n }\n } else\n listaString = null;\n return listaString;\n\n }", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "public static void consultaEleicoesPassadas() {\n\t\tArrayList<Eleicao> lista;\n\t\t\n\t\tint check = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tlista = rmiserver.getEleicoesPassadas();\n\t\t\t\tif(lista.isEmpty()) {\n\t\t\t\t\tSystem.out.println(\"Nao existem eleicoes para mostrar.\");\n\t\t\t\t}else {\n\t\t\t\t\tfor(Eleicao x: lista) {\n\t\t\t\t\t\tSystem.out.println(\"\\nEleicao \"+x.titulo);\n\t\t\t\t\t\tSystem.out.println(\"\\tID: \"+x.id);\n\t\t\t\t\t\tSystem.out.println(\"\\tDescricao: \"+x.descricao);\n\t\t\t\t\t\tSystem.out.println(\"\\tData Inicio: \"+x.dataInicio.toString());\n\t\t\t\t\t\tSystem.out.println(\"\\tData Fim: \"+x.dataInicio.toString());\n\t\t\t\t\t\tSystem.out.println(\"Resultados: \");\n\t\t\t\t\t\tif(x.tipo == 1) {\n\t\t\t\t\t\t\tif(x.registoVotos.size()>0) {\n\t\t\t\t\t\t\t\tfor(Lista y: x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tdouble perc = y.contagem/(double)x.registoVotos.size() * 100;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tif(x.registoVotos.size()>0) {\n\t\t\t\t\t\t\t\tint alunos = 0, docentes = 0, funcs = 0;\n\t\t\t\t\t\t\t\tfor(Lista y:x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tif(y.tipoLista.equals(\"1\")) {\n\t\t\t\t\t\t\t\t\t\talunos += y.contagem;\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"2\")) {\n\t\t\t\t\t\t\t\t\t\tfuncs += y.contagem;\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"3\")) {\n\t\t\t\t\t\t\t\t\t\tdocentes += y.contagem;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor(Lista y: x.listaCandidaturas) {\n\t\t\t\t\t\t\t\t\tif(y.tipoLista.equals(\"1\")) {\n\t\t\t\t\t\t\t\t\t\tif(alunos>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)alunos * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"2\")) {\n\t\t\t\t\t\t\t\t\t\tif(funcs>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)funcs * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"3\")) {\n\t\t\t\t\t\t\t\t\t\tif(docentes>0) {\n\t\t\t\t\t\t\t\t\t\t\tdouble perc = (double)y.contagem/(double)docentes * 100;\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": 0% (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else if(y.tipoLista.equals(\"4\")) {\n\t\t\t\t\t\t\t\t\t\tdouble perc = y.contagem/(double)x.registoVotos.size() * 100;\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\t\"+y.nome+\": \"+perc+\"% sobre Total (Num. votos: \"+y.contagem+\")\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\t\n\t}", "public static List<ViajeEntidad> getListaViajesEntidad(){\n List<ViajeEntidad> viajes = new ArrayList<>();\n Date date = new Date();\n ViajeEntidadPK viajePK = new ViajeEntidadPK();\n TaxiEntidad taxiByPkPlacaTaxi = new TaxiEntidad();\n ClienteEntidad clienteByPkCorreoCliente = new ClienteEntidad();\n clienteByPkCorreoCliente.setPkCorreoUsuario(\"[email protected]\");\n TaxistaEntidad taxistaByCorreoTaxi = new TaxistaEntidad();\n taxistaByCorreoTaxi.setPkCorreoUsuario(\"[email protected]\");\n OperadorEntidad agendaOperador = new OperadorEntidad();\n agendaOperador.setPkCorreoUsuario(\"[email protected]\");\n\n viajePK.setPkPlacaTaxi(\"CCC11\");\n viajePK.setPkFechaInicio(\"2019-01-01 01:01:01\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"DDD11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"EEE11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n\n return viajes;\n }", "public ArrayList<String> Info_Disc_Pel_Compras_usu(String genero, String usuario) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep1(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3]) & info_disco_compra[0].equals(usuario)) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }", "List<Entidade> listarTodos();", "public List<Usuario> buscaUsuarioNome(String nome) {\r\n\t\tList<Usuario> retorno = new LinkedList<Usuario>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tif (usuario.getNome().equals(nome)) {\r\n\t\t\t\tretorno.add(usuario);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}", "List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();", "public void mostrarLista(String tipo, String encabezado){\n System.out.println(\"\\n\" /*+ \"Departamento de \"*/ + tipo.concat(\"s\") + \"\\n\" + encabezado);\n for (Producto i: productos){\n if (tipo.compareToIgnoreCase(i.tipo) == 0)\n System.out.println(i);\n }\n }", "public void menuEncomendasTrans(String username){\n ArrayList<Encomenda> encs=b_dados.buscaEncomendasTransportadora(username);\n if(encs.isEmpty()){\n System.out.println(\"Não existem encomendas disponiveis na sua localização\");\n }\n else{\n Scanner s=new Scanner(System.in);\n while(!encs.isEmpty()) {\n b_dados.buscaEncomendasDisplay(encs);\n System.out.println(\"Digite o código de encomenda que a sua empresa está pronta a entregar\");\n String opcao = s.nextLine();\n int check=0;\n for (Encomenda e : encs) {\n if (e.getcodEncomenda().equals(opcao)) {\n String cod = b_dados.getTrasnportadoras().get(username).getCodEmpresa();\n String nome = b_dados.getTrasnportadoras().get(username).getNome();\n double kms=b_dados.getTrasnportadoras().get(username).getGps().distLocalizacao(b_dados.getLoja(e.getcodLoja()).getGps())+ b_dados.getTrasnportadoras().get(username).getGps().distLocalizacao(b_dados.getUtilizador(e.getcodUtilizador()).getGps());\n b_dados.novaEntrega(cod, nome, e.getcodEncomenda(), e.getcodUtilizador(), e.getcodLoja(), e.getPeso(), e.getLinhas(),kms);\n b_dados.removeEncomendaDisponivel(e);\n check=1;\n encs=b_dados.buscaEncomendasTransportadora(username);\n break;\n }\n }\n if(check==0){\n System.out.println(\"Código errado ou não existe!\");\n }\n }\n System.out.println(\"Não existem mais encomendas disponiveis!\");\n }\n }", "public List<String> pntinmueble(ReportePlazaDTO reportePlazaDTO) {\n List<CustomOutputFile> lista = new ArrayList<CustomOutputFile>();\n List<String> listaString = new ArrayList<String>();\n\n String qnaCaptura = reportePlazaDTO.getQnaCaptura();\n String qnaCaptura2 = \"\";\n\n if (new Integer(qnaCaptura) % 2 == 0) {\n qnaCaptura2 = String.valueOf((new Integer(qnaCaptura) - 1));\n } else {\n qnaCaptura2 = qnaCaptura;\n }\n\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotInmueble(qnaCaptura);\n listaString.add(\"Id Domicilio,Calle,Número Exterior,Número Interior,Colonia,Municipio,Estado/Entidad Fef.,País,Código Postal,Tipo de Oficina\");\n\n if (lista != null) {\n for (CustomOutputFile row: lista) {\n listaString.add(row.getRegistro());\n }\n } else\n listaString = null;\n return listaString;\n\n }", "public List<JsonObject> notasDeVentas(){\n String nv[][]= pedidoMaterialRepository.buscarNotaVenta();\n List<JsonObject> js = new ArrayList<JsonObject>();\n \n for (int i=0;i<nv.length;i++){\n \n JsonObject jo = new JsonObject();\n jo.put(\"notaDeVenta\", nv[i][0]);\n jo.put(\"descripcion\", nv[i][1]);\n jo.put(\"cliente\", nv[i][2]);\n js.add(jo);\n }\n \n return js;\n }", "public List<Cliente> findByNombreCli(String nombreCli);", "public List<Contato> getContatosByName(String nome) throws SQLException {\n QueryBuilder<Contato, Integer> queryBuilder =\n contatoDao.queryBuilder();\n // the 'password' field must be equal to \"qwerty\"\n queryBuilder.where().like(\"(nome || sobrenome)\", \"%\"+nome+\"%\");\n // prepare our sql statement\n PreparedQuery<Contato> preparedQuery = queryBuilder.prepare();\n // query for all accounts that have \"qwerty\" as a password\n List<Contato> contatos = contatoDao.query(preparedQuery);\n\n return contatos;\n }", "public List<ActDetalleActivo> listarDetalleActivoLaboratorio(long codigoSalaLaboratorio,long codigoTipo,String amie, int estado,int anio);", "public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }", "public List<ColunasMesesBody> getClientexIndustria(String periodo, String perfil, String cdVenda) {\n\t\tList<ClienteDetalhado> getCarteira = new ArrayList<>();\n\t\tgetCarteira = new PlanoDeCoberturaConsolidado().getClientesPlanCobConsolidado(perfil, cdVenda);\n\t\tSystem.err.println(getCarteira.size());\n\t\t\n\t\tList<ColunasMesesBody> planCobCliFat = new ArrayList<>();\n\t\t\n\t\tfor (ClienteDetalhado c : getCarteira) {\n\t\t\tColunasMesesBody registro = new ColunasMesesBody();\n\t\t\tregistro.setCd_cliente(c.getCd_cliente());\n\t\t\tregistro.setDesc_cliente(c.getDesc_cliente());\n\t\t\tregistro.setFantasia(c.getFantasia());\n\t\t\tregistro.setTp_Cli(c.getTp_Cli());\n\t\t\tregistro.setCgc_cpf(c.getCgc_cpf());\n\t\t\tregistro.setTelefone(c.getTelefone());\n\t\t\tregistro.setGrupoCli(c.getGrupoCli());\n\t\t\tregistro.setSegmento(c.getSegmento());\n\t\t\tregistro.setArea(c.getArea());\n\t\t\tregistro.setCep(c.getCep());\n\t\t\tregistro.setLogradouro(c.getLogradouro());\n\t\t\tregistro.setNumero(c.getNumero());\n\t\t\tregistro.setBairro(c.getBairro());\n\t\t\tregistro.setMunicipio(c.getMunicipio());\n\t\t\tregistro.setDistrito(c.getDistrito());\n\t\t\tregistro.setCdVendedor(c.getCdVendedor());\n\t\t\tregistro.setVendedor(c.getVendedor());\n\t\t\tregistro.setNomeGuerraVend(c.getNomeGuerraVend());\n\t\t\tregistro.setDescGerencia(c.getDescGerencia());\n\t\t\tregistro.setCdEquipe(c.getCdEquipe());\n\t\t\tregistro.setDescEquipe(c.getDescEquipe());\n\t\t\t\n\t\t\t\t\n\t\t\tregistro.setColuna01(\"R$ 0,00\");\n\t\t\tregistro.setColuna02(\"R$ 0,00\");\n\t\t\tregistro.setColuna03(\"R$ 0,00\");\n\t\t\tregistro.setColuna04(\"R$ 0,00\");\n\t\t\tregistro.setColuna05(\"R$ 0,00\");\n\t\t\tregistro.setColuna06(\"R$ 0,00\");\n\t\t\tregistro.setColuna07(\"R$ 0,00\");\n\t\t\tregistro.setColuna08(\"R$ 0,00\");\n\t\t\tregistro.setColuna09(\"R$ 0,00\");\n\t\t\tregistro.setColuna10(\"R$ 0,00\");\n\t\t\tregistro.setColuna11(\"R$ 0,00\");\n\t\t\tregistro.setColuna12(\"R$ 0,00\");\n\t\t\tregistro.setColuna13(\"R$ 0,00\");\n\t\t\tregistro.setColuna14(\"R$ 0,00\");\n\t\t\tregistro.setColuna15(\"R$ 0,00\");\n\n\t\t\t\n\t\t\tplanCobCliFat.add(registro);\n\t\t}\n\t\t/* CARREGANDO A LISTA DE CLIENTES*/\n\t\t\n\t\t/* TRANTANDO OS CLINTES PARA PASSAR PARA O SELECT */\n\t\t\tString inClintes = \"\";\n\t\t\tint tamanhoLista = getCarteira.size();\n\t\t\tint i = 1;\n\t\n\t\t\tfor (Cliente c : getCarteira) {\n\t\t\t\tif (i < tamanhoLista) {\n\t\t\t\t\tinClintes += c.getCd_cliente() + \", \";\n\t\t\t\t} else {\n\t\t\t\t\tinClintes += c.getCd_cliente();\n\t\t\t\t}\n\t\n\t\t\t\ti++;\n\t\t\t}\n\t\t\n\t\t/* TRANTANDO OS CLINTES PARA PASSAR PARA O SELECT */\n\t\t\n\t\tString sql = \"select * from(\\r\\n\" + \n\t\t\t\t\"SELECT\\r\\n\" + \n\t\t\t\t\" --DATEPART(mm, no.dt_emis) as MES_Emissao,\\r\\n\" + \n\t\t\t\t\" f.descricao as FABRICANTE,\\r\\n\" + \n\t\t\t\t\"\t\tno.cd_clien AS Cod_Cliente, \\r\\n\" + \n\t\t\t\t\"\t cast(SUM((itn.qtde* itn.preco_unit) ) as NUMERIC(12,2)) as Valor\\r\\n\" + \n\t\t\t\t\"\tFROM\\r\\n\" + \n\t\t\t\t\"\t\tdbo.it_nota AS itn\\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.nota AS no\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.nota_tpped AS ntped\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tINNER JOIN dbo.tp_ped AS tp\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON ntped.tp_ped = tp.tp_ped\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON no.nu_nf = ntped.nu_nf\\r\\n\" + \n\t\t\t\t\"\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.cliente AS cl \\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.ram_ativ AS rm\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.ram_ativ = rm.ram_ativ \t\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.end_cli AS edc\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_clien = edc.cd_clien\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tAND edc.tp_end = 'FA'\t\t\t\t\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\t\tLEFT OUTER JOIN dbo.area AS ar \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_area = ar.cd_area\\r\\n\" + \n\t\t\t\t\"\t\t\t\tLEFT OUTER JOIN grupocli\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_grupocli = grupocli.cd_grupocli\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON no.cd_clien = cl.cd_clien\\r\\n\" + \n\t\t\t\t\"\t\t\t\\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.vendedor AS vd\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.equipe AS eq \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tINNER JOIN dbo.gerencia AS ge \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON eq.cd_gerencia = ge.cd_gerencia\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tAND eq.cd_emp = ge.cd_emp\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON vd.cd_emp = eq.cd_emp \\r\\n\" + \n\t\t\t\t\"\t\t\t\tAND vd.cd_equipe = eq.cd_equipe \\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN grp_faix gr\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON vd.cd_grupo = gr.cd_grupo\\r\\n\" + \n\t\t\t\t\"\t\t\tON no.cd_vend = vd.cd_vend\t\t\t\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\tON itn.nu_nf = no.nu_nf \\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tJOIN produto p\\r\\n\" + \n\t\t\t\t\"\t\tON p.cd_prod=itn.cd_prod\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tJOIN fabric f\\r\\n\" + \n\t\t\t\t\"\t\tON p.cd_fabric = f.cd_fabric\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"WHERE \\r\\n\" + \n\t\t\t\t\"\tno.situacao IN ('AB', 'DP')\\r\\n\" + \n\t\t\t\t\"\tAND\tno.tipo_nf = 'S' \\r\\n\" + \n\t\t\t\t\"\tAND\tno.cd_emp IN (13, 20)\\r\\n\" + \n\t\t\t\t\"\tAND\tntped.tp_ped IN ('BE', 'BF', 'BS', 'TR', 'VC', 'VE', 'VP', 'VS', 'BP', 'BI', 'VB', 'SR','AS','IP','SL')\\r\\n\" + \n\t\t\t\t\"\tAND no.dt_emis BETWEEN \"+periodo+\"\t\\r\\n\" + \n\t\t\t\t\"\tand no.cd_clien IN (\"+inClintes+\")\\r\\n\" + \n\t\t\t\t\"\tAND f.descricao IN ('ONTEX GLOBAL', 'BIC','CARTA FABRIL','KIMBERLY','BARUEL','PHISALIA','SKALA', 'ALFAPARF', 'EMBELLEZE', 'BEAUTY COLOR', 'HYPERA S/A', 'STEVITA', 'PAMPAM', 'YPE', 'APOLO')\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\tGROUP BY\\r\\n\" + \n\t\t\t\t\"\t--DATEPART(dd,no.dt_emis),no.dt_emis,\\r\\n\" + \n\t\t\t\t\"\tf.descricao,\\r\\n\" + \n\t\t\t\t\"\t\\r\\n\" + \n\t\t\t\t\"\t no.cd_clien,\\r\\n\" + \n\t\t\t\t\"\tno.cd_emp,\\r\\n\" + \n\t\t\t\t\"\t no.nu_ped, \\r\\n\" + \n\t\t\t\t\"\t no.nome,\\r\\n\" + \n\t\t\t\t\"\t vd.nome_gue,\\r\\n\" + \n\t\t\t\t\"\t vd.cd_vend,\\r\\n\" + \n\t\t\t\t\"\t vd.nome,\\r\\n\" + \n\t\t\t\t\"\t vd.cd_equipe\\r\\n\" + \n\t\t\t\t\"\t \\r\\n\" + \n\t\t\t\t\") em_linha\\r\\n\" + \n\t\t\t\t\"pivot (sum(Valor) for FABRICANTE IN ([ONTEX GLOBAL], [BIC],[CARTA FABRIL],[KIMBERLY],[BARUEL],[PHISALIA],[SKALA],[ALFAPARF],[EMBELLEZE],[BEAUTY COLOR],[HYPERA S/A],[STEVITA],[PAMPAM],[YPE],[APOLO])) em_colunas\\r\\n\" + \n\t\t\t\t\"order by 1\";\t\t\n\t\t\n\t\tSystem.out.println(\"Processando Script Clientes: \" + sql);\n\t\t\n\t\ttry {\n\t\t\tPreparedStatement stmt = connectionSqlServer.prepareStatement(sql);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\tString coluna;\n\n\n\t\t\t\tfor (ColunasMesesBody p:planCobCliFat ) {\n\t\t\t\t\tif(rs.getInt(\"Cod_Cliente\") == p.getCd_cliente()) {\n\t\t\t\t\t\tp.setColuna01(\"teve vendas\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tp.setColuna01(Formata.moeda(rs.getDouble(2)));\n\t\t\t\t\t\tp.setColuna02(Formata.moeda(rs.getDouble(3)));\n\t\t\t\t\t\tp.setColuna03(Formata.moeda(rs.getDouble(4)));\n\t\t\t\t\t\tp.setColuna04(Formata.moeda(rs.getDouble(5)));\n\t\t\t\t\t\tp.setColuna05(Formata.moeda(rs.getDouble(6)));\n\t\t\t\t\t\tp.setColuna06(Formata.moeda(rs.getDouble(7)));\n\t\t\t\t\t\tp.setColuna07(Formata.moeda(rs.getDouble(8)));\n\t\t\t\t\t\tp.setColuna08(Formata.moeda(rs.getDouble(9)));\n\t\t\t\t\t\tp.setColuna09(Formata.moeda(rs.getDouble(10)));\n\t\t\t\t\t\tp.setColuna10(Formata.moeda(rs.getDouble(11)));\n\t\t\t\t\t\tp.setColuna11(Formata.moeda(rs.getDouble(12)));\n\t\t\t\t\t\tp.setColuna12(Formata.moeda(rs.getDouble(13)));\n\t\t\t\t\t\tp.setColuna13(Formata.moeda(rs.getDouble(14)));\n\t\t\t\t\t\tp.setColuna14(Formata.moeda(rs.getDouble(15)));\n\t\t\t\t\t\tp.setColuna15(Formata.moeda(rs.getDouble(16)));\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\n\t\treturn planCobCliFat;\n\n\t\t\n\t\t\n\t}", "private void cargarNotasEnfermeria() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/notas_enfermeria.zul\", \"NOTAS DE ENFERMERIA\",\r\n\t\t\t\tparametros);\r\n\t}", "@Override\n\tpublic List<AlmacenDTO> listarEntrada() {\n\t\tList<AlmacenDTO> data = new ArrayList<AlmacenDTO>();\n\t\tAlmacenDTO obj = null;\n\t\tConnection cn = null;\n\t\tPreparedStatement pstm = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tcn = new MySqlDbConexion().getConexion();\n\t\t\tString sql = \"select me.codigo_entrada,p.nombre_producto,me.cantidad_entrada,me.fecha_entrada\\r\\n\" + \n\t\t\t\t\t\"from material_entrada me inner join producto p on me.codigo_producto=p.codigo_producto\";\n\n\t\t\tpstm = cn.prepareStatement(sql);\n\t\t\trs = pstm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobj = new AlmacenDTO();\n\t\t\t\tobj.setCodigo_entrada(rs.getInt(1));\n\t\t\t\tobj.setNombre_producto(rs.getString(2));\n\t\t\t\tobj.setCantidad_entrada(rs.getInt(3));\n\t\t\t\tobj.setFecha_entrada(rs.getDate(4));\n\n\t\t\t\tdata.add(obj);\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn data;\n\t}", "public static void listarRegistros() {\n System.out.println(\"\\nLISTA DE TODOS LOS REGISTROS\\n\");\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno()+ \" DIRECCION: \"+ \n ps.getDireccion()+ \" SEXO: \"+ ps.getSexo());\n }\n }", "public void buscarComprobantesEntreFechas(){\n listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);\n \n System.out.println(\"listaComprobantes cantidad >> \" + listaComprobantes.size());\n }", "private void listarEntidades() {\r\n\t\tsetListEntidades(new ArrayList<EntidadDTO>());\r\n\t\tgetListEntidades().addAll(entidadController.encontrarTodos());\r\n\t\tif (!getListEntidades().isEmpty()) {\r\n\t\t\tfor (EntidadDTO entidadDTO : getListEntidades()) {\r\n\t\t\t\t// Conversión de decimales.\r\n\t\t\t\tDouble porcentaje = entidadDTO.getPorcentajeValorAsegurable() * 100;\r\n\t\t\t\tdouble por = Math.round(porcentaje * Math.pow(10, 2)) / Math.pow(10, 2);\r\n\t\t\t\tentidadDTO.setPorcentajeValorAsegurable(por);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<Enseignant> getNomsPreEmailEnseignants(Connection myConn) throws Exception {\n\n List<Enseignant> list = new ArrayList<>();\n\n Statement myStmt = null;\n ResultSet myRs = null;\n\n try {\n myStmt = myConn.createStatement();\n myRs = myStmt.executeQuery(\"select * from enseignant\");\n while (myRs.next()) {\n Enseignant tempEnseignant = convertRowToEnseignantEnvoir(myRs);\n list.add(tempEnseignant);\n }\n return list;\n\n } finally {\n myConn.close();\n myStmt.close();\n System.out.println(\"Voilà la liste nom pre em:)\");\n }\n }", "private static ArrayList<String> Read(String endereco) {\n\n ArrayList<String> conteudo = new ArrayList();\n\n try {\n\n Reader arquivo = null;\n\n try {\n arquivo = new InputStreamReader(new FileInputStream(endereco), \"ISO-8859-1\");\n } catch (UnsupportedEncodingException ex) {\n JOptionPane.showMessageDialog(null, \"ERROR\\nNão foi possivel ler o arquivo: \" + ex);\n }\n\n BufferedReader leitura = new BufferedReader(arquivo);\n\n String linha = \"\";\n\n try {\n\n linha = leitura.readLine();\n\n while (linha != null) {\n\n conteudo.add(linha);\n linha = leitura.readLine();\n\n }\n\n arquivo.close();\n\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"ERROR\\nNão foi possivel ler o arquivo: \" + ex);\n }\n\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"ERROR\\nArquivo não encontrado: \" + ex);\n }\n\n return conteudo;\n\n }", "public ArrayList<String> listarEdiciones(String nomCurso) throws CursoExcepcion;", "public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}", "public Collection pesquisarDadosTxtContasProjetosEspeciais(String anoMes,\n\t\t\tInteger idCliente, Integer quantidadeRegistros , Integer numeroIndice) throws ErroRepositorioException;", "@Override\n\tpublic ArrayList<ClienteFisico> listar(String complemento)\n\t\t\tthrows SQLException {\n\t\treturn null;\n\t}", "public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}", "public ArrayList<DataProducto> listarProductos(String nickName);", "public List<FieEsq51333> listarFieEsq51333(String filtro) {\n\t String consulta = \"select l from FieEsq51333 l where l.numEsq51333 like :nuncerc\";\n\t TypedQuery<FieEsq51333> query = manager.createQuery(consulta, FieEsq51333.class).setMaxResults(10);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "public List<Endereco> findByEntidadeId(Long entidadeId);", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "List<Pacote> buscarPorTransporte(Transporte transporte);", "public List<Compte> getComptesClient(int numeroClient);", "public String[] list(String text, String von, String bis) throws RemoteException;", "public String getMostrarResultados() {\n StringBuilder strb = new StringBuilder();\r\n if(auditoriaanalizada==null){\r\n return \"No existe ningún informe para dicho informe\";\r\n }\r\n for(int i=1; i <= MAX_PREGUNTAS; i++){\r\n try{\r\n PropertyDescriptor p = new PropertyDescriptor(\"p\" + i, Auditorias.class);\r\n Integer c = (Integer) p.getReadMethod().invoke(auditoriaanalizada);\r\n if(c!=null && c==0){\r\n //hay que buscar dicha pregunta y poner lo que pone en el campo reglamento\r\n Reglamento r = ejbFacadeReglamento.find(i);\r\n if(r!=null && r.getIncumplimiento()!=null && !r.getIncumplimiento().isEmpty()){\r\n strb.append(\"<li>\");\r\n strb.append(r.getIncumplimiento());\r\n strb.append(\"</li>\");\r\n }\r\n }\r\n \r\n }\r\n catch(Exception e){\r\n System.out.println(\"Error:\" + e.getMessage());\r\n }\r\n }\r\n return strb.toString();\r\n }", "@Override\n public ArrayList<Endereco> buscar() {\n PreparedStatement stmt;\n ResultSet rs;\n ArrayList<Endereco> arrayEndereco = new ArrayList<>();\n try {\n \n stmt = ConexaoBD.conectar().prepareStatement(\"SELECT * FROM Endereco\");\n rs = stmt.executeQuery();\n \n \n while (rs.next()) {\n Endereco endereco = new Endereco();\n endereco.setCodigo(rs.getInt(\"CODIGOENDERECO\"));\n endereco.setRua(rs.getString(\"RUA\"));\n endereco.setNumero(rs.getString(\"NUMERO\"));\n endereco.setBairro(rs.getString(\"BAIRRO\"));\n endereco.setCidade(rs.getString(\"CIDADE\"));\n arrayEndereco.add(endereco);\n }\n \n \n } catch (SQLException ex) {\n Logger.getLogger(FuncionarioDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return arrayEndereco; \n }", "private void enlistar(ArrayList<Caracter> caracteres){\n for (int i = 0; i < caracteres.size(); i++) {\n insertaOrdenado(new NodoCaracter((Caracter) caracteres.get(i)));\n }\n }", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "public List<Comentario> listaComentarioPorCodigo(Long codigo);", "public void verificarDatosConsola(Cliente cliente, List<Cuenta> listaCuentas) {\n\n int codigoCliente = cliente.getCodigo();\n\n System.out.println(\"Codigo: \"+cliente.getCodigo());\n System.out.println(\"Nombre: \"+cliente.getNombre());\n System.out.println(\"DPI: \"+cliente.getDPI());\n System.out.println(\"Direccion: \"+cliente.getDireccion());\n System.out.println(\"Sexo: \"+cliente.getSexo());\n System.out.println(\"Password: \"+cliente.getPassword());\n System.out.println(\"Tipo de Usuario: \"+ 3);\n\n System.out.println(\"Nacimiento: \"+cliente.getNacimiento());\n System.out.println(\"ArchivoDPI: \"+cliente.getDPIEscaneado());\n System.out.println(\"Estado: \"+cliente.isEstado());\n \n \n for (Cuenta cuenta : listaCuentas) {\n System.out.println(\"CUENTAS DEL CLIENTE\");\n System.out.println(\"Numero de Cuenta: \"+cuenta.getNoCuenta());\n System.out.println(\"Fecha de Creacion: \"+cuenta.getFechaCreacion());\n System.out.println(\"Saldo: \"+cuenta.getSaldo());\n System.out.println(\"Codigo del Dueño: \"+codigoCliente);\n \n }\n \n\n\n }", "private static java.util.List<com.esperapp.ws.Empleado> buscarEmpleado(java.lang.String cedula) {\n com.esperapp.ws.AsignarTurnos_Service service = new com.esperapp.ws.AsignarTurnos_Service();\n com.esperapp.ws.AsignarTurnos port = service.getAsignarTurnosPort();\n return port.buscarEmpleado(cedula);\n }", "public List<String> GetAssegnamentiInCorso() {\n String str = \"Guillizzoni-Coca Cola Spa1-DRYSZO,Rossi-Coca Cola Spa2-DRYSZ2\";\n StringaAssegnamenti = str;\n StringaAssegnamenti = \"\";\n \n\tList<String> items = Arrays.asList(str.split(\"\\\\s*,\\\\s*\"));\n return items;\n }", "public static void criaEleicao() {\n\t\tScanner sc = new Scanner(System.in);\t\t\n\t\tString tipo, id, titulo, descricao, yesno;\n\t\tString dataI, dataF;\n\t\tString dept = \"\";\n\t\tint check = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o tipo de eleicao:\\n(1)Nucleo de Estudantes\\n(2)Conselho Geral\");\n\t\t\ttipo = sc.nextLine();\n\t\t\tif(tipo.equals(\"1\") || tipo.equals(\"2\")) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 2\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tif (tipo.equals(\"1\")) {\n\t\t\tdo {\n\t\t\t\tSystem.out.println(\"\\nInsira o nome do departamento:\");\n\t\t\t\tdept = sc.nextLine();\n\t\t\t\tif(verificarLetras(dept) && dept.length()>0) {\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"\\nO departamento apenas pode conter letras\");\n\t\t\t\t}\n\t\t\t}while(check==0);\n\t\t\t\t\n\t\t\tcheck = 0;\n\t\t}\n\n\t\tSystem.out.println(\"\\nInsira o id:\");\n\t\tid = sc.nextLine();\n\n\t\tdo {\n\t\t\tSystem.out.println(\"Insira o titulo da eleicao:\\n\");\n\t\t\ttitulo = sc.nextLine();\n\t\t\tif(verificarLetras(titulo) && titulo.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO titulo apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira a descricao da eleicao:\");\n\t\t\tdescricao = sc.nextLine();\n\t\t\tif(verificarLetras(descricao) && descricao.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA descricao apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\t\n\t\tcheck = 0;\n\t\t\n\t\tSystem.out.println(\"Insira a data de inicio da eleicao (DD/MM/AAAA HH:MM):\\n\");\n\t\tdataI = sc.nextLine();\n\t\t\n\t\tSystem.out.println(\"Insira a data do fim da eleicao (DD/MM/AAAA HH:MM):\\n\");\n\t\tdataF = sc.nextLine();\n\t\t\n\t\tString msgServer = \"\";\n\t\t\n\t\tcheck = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tmsgServer = rmiserver.criaEleicao(Integer.parseInt(tipo), id, titulo, descricao, dataI, dataF, dept);\n\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI alteraFac\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\n\t\tif (msgServer.equals(\"\\nEleicao criada com sucesso\")){\n\t\t\tdo {\n\t\t\t\tSystem.out.println(\"\\nDeseja criar uma lista de candidatos para associar a eleicao?\\n(1) Sim (2) Nao\");\n\t\t\t\tyesno = sc.nextLine();\n\t\t\t\tif(verificarNumeros(yesno)) {\n\t\t\t\t\tif (yesno.equals(\"1\")) {\n\t\t\t\t\t\tcriaListaCandidatos();\n\t\t\t\t\t}\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos\");\n\t\t\t\t}\n\t\t\t}while(check==0);\n\t\t\t\n\t\t\tcheck = 0;\n\t\t}\n\t}", "public String[] listadoJugadoresEnMesa() {\n\n\t\tString[] listado = new String[this.jugadoresEnMesa.size()];\n\n\t\tfor (int i = 0; i < this.jugadoresEnMesa.size(); i++)\n\t\t\tlistado[i] = String.format(\"%d - %s\", (i + 1), this.jugadoresEnMesa.get(i).info());\n\n\t\treturn listado;\n\t}", "public static String obtenerListaNombres (String producto) {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM \" + producto;\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "public ArrayList<DatosNombre> listaNombre(){\n \n ArrayList<DatosNombre> respuesta = new ArrayList<>();\n Connection conexion = null;\n JDBCUtilities conex = new JDBCUtilities();\n \n try{\n conexion= conex.getConnection();\n \n String query = \"SELECT usuario, contrasenia, nombre\"\n + \" FROM empleado\"\n + \" WHERE estado=true\";\n \n PreparedStatement statement = conexion.prepareStatement(query);\n ResultSet resultado = statement.executeQuery();\n \n while(resultado.next()){\n DatosNombre consulta = new DatosNombre();\n consulta.setUsuario(resultado.getString(1));\n consulta.setContrasenia(resultado.getString(2));\n consulta.setNombreAnt(resultado.getString(3));\n \n respuesta.add(consulta);\n }\n }catch(SQLException e){\n JOptionPane.showMessageDialog(null, \"Error en la consulta \" + e);\n }\n return respuesta;\n }", "public List<String> pot(ReportePlazaDTO reportePlazaDTO) {\n List<CustomOutputFile> lista = new ArrayList<CustomOutputFile>();\n List<String> listaString = new ArrayList<String>();\n\n String qnaCaptura = reportePlazaDTO.getQnaCaptura();\n String qnaCaptura2 = \"\";\n\n if (new Integer(qnaCaptura) % 2 == 0) {\n qnaCaptura2 = String.valueOf((new Integer(qnaCaptura) - 1));\n } else {\n qnaCaptura2 = qnaCaptura;\n }\n\n\n if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"e\")) {\n\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotEscenario(qnaCaptura);\n listaString.add(\"ID del Cargo,Nombre del Cargo\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"i\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotInmueble(qnaCaptura);\n listaString.add(\"Id Domicilio,Calle,Número Exterior,Número Interior,Colonia,Municipio,Estado/Entidad Fef.,País,Código Postal,Tipo de Oficina\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"a\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotAltas(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"ID del Servidor Público,Nombre,Primer Apellido,Segundo Apellido,Tipo Vacancia,Telefono Directo,Conmutador,Extensión,Fax,Email,ID Domicilio,Nivel de Puesto,Id del Cargo,ID del Cargo Superior,Nivel_Jerarquico\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"b\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotBajas(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"ID del Servidor Público\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"d\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotDirectorio(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"Unidad,RFC,ID del Servidor Público,Nombre,Primer Apellido,Segundo Apellido,Tipo Vacancia,Telefono Directo,Conmutador,Extensión,Fax,Email,ID Domicilio,Nivel de Puesto,Id del Cargo,ID del Cargo Superior,Nivel_Jerarquico\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"r\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotRemuneraciones(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"Id Puesto,Nombre,Tipo,SubTipo,Sueldo Base,Compensación Garantizada, Total Bruto, Total Neto,Nombre 01 Remuneracion,Monto 01 Remuneracion,Nombre 02 Remuneracion,Monto 02 Remuneracion,Nombre 03 Remuneracion,Monto 03 Remuneracion,Nombre 04 Remuneracion,Monto 04 Remuneracion,Nombre 05 Remuneracion,Monto 05 Remuneracion,Nombre 06 Remuneracion,Monto 06 Remuneracion,Nombre 07 Remuneracion,Monto 07 Remuneracion,Nombre 08 Remuneracion,Monto 08 Remuneracion,Nombre 09 Remuneracion,Monto 09 Remuneracion,Nombre 10 Remuneracion,Monto 10 Remuneracion,Nombre 11 Remuneracion,Monto 11 Remuneracion,Nombre 12 Remuneracion,Monto 12 Remuneracion,Nombre 13 Remuneracion,Monto 13 Remuneracion,Nombre 14 Remuneracion,Monto 14 Remuneracion,Nombre 15 Remuneracion,Monto 15 Remuneracion,Institucional,Colectivo de Retiro,Gastos Médicos,Separación Individualizado,Riesgos de Trabajo,Nombre Otros Seguros 1,Monto Otros Seguros 1,Nombre Otros Seguros 2,Monto Otros Seguros 2,Nombre Otros Seguros 3,Monto Otros Seguros 3,Nombre Otros Seguros 4,Monto Otros Seguros 4,Nombre Otros Seguros 5,Monto Otros Seguros 5,Nombre Otros Seguros 6,Monto Otros Seguros 6,Nombre Otros Seguros 7,Monto Otros Seguros 7,Nombre Otros Seguros 8,Monto Otros Seguros 8,Nombre Otros Seguros 9,Monto Otros Seguros 9,Nombre Otros Seguros 10,Monto Otros Seguros 10,Nombre Otros Seguros 11,Monto Otros Seguros 11,Nombre Otros Seguros 12,Monto Otros Seguros 12,Nombre Otros Seguros 13,Monto Otros Seguros 13,Nombre Otros Seguros 14,Monto Otros Seguros 14,Nombre Otros Seguros15,Monto Otros Seguros 15,Prima Vacacional,Primas de Antigüedad,Gratificación de Fin de Año,Pagas de Defunción,Ayuda para Despensa,Vacaciones,Nombre Prest. Econom 1,Monto Prest. Econom 1,Nombre Prest. Econom 2,Monto Prest. Econom 2,Nombre Prest. Econom 3,Monto Prest. Econom 3,Nombre Prest. Econom 4,Monto Prest. Econom 4,Nombre Prest. Econom 5,Monto Prest. Econom 5,Nombre Prest. Econom 6,Monto Prest. Econom 6,Nombre Prest.Econom 7,Monto Prest. Econom 7,Nombre Prest. Econom 8,Monto Prest. Econom 8,Nombre Prest. Econom 9,Monto Prest. Econom 9,Nombre Prest. Econom 10,Monto Prest. Econom 10,Nombre Prest. Econom 11,Monto Prest. Econom 11,Nombre Prest. Econom 12,Monto Prest. Econom 12,Nombre Prest. Econom 13,Monto Prest. Econom 13,Nombre Prest. Econom 14,Monto Prest. Econom 14,Nombre Prest. Econom 15,Monto Prest. Econom 15,Asistencia Legal,Asignación de Vehículo y/o Apoyo Económico ,Equipo de Telefonía Celular,Gastos de Alimentación,Nombre Prest. Inherentes al Puesto 1,Monto Prest. Inherentes al Puesto 1,Nombre Prest. Inherentes al Puesto 2,Monto Prest. Inherentes al Puesto 2,Nombre Prest. Inherentes al Puesto 3,Monto Prest. Inherentes al Puesto 3,Nombre Prest. Inherentes al Puesto 4,Monto Prest. Inherentes al Puesto 4,Nombre Prest. Inherentes al Puesto 5,Monto Prest. Inherentes al Puesto 5,Nombre Prest. Inherentes al Puesto 6,Monto Prest. Inherentes al Puesto 6,Nombre Prest. Inherentes al Puesto 7,Monto Prest. Inherentes al Puesto 7,Nombre Prest. Inherentes al Puesto 8,Monto Prest. Inherentes al Puesto 8,Nombre Prest. Inherentes al Puesto 9,Monto Prest. Inherentes al Puesto 9,Nombre Prest. Inherentes al Puesto 10,Monto Prest. Inherentes al Puesto 10,Nombre Prest. Inherentes al Puesto 11,Monto Prest. Inherentes al Puesto 11,Nombre Prest. Inherentes al Puesto 12,Monto Prest. Inherentes al Puesto 12,Nombre Prest. Inherentes al Puesto 13,Monto Prest. Inherentes al Puesto 13,Nombre Prest. Inherentes al Puesto 14,Monto Prest. Inherentes al Puesto 14,Nombre Prest. Inherentes al Puesto 15,Monto Prest. Inherentes al Puesto 15,ISSSTE / IMSS,FOVISSSTE / INFONAVIT,SAR,Nombre 01 Prest.Seg Social,Monto 01 Prest.Seg Social,Nombre 02 Prest.Seg Social,Monto 02 Prest.Seg Social,Nombre 03 Prest.Seg Social,Monto 03 Prest.Seg Social,Nombre 04 Prest.Seg Social,Monto 04 Prest.Seg Social,Nombre 05 Prest.Seg Social,Monto 05 Prest.Seg Social,Nombre 06 Prest.Seg Social,Monto 06 Prest.Seg Social,Nombre 07 Prest.Seg Social,Monto 07 Prest.Seg Social,Nombre 08 Prest.Seg Social,Monto 08 Prest.Seg Social,Nombre 09 Prest.Seg Social,Monto 09 Prest.Seg Social,Nombre 10 Prest.Seg Social,Monto 10 Prest.Seg Social,Nombre 11 Prest.Seg Social,Monto 11 Prest.Seg Social,Nombre 12 Prest.Seg Social,Monto 12 Prest.Seg Social,Nombre 13 Prest.Seg Social,Monto 13 Prest.Seg Social,Nombre 14 Prest.Seg Social,Monto 14 Prest.Seg Social,Nombre 15 Prest.Seg Social,Monto 15 Prest.Seg Social,Préstamos,Becas,Indemnizaciones,Nombre Otro Tipo Incentivo 01,Monto. Otro Tipo Incentivo 01,Nombre Otro Tipo Incentivo 02,Monto. Otro Tipo Incentivo 02,Nombre Otro Tipo Incentivo 03,Monto. Otro Tipo Incentivo 03,Nombre Otro Tipo Incentivo 04,Monto. Otro Tipo Incentivo 04,Nombre Otro Tipo Incentivo05,Monto. Otro Tipo Incentivo 05,Nombre Otro Tipo Incentivo 06,Monto. Otro Tipo Incentivo 06,Nombre Otro Tipo Incentivo 07,Monto. Otro Tipo Incentivo 07,Nombre Otro Tipo Incentivo 08,Monto. Otro Tipo Incentivo 08,Nombre Otro Tipo Incentivo 09,Monto. Otro Tipo Incentivo 09,Nombre Otro Tipo Incentivo 10,Monto. Otro Tipo Incentivo10,Nombre Otro Tipo Incentivo 11,Monto. Otro Tipo Incentivo 11,Nombre Otro Tipo Incentivo 12,Monto. Otro Tipo Incentivo12,Nombre Otro Tipo Incentivo 13,Monto. Otro Tipo Incentivo 13,Nombre Otro Tipo Incentivo 14,Monto. Otro Tipo Incentivo 14,Nombre Otro Tipo Incentivo 15,Monto. Otro Tipo Incentivo 15\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"f\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotFuncion((reportePlazaDTO.getQnaCaptura().substring(0, \n 4)));\n listaString.add(\"Identificador de la Facultad,Fundamento Legal,Documento Registrado,Unidad Administrativa,Nombre de la Unidad Administrativa\");\n } else if (reportePlazaDTO.getOrigen().equalsIgnoreCase(\"s\")) {\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotEstadistico(qnaCaptura);\n listaString.add(\"NIVEL,G,H,HH,I,J,K,L,M,N,O,Total\");\n }\n\n if (lista != null) {\n for (CustomOutputFile row: lista) {\n listaString.add(row.getRegistro());\n }\n } else\n listaString = null;\n return listaString;\n\n }", "public List<String> getUniquePhoneNo();", "public List<String> getContactosEmpresa(String idEmpresa) {\n List<String> contactos = new ArrayList<>();\n String contacto;\n\n try{\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT Contacto FROM Contactos \" +\n \"WHERE Empresa_ID = \" + idEmpresa);\n ResultSet rs = stm.executeQuery();\n\n while(rs.next()){\n contacto = rs.getString(\"Contacto\");\n contactos.add(contacto);\n }\n }\n catch (Exception e){\n e.getMessage();\n }\n finally {\n con.close(connection);\n }\n return contactos;\n }", "public List<EntradaDeMaterial> buscarEntradasDisponibles();", "public List<NumeroMega> listar() {\n List<NumeroMega> lista = new ArrayList<NumeroMega>();\n\n // Definicao da instrucao SQL\n String sql = \"Select NumeroMega from \" +TABELA+ \" order by id\";\n\n // Objeto que recebe os registros do banco de dados\n Cursor cursor = getReadableDatabase().rawQuery(sql, null);\n\n try {\n while (cursor.moveToNext()) {\n // Criacao de nova referencia\n NumeroMega numeroMega = new NumeroMega();\n // Carregar os atributos com dados do BD\n\n numeroMega.setNumeroMega(cursor.getString(0));\n\n // Adicionar novo a lista\n lista.add(numeroMega);\n }\n } catch (SQLException e) {\n Log.e(TAG, e.getMessage());\n } finally {\n cursor.close();\n }\n return lista;\n }", "public List<Cliente> getClientes() {\n List<Cliente> cli = new ArrayList<>();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"src/Archivo/archivo.txt\"));\n String record;\n\n while ((record = br.readLine()) != null) {\n\n StringTokenizer st = new StringTokenizer(record, \",\");\n \n String id = st.nextToken();\n String nombreCliente = st.nextToken();\n String nombreEmpresa = st.nextToken();\n String ciudad = st.nextToken();\n String deuda = st.nextToken();\n String precioVentaSaco = st.nextToken();\n\n Cliente cliente = new Cliente(\n Integer.parseInt(id),\n nombreCliente,\n nombreEmpresa,\n ciudad,\n Float.parseFloat(deuda),\n Float.parseFloat(precioVentaSaco)\n );\n\n cli.add(cliente);\n }\n\n br.close();\n } catch (Exception e) {\n System.err.println(e);\n }\n\n return cli;\n }", "public Cliente[] findWhereTelefonoEquals(String telefono) throws ClienteDaoException;", "public List<Filme> buscarPeloNome(String nome) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<Filme> consulta = gerenciador.createQuery(\r\n \"Select f from Filme f where f.nome like :nome\",\r\n Filme.class);\r\n\r\n //Substituindo o parametro :nome pelo valor da variavel n\r\n consulta.setParameter(\"nome\", nome + \"%\");\r\n\r\n //Retornar os dados\r\n return consulta.getResultList();\r\n\r\n }", "public void formatarDadosEntidade(){\n\t\tcodigoMunicipioOrigem = Util.completarStringZeroEsquerda(codigoMunicipioOrigem, 10);\n\t\tcodigoClasseConsumo = Util.completarStringZeroEsquerda(codigoClasseConsumo, 2);\n\n\t}", "public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }", "@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}", "public List<PedidoIndividual> obtenerCuentaCliente(Long idCliente,String claveMesa) throws QRocksException;", "public char[] getWord(int endereco){\n char[] resposta = new char[16];\n \n System.arraycopy(memory[endereco], 0, resposta, 0, 16);\n \n return resposta;\n }", "public ArrayList<String> Info_Disc_Pel_Compras(String genero) {\r\n ArrayList<String> Lista_nombre = Info_Disco_Pel_Rep4(genero);\r\n ArrayList<String> Lista_datos_compras = new ArrayList();\r\n String line;\r\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/Archivos/Compra_Peliculas.txt\"))) {\r\n while ((line = br.readLine()) != null) {\r\n String[] info_disco_compra = line.split(\";\");\r\n for (int s = 0; s < Lista_nombre.size(); s++) {\r\n if (Lista_nombre.get(s).equals(info_disco_compra[3])) {\r\n Lista_datos_compras.add(info_disco_compra[3]);\r\n Lista_datos_compras.add(info_disco_compra[5]);\r\n }\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n return Lista_datos_compras;\r\n }", "List<Persona> obtenerTodasLasPersona();", "public List<MovimentoPorCanalDeVendaVO> validaSelecionaEmissaoPorCanal(String movimento) {\n\n\t\tList<MovimentoPorCanalDeVendaVO> list = new ArrayList<MovimentoPorCanalDeVendaVO>(listaEmissaoPorCanal);\n\n\t\tList<MovimentoPorCanalDeVendaVO> listTotal = new ArrayList<MovimentoPorCanalDeVendaVO>();\n\n\t\tString[] mesesTotaisValor = { \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\", \"0.0\",\n\t\t\t\t\"0.0\" };\n\n\t\tString[] mesesTotaisQuantidade = { \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\" };\n\n\t\tString anoTotal = null;\n\t\tString produtoTotal = null;\n\n\t\tint qtdQuantidade = 0;\n\t\tint qtdValor = 0;\n\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tif (!(list.get(i).getMovimento().trim().equalsIgnoreCase(movimento.trim()))) {\n\t\t\t\tlist.remove(i);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\tfor (MovimentoPorCanalDeVendaVO objLista : list) {\n\t\t\tif (objLista.getTipo().equalsIgnoreCase(\"Valor\")) {\n\t\t\t\tqtdValor++;\n\t\t\t} else if (objLista.getTipo().equalsIgnoreCase(\"Quantidade\")) {\n\t\t\t\tqtdQuantidade++;\n\t\t\t}\n\t\t}\n\t\tint indiceElementoNaoEncontrado = 0;\n\t\tif (qtdValor != qtdQuantidade) {\n\n\t\t\tif (qtdValor > qtdQuantidade) {// Valor eh maior\n\t\t\t\touter: for (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif (list.get(i).getTipo().equalsIgnoreCase(\"Valor\")) {\n\n\t\t\t\t\t\t// System.out.println();\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// System.out.print(\" 1 | \"\n\t\t\t\t\t\t// + list.get(i).getCanalDeVenda());\n\t\t\t\t\t\t// System.out.println();\n\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\n\t\t\t\t\t\t\tint achou = -1;\n\t\t\t\t\t\t\tif (list.get(j).getTipo().equalsIgnoreCase(\"Quantidade\")) {\n\n\t\t\t\t\t\t\t\t// System.out.print(\" 2 | \"\n\t\t\t\t\t\t\t\t// + list.get(j).getCanalDeVenda());\n\t\t\t\t\t\t\t\t// System.out.println();\n\n\t\t\t\t\t\t\t\tif (list.get(i).getCanalDeVenda().equals(list.get(j).getCanalDeVenda())) {\n\t\t\t\t\t\t\t\t\tachou = j;\n\t\t\t\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (j == list.size() - 1 && achou == -1) {\n\t\t\t\t\t\t\t\t\tindiceElementoNaoEncontrado = i;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tString[] meses = { \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\" };\n\n\t\t\t\tMovimentoPorCanalDeVendaVO canalVendaVazio = new MovimentoPorCanalDeVendaVO();\n\t\t\t\tcanalVendaVazio.setCanalDeVenda(list.get(indiceElementoNaoEncontrado).getCanalDeVenda());\n\t\t\t\tcanalVendaVazio.setProduto(list.get(indiceElementoNaoEncontrado).getProduto());\n\t\t\t\tcanalVendaVazio.setTipo(\"Quantidade\");\n\t\t\t\tcanalVendaVazio.setMeses(meses);\n\n\t\t\t\tlist.add(((list.size() + 1) / 2 + indiceElementoNaoEncontrado), canalVendaVazio);// aqui\n\t\t\t\t/* estou ordenando tudo que é tipo 'Valor' antes de 'Quantidade' */\n\t\t\t} else {// Qtd eh maior\n\t\t\t\touter: for (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif (list.get(i).getTipo().equalsIgnoreCase(\"Quantidade\")) {\n\n\t\t\t\t\t\t// System.out.println();\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// System.out.print(\" 1 | \"\n\t\t\t\t\t\t// + list.get(i).getCanalDeVenda());\n\t\t\t\t\t\t// System.out.println();\n\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\n\t\t\t\t\t\t\tint achou = -1;\n\t\t\t\t\t\t\tif (list.get(j).getTipo().equalsIgnoreCase(\"Valor\")) {\n\n\t\t\t\t\t\t\t\t// System.out.print(\" 2 | \"+\n\t\t\t\t\t\t\t\t// list.get(j).getCanalDeVenda());\n\t\t\t\t\t\t\t\t// System.out.println();\n\n\t\t\t\t\t\t\t\tif (list.get(i).getCanalDeVenda().equals(list.get(j).getCanalDeVenda())) {\n\t\t\t\t\t\t\t\t\tachou = j;\n\t\t\t\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (j == list.size() - 1 && achou == -1) {\n\t\t\t\t\t\t\t\t\tindiceElementoNaoEncontrado = i;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tString[] meses = { \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\" };\n\n\t\t\t\tMovimentoPorCanalDeVendaVO canalVendaVazio = new MovimentoPorCanalDeVendaVO();\n\t\t\t\tcanalVendaVazio.setCanalDeVenda(list.get(indiceElementoNaoEncontrado).getCanalDeVenda());\n\t\t\t\tcanalVendaVazio.setProduto(list.get(indiceElementoNaoEncontrado).getProduto());\n\t\t\t\tcanalVendaVazio.setTipo(\"Valor\");\n\t\t\t\tcanalVendaVazio.setMeses(meses);\n\n\t\t\t\tlist.add(((list.size() + 1) / 2 + indiceElementoNaoEncontrado), canalVendaVazio);// aqui\n\t\t\t\t/* estou ordenando tudo que é tipo 'Valor' antes de 'Quantidade' */\n\n\t\t\t}\n\n\t\t}\n\n\t\t/*\n\t\t * ===Primeiro crio os objetos com os totais=========\n\t\t */\n\t\tfor (MovimentoPorCanalDeVendaVO emi : list) {\n\n\t\t\tif (emi.getTipo().equals(\"Valor\")) {\n\n\t\t\t\tfor (int i = 0; i < emi.getMeses().length; i++) {\n\t\t\t\t\tmesesTotaisValor[i] = new BigDecimal(mesesTotaisValor[i]).add(new BigDecimal(emi.getMeses()[i]))\n\t\t\t\t\t\t\t.toString();\n\t\t\t\t}\n\n\t\t\t} else if (emi.getTipo().equals(\"Quantidade\")) {\n\n\t\t\t\tfor (int i = 0; i < emi.getMeses().length; i++) {\n\t\t\t\t\tmesesTotaisQuantidade[i] = Integer.toString(\n\t\t\t\t\t\t\t(Integer.parseInt(mesesTotaisQuantidade[i]) + Integer.parseInt(emi.getMeses()[i])));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tanoTotal = emi.getAno();\n\t\t\tprodutoTotal = emi.getProduto();\n\n\t\t}\n\n\t\tMovimentoPorCanalDeVendaVO totalValor = new MovimentoPorCanalDeVendaVO();\n\t\tMovimentoPorCanalDeVendaVO totalQuantidade = new MovimentoPorCanalDeVendaVO();\n\n\t\ttotalValor.setCanalDeVenda(\"Total\");\n\t\ttotalValor.setProduto(produtoTotal);\n\t\ttotalValor.setTipo(\"Valor\");\n\t\ttotalValor.setAno(anoTotal);\n\t\ttotalValor.setMeses(mesesTotaisValor);\n\t\tlistTotal.add(totalValor);\n\n\t\ttotalQuantidade.setCanalDeVenda(\"Total\");\n\t\ttotalQuantidade.setProduto(produtoTotal);\n\t\ttotalQuantidade.setTipo(\"Quantidade\");\n\t\ttotalQuantidade.setAno(anoTotal);\n\t\ttotalQuantidade.setMeses(mesesTotaisQuantidade);\n\t\tlistTotal.add(totalQuantidade);\n\n\t\t/*\n\t\t * ===Agora calculo os percentuais=========\n\t\t */\n\n\t\tfinal int VALOR = 0;\n\t\tfinal int QUANTIDADE = 1;\n\n\t\tDecimalFormat percentForm = new DecimalFormat(\"0.00%\");\n\t\tDecimalFormat roundForm = new DecimalFormat(\"0.00\");\n\t\tUteis uteis = new Uteis();\n\t\tList<MovimentoPorCanalDeVendaVO> listFinal = new ArrayList<MovimentoPorCanalDeVendaVO>();\n\n\t\tfor (int i = 0; i < list.size() / 2; i++) {\n\t\t\tMovimentoPorCanalDeVendaVO emissaoValor = new MovimentoPorCanalDeVendaVO();\n\t\t\t/* ===VALOR==== */\n\t\t\temissaoValor.setCanalDeVenda(list.get(i).getCanalDeVenda());\n\t\t\temissaoValor.setTipo(list.get(i).getTipo());\n\t\t\temissaoValor.setMeses(list.get(i).getMeses());\n\n\t\t\tMovimentoPorCanalDeVendaVO emissaoValorPercent = new MovimentoPorCanalDeVendaVO();\n\t\t\t/* ===%=VALOR==== */\n\t\t\temissaoValorPercent.setCanalDeVenda(list.get(i).getCanalDeVenda());\n\t\t\temissaoValorPercent.setTipo(\"% \" + list.get(i).getTipo());\n\n\t\t\tString[] mesesPercentValor = new String[12];\n\t\t\tfor (int k = 0; k < list.get(i).getMeses().length; k++) {\n\n\t\t\t\ttry {\n\t\t\t\t\tdouble total = Double.parseDouble(new BigDecimal(list.get(i).getMeses()[k])\n\t\t\t\t\t\t\t.divide(new BigDecimal(listTotal.get(VALOR).getMeses()[k]), 5, RoundingMode.HALF_DOWN)\n\t\t\t\t\t\t\t.toString());\n\t\t\t\t\tmesesPercentValor[k] = percentForm.format(total);\n\n\t\t\t\t} catch (ArithmeticException e) {\n\t\t\t\t\tmesesPercentValor[k] = \"0%\";\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\temissaoValorPercent.setMeses(mesesPercentValor);\n\n\t\t\tMovimentoPorCanalDeVendaVO emissaoQuantidade = new MovimentoPorCanalDeVendaVO();\n\t\t\t/* ===QUANTIDADE==== */\n\t\t\tint j = list.size() / 2;\n\t\t\temissaoQuantidade.setCanalDeVenda(list.get(j + i).getCanalDeVenda());\n\t\t\temissaoQuantidade.setTipo(list.get(j + i).getTipo());\n\t\t\temissaoQuantidade.setMeses(list.get(j + i).getMeses());\n\n\t\t\tMovimentoPorCanalDeVendaVO emissaoQuantidadePercent = new MovimentoPorCanalDeVendaVO();\n\t\t\t/* ===%=QUANTIDADE==== */\n\t\t\temissaoQuantidadePercent.setCanalDeVenda(list.get(j + i).getCanalDeVenda());\n\t\t\temissaoQuantidadePercent.setTipo(\"% \" + list.get(j + i).getTipo());\n\n\t\t\tString[] mesesPercentQuantidade = new String[12];\n\t\t\tfor (int k = 0; k < list.get(j + i).getMeses().length; k++) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tdouble total = Double.parseDouble(list.get(j + i).getMeses()[k])\n\t\t\t\t\t\t\t/ Double.parseDouble(listTotal.get(QUANTIDADE).getMeses()[k]);\n\t\t\t\t\tmesesPercentQuantidade[k] = percentForm\n\t\t\t\t\t\t\t.format(Double.toString(total).equalsIgnoreCase(\"NaN\") ? 0.0 : total);\n\n\t\t\t\t} catch (ArithmeticException e) {\n\t\t\t\t\tmesesPercentQuantidade[k] = \"0%\";\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\temissaoQuantidadePercent.setMeses(mesesPercentQuantidade);\n\n\t\t\tString[] valorFormatado = new String[12];\n\t\t\tfor (int k = 0; k < emissaoValor.getMeses().length; k++) {\n\t\t\t\tvalorFormatado[k] = uteis\n\t\t\t\t\t\t.insereSeparadoresMoeda(roundForm.format(Double.parseDouble(emissaoValor.getMeses()[k])));\n\n\t\t\t}\n\t\t\temissaoValor.setMeses(valorFormatado);\n\n\t\t\tString[] valorFormatado2 = new String[12];\n\t\t\tfor (int k = 0; k < emissaoQuantidade.getMeses().length; k++) {\n\t\t\t\tvalorFormatado2[k] = uteis.insereSeparadores(emissaoQuantidade.getMeses()[k]);\n\t\t\t}\n\t\t\temissaoQuantidade.setMeses(valorFormatado2);\n\n\t\t\tlistFinal.add(emissaoValor);\n\t\t\tlistFinal.add(emissaoValorPercent);\n\t\t\tlistFinal.add(emissaoQuantidade);\n\t\t\tlistFinal.add(emissaoQuantidadePercent);\n\n\t\t}\n\n\t\treturn listFinal;\n\n\t}", "public void listar() {\n\n if (!vacia()) {\n\n NodoEnteroSimple temp = head;\n\n int i = 0;\n\n while (temp != null) {\n\n System.out.print(i + \".[ \" + temp.getValor() + \" ]\" + \" -> \");\n\n temp = temp.getSiguiente();\n\n i++;\n }\n }\n \n }", "public List<Cliente> findByApellidoCli(String apellidoCli);", "public List<Cuenta> mostrarCuentas(String cuales)\n\t{\n\t\t\n\n\t\t\n\t\tCliente p;\n\n\t\tSet<String> ll = clientes.keySet();\n\t\tList<String> li = new ArrayList<String>(ll);\n\t\tListIterator<String> it = li.listIterator();\n\t\tListIterator<Cuenta> cu;\n\t\tList<Cuenta> lista = new ArrayList<Cuenta>();\n\t\tCuenta c;\n\t\n\t\tif(cuales.equalsIgnoreCase(\"pre\") || cuales.equalsIgnoreCase(\"prepost\"))\n\t\t{\n\t\t\tit = li.listIterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcu = p.getCuentas().listIterator();\n\t\t\t\twhile(cu.hasNext())\n\t\t\t\t{\n\t\t\t\t\tc = cu.next();\n\t\t\t\t\tif (c instanceof CuentaPrepago)\n\t\t\t\t\t{\n\t\t\t\t\t\tlista.add(c);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tif(cuales.equalsIgnoreCase(\"post\") || cuales.equalsIgnoreCase(\"prepost\"))\n\t\t{\n\t\t\tit = li.listIterator();\n\t\t\t\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcu = p.getCuentas().listIterator();\n\t\t\t\twhile(cu.hasNext())\n\t\t\t\t{\n\t\t\t\t\tc = cu.next();\n\t\t\t\t\tif (c instanceof CuentaPostpago)\n\t\t\t\t\t{\n\t\t\t\t\t\tlista.add(c);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tCollections.sort(lista, new CompararCuentasId());\n\n\t\treturn lista;\n\t\t\n\t}", "public String list()\n {\n addressEntryList.sort(null);\n Iterator<AddressEntry> iterate = addressEntryList.iterator();\n Integer count = 1;\n String all = \"\";\n while(iterate.hasNext())\n {\n all += \"\\nEntry Number \" + count;\n all += iterate.next().toString();\n count++;\n }\n System.out.println(all);\n return all;\n }" ]
[ "0.6161782", "0.58970493", "0.58285755", "0.57888204", "0.57742673", "0.56939846", "0.5602051", "0.556776", "0.5491947", "0.54833853", "0.54672116", "0.5456794", "0.545388", "0.54168946", "0.5394703", "0.53893733", "0.53385967", "0.53163016", "0.5305975", "0.53004235", "0.52794737", "0.5257183", "0.5256675", "0.5252266", "0.5249444", "0.5243466", "0.5240363", "0.52341294", "0.5230186", "0.52230906", "0.52140933", "0.5206942", "0.5187064", "0.51856035", "0.5185285", "0.51725215", "0.5166032", "0.5152283", "0.5151118", "0.51300955", "0.5128933", "0.51256144", "0.51254934", "0.5123493", "0.5122824", "0.5118395", "0.5114401", "0.51136583", "0.51129967", "0.51110125", "0.5108241", "0.51042616", "0.5103937", "0.5096878", "0.5088128", "0.5071773", "0.50700223", "0.506601", "0.5064099", "0.50602025", "0.5058878", "0.50584775", "0.50578284", "0.50544125", "0.50474995", "0.50402236", "0.50261384", "0.5017525", "0.5000133", "0.49973893", "0.4992807", "0.49863523", "0.4985247", "0.49807853", "0.49687654", "0.49678856", "0.49636334", "0.49632496", "0.49605232", "0.49594593", "0.49576792", "0.49568862", "0.4956441", "0.4955677", "0.49517626", "0.49488315", "0.49449944", "0.49426585", "0.4942423", "0.49419397", "0.4936015", "0.49265116", "0.49227354", "0.49205604", "0.49199772", "0.49195364", "0.49170965", "0.4916697", "0.49159676", "0.49106696" ]
0.6153624
1
quickly get the nb of token in that String
public static int getNbTokens(String s, String language){ int len=s.length(); int nb_tokens=0; for (int i=1; i<len; i++){ if (s.charAt(i)==' ' && s.charAt(i-1)!=' ') nb_tokens++; } return nb_tokens; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long tokenCount();", "private int getCount(String token, String content) {\n int index = 0;\n int count = 0;\n// String[] parts = token.split(\"\\\\s+\");\n// int size = parts.length;\n boolean hasPreview = false;\n while ((index = content.indexOf(token, index)) != -1) {\n if (!hasPreview) {\n int end = Math.min(content.length(), index + 200);\n while (end < content.length() && content.charAt(end) != ' ') {\n end++;\n }\n preview = content.substring(index, end);\n hasPreview = true;\n }\n count++;\n index += token.length();\n }\n return count;\n }", "public int countTokens()\n {\n\n int count = 0;\n int currpos = currentPosition;\n\n while (currpos < maxPosition)\n {\n int start = currpos;\n\n while ((currpos < maxPosition)\n && Character.isLetterOrDigit(str.charAt(currpos)))\n {\n currpos++;\n }\n\n if ((start == currpos)\n && (Character.isLetterOrDigit(str.charAt(currpos)) == false))\n {\n currpos++;\n }\n\n count++;\n }\n\n return count;\n }", "public long numberOf (String type) {\n return this.numberOf(\"tokens\", type);\n }", "public int symbols(String senha){\n Pattern exp = Pattern.compile(\"([^a-zA-Z\\\\d\\\\s]+)\");\n Matcher matcher = exp.matcher(senha);\n int i = 0;\n while (matcher.find())\n i += matcher.group().length();\n return i;\n }", "public static int count(String s, String token)\r\n {\r\n if (isEmpty(s) || isEmpty(token))\r\n return 0;\r\n \r\n int count = 0;\r\n int k = 0;\r\n while ((k = s.indexOf(token, k)) >= 0)\r\n {\r\n count ++;\r\n k += token.length();\r\n }\r\n return count;\r\n }", "static int size_of_inr(String passed){\n\t\treturn 1;\n\t}", "public int getNumTokens() {\n \treturn numTokens;\n }", "static int size_of_cm(String passed){\n\t\treturn 3;\n\t}", "public int countXX(String str) {\n\n int index = str.indexOf(\"xx\");\n int numOfX = 0;\n\n while (index != -1) {\n numOfX++;\n str = str.substring(index + 1);\n index = str.indexOf(\"xx\");\n }\n return numOfX;\n }", "public int length() {\n\treturn tokens.length;\n}", "static int size_of_jm(String passed){\n\t\treturn 3;\n\t}", "int getTokenSegmentCount();", "java.lang.String getN();", "public int getToken_num() {\n return this.token_num;\n }", "public static int getNforNgram(){\r\n\t\tString path = \"conf/ngram.txt\"; \r\n\t\tint res = 0;\r\n\t\tArrayList<String> words = TextFile.getLines(path);\r\n\t\tString s = words.get(0);\r\n\t\tres = Integer.valueOf(s);\r\n\t\treturn res;\r\n\t}", "static int size_of_in(String passed){\n\t\treturn 2;\n\t}", "int getStrLngth(String name){\r\n int l= name.length();\r\n return l;}", "static int size_of_rnz(String passed){\n\t\treturn 1;\n\t}", "long getEmbeddingTokenHigh();", "long getEmbeddingTokenHigh();", "private String m20347f(String str) {\n C3927c cVar = new C3927c(\".cnt\", str);\n return cVar.mo27425a(m20344d(cVar.f17426b));\n }", "public static int getMin(String str){\n\t\tStack<Character> st = new Stack<>();\n\t\tint count = 0;\n\t\tfor(char c: str.toCharArray()){\n\t\t if(c == ')'){\n\t\t if(st.size() > 0){\n\t\t st.pop();\n\t\t }\n\t\t else{\n\t\t count++;\n\t\t }\n\t\t }\n\t\t else{\n\t\t st.push(c);\n\t\t }\n\t\t}\n\t\treturn count + st.size();\n\t}", "int number() {\r\n\t\treturn delimiters.size();\r\n\t}", "private int m127619a(String str) {\n if (TextUtils.isEmpty(str)) {\n return 0;\n }\n int i = 0;\n for (char a : str.toCharArray()) {\n if (m127620a(a)) {\n i++;\n }\n }\n return i;\n }", "public int size() {\n return tokens.size();\n }", "static int size_of_aci(String passed){\n\t\treturn 2;\n\t}", "static int size_of_sta(String passed){\n\t\treturn 3;\n\t}", "static int size_of_jpe(String passed){\n\t\treturn 3;\n\t}", "Integer getNLNDsp();", "@Test(timeout = 4000)\n public void test124() throws Throwable {\n StringReader stringReader0 = new StringReader(\"J..!IK9I\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"J\", token0.toString());\n assertEquals(74, token0.kind);\n }", "public static void countTokens(Scanner in) {\n }", "static int size_of_cnz(String passed){\n\t\treturn 3;\n\t}", "public static int count(String str){\r\n\t\tString[] splitStr = str.trim().split(\"\\\\s+\"); //split according to spaces and tabs.\r\n\t\treturn splitStr.length;\r\n\t}", "static int size_of_ani(String passed){\n\t\treturn 2;\n\t}", "static int size_of_lxi(String passed){\n\t\treturn 3;\n\t}", "public int numTokens() {\n return mTokens.size();\n }", "static int size_of_rnc(String passed){\n\t\treturn 1;\n\t}", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "static int size_of_cpi(String passed){\n\t\treturn 2;\n\t}", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n StringReader stringReader0 = new StringReader(\"U3kE.1/hk@Tuvel]`L\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "public int getTokensCount() {\n synchronized (this) {\n return tokens.size();\n }\n }", "static int size_of_inx(String passed){\n\t\treturn 1;\n\t}", "static long substrCount(int n, String input) {\n List<String> result = new ArrayList<>();\n if (!isEmpty(input)) {\n for (int index = 0; index <= input.length(); index++) {\n for (int i = index; i <= input.length(); i++) {\n String temp = input.substring(index, i);\n if (valid(temp)) {\n result.add(temp);\n }\n }\n }\n }\n return result.size();\n\n }", "static int size_of_cnc(String passed){\n\t\treturn 3;\n\t}", "@Test(timeout = 4000)\n public void test160() throws Throwable {\n StringReader stringReader0 = new StringReader(\"interuace\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(8, javaCharStream0.bufpos);\n assertEquals(\"interuace\", token0.toString());\n }", "@Test(timeout = 4000)\n public void test139() throws Throwable {\n StringReader stringReader0 = new StringReader(\"NXMnbm>`7-o(jz g3N\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n char[] charArray0 = new char[7];\n stringReader0.read(charArray0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"7\", token0.toString());\n }", "String getBShortToken();", "@Test(timeout = 4000)\n public void test069() throws Throwable {\n StringReader stringReader0 = new StringReader(\"..!IK9I\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(\"!\", token0.toString());\n }", "static int size_of_jnc(String passed){\n\t\treturn 3;\n\t}", "@Test(timeout = 4000)\n public void test142() throws Throwable {\n StringReader stringReader0 = new StringReader(\"e3dIj\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n // // Unstable assertion: assertEquals(3, javaCharStream0.bufpos);\n // // Unstable assertion: assertEquals(\"3dIj\", token0.toString());\n }", "public void processOperandN(StreamTokenizer st) {\n\t\tif (constantCaseB){\r\n\t\t\tif (cfound){\r\n\t\t\t\thexDigitCount += (NtoString(st.nval).substring(2, NtoString(st.nval).length()-1).length() * 2);\r\n\t\t\t}\r\n\t\t\telse if (xfound){\r\n\t\t\t\thexDigitCount += (NtoString(st.nval).substring(2, NtoString(st.nval).length()-1).length());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "String getTokenString();", "String getLongToken();", "String getLongToken();", "public int strCount(String str, String sub) {\n//Solution to problem coming soon\n}", "static int size_of_cmc(String passed){\n\t\treturn 1;\n\t}", "static int check(String exp) {\n exp = exp.replaceAll(\"\\\\+\\n\", \"\");\n int val = 0;\n StringTokenizer tokenizer = new StringTokenizer(exp, \"\\n\", true);\n\n while (tokenizer.hasMoreTokens()) {\n String nextToken = tokenizer.nextToken().trim();\n if (nextToken.equals(\"\\n\") || nextToken.equals(\"\")) {\n val += Integer.parseInt(tokenizer.nextToken().trim());\n } else {\n val = Integer.parseInt(nextToken);\n }\n }\n return val;\n }", "static int size_of_mvi(String passed){\n\t\treturn 2;\n\t}", "@Test(timeout = 4000)\n public void test110() throws Throwable {\n StringReader stringReader0 = new StringReader(\"RaLz,<NBG_}Q[P4}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 20, 0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(3, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "private String getIntToken(char[] characters) {\n\t\tString currentToken = \"\";\n\t\t//look at each character\n\t\tfor (char ch: characters)\n\t\t{\n\t\t\t//check if whitespace\n\t\t\tboolean ws = Character.isWhitespace(ch);\n\t\t\t//check type\n\t\t\tString type = getType(ch);\n\t\t\t\n\t\t\t//not whitespace and new ch is an integer.\n\t\t\tif (!ws && Objects.equals(type, \"int\"))\n\t\t\t{\n\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t}\n\t\t\t//not whitespace and special ch\n\t\t\telse if (!ws && Objects.equals(type, \"special\"))\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse if ( ws )\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse //ch type cannot follow integer \n\t\t\t{\n\t\t\t\tSystem.out.println(\"invalid type follows int\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t//ran out of tokens to process\n\t\treturn currentToken;\n\t}", "static int size_of_xthl(String passed){\n\t\treturn 1;\n\t}", "static int size_of_jz(String passed){\n\t\treturn 3;\n\t}", "public int GetToken(int fixedTokenSize, byte [] result)\n\t{\n\t\t//byte [] result = null;\n\t\tint i = 0;\n\t\tint tokenSize = -1;\n\n\t\tif (fixedTokenSize != 0)\n\t\t{\n\t\t\tif (mBufferIndex > fixedTokenSize)\n\t\t\t{\n\t\t\t\t//result = new byte [fixedTokenSize];\n\t\t\t\tSystem.arraycopy(mBuffer, 0, result, 0, fixedTokenSize);\n\t\t\t\tSystem.arraycopy(mBuffer, fixedTokenSize + 1, mBuffer, 0, \n\t\t\t\tmBufferIndex - fixedTokenSize - 1);\n\t\t\t\tmBufferIndex -= fixedTokenSize + 1;\n\t\t\t\ttokenSize = fixedTokenSize;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor (i = 0 ; i < mBufferIndex ; i++)\n\t\t\t{\n\t\t\t\tif (mBuffer[i] == ';')\n\t\t\t\t{\n\t\t\t\t\t//result = new byte [i];\n\t\t\t\t\tSystem.arraycopy(mBuffer, 0, result, 0, i);\n\t\t\t\t\tSystem.arraycopy(mBuffer, i + 1, mBuffer, 0, mBufferIndex - \n\t\t\t\t\t\ti - 1);\n\t\t\t\t\tmBufferIndex -= (i + 1);\n\t\t\t\t\ttokenSize = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn tokenSize; \n\t}", "static int size_of_rc(String passed){\n\t\treturn 1;\n\t}", "long getEmbeddingTokenLow();", "long getEmbeddingTokenLow();", "@Test(timeout = 4000)\n public void test145() throws Throwable {\n StringReader stringReader0 = new StringReader(\")0\\\":rw.f=QJ{Y+>$7\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"0\", token0.toString());\n }", "int getContentIdToEmbeddingTokensCount();", "static int size_of_jpo(String passed){\n\t\treturn 3;\n\t}", "public int getNumberOfCharactersInThisText(){\n\t\treturn this.number;\n\t}", "static int size_of_ana(String passed){\n\t\treturn 1;\n\t}", "static int size_of_sbb(String passed){\n\t\treturn 1;\n\t}", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "static int size_of_rpe(String passed){\n\t\treturn 1;\n\t}", "static int size_of_cc(String passed){\n\t\treturn 3;\n\t}", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n StringReader stringReader0 = new StringReader(\"[dfm,AL#MUTe;f\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[5];\n stringReader0.read(charArray0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"L\", token0.toString());\n assertEquals(74, token0.kind);\n }", "@Deprecated\n\tpublic static final int GetOccuranceCount(final String source, final String token, final int max) {\n\t\t\n\t\tif (source == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tfinal int tokenLength = token.length();\n\t\tint LookingSince = 0;\n\t\tint count = 0;\n\t\tfor (; count < max;) {\n\t\t\tfinal int pos = source.indexOf(token, LookingSince);\n\t\t\tif (pos == -1) {\n\t\t\t\treturn count;\n\t\t\t}\n\t\t\tLookingSince = pos + tokenLength;\n\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}", "@Test\r\n\tpublic void testTokenizeSpace() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(\"the_best_cat = \\\"Noogie Cat\\\"\");\r\n\r\n\t\t// Look for the \"Tokenize\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(0).click();\r\n\r\n\t\t// Check that there is corresponding quantity of the word \":on_sp\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint count = 0;\r\n\t\t\tfor (int i = 0; i <= res.length() - 6; i++) {\r\n\t\t\t\tString sub = res.substring(i, i + 6);\r\n\t\t\t\tif (sub.equals(\":on_sp\"))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tassertEquals(count, 2);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "@Test\n public void shouldReturnLastIndexOfFirstWhitespace(){\n Assert.assertThat(\"match any digits\",CharMatcher.DIGIT\n .lastIndexIn(\"123TT T4\"),is(7));\n }", "@Test\r\n\tpublic void testTokenizeIdentifiers() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\"))\r\n\t\t\t\t.sendKeys(\"the_best_cat = \\\"Noogie Cat\\\"\\nputs \\\"The best cat is: \\\" + the_best_cat\");\r\n\r\n\t\t// Look for the \"Tokenize\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(0).click();\r\n\r\n\t\t// Check that there is corresponding quantity of the word \":on_ident\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint count = 0;\r\n\t\t\tfor (int i = 0; i <= res.length() - 9; i++) {\r\n\t\t\t\tString sub = res.substring(i, i + 9);\r\n\t\t\t\tif (sub.equals(\":on_ident\"))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tassertEquals(count, 3);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "static int size_of_sub(String passed){\n\t\treturn 1;\n\t}", "static int size_of_jp(String passed){\n\t\treturn 3;\n\t}", "public int count(String word);", "static int size_of_pchl(String passed){\n\t\treturn 1;\n\t}", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "static int size_of_lhld(String passed){\n\t\treturn 3;\n\t}" ]
[ "0.7172913", "0.6760258", "0.63945234", "0.63346195", "0.6182097", "0.6128935", "0.60982263", "0.6091378", "0.59110993", "0.58846736", "0.58824956", "0.58753514", "0.5848637", "0.58446246", "0.5842243", "0.5834441", "0.58128446", "0.5784961", "0.5780739", "0.57746804", "0.57746804", "0.57623464", "0.5743778", "0.57292926", "0.5712866", "0.57055616", "0.5696428", "0.56770617", "0.5656201", "0.56396043", "0.5635747", "0.5603309", "0.5592241", "0.5584316", "0.5579693", "0.55750936", "0.55699235", "0.5568529", "0.55597377", "0.55597377", "0.55597377", "0.55597377", "0.55597377", "0.55597377", "0.55597377", "0.55597377", "0.55597377", "0.55597377", "0.5539879", "0.55208147", "0.5519348", "0.55164856", "0.54906476", "0.5479842", "0.54763085", "0.54715437", "0.5464125", "0.5461469", "0.5455694", "0.54430956", "0.5439339", "0.5431719", "0.5431479", "0.5431479", "0.54271567", "0.54256743", "0.54246217", "0.54145956", "0.5413017", "0.539845", "0.5394911", "0.53944063", "0.5393283", "0.53865206", "0.53835905", "0.53835905", "0.53803706", "0.53654236", "0.53633755", "0.53609824", "0.5345243", "0.5341225", "0.5340901", "0.5327529", "0.53261465", "0.532477", "0.532197", "0.5321615", "0.5321593", "0.53215444", "0.53144586", "0.5303465", "0.52983147", "0.5296494", "0.5294159", "0.5294159", "0.5294159", "0.5294159", "0.5294159", "0.529131" ]
0.66731775
2
get the index of the begining of each word. I prefer to do in two passes and output an array, this way dealing with the memory may be faster.
public static int[] getDelimiters(String s){ int len=s.length(); int nb_token=0; boolean previous_is_delimiter=true; for (int i=0; i<len; i++){ char c=s.charAt(i); if (tokenize_isdelim(c)){ if (!previous_is_delimiter){ nb_token++; } previous_is_delimiter=true; } else{ if (previous_is_delimiter){ nb_token++; } previous_is_delimiter=false; } } int[] delimiters=new int[nb_token]; int counter=0; previous_is_delimiter=true; for (int i=0; i<len; i++){ char c=s.charAt(i); if (tokenize_isdelim(c)){ if (!previous_is_delimiter){ delimiters[counter]=i; counter++; } previous_is_delimiter=true; } else{ if (previous_is_delimiter){ delimiters[counter]=i; counter++; } previous_is_delimiter=false; } } return delimiters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Word> getWordsStartingAt(int start);", "List<Integer> wordFinder(String text, String word) {\n\n List<Integer> indexes = new ArrayList<Integer>();\n String wordProper = \" \" + word + \" \";\n\n int index = 0;\n\n while (index != -1) {\n\n index = text.indexOf(wordProper, index);\n\n if (index != -1) {\n indexes.add(index);\n index++;\n }\n }\n\n return indexes;\n }", "private static HashMap<String, Integer> generateWordIndex()\n\t{\n\t\tHashMap<String, Integer> wordIndex = new HashMap<String, Integer>();\n\t\tint currIndex = 0;\n\t\tStringBuffer combinedHeaders;\n\t\tfor (MP mp : Capone.getInstance().getParliament().getMPList())\n\t\t{\n\t\t\tfor (Speech sp : mp.returnSpeeches())\n\t\t\t{\n\t\t\t\tcombinedHeaders = new StringBuffer();\n\t\t\t\tcombinedHeaders.append(sp.getHeader1());\n\t\t\t\tcombinedHeaders.append(sp.getHeader2());\n\t\t\t\tfor (String str : combinedHeaders.toString().split(\" \"))\n\t\t\t\t{\n\t\t\t\t\tif (!wordIndex.containsKey(str))\n\t\t\t\t\t{\n\t\t\t\t\t\twordIndex.put(str, currIndex);\n\t\t\t\t\t\tcurrIndex++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn wordIndex;\n\t}", "int getStartCharIndex();", "public int getWordStart (int wordIndex) {\n int wordCount = -1;\n int i = 0;\n int start = 0;\n int end = 0;\n while (i < tags.length() && wordCount < wordIndex) {\n start = indexOfNextWordStart (tags, i, slashToSeparate);\n end = indexOfNextSeparator (tags, start, true, true, slashToSeparate);\n wordCount++;\n if (wordCount < wordIndex) {\n i = end + 1;\n }\n }\n return start;\n }", "String getFirstIndex();", "public static int getLetterIndex(String word, byte startFrom) {\r\n int i, j;\r\n if (startFrom == head) // start checking from beginning\r\n {\r\n for (i = 0; i < word.length(); i++) {\r\n if (word.charAt(i) >= 'a' && word.charAt(i) <= 'z')\r\n return i;\r\n }\r\n return -1; // cannot found any letter in the string\r\n } else if (startFrom == tail) // start check from the ed\r\n {\r\n for (j = word.length() - 1; j >= 0; j--) {\r\n if (word.charAt(j) >= 'a' && word.charAt(j) <= 'z')\r\n return j;\r\n }\r\n return -1; // cannot found any letter in the string\r\n }\r\n return 0;\r\n }", "@Override\n public final int getBeginIndex() {\n return lower;\n }", "public List<String> GetSentenceFocusWords() {\r\n\t\tList<String> indxList = new ArrayList<String>();\r\n\t\t\r\n\t\tfor(int i = 0; i < m_questPos.size(); i++) {\r\n\t\t\tif(m_questPos.get(i).contains(\"NN\")){\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\t\r\n\t\t\telse if(m_questPos.get(i).contains(\"JJ\")){\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\r\n\t\t\telse if(m_questPos.get(i).contains(\"VB\")) {\r\n\t\t\t\tindxList.add(this.m_questWords.get(i));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//System.out.println(m_questPos.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn indxList;\r\n\t}", "public static int index_of_first_vowel(String word) {\r\n // Iterate over each letter of the word from the start\r\n for (int i = 0; i < word.length(); i++) {\r\n // True when the index i of the string is a vowel\r\n if(Main.VOWELS.indexOf(word.charAt(i)) > -1){\r\n return i;\r\n }\r\n }\r\n\r\n return -1; // Condition when the word contains no vowels, program will just add ay to the end in this case\r\n }", "public static List<Integer> findWordConcatenation(String str, String[] words) {\n List<Integer> resultIndices = new ArrayList<Integer>();\n if (str == null || str.isEmpty() || words == null || words.length == 0)\n return resultIndices;\n\n int len = words[0].length();\n Map<String, Integer> freqMap = new HashMap();\n\n for (String word : words)\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n\n Map<String, Integer> curMap = new HashMap();\n int l = 0, cc = 0;\n int i = 0;\n while (i < str.length() - len + 1) {\n String cur = str.substring(i, i + len);\n if (!freqMap.containsKey(cur)) {\n curMap.clear();\n ++i; l = i;\n continue;\n }\n\n curMap.put(cur, curMap.getOrDefault(cur, 0) + 1);\n if (curMap.get(cur) == freqMap.get(cur))\n cc++;\n\n while(curMap.get(cur) > freqMap.get(cur)) {\n String word1 = str.substring(l, l + len);\n curMap.put(word1, curMap.get(word1) - 1);\n if (curMap.get(word1) < freqMap.get(word1))\n --cc;\n l+=len;\n }\n\n if (cc == freqMap.size())\n resultIndices.add(l);\n i+=len;\n }\n return resultIndices;\n }", "public double getIndex()\n {\n index = 206.835 - 84.6 * syllables / words\n - 1.015 * words / sentences;\n\n return index;\n }", "private int findFirstNotWhitespace(char[] characters) \n\t{\n\t\t//find starting position of token\n\t\tfor(int i=0; i<characters.length; i++)\n\t\t{\n\t\t\t//check if character is not whitespace.\n\t\t\tif(!Character.isWhitespace( characters[i]))\n\t\t\t{\n\t\t\t\t//non-whitespace found, return position \n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\t//no non-whitespace in char[].\n\t\treturn -1;\n\t}", "public static List<Integer> findIndicesOfWordInLine(String line, String charSequence) {\n\t\tList<Integer> indexes = new ArrayList<>();\n\t\tString lowerCaseTextString = line.toLowerCase();\n\t\tString lowerCaseWord = charSequence.toLowerCase();\n\t\tint wordLength = 0;\n\t\tint index = 0;\n\t\twhile (index != -1) {\n\t\t\tindex = lowerCaseTextString.indexOf(lowerCaseWord, index + wordLength);\n\t\t\tif (index != -1) {\n\t\t\t\tindexes.add(index);\n\t\t\t\twordLength = charSequence.length();\n\t\t\t}\n\t\t}\n\t\treturn indexes;\n\t}", "public Iterator<IPosition> positions(String word) throws WordException;", "public int GetIndex(String word) {\n\t\tString s = word.toLowerCase();\n\t\t\n\t\tif(this.wordIndex == null) {\n\t\t\tLoadWordIndexFromFile();\n\t\t}\n \treturn this.wordIndex.get(s);\n\t}", "private int getUseOfLetter(String word) {\n int result = 0;\n for (int i = 0; i < word.length(); i++) {\n result |= tables[word.charAt(i)];\n }\n return result;\n }", "public int[] getChar(String[] words) {\n int[] chars = new int[26];\n for (String s : words) {\n for (int i = 0; i < s.length(); i++) {\n chars[s.charAt(i) - 'a'] = 1;\n }\n }\n return chars;\n }", "public char[] nextToken() {\n\t\t// read and return the next word of the document\n\t\tif(loc<words.length){\n\n\t\t\tString res=words[loc];\n\t\t\tloc++;\n\t\t\treturn res.toCharArray();\n\t\t}\n\n\t\t// or return null if it reaches the end of the document\n\t\treturn null;\n\t}", "private static HashMap<String, Integer> getWordIndex()\n\t{\n\t\treturn aWordIndex;\n\t}", "static void getMinScoreWordIndex(String[] words, int minScore){\n int currentMinScore = minScore;\n\n for(int i=0; i < words.length; i++){\n if (!tracker.contains(i)) {\n String word = words[i];\n int score = minScore(word);\n\n if(currentMinScore == -1){\n currentMinScore=score+1;\n tracker.add(i);\n }\n if(score < currentMinScore){\n currentMinScore = score;\n tracker.add(i);\n\n// minIndex = i;\n }\n\n\n }\n\n\n\n// if(i == words.length-1) return currentIndex ;\n\n\n }\n// return minIndex;\n }", "public static int getWordStart(JTextComponent c, int offset)\n throws BadLocationException {\n return getWordStart((BaseDocument)c.getDocument(), offset);\n }", "private String getPlace(String[] tokens, int start_index) {\n\t\t\n\t\tint i = start_index + 1;\n\t\tboolean found = false;\n\t\tString ret = \"\";\n\t\t\n\t\twhile(!found && i < tokens.length)\n\t\t{\n\t\t\tif(isWordPlace(tokens[i]))\n\t\t\t{\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(found)\n\t\t{\n\t\t\tret = tokens[i];\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "java.lang.String getWord();", "public static ArrayList<Integer> getAllIndeces(char[] array, char target) //searches for indexes of letter in the array\n {\n ArrayList<Integer> indeces = new ArrayList<Integer>();\n for(int i = 0; i<array.length; i++)\n {\n if (array[i] == target)\n {\n indeces.add(i); //adds the index where target was found to the arraylist indeces\n }\n }\n\n return indeces;\n }", "@SuppressWarnings(\"unused\")\n\tprivate static int[] pureStreamStrategy(String word) {\n\t\treturn word.codePoints()\n\t\t\t\t.filter(Character::isLetter)\n\t\t\t\t.map(Character::toUpperCase)\n\t\t\t\t.boxed()\n\t\t\t\t.collect(\n\t\t\t\t\tCollectors.groupingBy(\n\t\t\t\t\t\tcp -> cp,\n\t\t\t\t\t\tTreeMap::new,\n\t\t\t\t\t\tCollectors.summingInt(cp -> 1)\n\t\t\t\t\t)\n\t\t\t\t).entrySet().stream()\n\t\t\t\t.flatMap(e -> Stream.of(e.getKey(), e.getValue()))\n\t\t\t\t.mapToInt(i -> i)\n\t\t\t\t.toArray()\n\t\t;\n\t}", "public int getWordPosition() {\n return wordPosition;\n }", "private static String toStartCase(String words) {\n String[] tokens = words.split(\"\\\\s+\");\n StringBuilder builder = new StringBuilder();\n for (String token : tokens) {\n builder.append(capitaliseSingleWord(token)).append(\" \");\n }\n return builder.toString().stripTrailing();\n }", "public static void main(String[] args) {\r\n\t\tString text = \"thestoryofleetcodeandme\";\r\n\t\tString[] words = new String[]{\"story\", \"fleet\", \"leetcode\"};\r\n\t\tint[][] arr = findIndexPairs(text, words);\r\n\t\tfor(int[] row : arr)\r\n\t\t{\r\n\t\t\tSystem.out.println(Arrays.toString(row));\r\n\t\t}\r\n\t}", "int getWord( int pos){\n\t\treturn data[pos] + (data[pos+1] << 8);\n\t}", "public static List<Integer> findSubstringWordConcatenation(String str, String[] words) {\n assert str != null;\n assert words != null;\n List<String> wordList = new ArrayList<>();\n List<Integer> wordIndex = new ArrayList<>();\n int noOfWords = words.length, wordLength = words[0].length();\n Map<String,Integer> wordFrequencyMap = new HashMap<>();\n for(String word: words) {\n wordFrequencyMap.put(word,wordFrequencyMap.getOrDefault(word,0)+1);\n }\n\n for(int windowStart=0; windowStart <= (str.length() - (wordLength * noOfWords)); windowStart++) {\n HashMap<String, Integer> wordsSeen = new HashMap<>();\n /*now look for words*/\n for(int wrd=0; wrd<noOfWords; wrd++) {\n int wordStartIndex = windowStart + (wrd * wordLength);\n String word = str.substring(wordStartIndex, wordStartIndex+wordLength);\n if(wordFrequencyMap.containsKey(word)) {\n wordsSeen.put(word, wordsSeen.getOrDefault(word,0)+1);\n } else {\n break;// break for loop\n }\n if(wordsSeen.get(word) > wordFrequencyMap.getOrDefault(word,0)) {\n break;// frequency is more then required\n }\n if(wordsSeen.size() == wordFrequencyMap.size()) {\n wordList.add(str.substring(windowStart, wordStartIndex+wordLength));\n wordIndex.add(windowStart);\n }\n }\n }\n return wordIndex;\n }", "public int getIndex() {\r\n\t\ttry {\r\n\t\t\treturn (int)(index * ((float)this.originalTextLength / (float)this.text.length));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// maybe there were a division by zero\r\n\t\t\treturn index;\r\n\t\t}\r\n\t}", "public int getAllTextStartOffset ()\n {\n\n return this.getStart ();\n\n }", "void startIndexing();", "public String [] get_word_array(){\n\t\treturn word_array;\n\t}", "public Iterator<String> words();", "public NavigableSet<Integer> findAllTextIndexes (String words,\n DialogueConstraints constraints)\n {\n\n NavigableSet<Integer> matches = new TreeSet ();\n\n for (Paragraph p : this.paragraphs)\n {\n\n for (Sentence s : p.getSentences ())\n {\n\n int st = s.getAllTextStartOffset ();\n\n // These indexes will be sentence local.\n NavigableSet<Integer> found = s.find (words,\n constraints);\n\n if (found != null)\n {\n\n for (Integer i : found)\n {\n\n matches.add (s.getWord (i).getAllTextStartOffset ());\n\n //matches.add (i + st);\n\n }\n\n }\n\n }\n\n }\n\n return matches;\n\n }", "public Iterator words() {\n return index.keySet().iterator();\n }", "public final Word getWord(int offset) {\n return words[offset == 0 ? offset : offset - 1];\n }", "private int parseWord(Token token, char[] buffer, int offset, int type){\nfromStart:\n for(int i=offset; i<buffer.length; ++i){\n for(int x=0; x < characters[type].length; ++x){\n if(buffer[i] == characters[type][x]){\n token.identifier += buffer[i];\n continue fromStart;\n }\n }\n // If it gets here, the character currently parsed isn't of the same type \n return i;\n }\n // Found end of file\n return offset+buffer.length;\n }", "private static String[] parseStartWordDelimiter(final String token) {\r\n String[] tokenArray = null;\r\n if (token != null && token.length() > 0) {\r\n final Iterator iterator = TagOptionSingleton.getInstance().getStartWordDelimiterIterator();\r\n int index;\r\n String delimiter;\r\n while (iterator.hasNext()) {\r\n delimiter = (String) iterator.next();\r\n if (token.startsWith(delimiter)) {\r\n index = token.indexOf(delimiter, delimiter.length());\r\n } else {\r\n index = token.indexOf(delimiter);\r\n }\r\n if (index > 0) {\r\n tokenArray = new String[3];\r\n tokenArray[0] = delimiter;\r\n tokenArray[1] = token.substring(0, index);\r\n tokenArray[2] = token.substring(index);\r\n }\r\n }\r\n }\r\n return tokenArray;\r\n }", "public static void main(String[] args) {\n String name = \"I love Java I Love Java Java Java\";\n System.out.println(\"starting from 0 \" +name.indexOf(\"Java\"));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 7));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 8));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 9));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 19));\n System.out.println(\" starting from 7 \"+name.indexOf(\"Java\", 20));\n // ilk java gosterecek yani location of// simdi ise ikinci javayi ariyor +1 ile! (ava I Love )\n //or you can start here + 4 nereden biliyorum +4 cunku\n //java 4 character!!!!!!!!!!! yada ilk aradigin kelimeyi\n // bitiri bitirmez +1 koyarsin eger bilmiyorsam +word.lenght();\n\n int firstJavaLocation = name.indexOf(\"Java\");\n int startingPointToSearchSecondJava = firstJavaLocation+1;\n int secondJavaLocation = name.indexOf(\"Java\",startingPointToSearchSecondJava);\n System.out.println(\"secondJavaLocation = \" + secondJavaLocation);\n //eger cumlede nekadar kelime oldugunu bilmiyorsam I only know there are 3+ words\n // ve sadece ikinci kelimeyi biliyorsam;\n //the word in between first space and second space is second word\n int firstSpaceLocation = name.indexOf(\" \");\n int secondSpace = name.indexOf(\" \", firstJavaLocation + 1);\n System.out.println(\"second word in this sentence is \"\n +name.substring(firstJavaLocation + 1, secondSpace));\n\n\n\n\n }", "List<String> tokenize0(String doc) {\n List<String> res = new ArrayList<String>();\n\n for (String s : doc.split(\"\\\\s+\"))\n res.add(s);\n return res;\n }", "void findAllWords() {\n\t\tScanner in = new Scanner(textEditor.getText());\n\t\tint head = 0;\n\t\twhile (in.hasNext()) {\n\t\t\tString value = in.next();\n\t\t\tif (value.equals(findWord)) {\n\t\t\t\tint tail = value.length();\n\t\t\t\tfinder.add(new WordPosition(head, tail + head +1));\n\t\t\t}\n\t\t\thead += (value.length()+1);\n\t\t}\n\t\tin.close();\n\t}", "public int calWord() {\n for(int i = 0; i < newWord.length(); i++) {\n for (String c : keySetPoint) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n point += mapPoint.get(c);\n }\n }\n }\n\n return point;\n }", "private String search_words(String word, int index){\n\t\tString found_words = \"\";\n\t\tint local_index = index +1;\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs){\n\t\t\tif(local_index > word.length()-1 || word.toLowerCase().charAt(local_index) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, local_index);\n\t\t}\n\t\tif(current_word != null && word.length() > current_word.length())\n\t\t\treturn found_words;\n\t\tif(current_word != null && !found_words.equals(\"\"))\n\t\t\treturn current_word.toLowerCase().equals(word.toLowerCase()) ? current_word +\" & \" + definition + \"#\" + found_words +\"#\" : current_word + \"#\" + found_words;\n\t\telse if(current_word != null && found_words.equals(\"\"))\n\t\t\treturn current_word.toLowerCase().equals(word.toLowerCase()) ? current_word +\" & \" + definition + \"#\": current_word+ \"#\";\n\t\telse //current_word == null && found_words != null\n\t\t\treturn found_words;\n\t}", "private int findSplit(String input) {\n char[] buffer = input.toCharArray();\n int pos = 0;\n for (int i = 0; i < buffer.length; i++) {\n if (this.isLetter(buffer[i])) {\n pos = i;\n break;\n }\n }\n return pos;\n }", "public static void main(String[] args) {\n\t\tint counter=0;\n String sentence = \"Java is a general-purpose computer-programming language \"\n \t\t+ \"that is concurrent, class-based, object-oriented,\"\n \t\t+ \" and specifically designed to have as few implementation dependencies as possible.\";\n \n String[] word = sentence.split(\" \");\n \n for(String str: word) {\n \t if(str.equals(\"is\")) {\n \t\t break;\n \t } counter++;\n }\n System.out.println(\"Position: \"+ counter);\n System.out.println(word[counter]);\n \n \n \n }", "public static int indexOfNextWordStart (\n StringBuilder str, \n int fromIndex, \n boolean slashToSeparate) {\n int i = fromIndex;\n if (i < str.length() && \n (isLevelSeparator (str.charAt(i), slashToSeparate) \n || isTagSeparator (str.charAt(i)))) {\n i++;\n }\n while (i < str.length() && Character.isWhitespace (str.charAt(i))) {\n i++;\n }\n return i;\n }", "public String[] nextHotWords( String hotWord ){\r\n //Created vector to push the variable amount of hotwords before the one in the arguments\r\n Vector<String> output = new Vector<String>();\r\n //The output string array which is returned\r\n String[] out;\r\n //Turns the hotword to lowercase for it to be compatible anc checkable\r\n String chk = hotWord.toLowerCase();\r\n //Iterates through consec\r\n for (int i = 0; i < consec.size()-1; i++) {\r\n //If the hotword is found, the next hotword in the sequence is stored in output\r\n if(consec.get(i).equals(chk)){\r\n output.add(consec.get(i+1));\r\n }\r\n }\r\n //Out is set to the size of the vector of all the next hotwords\r\n out = new String[output.size()];\r\n //Copies items to out\r\n for(int j = 0; j < output.size(); j++){\r\n out[j] = output.get(j);\r\n }\r\n return out;\r\n\t}", "public String getWord() {\n if(words[index] != null) {\n return words[index];\n } else {\n return \"\";\n }\n }", "protected int firstIdx() {\n return arrayIndex(_oldestWindowIndex);\n }", "protected char[] indexEntryPrefix() {\n\tif (this.simpleName == null) // Optimization, eg. type reference is 'org.eclipse.jdt.core.*'\n\t\treturn indexEntryPrefix(REF, this.segments[this.currentSegment]);\n\n\treturn indexEntryPrefix(this.currentTag, this.simpleName);\n}", "@Test\n public void whenStartWithPrefixThenTrue() {\n char[] word = {'H', 'e', 'l', 'l', 'o'};\n char[] pref = {'H', 'e'};\n boolean result = ArrayChar.startsWith(word, pref);\n assertThat(result, is(true));\n }", "public static int indexOfNextWordStart (\n String str, \n int fromIndex, \n boolean slashToSeparate) {\n int i = fromIndex;\n if (i < str.length() &&\n (isLevelSeparator (str.charAt(i), slashToSeparate) || isTagSeparator (str.charAt(i)))) {\n i++;\n }\n while (i < str.length() && Character.isWhitespace (str.charAt(i))) {\n i++;\n }\n return i;\n }", "public Integer[] indicesOf(String text, String[] targetArray) {\n List<Integer> indices = new ArrayList<Integer>();\n\n for(int i = 0; i < targetArray.length; i++ ) {\n if(targetArray[i].contains(text)) {\n indices.add(i);\n }\n }\n //convert list to array\n return indices.toArray(new Integer[indices.size()]);\n }", "public abstract String[][] getTopWords();", "String[] splitSentenceWords() {\n\t\t\tint i=0;\n\t\t\tint j=0;\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\t\n\t\t\t\tString[] allWords = wordPattern.split(purePattern.matcher(sentence).replaceAll(\" \"));//.split(\"(?=\\\\p{Lu})|(\\\\_|\\\\,|\\\\.|\\\\s|\\\\n|\\\\#|\\\\\\\"|\\\\{|\\\\}|\\\\@|\\\\(|\\\\)|\\\\;|\\\\-|\\\\:|\\\\*|\\\\\\\\|\\\\/)+\");\n\t\t\tfor(String word : allWords) {\n\t\t\t\tif(word.length()>2) {\n\t\t\t\t\twords.add(word.toLowerCase());\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn (String[])words.toArray(new String[words.size()]);\n\t\t\n\t\t}", "public int startIndex(){\n\t\tswitch (this) {\n\t\t\tcase ORCHESTRA:\n\t\t\t\treturn 0;\n\t\t\tcase MAIN:\n\t\t\t\treturn ORCHESTRA.getRows();\n\t\t\tcase BALCONY1:\n\t\t\t\treturn ORCHESTRA.getRows()+MAIN.getRows();\n\t\t\tdefault:\n\t\t\t\treturn ORCHESTRA.getRows()+MAIN.getRows()+BALCONY1.getRows();\n\t\t}\n\t}", "private String getWord(final int index) {\n int start = 0;\n int length = 0;\n String result = null;\n try {\n start = TextUtils.getWordStart(textKit, index);\n length = TextUtils.getWordEnd(textKit, index) - start;\n result = document.getText(start, length);\n } catch (final BadLocationException e) {\n }\n\n return result;\n }", "public String wordAt(int index) {\n if (index < 0 || index >= myWords.length) {\n throw new IndexOutOfBoundsException(\"bad index in wordAt \"+index);\n }\n return myWords[index];\n }", "private static void setWordPosition() {\n\t\tSet setKeys = Utility.vocabHM.keySet();\n\t\tIterator i = setKeys.iterator();\n\t\tint position = 0;\n\t\twhile (i.hasNext()) {\n\t\t\tString w = (String) i.next();\n\t\t\tInteger rows[] = new Integer[2];\n\t\t\trows[0] = new Integer(position); /* word position */\n\t\t\trows[1] = (Integer) Utility.vocabHM.get(w); /* df */\n\n\t\t\tUtility.vocabHM.put(w, rows);\n\t\t\tposition++;\n\t\t}\n\t}", "public static List<Integer> getBlankPositions() {\n\t\tList<Integer> posList = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < sentence.length(); i++) {\n\t\t\tif (sentence.substring(i, i + 1).equals(\" \")) posList.add(i);\n\t\t}\n\t\treturn posList;\n\t}", "private int getIndexOfStart(String document, int indexOfEnd) {\n int indexOfStart = -1;\n // iterate the document backwards until '>' is found\n for (int i = indexOfEnd; i >= 0 ; i--) {\n char c = document.charAt(i);\n if (c == '>') {\n indexOfStart = i + 1;\n break;\n }\n }\n return indexOfStart;\n }", "public String showSearchBegin(String begin, ArrayList<String> wordWithBegins) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append((wordWithBegins.size() == 1) ? \"This is a word that has \" : \"These are words that have \");\n stringBuilder.append(\"the beginning \" + begin + \"\\n\");\n for (String s : wordWithBegins) {\n stringBuilder.append(s + \"\\n\");\n }\n return stringBuilder.toString();\n }", "public HashMap<String, int[]> documentsContaining(String word) {\n return index.get(word);\n }", "String getIndexBits();", "private Set<String> insertionHelper(String word) {\n\t\tSet<String> insertionWords = new HashSet<String>();\n\t\tfor (char letter : LETTERS) {\n\t\t\tfor (int i = 0; i <= word.length(); i++) {\n\t\t\t\tinsertionWords.add(word.substring(0, i) + letter + word.substring(i));\n\t\t\t}\n\t\t}\n\t\treturn insertionWords;\n\t}", "public static List<Pair<Integer,String>> getIndexedCamelCaseWords(String content) {\n List<Pair<Integer,String>> camelCaseList = new ArrayList<>();\n// for (String word : content.split(\" \")) {\n// if(word.matches(\"[aA-zZ]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*\")){\n// camelCaseList.add(word);\n// }\n// }\n Pattern regex = Pattern.compile(\"[aA-zZ]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*\");\n Matcher regexMatcher = regex.matcher(content);\n while (regexMatcher.find()) {\n if(regexMatcher.group().length()<=40){\n camelCaseList.add(new Pair<>(regexMatcher.start(), regexMatcher.group()));\n }\n }\n return camelCaseList;\n }", "public String findFirstWord(String a, String b) {\n\t\tchar[] aArray = a.toCharArray();\n\t\tchar[] bArray = b.toCharArray();\n\n\t\t//loop through letters of each\n\t\tfor (int i = 0; i < aArray.length; i++) {\n\n\t\t\t// if letter in a comes before b, then return a\n\t\t\tif (aArray[i] < bArray[i]) {\n\t\t\t\treturn a;\n\t\t\t}\n\n\t\t\t// check if letter in b comes before a\n\t\t\tif (aArray[i] > bArray[i]) {\n\t\t\t\treturn b;\n\t\t\t}\n\n\t\t\t// otherwise they are equal and you can move to the next letter\n\t\t}\n\n\t\t// you need this line in case the above loop doesn't return anything.\n\t\t// this is for the compiler.\n\t\treturn a;\n\t}", "public String getWord(int i) {\n\t\treturn ((String) wc.elementAt(i));\n\t}", "public int indexOfWord(String lemma) {\n checkLemmaIsNotNull(lemma);\n for (int i = 0; i < words.size(); i++) {\n if (words.get(i).getLemma().equalsIgnoreCase(lemma)) {\n return i;\n }\n }\n return -1;\n }", "default int findBegin(char[] buffer, int beginIndex, int endIndex) {\n return beginIndex;\n }", "int indexOf(ASCIIString str, int fromIndex);", "public void getWord() {\n\t\t\n\t}", "public static char [] insertion(char [] word, int index){\n\t\tchar [] temp = new char[word.length+1];\n\n\t\tfor(int i=0; i<word.length+1; i++){\n\t\t\tif(i<index)\n\t\t\t\ttemp[i] = word[i];\n\t\t\telse if(i == index)\n\t\t\t\ttemp[i] = randomLetter();\n\t\t\telse\n\t\t\t\ttemp[i] = word[i-1];\n\t\t}\n\t\treturn temp;\n\t}", "public String getWordAt(int pos){\n\t\treturn sentence.get(pos).getWord();\n\t}", "public static void main(String[] args) {\n char[][] grid1 = {\n {'c', 'c', 'c', 't', 'i', 'b'},\n {'c', 'c', 'a', 't', 'n', 'i'},\n {'a', 'c', 'n', 'n', 't', 't'},\n {'t', 'c', 's', 'i', 'p', 't'},\n {'a', 'o', 'o', 'o', 'a', 'a'},\n {'o', 'a', 'a', 'a', 'o', 'o'},\n {'k', 'a', 'i', 'c', 'k', 'i'}\n };\n String word1 = \"catnip\";\n String word2 = \"cccc\";\n String word3 = \"s\";\n String word4 = \"bit\";\n String word5 = \"aoi\";\n String word6 = \"ki\";\n String word7 = \"aaa\";\n String word8 = \"ooo\";\n\n char[][] grid2 = {{'a'}};\n String word9 = \"a\";\n System.out.println(find_word_location(grid1, word1));\n System.out.println(find_word_location(grid1, word2));\n System.out.println(find_word_location(grid1, word3));\n System.out.println(find_word_location(grid1, word4));\n System.out.println(find_word_location(grid1, word5));\n System.out.println(find_word_location(grid1, word6));\n System.out.println(find_word_location(grid1, word7));\n System.out.println(find_word_location(grid1, word8));\n System.out.println(find_word_location(grid2, word9));\n }", "public abstract int getStartIndex();", "private int getAnchorPosition(Anchor anchor, ArrayList<Tile> word){\n for (int c = 0 ; c < word.size() ; c++){\n if (word.get(c).letter == anchor.anchorTile.letter){\n return c;\n }\n }\n return -1000; //return something ridiculous if not there\n }", "public String startWord(String str, String word) {\r\n if (str.length() > 0 && word.length() > 0) {\r\n String strSub = str.substring(1);\r\n String wordSub = word.substring(1);\r\n\r\n if (strSub.startsWith(wordSub)) {\r\n\r\n return str.charAt(0) + wordSub;\r\n }\r\n }\r\n\r\n return \"\";\r\n }", "public int fromBeginning(String str) {\n if(str == null || str.length() == 0)\n return 0;\n char[] ca = str.toCharArray();\n int res = 0, pre = 0;\n for(char c : ca) {\n res += map.get(c);\n if(pre != 0 && pre < map.get(c))\n res -= 2 * pre;\n pre = map.get(c);\n }\n return res;\n }", "private int hashFunc1(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n // Java can return negative vals with hashCode() it's biggg so need to check for this\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n return hashVal; // Idea index position we'd like to insert or search in\n }", "public static Vector<String> getTokenizeDoc(String[] words) {\n\t\t// 0th position is where all the labels are so we need to look from 1\n\t\t// create a arrayList to keep all the words\n\t\tVector<String> wordList = new Vector<String>();\n\t\tfor(int i = 1; i< words.length; i++){\n\t\t\twords[i] = words[i].replaceAll(\"\\\\W\",\"\");\n\t\t\tif(words[i].length() > 0)wordList.add(words[i]);\n\t\t}\n\t\treturn wordList;\n\t}", "public static char[] getWord() {\n\t\t\n\t\tString[] words = {\"cookie\", \"bacon\", \"steak\", \"apple\", \"doughnut\"};\n\t\tString choice = words[(int)(Math.random() * words.length)];\n\t\tchar[] word = new char[choice.length()];\n\n\t\tfor (int i = 0; i < word.length; i++) {\n\t\t\tword[i] = choice.charAt(i); // Convert Word into charArray\n\t\t}\n\t\treturn word;\n\t}", "public static String [] findWords (String letters) \r\n { \r\n String total = \"\";\r\n try\r\n {\r\n Scanner scanner = new Scanner(new File(\"wordlist.txt\"));\r\n while(scanner.hasNext())\r\n {\r\n String line = scanner.nextLine();\r\n if(matchletters(line, letters))\r\n total = total.concat(line).concat(\" \");\r\n }\r\n //System.out.println(total);\r\n return total.split(\" \");\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(\"Error found: \" + e);\r\n return null;\r\n }\r\n }", "int[] documents(VocabWord vocabWord);", "public int isPrefixOfWord_mysolution(String sentence, String searchWord) {\n String[] words = sentence.split(\" \");\n for (int i = 0; i < words.length; i++) {\n String word = words[i];\n if (word.startsWith(searchWord)) {\n return i + 1;\n }\n }\n return -1;\n }", "public String[] wordSearch(String word,String[] arrayInput){\n\t\t\r\n\t\tString[] TempArray1 = new String[arrayInput.length];\r\n\t\tString[] TempArray2;\r\n\t\tint count1=0;\r\n\t\tint count2=0;\r\n\t\t\r\n\t\tfor(int i=0;i<arrayInput.length;i++){\r\n\t\t\t//create an array of all the words found in the input array\r\n\t\t\t//*note, this array is the same length as the input, therefore contains NULL values\r\n\t\t\tif(arrayInput[i].toLowerCase().contains(word.toLowerCase())){\r\n\t\t\t\tTempArray1[count1] = arrayInput[i];\r\n\t\t\t\tcount1++;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\tif (count1>0){\r\n\t\t\t//1. check to see if anything was found\r\n\t\t\t//2. If found, add all the values found to a correctly sized array\r\n\t\t\t//3.return\r\n\t\t\tTempArray2 = new String[count1];\r\n\t\t\tfor(int i=0;i<arrayInput.length;i++){\r\n\t\t\t\tif(TempArray1[i] != null){\r\n\t\t\t\t\tcount2++;\r\n\t\t\t\t\tTempArray2[count2-1] = TempArray1[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn TempArray2;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//nothing found, return\r\n\t\t\tTempArray1 = new String[1];\r\n\t\t\tTempArray1[0]=\"Empty\";\r\n\t\t\treturn TempArray1;\r\n\t\t}\r\n\t}", "List<String> tokenize0(String doc) {\r\n List<String> res = new ArrayList<String>();\r\n\r\n for (String s : doc.split(\"\\\\s+\")) {\r\n // implement stemming algorithm if ToStem == true\r\n if (ToStem == true) {\r\n Stemmer st = new Stemmer();\r\n st.add(s.toCharArray(), s.length());\r\n st.stem();\r\n s = st.toString();\r\n }\r\n res.add(s);\r\n }\r\n return res;\r\n }", "public int getCharStart() {\n\t\treturn -1;\n\t}", "public String getAnyWordStartingWith(String s) {\n TrieNode temp = searchNode(s);\n if (temp == null){\n return \"noWord\";\n }\n while (!temp.isWord){\n for (String c: temp.children.keySet()){\n temp = temp.children.get(c);\n s += c;\n break;\n }\n }\n return s;\n }", "static int getIdx(char ch)\n {\n return (ch - 'a');\n }", "public String getWordUnderCursor() {\r\n\t\t\r\n\t\t//we cannot search backward, so we start from the beginning: \r\n\t\tString text = getAllText();\r\n\t\tint index = getCaretPosition();\r\n\t\tPattern pattern = Pattern.compile(\"[a-zA-Z]+\"); //test version, this is not perfect. For example words between quotes\r\n\t\tMatcher matcher = pattern.matcher(text);\r\n\t\twhile(matcher.find()) {\r\n\t\t\tif(matcher.start() > index)\r\n\t\t\t\treturn \"\";\r\n\t\t\tif(matcher.start() <= index && matcher.end() >= index)\r\n\t\t\t\treturn getText(matcher.start(), matcher.end()-matcher.start());\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public static int getPosition(String word, int indicator) {\n ListIterator list_Iter = dict.get(indicator).listIterator(0);\n int result =0;\n while(list_Iter.hasNext()){\n\n String word_2 = list_Iter.next().toString();\n if (word.compareTo(word_2) < 0){\n return result;\n }\n result++;\n }\n return -1;\n }", "public List<Integer> findSubstring(String s, String[] words) {\n if (s == null || s.isEmpty() || words == null || words.length == 0) {\n return new ArrayList<>();\n }\n\n List<Integer> res = new ArrayList<>();\n int size = words.length;\n int length = words[0].length();\n\n if (s.length() < size * length) {\n return new ArrayList<>();\n }\n\n Map<String,Integer> covered = new HashMap<>();\n\n for (int j=0; j<size; j++) {\n if (s.indexOf(words[j]) < 0) {\n return res;\n }\n\n covered.compute(words[j], (k, v) -> v != null ? covered.get(k)+1 : 1);\n }\n\n int i=0;\n int sLength = s.length();\n while(sLength -i >= size * length){\n Map<String, Integer> temp = new HashMap<>(covered);\n\n for (int j=0; j<words.length; j++){\n String testStr = s.substring(i + j*length, i + (j+1)*length);\n\n if (temp.containsKey(testStr)){\n if (temp.get(testStr) == 1)\n temp.remove(testStr);\n else\n temp.put(testStr, temp.get(testStr)-1);\n }\n else {\n break;\n }\n }\n\n if (temp.size() == 0) {\n res.add(i);\n }\n\n i++;\n }\n return res;\n }", "public char FirstAppearingOnce(){\n int minIndex = Integer.MAX_VALUE;\n char ch = '#';\n for(int i=0;i<256;i++){\n if(occurrence[i]>=0){\n if(occurrence[i]<minIndex){\n minIndex = occurrence[i];\n ch = (char)i;\n }\n }\n }\n if(minIndex==Integer.MAX_VALUE)\n return '#';\n else\n return ch;\n }", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();" ]
[ "0.66040695", "0.6276317", "0.6233002", "0.6229048", "0.61982065", "0.60349584", "0.59682685", "0.5850107", "0.5840263", "0.5827324", "0.5790815", "0.57314175", "0.57188255", "0.5677872", "0.56288177", "0.55997515", "0.559074", "0.5589637", "0.55323344", "0.5522725", "0.5458885", "0.54545665", "0.54432315", "0.5437749", "0.5436272", "0.5419897", "0.5415451", "0.5413141", "0.53624445", "0.5353649", "0.53471005", "0.53305846", "0.53122985", "0.53067344", "0.53063375", "0.52855945", "0.5281364", "0.5267151", "0.5258598", "0.5254836", "0.5243682", "0.5231066", "0.52296865", "0.52237666", "0.5219973", "0.5215943", "0.519109", "0.5189514", "0.5168253", "0.51416314", "0.5132685", "0.5121104", "0.51190865", "0.5116903", "0.51135975", "0.5110618", "0.51100355", "0.51062024", "0.5104813", "0.51013446", "0.5095591", "0.5093809", "0.50921196", "0.5091141", "0.5087414", "0.5075965", "0.5075537", "0.50752556", "0.50745845", "0.5072516", "0.5070811", "0.5068125", "0.5067755", "0.50621134", "0.5059501", "0.5056403", "0.505597", "0.50553846", "0.50531685", "0.5045631", "0.5036464", "0.503312", "0.50305307", "0.50276554", "0.5023183", "0.50212073", "0.5015606", "0.5005112", "0.49925786", "0.4981172", "0.49791375", "0.49776676", "0.49772775", "0.4976311", "0.49755156", "0.49742976", "0.49713394", "0.49701545", "0.49701545", "0.49701545", "0.49701545" ]
0.0
-1
Uses the BreakIndexer class from java
public static ArrayList<Integer> getDelimiters2(String s, String language){ ArrayList<Integer> list_boundaries=new ArrayList<Integer>(); BreakIterator bi=BreakIterator.getWordInstance(new Locale(language)); bi.setText(s); int start=bi.first(); int end = 0; try { end=bi.next(); } catch(ArrayIndexOutOfBoundsException e) { bi.setText( java.text.Normalizer.normalize(s, java.text.Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "") ); end=bi.next(); } while (end != BreakIterator.DONE) { if (end==start+1){ char c=s.charAt(start); if (!tokenize_isdelim(c)){ list_boundaries.add(start); list_boundaries.add(end); } } else{ list_boundaries.add(start); list_boundaries.add(end); } start = end; end = bi.next(); } return list_boundaries; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface LanguageBreakEngine {\n int findBreaks(CharacterIterator characterIterator, int i, int i2, DictionaryBreakEngine.DequeI dequeI);\n\n boolean handles(int i);\n}", "void startIndexing();", "public Break Break(){\n\t\treturn new Break();\r\n\t}", "Break createBreak();", "private void Perform_BREAK() throws RuntimeException\n {\n throw new RuntimeException(Constants.Error(Constants.BREAK_MODE));\n }", "public void breaker() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic int getIndexStep() {\n\t\t\r\n\t\treturn 2;\r\n\t}", "public abstract int getStartIndex();", "int getSplitIndex();", "boolean hasCustomBreak();", "java.lang.String getCustomBreak();", "@Override\r\n\tpublic void carBreak() {\n\t\t\r\n\t}", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[0];\n String string0 = \"6U7NPvC\";\n String string1 = \"LineNumberTable\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"6U7NPvC\", \"LineNumberTable\", \".s.IFJDCS\", stringArray0, false, false);\n MethodWriter methodWriter1 = methodWriter0.next;\n Label label0 = new Label();\n Label label1 = label0.getFirst();\n MethodWriter methodWriter2 = classWriter0.lastMethod;\n Label[] labelArray0 = new Label[7];\n labelArray0[0] = label0;\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n labelArray0[4] = label1;\n labelArray0[5] = label0;\n Label label2 = new Label();\n labelArray0[6] = label2;\n methodWriter2.visitTableSwitchInsn((-226294317), 186, label1, labelArray0);\n int[] intArray0 = new int[2];\n intArray0[0] = (-226294317);\n intArray0[1] = (-226294317);\n // Undeclared exception!\n try { \n methodWriter2.visitLookupSwitchInsn(label0, intArray0, labelArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 2\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "@Override\n\tpublic void wantToGoOnBreak() {\n\t\t\n\t}", "public int getIndex()\n/* */ {\n/* 46 */ return this.index;\n/* */ }", "public static GotoExpression break_(LabelTarget labelTarget, Class clazz) { throw Extensions.todo(); }", "public abstract int getEndIndex();", "public static void main(String[] args) {\n\t\tWordBreak result = new WordBreak();\n\t\tSystem.out.println(result.wordBreak(\"leetcode\", new ArrayList<>(Arrays.asList(\"leet\", \"code\"))));\n\t\tSystem.out.println(result.wordBreakI(\"catsanddog\", new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"))));\n\t}", "public Branch createBreak(Position pos) {\n return xnf.Break(pos);\n }", "@Override\n public void pageBreak()\n {\n }", "public static GotoExpression break_(LabelTarget labelTarget) { throw Extensions.todo(); }", "public abstract int getBreakDistance();", "@VTID(10)\n int getIndex();", "public int getIntLE(int index)\r\n/* 775: */ {\r\n/* 776:784 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 777:785 */ return super.getIntLE(index);\r\n/* 778: */ }", "void stopIndexing();", "public void setBreak(boolean flag) {\n\tisBreaking = flag;\n}", "@Test\n\tpublic void testStartingIndicesRegression(){\n\t\tassertLeftmostStartingIndices(\"5,1,7,3,2|-..xxx$1..x...xxx$3....-xx........\", 0, 6, 8, 18, 22);\n\t\tassertRightmostStartingIndices(\"7,5|.......xxx$1....xxx$2..-\", 6, 14);\n\t\t\n\t}", "private static void dfs(int idx, boolean[] visited, boolean[] isbreak) {\n\t\tif(idx==N) {\n\t\t\t//System.out.println(\"����������\");\n\t\t\tint cnt=0;\n\t\t\tfor(int i=0; i<N; i++) {\n\t\t\t\tif(isbreak[i]) cnt++; \n\t\t\t}\n\t\t\tans=Math.max(ans, cnt);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(isbreak[idx]) {\n\t\t\tdfs(idx+1, visited, isbreak); return;\n\t\t}\n\t\t\n\t\tboolean flag = false;\n\t\tfor(int i=0; i<N; i++) {\n\t\t\t//System.out.println(\"i:\"+i);\n\t\t\tif(i==idx) continue;\n\t\t\t\n\t\t\tif(!isbreak[i]) {\n\t\t\t\tflag=true;\n\t\t\t\t/*System.out.println(i+\"�� ģ��\");\n\t\t\t\tSystem.out.println(\"ġ����\");\n\t\t\t\tSystem.out.println(list.get(idx).inner+\" \"+list.get(idx).weight);\n\t\t\t\tSystem.out.println(list.get(i).inner+\" \"+list.get(i).weight);*/\n\t\t\t\tlist.get(idx).inner-=list.get(i).weight;\n\t\t\t\tlist.get(i).inner-=list.get(idx).weight;\n\t\t\t\t/*System.out.println(\"ġ����\");\n\t\t\t\tSystem.out.println(list.get(idx).inner+\" \"+list.get(idx).weight);\n\t\t\t\tSystem.out.println(list.get(i).inner+\" \"+list.get(i).weight);*/\n\t\t\t\tif(list.get(i).inner <= 0) isbreak[i]=true;\n\t\t\t\tif(list.get(idx).inner <= 0) isbreak[idx]=true;\n\t\t\t\t\n\n\t\t\t\tdfs(idx+1,visited,isbreak);\n\t\t\t\t\n\t\t\t\tlist.get(idx).inner+=list.get(i).weight;\n\t\t\t\tlist.get(i).inner+=list.get(idx).weight;\n\t\t\t\tif(list.get(i).inner > 0) isbreak[i]=false;\n\t\t\t\tif(list.get(idx).inner > 0) isbreak[idx]=false;\n\t\t\t}\n\t\t}\n\t\tif(!flag) {\n\t\t\tint cnt=0;\n\t\t\tfor(int i=0; i<N; i++) {\n\t\t\t\tif(isbreak[i]) cnt++; \n\t\t\t}\n\t\t\tans=Math.max(ans, cnt);\n\t\t\treturn;\n\t\t}\n\t\t\n\t}", "@Override\n public void visit(Index node) {\n }", "@Override\n public int nextIndex()\n {\n return idx+1; \n }", "public int getMediumLE(int index)\r\n/* 763: */ {\r\n/* 764:772 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 765:773 */ return super.getMediumLE(index);\r\n/* 766: */ }", "public int getIndex() {\n/* 265 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private IntSplitInfo split() {\n\t\tint midKey = entries.getMidKey();\n\t\tIntInternalNode newNode = new IntInternalNode(k, entries.split());\n\n\t\t// // fix sibling pointers\n\t\t// newNode.nextNode = nextNode;\n\t\t// nextNode = newNode;\n\n\t\treturn new IntSplitInfo(this, midKey, newNode);\n\t}", "public abstract long getIndex();", "public static GotoExpression break_(LabelTarget labelTarget, Expression expression, Class clazz) { throw Extensions.todo(); }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak getCodeBreak();", "private static void removeBreakPoint() {\n for (int i=1;i<=dvm.getSourceCodeLength();i++) {\n dvm.setBreakPoint(i-1, false);\n }\n }", "protected int _getIntLE(int index)\r\n/* 389: */ {\r\n/* 390:403 */ return HeapByteBufUtil.getIntLE(this.array, index);\r\n/* 391: */ }", "public final PythonParser.break_stmt_return break_stmt() throws RecognitionException {\n PythonParser.break_stmt_return retval = new PythonParser.break_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token BREAK94=null;\n\n PythonTree BREAK94_tree=null;\n RewriteRuleTokenStream stream_BREAK=new RewriteRuleTokenStream(adaptor,\"token BREAK\");\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:729:5: ( BREAK -> ^( BREAK[$BREAK] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:729:7: BREAK\n {\n BREAK94=(Token)match(input,BREAK,FOLLOW_BREAK_in_break_stmt2595); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_BREAK.add(BREAK94);\n\n\n\n // AST REWRITE\n // elements: BREAK\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 730:4: -> ^( BREAK[$BREAK] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:730:7: ^( BREAK[$BREAK] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Break(BREAK, BREAK94), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public abstract int getIndex();", "public static GotoExpression break_(LabelTarget labelTarget, Expression expression) { throw Extensions.todo(); }", "@Override\n public String getCommandPrefix()\n {\n return \"break\";\n }", "int breakpointIndexOf(int fileId, int line)\t\t\t{ return breakpointIndexOf(fileId, line, 0, true); }", "private void wordMultiBreakEkle(XWPFRun r, int adet)\n {\n for (int i = 0; i < adet; i++)\n r.addBreak();\n }", "public int index();", "public int forEachByteDesc(int index, int length, ByteProcessor processor)\r\n/* 679: */ {\r\n/* 680:688 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 681:689 */ return super.forEachByteDesc(index, length, processor);\r\n/* 682: */ }", "protected short _getShortLE(int index)\r\n/* 345: */ {\r\n/* 346:359 */ return HeapByteBufUtil.getShortLE(this.array, index);\r\n/* 347: */ }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "public static void main(String[] args) {\n\t\tList<String> wordDict = new ArrayList<>();\n\t\twordDict.add(\"cat\");\n\t\twordDict.add(\"cats\");\n\t\twordDict.add(\"and\");\n\t\twordDict.add(\"sand\");\n\t\twordDict.add(\"dog\");\n\t\tWordBreakII_140 ww = new WordBreakII_140();\n\t\tSystem.out.println(ww.wordBreak(\"catsanddog\", wordDict));\n\t}", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n Label label0 = new Label();\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", \"p@7pE4I\", 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2450), \"p@7pE4I\", \"p@7pE4I\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n labelArray0[0] = label0;\n label0.status = (-1274);\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n label0.info = (Object) null;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, (-2450), label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn((-2013884532), label0);\n methodWriter0.visitFieldInsn(1, \"oc[MfnZM[~MHOK iO\", \"p@7pE4I\", \"'@Cix/db]3YECoja=\");\n methodWriter0.visitTryCatchBlock(label0, label0, label0, (String) null);\n methodWriter0.visitJumpInsn(1198, label0);\n methodWriter0.visitMaxs((-1274), (-1460));\n methodWriter0.visitJumpInsn(1198, label0);\n ByteVector byteVector1 = byteVector0.putByte(177);\n methodWriter0.put(byteVector1);\n assertSame(byteVector0, byteVector1);\n }", "public final native double getStartIndex() /*-{\n return this.getStartIndex();\n }-*/;", "public int getIndex();", "public int getIndex();", "public int getIndex();", "private Stmt labelFreeBreaks(Stmt body, final Id label) {\n return (Stmt) body.visit(new NodeVisitor(){\n @Override\n public Node override(Node node) { // these constructs capture free breaks\n if (node instanceof Loop) return node;\n if (node instanceof Switch) return node;\n return null;\n }\n @Override\n public Node leave(Node old, Node n, NodeVisitor v) {\n if (n instanceof Branch) {\n Branch b = (Branch) n;\n if (b.kind().equals(Branch.BREAK) && null == b.labelNode()) {\n return b.labelNode(label);\n }\n }\n return n;\n }\n });\n }", "private int wrapIndex(int index) {\n return Math.max(Math.min(index, length - 1), 0);\n }", "public int getIndex() { return this.index; }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"Label offset position has not been resolved yet\";\n stringArray0[1] = \"'0\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"'0\", \"Label offset position has not been resolved yet\", \"'0\", stringArray0, false, false);\n Label label0 = new Label();\n Object object0 = new Object();\n label0.info = object0;\n methodWriter0.visitMultiANewArrayInsn(\"@pW02*kbwab-\", (-299));\n Label label1 = label0.getFirst();\n label0.position = 185;\n Label[] labelArray0 = new Label[2];\n labelArray0[0] = label1;\n methodWriter0.visitMultiANewArrayInsn(\"Ljava/lang/Synthetic;\", (-1840700267));\n methodWriter0.visitTryCatchBlock(label1, label0, label0, \"double\");\n methodWriter0.visitIincInsn(2, (-533));\n MethodWriter methodWriter1 = classWriter0.lastMethod;\n methodWriter1.visitFrame(1557, (-802), labelArray0, (-1840700267), stringArray0);\n methodWriter1.visitJumpInsn((-533), label1);\n methodWriter0.visitTryCatchBlock(label1, label1, label0, \"\");\n assertSame(methodWriter0, methodWriter1);\n }", "@Override\n\t\tpublic int nextIndex() {\n\t\t\treturn 0;\n\t\t}", "Long pickupSpan(INDArray array);", "private int getIndex2(int val){\n return val/bucket;\n }", "private int getIndex(int val){\n return val%bucket;\n }", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(958);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (byte) (-82), \"The array of suffixes must not be null\", \"O8\", \"wheel.asm.MethodWriter\", (Object) null);\n ByteVector byteVector0 = classWriter0.pool;\n byteVector0.putByteArray((byte[]) null, 50, (-3862));\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation(\"D&G}fBu\", true);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2005);\n FieldVisitor fieldVisitor0 = classWriter0.visitField(2, \"RuntsmeInvisibleAnnotatgons\", \"RuntsmeInvisibleAnnotatgons\", \"RuntsmeInvisibleAnnotatgons\", \"RuntsmeInvisibleAnnotatgons\");\n ByteVector byteVector0 = classWriter0.pool;\n byte[] byteArray0 = new byte[0];\n byteVector0.data = byteArray0;\n // Undeclared exception!\n try { \n fieldVisitor0.visitAnnotation(\".1V*&cr?k\", true);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n }\n }", "com.google.protobuf.ByteString\n getCustomBreakBytes();", "public BreakController getBreakController() {\n return breakController;\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n classWriter0.thisName = \"p@7pE4I\";\n String[] stringArray0 = new String[0];\n classWriter0.visitInnerClass((String) null, \"p@7pE4I\", (String) null, 2257);\n ByteVector byteVector0 = new ByteVector(1);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2217), \"p@7pE4I\", \"TET-!0-b\", (String) null, stringArray0, false, false);\n Label[] labelArray0 = new Label[4];\n labelArray0[0] = label0;\n label0.status = (-1274);\n labelArray0[1] = label0;\n labelArray0[2] = label0;\n labelArray0[3] = label0;\n methodWriter0.visitTableSwitchInsn(1, (-2450), label0, labelArray0);\n methodWriter0.put(byteVector0);\n methodWriter0.visitJumpInsn(183, label0);\n methodWriter0.visitFieldInsn(959, \"TET-!0-b\", \"),-a}=[<X(poa~{!\", \"TET-!0-b\");\n methodWriter0.visitTryCatchBlock(label0, label0, label0, \"p@7pE4I\");\n int[] intArray0 = new int[6];\n intArray0[0] = (-2450);\n intArray0[1] = 959;\n intArray0[2] = (-484);\n intArray0[3] = (-1274);\n intArray0[4] = 183;\n intArray0[5] = (-1274);\n MethodWriter.getNewOffset(intArray0, intArray0, label0);\n assertArrayEquals(new int[] {(-2450), 959, (-484), (-1274), 183, (-1274)}, intArray0);\n }", "public interface Indexable {\n\n char getIndexForPosition(int position);\n\n int getCount();\n}", "private void changeJumps(int breakBCI, int delta) {\n int bci = 0;\n int bc;\n\n // Now, adjust any affected instructions.\n while (bci < bytecodesLength) {\n bc = (bytecodes[bci] & 0xFF);\n\n if (((bc >= opc_ifeq) && (bc <= opc_if_acmpne)) || (bc == opc_ifnull) || (bc == opc_ifnonnull) || (bc == opc_goto)\n || (bc == opc_jsr)) {\n changeJump(bci, bci + 1, true, breakBCI, delta);\n } else {\n switch (bc) {\n case opc_goto_w:\n case opc_jsr_w:\n changeJump(bci, bci + 1, false, breakBCI, delta);\n\n break;\n case opc_tableswitch:\n case opc_lookupswitch: {\n int recPad = getOrigSwitchPadding(bci, (bc != opc_tableswitch));\n int oldPad = (recPad != -1) ? recPad : (align(bci + 1) - (bci + 1));\n\n if (bci > breakBCI) {\n int new_bci = bci + delta;\n int newPad = align(new_bci + 1) - (new_bci + 1);\n\n // Do we need to check the padding?\n if (newPad != oldPad) {\n if (recPad == -1) {\n changes.push(new ChangeSwitchPadding(bci, oldPad, (bc != opc_tableswitch)));\n }\n }\n }\n\n // Then the rest, which depends on the kind of switch.\n if (bc == opc_tableswitch) {\n changeJump(bci, bci + 1 + oldPad, false, breakBCI, delta);\n\n // We cannot use the Bytecode_tableswitch abstraction, since the padding might not be correct.\n int lo = getInt(bci + 1 + oldPad + (4 * 1));\n int hi = getInt(bci + 1 + oldPad + (4 * 2));\n int n = hi - lo + 1;\n\n for (int k = 0; k < n; k++) {\n changeJump(bci, bci + 1 + oldPad + (4 * (k + 3)), false, breakBCI, delta);\n }\n\n // Special next-bci calculation here...\n bci += (1 + oldPad + ((n + 3) * 4));\n\n continue;\n } else {\n changeJump(bci, bci + 1 + oldPad, false, breakBCI, delta);\n\n // We cannot use the Bytecode_lookupswitch abstraction, since the padding might not be correct.\n int npairs = getInt(bci + 1 + oldPad + (4 * 1));\n\n for (int k = 0; k < npairs; k++) {\n changeJump(bci, bci + 1 + oldPad + (4 * (2 + (2 * k) + 1)), false, breakBCI, delta);\n }\n\n // Special next-bci calculation here...\n bci += (1 + oldPad + ((2 + (npairs * 2)) * 4));\n\n continue;\n }\n }\n default:\n break;\n }\n }\n\n bci += opcodeLength(bci);\n }\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2438);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2438, \"jyY)^e *U#>@n8v((\", \"jyY)^e *U#>@n8v((\", \"jyY)^e *U#>@n8v((\", \"jyY)^e *U#>@n8v((\");\n ByteVector byteVector0 = classWriter0.pool;\n byteVector0.length = (-2808);\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation(\"\", true);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2808\n //\n verifyException(\"wheel.asm.ByteVector\", e);\n }\n }", "@Test\n\tpublic void testFieldIndexConverter() {\n\n\t\tAssert.assertTrue(1 == Board.lineFromIndex((byte) 0));\n\t\tAssert.assertTrue(8 == Board.lineFromIndex((byte) 7));\n\t\tAssert.assertTrue(7 == Board.lineFromIndex((byte) 14));\n\t\tAssert.assertTrue(1 == Board.lineFromIndex((byte) 16));\n\n\t\tAssert.assertTrue(1 == Board.rowFromIndex((byte) 0));\n\t\tAssert.assertTrue(1 == Board.rowFromIndex((byte) 7));\n\t\tAssert.assertTrue(2 == Board.rowFromIndex((byte) 8));\n\t\tAssert.assertTrue(8 == Board.rowFromIndex((byte) 63));\n\t\t\n\t\t\n\t\t\n\t\t//49=B7\n\t\tAssert.assertTrue(2 == Board.lineFromIndex((byte) 49));\n\t\tAssert.assertTrue(7 == Board.rowFromIndex((byte) 49));\n\t\t\n\n\t}", "@Test(timeout = 4000)\n public void test076() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1790259326));\n int int0 = (-2013884528);\n Item item0 = classWriter0.key;\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"H\";\n stringArray0[1] = \"H\";\n stringArray0[2] = \"cM6G}.\";\n stringArray0[3] = \"H\";\n String string0 = \"!`EadfDEPz-?X.0{\";\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"!`EadfDEPz-?X.0{\");\n classWriter0.newConst(\"cM6G}.\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1790259326), \"9~\\\"GM0+ ?&-(JmN[0f.\", \"Fj)3/|(;sZXz$\", \"H\", stringArray0, true, false);\n Label label0 = new Label();\n // Undeclared exception!\n try { \n methodWriter0.visitJumpInsn((-2013884528), label0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2013884528\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "public interface BoostingIndexer {\r\n\t/**\r\n\t * Add a new {@link Document} to the Index or update an existing one.<br> \r\n\t * When adding a document, its dynamic boosts values must be set. Specifying the values is accomplished by\r\n\t * passing the dynamicBoosts parameter with a Map from the boost index (zero based) to the boost value (a <code>double</code>).\r\n\t * In this map, no index can be larger than the number of available boosts the {@link IndexEngine}'s {@link Scorer} has, minus one (since it is zero based).\r\n\t * The value for any available boost index not specified in the map is defaulted to zero. \r\n\t * \r\n\t * @param docId external (customer) identifier of the document to add\r\n\t * @param document the {@link Document} to add\r\n\t * @param timestampBoost a <code>float</code> representing the time of the document (the younger the document, the larger the boost should be)\r\n\t * @param dynamicBoosts a Map from the boost index (zero based) to the boost value (a <code>double</code>).\r\n\t * @throws {@link IllegalArgumentException} if an invalid index is passed for a boost \r\n\t */\r\n\tpublic void add(String docId, Document document, int timestampBoost, Map<Integer, Double> dynamicBoosts);\r\n\r\n\t/**\r\n\t * Remove a document from the index.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document to remove\r\n\t */\r\n\tpublic void del(String docId);\r\n\t\r\n\t/**\r\n\t * Update the special boost for the timestamp\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param timestampBoost a <code>float</code> representing the time of the document (the younger the document, the larger the boost should be)\r\n\t */\r\n\tpublic void updateTimestamp(String docId, int timestampBoost);\r\n\t\r\n\t/**\r\n\t * Update one or more of the dynamic boosts values.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param updatedBoosts a Map from the boost index (zero based) to the boost value (a <code>double</code>). No index can be larger than the available boosts the {@link IndexEngine}'s {@link Scorer} has, minus one (since it is zero based)\r\n\t * @throws {@link IllegalArgumentException} if an invalid index is passed for a boost \r\n\t */\r\n\tpublic void updateBoosts(String docId, Map<Integer, Double> updatedBoosts);\r\n\r\n public void updateCategories(String docId, Map<String, String> categories);\r\n\t/**\r\n\t * Promote a document to be the first result for a specific query.\r\n\t * \r\n\t * @param docId external (customer) identifier of the document\r\n\t * @param query the exact query the document must be promoted to the first result for\r\n\t */\r\n public void promoteResult(String docId, String query);\r\n\r\n /**\r\n * Dumps the current state to disk.\r\n */\r\n public void dump() throws IOException;\r\n\r\n public void addScoreFunction(int functionIndex, String definition) throws Exception;\r\n\r\n public void removeScoreFunction(int functionIndex);\r\n\r\n public Map<Integer,String> listScoreFunctions();\r\n \r\n public Map<String, String> getStats();\r\n\r\n}", "private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }", "public interface FreeExpSeg {\r\n public Object getValue(Object obj,int index) throws IllegalAccessException, InvocationTargetException;\r\n}", "protected void setBreak() {\n shouldBreak = true;\n }", "public abstract int start(int i);", "public int indexOf(int fromIndex, int toIndex, byte value)\r\n/* 637: */ {\r\n/* 638:646 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 639:647 */ return super.indexOf(fromIndex, toIndex, value);\r\n/* 640: */ }", "public int forEachByte(int index, int length, ByteProcessor processor)\r\n/* 667: */ {\r\n/* 668:676 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 669:677 */ return super.forEachByte(index, length, processor);\r\n/* 670: */ }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-946));\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (-946), \"Consta5)ntValue\", \"Consta5)ntValue\", \"?H+TLs Gws\", (Object) null);\n ByteVector byteVector0 = classWriter0.pool;\n byteVector0.length = 2845;\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation(\"\", false);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n }\n }", "int index();", "private int getRealIndex()\r\n\t{\r\n\t\treturn index - 1;\r\n\t}", "private static void zoomInArrayElmnt(\n String curPath,\n Object curObj,\n String idxStr,\n int curIndex,\n ArrayList<String> accessors,\n HashSet<Variable> variables) {\n int nextIndex = curIndex + 1;\n int elementIndex = 0;\n int target = Integer.parseInt(idxStr);\n String nextPath = curPath + \".[\" + idxStr + \"]\";\n Object nextObj = null;\n\n String typeString = curObj.getClass().getComponentType().toString();\n switch (typeString) {\n case \"boolean\":\n for (boolean element : (boolean[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"byte\":\n for (byte element : (byte[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"short\":\n for (short element : (short[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"int\":\n for (int element : (int[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"long\":\n for (long element : (long[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"char\":\n for (char element : (char[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"float\":\n for (float element : (float[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n case \"double\":\n for (double element : (double[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n break;\n default:\n for (Object element : (Object[]) curObj) {\n if (elementIndex == target) {\n nextObj = element;\n break;\n } else {\n elementIndex++;\n }\n }\n }\n zoomInAndGetVars(nextObj, accessors, nextIndex, nextPath, variables);\n }", "@Override\n public final int getBeginIndex() {\n return lower;\n }", "static int fixIndex(int i)\r\n {\r\n return i >= 0 ? i : -(i + 1);\r\n }", "public int getIndex(\n )\n {return index;}", "protected void _setMediumLE(int index, int value)\r\n/* 471: */ {\r\n/* 472:485 */ HeapByteBufUtil.setMediumLE(this.array, index, value);\r\n/* 473: */ }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n classWriter0.addType(\"H\");\n classWriter0.visitOuterClass(\"H\", \"H\", \"<init>\");\n classWriter0.newField(\"H\", \"H\", \"\\\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\\\"\";\n classWriter0.addUninitializedType(\"$`[E(62B_\", 7);\n stringArray0[1] = \"<T'RwU+).UKJX>\";\n stringArray0[2] = \"H\";\n stringArray0[3] = \"\\\"\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \"H\", \"<T'RwU+).UKJX>\", \"H\", stringArray0, true, false);\n Item item0 = new Item();\n int int0 = (-4989);\n methodWriter0.visitInsn(187);\n Integer integer0 = new Integer((-1983180370));\n int int1 = 172;\n Label label0 = new Label();\n Integer.getInteger(\"\\\"\");\n Integer.remainderUnsigned(187, 187);\n Label label1 = label0.successor;\n // Undeclared exception!\n try { \n methodWriter0.visitInsn((-2049));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2049\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }" ]
[ "0.6324114", "0.6245651", "0.6210403", "0.5972325", "0.5558808", "0.55546963", "0.5536683", "0.5493287", "0.54138786", "0.53994346", "0.5361447", "0.53483075", "0.53399986", "0.5334146", "0.5283745", "0.5278019", "0.5272911", "0.5271666", "0.52585906", "0.5249677", "0.5232687", "0.5226212", "0.5223425", "0.5205058", "0.52049005", "0.52048534", "0.51844937", "0.51651514", "0.5143338", "0.5106537", "0.50797683", "0.5078232", "0.5060444", "0.50391436", "0.5039112", "0.50258386", "0.5015333", "0.5011178", "0.4965545", "0.49557555", "0.4945723", "0.4941126", "0.49352765", "0.49327776", "0.4912838", "0.4898586", "0.4887494", "0.48577183", "0.48551142", "0.48535332", "0.48490953", "0.48424304", "0.48424304", "0.48424304", "0.48405564", "0.48326525", "0.48299938", "0.48168075", "0.48078972", "0.48067713", "0.48054987", "0.48039383", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.4803585", "0.47954652", "0.47950068", "0.47932607", "0.4791667", "0.47878376", "0.47813395", "0.4763089", "0.47590986", "0.47558182", "0.4755639", "0.47495577", "0.47486234", "0.47472808", "0.47439125", "0.4742418", "0.47278595", "0.4727358", "0.4719572", "0.47195163", "0.47081915", "0.47074005", "0.47007227", "0.4700474", "0.46976778", "0.46920392", "0.4691594" ]
0.0
-1
Constructeur du state (etat) menu
public MenuState(Handler handler) { super(handler, handler.getStateManager()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MenuTamu() {\n initComponents();\n \n }", "public Menu() {\n\n\t}", "public Menu()\n {\n \n }", "public Menu() {\r\n\r\n }", "public void initMenu(){\n\t}", "public Menu() {\n this(\"\");\n }", "public menuAddStasiun() {\n initComponents();\n }", "public Menu() {\n }", "public Menu() {\r\n \r\n ingresaVehiculo (); \r\n }", "public MenuState(Nifty nifty) {\n\t\tsuper();\n\t\tthis.nifty = nifty;\n\t}", "public menuFornecedorView() {\n initComponents();\n botoes(true,true,false,true,false,false);\n campos(false,true,false,false,false,false);\n }", "public menu() {\n initComponents();\n }", "public menu() {\n initComponents();\n }", "public Menus() {\n initComponents();\n }", "private void init() {\n StateManager.setState(new MenuState());\n }", "public MainMenu() {\n super();\n }", "public Menu() {\n initComponents();\n setResizable(false);\n \n selectInsc.setVisible(false);\n selectCarrera.setVisible(false);\n selectCursado.setVisible(false);\n selectInsc.setVisible(false);\n selectMat.setVisible(false);\n selectProf.setVisible(false);\n\n }", "public Menu() {\n initComponents();\n }", "public Menu() {\n initComponents();\n }", "public Menu() {\n initComponents();\n }", "public void menu() {\n\t\tstate.menu();\n\t}", "public ItemMenu() {\n super(null, null);\n }", "public MenuItem(){\n\n }", "public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }", "public LibrarianMenu() {\n initComponents();\n }", "public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }", "public MenuBangunRuang() {\n initComponents();\n }", "private JMenu createLanguageMenu() {\n\t\tAction nestoAction = new AbstractAction() {\n\n\t\t\t/** The generated serial user ID */\n\t\t\tprivate static final long serialVersionUID = -4439263551767223123L;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJMenuItem src = (JMenuItem) e.getSource();\n\t\t\t\tString arg = src.getText();\n\t\t\t\tLocalizationProvider.getInstance().setLanguage(arg);\n\t\t\t\tLocalizationProvider.getInstance().fire();\n\t\t\t}\n\t\t};\n\n\t\titemHR = new JMenuItem(nestoAction);\n\t\titemHR.setText(\"hr\");\n\t\titemEN = new JMenuItem(nestoAction);\n\t\titemEN.setText(\"en\");\n\t\titemDE = new JMenuItem(nestoAction);\n\t\titemDE.setText(\"de\");\n\n\t\tlangMenu = new JMenu(flp.getString(\"lang\"));\n\n\t\tlangMenu.add(itemHR);\n\t\tlangMenu.add(itemEN);\n\t\tlangMenu.add(itemDE);\n\n\t\treturn langMenu;\n\t}", "public MyMenu() {\n this(DSL.name(\"MY_MENU\"), null);\n }", "private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }", "public ActionMenuItem() {\n this(\"\");\n }", "public Tela_Menu2() {\n initComponents();\n }", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "public ToolsMenu() {\n\t\tsuper(\"Tools\");\n\t}", "public LevelMenu(int levelmenu) {}", "public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}", "public startingMenu() {\r\n initComponents();\r\n }", "public Menu createToolsMenu();", "public menu() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public MainMenu(Game game) {\r\n\t\tsuper(game);\r\n\t}", "public Menu_Ingreso() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MenuController() {\r\n\t \r\n\t }", "private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}", "public abstract Menu mo2158c();", "public ObjectFactoryMenu() {\n }", "public StartMenu(){\n\t\tmenu.setTitle(\"COP4331 Spring '14 - Battle Ship!\");\n\t\t\n\t\t//startGame JButton will begin a new game\n\t\tstartEasyGame = new JButton(\"Start Easy Game\");\n\t\tstartEasyGame.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetSkill(0);\n\t\t\t\tplay = true;\n\t\t\t}\n\t\t});\n\t\t\n\t\tstartAdvancedGame = new JButton(\"Start Advanced Game\");\n\t\tstartAdvancedGame.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetSkill(1);\n\t\t\t\tplay = true;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\n\t\t//exitGame JButton will end the program\n\t\texitGame = new JButton(\"Exit Game\");\n\t\texitGame.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\tclose = true;\n\t\t\t}\n\t\t});\n\t\t\n\t\tmenu.add(startEasyGame);\n\t\tmenu.add(startAdvancedGame);\n\t\tmenu.add(exitGame);\t\t\n\t}", "public Menu(SistemaOperativo sist) {\n initComponents();\n this.so = sist;\n }", "private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }", "public Menu_Train() {\n initComponents();\n }", "public Menu() {\n initComponents();\n setSize(822, 539);\n setLocationRelativeTo(this);\n setVisible(true);\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }", "public MenuCriarArranhaCeus() {\n initComponents();\n }", "public Menu(){\n\t\tthis.player = null;\n\t\tthis.weapon = null;\n\t\tthis.power = null;\n\t\tthis.in = new Scanner(System.in);\n\t\tthis.bdd = new Driver();\n\t\tthis.savedIndex = 0;\n\n\t}", "public Menu(Game game) {\n this.game = game;\n }", "public MenuKullanimi()\n {\n initComponents();\n setLocationRelativeTo(null);\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Contabilidade m3= new Menu_Contabilidade();\r\n \r\n }", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "public myView() {\n initComponents();\n CreatMenu();\n }", "public Menu createViewMenu();", "public AbstractMenu(MenuLoader menuLoader) \r\n\t{}", "@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}", "public Menu(ChessGame game) {\n this.game = game;\n setBounds(0, ChessGame.MENU_Y, ChessGame.MENU_WIDTH, ChessGame.TOP_HUD_Y);\n setVisible(false);\n\n friendsListBtn = new TextButton(\"Friends List\", Assets.skin);\n friendsListBtnListener();\n chatRoomBtn = new TextButton(\"Chat Room\", Assets.skin);\n chatRoomBtnListener();\n leaderboardBtn = new TextButton(\"Leaderboards\", Assets.skin);\n leaderboardBtnListener();\n announcementBtn = new TextButton(\"Announcements\", Assets.skin);\n announcementBtnListener();\n currentGamesBtn = new TextButton(\"Current Games\", Assets.skin);\n currentGamesBtnListener();\n settingsBtn = new TextButton(\"Settings\", Assets.skin);\n settingsBtnListener();\n\n switch (ChessGame.SCREEN_STATE) {\n case CHESSBOARD:\n setupChessBoard();\n break;\n case CURRENTGAMES:\n setupCurrentGames();\n break;\n case CHATROOM:\n setupChatRoom();\n break;\n case FRIENDSLIST:\n setupFriendsList();\n break;\n case LEADERBOARD:\n setupLeaderBoards();\n break;\n case ANNOUNCEMENT:\n setupAnnouncements();\n break;\n case SETTINGS:\n setupSettings();\n break;\n default:\n break;\n }\n\n //setDebug(true);\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Empregados m1= new Menu_Empregados();\r\n \r\n }", "public MenuCreditos(Game world) {\n this.world=world;\n this.setVisible(true);\n teclas= new Sonido();\n onEnter();\n }", "public vistaMenu() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public SysMenu() {\n this(DSL.name(\"sys_menu\"), null);\n }", "public ModeloMenuBase() {\n\t\tinicializar();\n\t}", "private QuestMenu() {\n }", "public void branchMenu(int option){\n switch(option){\n case 1:\n System.out.println(\"Starting security view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SECURITY);\n break;\n case 2:\n System.out.println(\"Starting application view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.APPLICATION);\n break;\n case 3:\n System.out.println(\"Starting manager view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.MANAGER);\n break;\n case 4:\n System.out.println(\"Starting swipe view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SWIPE);\n break;\n case 5:\n System.out.println(\"Quitting application...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.QUIT);\n break;\n }\n }", "public void buildMenu() {\n\t\tthis.Menu = new uPanel(this.layer, 0, 0, (int) (this.getWidth() * 2), (int) (this.getHeight() * 3)) {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean handleEvent(uEvent event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick() {\r\n\t\t\t\tsuper.onClick();\r\n\t\t\t\tthis.space.sortLayer(this.layer);\r\n\t\t\t\tthis.castEvent(\"MENUPANEL_CLICK\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.screen.addPrehide(this.Menu);\r\n\r\n\t\tthis.Node.addChild(this.Menu.getNode());\r\n\r\n\t}", "public DropMainMenu() {\n initComponents();\n }", "public int create(Esysmeudef menu);", "public GameMenuView(){\r\n \r\n // super: calls the base class constructor\r\n super(\"\\n\" +\r\n \"********************************************\\n\" +\r\n \"* CITY OF AARON: GAME MENU *\\n\" + \r\n \"********************************************\\n\" +\r\n \"1 - View the map\\n\" +\r\n \"2 - View/Print a list\\n\" +\r\n \"3 - Move to a new location\\n\" +\r\n \"4 - Manage the crops\\n\" +\r\n \"5 - Return to the Main Menu\\n\",\r\n 5);\r\n }", "public MenuBar() {\r\n super();\r\n myTrue = false;\r\n }", "public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }", "public MainMenu() {\n initComponents();\n }", "public MainMenu() {\n initComponents();\n }", "public MainMenu() {\n initComponents();\n }", "public Menu(Board board, Game context) {\n \t\tcursorY = menuY + 75;\n \t\tstate = 1;\n \t\tselected = 2;\n \t\tselectedLevel = 1;\n \t\tlevel = 1;\n \t\tthis.board = board;\n \t\tthis.context = context;\n \t\tthis.playerName = \"\";\n \t\tspaceLevelImage = new ImageIcon(this.getClass().getResource(\n \t\t\t\tConfig.getImagePath() + \"Player.png\"));\n \t\tdeepseaLevelImage = new ImageIcon(this.getClass().getResource(\n \t\t\t\tConfig.getImagePath() + \"Submarine.png\"));\n \n \t}", "public MyMenu(Name alias) {\n this(alias, MY_MENU);\n }", "public Menu2() {\n initComponents();\n }", "public MenuPanel() {\n initComponents();\n }", "public Menu(String name) {\n// categoryIndex=categoryIterator;\n// categoryIterator++;\n categoryMenu = new ArrayList<>();\n this.name = name;\n }", "public void transactionMenu(){\n\t\tstate = ATM_State.TRANSACTION;\n\t\tgui.setDisplay(\"Transaction menu\\n\"\n\t\t\t\t+ \"1. Balance\\n\"\n\t\t\t\t+ \"2. Deposit\\n\"\n\t\t\t\t+ \"3. Withdraw\\n\"\n\t\t\t\t+ \"4. Log out\\n\"\n\t\t\t\t+ \"Enter choice: \");\n\t}", "private void constructMenuItems()\n\t{\n\t\tthis.saveImageMenuItem = ComponentGenerator.generateMenuItem(\"Save Image\", this, KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));\n\t\tthis.quitMenuItem = ComponentGenerator.generateMenuItem(\"Quit\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));\n\t\tthis.undoMenuItem = ComponentGenerator.generateMenuItem(\"Undo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK));\n\t\tthis.redoMenuItem = ComponentGenerator.generateMenuItem(\"Redo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK));\n\t\tthis.removeImageMenuItem = ComponentGenerator.generateMenuItem(\"Remove Image from Case\", this);\n\t\tthis.antiAliasMenuItem = ComponentGenerator.generateMenuItem(\"Apply Anti Aliasing\", this);\n\t\tthis.brightenMenuItem = ComponentGenerator.generateMenuItem(\"Brighten by 10%\", this);\n\t\tthis.darkenMenuItem = ComponentGenerator.generateMenuItem(\"Darken by 10%\", this);\n\t\tthis.grayscaleMenuItem = ComponentGenerator.generateMenuItem(\"Convert to Grayscale\", this);\n\t\tthis.resizeMenuItem = ComponentGenerator.generateMenuItem(\"Resize Image\", this);\n\t\tthis.cropMenuItem = ComponentGenerator.generateMenuItem(\"Crop Image\", this);\n\t\tthis.rotate90MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 90\\u00b0 Right\", this);\n\t\tthis.rotate180MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 180\\u00b0 Right\", this);\n\t\tthis.rotate270MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 270\\u00b0 Right\", this);\n\t}", "public Edit_Menu(MainPanel mp) {\r\n mainPanel = mp;\r\n setText(\"Засах\");\r\n// Uitem.setEnabled(false);//TODO : nemsen\r\n Ritem.setEnabled(false);//TODO : nemsen\r\n add(Uitem);\r\n add(Ritem);\r\n }", "public Principal() {\n initComponents();\n this.setLocationRelativeTo(null);\n inicio.setEnabled(false);\n this.setTitle(\"Menu Principal\");\n menuA=\"Inicio\";\n menuB=\"\";\n }", "public OptionsMenu() {\n initComponents();\n }", "public MenuPrincipal() {\n initComponents();\n \n }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "void Menu();", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "public Menu(String[] opcoes) {\n this.opcoes = Arrays.asList(opcoes);\n this.op = 0;\n }", "private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }", "private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }", "private StateActions(){}", "public static void main(String[] args){\n Menu iniciar_menu = new Menu();\r\n }", "public Menus( Main mainApp ) {\n this(); // call the default constructor, which must always be called first\n this.mainApp = mainApp; // save the reference to the Main application\n }", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "public Menu(String text) {\n this(text,null);\n }" ]
[ "0.7300128", "0.7101062", "0.70486677", "0.70260537", "0.6965184", "0.6957914", "0.69451237", "0.6938386", "0.6891256", "0.6861912", "0.6832112", "0.6830201", "0.6830201", "0.6818869", "0.67743003", "0.67706007", "0.67404354", "0.67057514", "0.67057514", "0.67057514", "0.6683317", "0.66812885", "0.6667916", "0.6624958", "0.6600598", "0.6587804", "0.65849334", "0.6572938", "0.6567065", "0.65670645", "0.6545477", "0.6537215", "0.65326303", "0.6521223", "0.64980686", "0.64967924", "0.6490248", "0.64554685", "0.6433827", "0.6431969", "0.64272237", "0.6423276", "0.6400382", "0.6398293", "0.63730335", "0.6361199", "0.6359506", "0.6354963", "0.63515973", "0.63333356", "0.6326225", "0.6324337", "0.63230765", "0.63097167", "0.6306426", "0.6302928", "0.6302727", "0.63027096", "0.6298247", "0.62941504", "0.62919307", "0.6287118", "0.6283859", "0.62790734", "0.627097", "0.6270836", "0.6267472", "0.6266893", "0.62630403", "0.6262417", "0.6260866", "0.62559414", "0.6255026", "0.6251221", "0.6240801", "0.6237275", "0.6237275", "0.6237275", "0.622858", "0.62273836", "0.62205434", "0.6219423", "0.61993897", "0.6179431", "0.6175544", "0.61725473", "0.61666983", "0.6166504", "0.6155927", "0.61508626", "0.61454576", "0.6142409", "0.61391366", "0.61390984", "0.6137812", "0.61293614", "0.61283773", "0.6125449", "0.6123768", "0.61185426" ]
0.6301552
58
Methode qui recupere les informations du clavier afin de naviguer le menu.
protected abstract void getInput();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public void readTheMenu();", "static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }", "@Override\r\n\tpublic void cargarSubMenuPersona() {\n\t\t\r\n\t}", "public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }", "@Override\n\tpublic List<MenuDto> menuInfo() {\n\t\tList<MenuDto> menuByParent = mapper.menuByParent(0);\n\t\treturn menuByParent;\n\t}", "private void goToMenu() {\n Intent intentProfile = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intentProfile);\n }", "IMenu getMainMenu();", "C getMenu();", "public void viewMenu() {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\tmm.clear();\n\n\t\t\tmm = (ArrayList<AlacarteMenu>) ois.readObject();\n\n\t\t\tString leftAlignFormat = \"| %-10s | %-37s | %-5s | %-12s | %n\";\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\n\t\t\t\n\t\t\tCollections.sort(mm); \n\t\t\tfor (AlacarteMenu item : mm) {\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tSystem.out.format(leftAlignFormat, item.getMenuName(), item.getMenuDesc(), item.getMenuPrice(),\n\t\t\t\t\t\titem.getMenuType());\n\t\t\t}\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t} catch (IOException e) {\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "protected abstract List<OpcionMenu> inicializarOpcionesMenu();", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "public void getMenuItems(){ \n\t\tParseUser user = ParseUser.getCurrentUser();\n\t\tmenu = user.getParseObject(\"menu\");\n\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"Item\");\n\t\tquery.whereEqualTo(\"menu\", menu);\n\n\t\tquery.findInBackground(new FindCallback<ParseObject>() {\n\t\t\tpublic void done(List<ParseObject> menuItems, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tlistMenuItems(menuItems);\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void displayMenu() {\n\t\tint option = MenuView.getMenuOption(\n\t\t\t\"Welcome \" + movieGoer.getName() + \"!\",\n\t\t\t\"View movie showtimes\",\n\t\t\t\"Book a ticket\",\n\t\t\t\"View movie details\",\n\t\t\t\"List top 5 movies\",\n\t\t\t\"View booking history\",\n\t\t\t\"Exit\"\n\t\t);\n\t\t\n\t\tswitch (option) {\n\t\t\tcase 1:\n\t\t\t\tNavigationController.load(new ShowTimeController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tNavigationController.load(new BookingController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tNavigationController.load(new MovieController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tNavigationController.load(new TopMoviesController());\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tNavigationController.load(new BookingHistoryController(movieGoer));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tNavigationController.goBack();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public Menu getMenu() { return this.menu; }", "private void searchMenu(){\n\t\t\n\t}", "Menu setMenuSectionsFromInfo(RestaurantFullInfo fullInfoOverride);", "private void getMenu() {\n compositeDisposable.add(mcApi.getMenu()\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Consumer<List<Category>>() {\n @Override\n public void accept(List<Category> categories) throws Exception {\n displayMenu(categories);\n }\n\n }));\n }", "private JMenuItem getItemComecar() {\r\n\t\tif (itemComecar == null) {\r\n\t\t\titemComecar = new JMenuItem(\"Iniciar Jogo\");\r\n\t\t}\r\n\t\treturn itemComecar;\r\n\t}", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public abstract void displayMenu();", "public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}", "public MenuCriarArranhaCeus() {\n initComponents();\n }", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "public void initMenu(){\n\t}", "public void mostrarMenuLectura(TomarLectura tomarLectura, Lectura lecturaActual);", "private static void mostrarMenu() {\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println(\"-----------OPCIONES-----------\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\n\\t1) Mostrar los procesos\");\n\t\tSystem.out.println(\"\\n\\t2) Parar un proceso\");\n\t\tSystem.out.println(\"\\n\\t3) Arrancar un proceso\");\n\t\tSystem.out.println(\"\\n\\t4) A�adir un proceso\");\n\t\tSystem.out.println(\"\\n\\t5) Terminar ejecucion\");\n\t\tSystem.out.println(\"\\n------------------------------\");\n\t}", "private void studenti(reusablemenu.sample.Student curent) {\n\t\t\r\n\t}", "MenuItem getMenuItemAbout();", "static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}", "@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}", "public void menu(){\n super.goToMenuScreen();\n }", "public String navigateMenuRolList() {\n Submenu selected = this.getSelected();\n if (selected != null) {\n SubmenuFacade ejbFacade = (SubmenuFacade) this.getFacade();\n List<MenuRol> selectedMenuRolList = ejbFacade.findMenuRolList(selected);\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"MenuRol_items\", selectedMenuRolList);\n }\n return this.mobilePageController.getMobilePagesPrefix() + \"/app/menuRol/index\";\n }", "public String getParentMenu();", "public void gotoMenu() {\n try {\n MenuClienteController menu = (MenuClienteController) replaceSceneContent(\"MenuCliente.fxml\");\n menu.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "String getMenuName();", "public static void main(String[] args){\n Menu iniciar_menu = new Menu();\r\n }", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "public static void main(String[] args) {\n \r\n MenuPrincipal iniciar=new MenuPrincipal();\r\n iniciar.mostrarMenu();\r\n \r\n \r\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }", "public abstract Menu mo2158c();", "public abstract int getMenu();", "private void afficheMenu() {\n\t\tSystem.out.println(\"------------------------------ Bien venu -----------------------------\");\n\t\tSystem.out.println(\"--------------------------- \"+this.getName()+\" ------------------------\\n\");\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(40);\n\t\t\tSystem.out.println(\"A- Afficher l'état de l'hôtel. \");\n\t\t\tThread.sleep(50);\n\t\t\tSystem.out.println(\"B- Afficher Le nombre de chambres réservées.\");\n\t\t\tThread.sleep(60);\n\t\t\tSystem.out.println(\"C- Afficher Le nombre de chambres libres.\");\n\t\t\tThread.sleep(70);\n\t\t\tSystem.out.println(\"D- Afficher Le numéro de la première chambre vide.\");\n\t\t\tThread.sleep(80);\n\t\t\tSystem.out.println(\"E- Afficher La numéro de la dernière chambre vide.\");\n\t\t\tThread.sleep(90);\n\t\t\tSystem.out.println(\"F- Reserver une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"G- Libérer une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"O- Voire toutes les options possibles?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"H- Aide?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"-------------------------------------------------------------------------\");\n\t\t}catch(Exception err) {\n\t\t\tSystem.out.println(\"Error d'affichage!\");\n\t\t}\n\t\n\t}", "public void menu3Method() {\n }", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "public void list_of_menu_items() {\n\t\tdriver.findElement(open_menu_link).click();\n\t}", "private void callSubMenu() {\n new SubMenu().display();\n }", "private static void returnMenu() {\n\t\t\r\n\t}", "public List<Menu> getMenu() {\n return mMenu;\n }", "@Override\n\tpublic void goToUiCobrador() {\n\t\tif(uiHomeCobrador!=null){\n\t\t\tuiHomeCobrador.getHeader().getLblTitulo().setText(constants.cobrador());\n\t\t\tuiHomeCobrador.getHeader().setVisibleBtnMenu(true);\n\t\t\tuiHomeCobrador.getContainer().showWidget(0);\n\t\t\t}\n\t}", "public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }", "@Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.parent) {\n Intent i = new Intent(Inhaltselement.this, Inhaltsuebersicht.class);\n i.putExtra(\"thisElement\", this.parentName);\n i.putExtra(\"elements\", this.elements);\n i.putExtra(\"category\", this.category);\n startActivity(i);\n } else if (id == R.id.prev) {\n Intent i = new Intent(Inhaltselement.this, Inhaltselement.class);\n if(this.position > 0) {\n i.putExtra(\"thisElement\", this.elements[this.position - 1]);\n i.putExtra(\"position\", this.position - 1);\n }\n else\n {\n i.putExtra(\"thisElement\", this.elements[this.elements.length - 1]);\n i.putExtra(\"position\", this.elements.length - 1);\n }\n i.putExtra(\"elements\", this.elements);\n i.putExtra(\"parentName\", this.parentName);\n i.putExtra(\"category\", this.category);\n startActivity(i);\n } else if (id == R.id.next) {\n Intent i = new Intent(Inhaltselement.this, Inhaltselement.class);\n if(this.position < this.elements.length - 1) {\n i.putExtra(\"thisElement\", this.elements[this.position + 1]);\n i.putExtra(\"position\", this.position + 1);\n }\n else\n {\n i.putExtra(\"thisElement\", this.elements[0]);\n i.putExtra(\"position\", 0);\n }\n i.putExtra(\"elements\", this.elements);\n i.putExtra(\"parentName\", this.parentName);\n i.putExtra(\"category\", this.category);\n startActivity(i);\n } else if (id == R.id.map) {\n Intent i = new Intent(Inhaltselement.this, Hauptfenster.class);\n startActivity(i);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(Gravity.START);\n return true;\n }", "public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public String getActivationMenu();", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "public MenuScene getMenu() { return menu; }", "public static int menu()\n {\n \n int choix;\n System.out.println(\"MENU PRINCIPAL\");\n System.out.println(\"--------------\");\n System.out.println(\"1. Operation sur les membres\");\n System.out.println(\"2. Operation sur les taches\");\n System.out.println(\"3. Assignation de tache\");\n System.out.println(\"4. Rechercher les taches assigne a un membre\");\n System.out.println(\"5. Rechercher les taches en fonction de leur status\");\n System.out.println(\"6. Afficher la liste des taches assignees\");\n System.out.println(\"7. Sortir\");\n System.out.println(\"--------------\");\n System.out.print(\"votre choix : \");\n choix = Keyboard.getEntier();\n System.out.println();\n return choix;\n }", "public void setup() {\n\n // configura il navigator in base alla MenuBar\n nav.configureFromMenubar(menuBar);\n\n // manda il navigatore alla prima view\n Collection<MenuBar.MenuItem> coll = mappaItem.values();\n MenuBar.MenuItem[] items = coll.toArray(new MenuBar.MenuItem[0]);\n if (items.length>0){\n MenuBar.MenuItem item = items[0];\n MenuCommand mcmd = (MenuCommand)item.getCommand();\n String addr = mcmd.getNavigatorAddress();\n nav.navigateTo(addr);\n }\n }", "public void menu2Method() {\n }", "static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}", "public int menu() {\n System.out.println(\"MENU PRINCIPAL\\n\"\n + \"1 - CADASTRO DE PRODUTOS\\n\"\n + \"2 - MOVIMENTAÇÃO\\n\"\n + \"3 - REAJUSTE DE PREÇOS\\n\"\n + \"4 - RELATÓRIOS\\n\"\n + \"0 - FINALIZAR\\n\");\n return getEscolhaMenu(); \n }", "public void MostrarListas (){\n Nodo recorrer=inicio; // esto sirve para que el elemento de la lista vaya recorriendo conforme se inserta un elemento\r\n System.out.println(); // esto nos sirve para dar espacio a la codificacion de la lista al imprimir \r\n while (recorrer!=null){ // esta secuencia iterativa nos sirve para repetir las opciones del menu\r\n System.out.print(\"[\" + recorrer.dato +\"]--->\");\r\n recorrer=recorrer.siguiente;\r\n }\r\n }", "public List<Categoria> getMenuPrincipal(){\n this.menuPrincipal = categoriaService.findAllMenu();\n System.out.println(\" ssss *********\"+menuPrincipal.toString());\n return menuPrincipal;\n }", "void clickAmFromMenu();", "public void goToMenu (View view)\n {\n Intent intentProfile = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intentProfile);\n }", "abstract void menu(User theUser);", "public void menuTipoActividad() {\n\t\tSystem.out.println(\"MENU TIPOS ACTIVIDAD\");\n\t\tSystem.out.println(\"1. LOW\");\n\t\tSystem.out.println(\"2. MEDIUM\");\n\t\tSystem.out.println(\"3. HIGH\");\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Contabilidade m3= new Menu_Contabilidade();\r\n \r\n }", "private void loadHomeclass(){\n // selecting appropriate nav menu item\n selectNavMenu();\n\n // set toolbar title\n setToolbarTitle();\n\n // if user select the current navigation menu again, don't do anything\n // just close the navigation drawer\n if (getClass().getSimpleName()==CURRENT_TAG) {\n\n drawerLayout.closeDrawers();\n\n return;\n }\n\n\n //Closing drawer on item click\n drawerLayout.closeDrawers();\n\n // refresh toolbar menu\n invalidateOptionsMenu();\n }", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "List<Menu> listarMenuPorUsuario(String nombre);", "protected void CriarEventos(){\n ListMenu.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String opcMenu = ((TextView) view).getText().toString();\n\n RedirecionaTela(opcMenu);\n }\n });\n }", "public void afficherInfo(String str1) {\n System.out.println(this.personnage);\n afficherMenuPerso();\n }", "public void menu4Method() {\n }", "public void barraprincipal(){\n setJMenuBar(barra);\n //Menu archivo\n archivo.add(\"Salir del Programa\").addActionListener(this);\n barra.add(archivo);\n //Menu tareas\n tareas.add(\"Registros Diarios\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Ver Catalogo de Cuentas\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Empleados\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Productos\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Generacion de Estados Financieros\").addActionListener(this);\n barra.add(tareas);\n //Menu Ayuda\n ayuda.add(\"Acerca de...\").addActionListener(this);\n ayuda.addSeparator();\n barra.add(ayuda);\n //Para ventana interna\n acciones.addItem(\"Registros Diarios\");\n acciones.addItem(\"Ver Catalogo de Cuentas\");\n acciones.addItem(\"Empleados\");\n acciones.addItem(\"Productos\");\n acciones.addItem(\"Generacion de Estados Financieros\");\n aceptar.addActionListener(this);\n salir.addActionListener(this);\n }", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}", "String getMenus(MmtConfig cfg);", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Empregados m1= new Menu_Empregados();\r\n \r\n }", "private static void menuCategoria() throws Exception {//Inicio menuCategoria\r\n byte opcao;\r\n boolean encerrarPrograma = false;\r\n Integer[] listaC = null;\r\n do {\r\n System.out.println(\r\n \"\\n\\t*** MENU DE CATEGORIAS ***\\n\"\r\n + \"0 - Adicionar categoria\\n\"\r\n + \"1 - Remover categoria\\n\"\r\n + \"2 - Listar categorias cadastradas\\n\"\r\n + \"3 - Listar produtos cadastrados em uma categoria\\n\"\r\n + \"4 - Sair\"\r\n );\r\n System.out.print(\"Digite a opção: \");\r\n opcao = read.nextByte();\r\n System.out.println();\r\n switch (opcao) {\r\n case 0:\r\n adicionarCategoria();\r\n break;\r\n case 1:\r\n removerCategoria();\r\n break;\r\n case 2:\r\n listaC = listaCategoriasCadastradas();\r\n if (listaC == null) {\r\n System.out.println(\"Não ha categorias cadastradas!\");\r\n }\r\n break;\r\n case 3:\r\n consultaCategoria();\r\n break;\r\n case 4:\r\n encerrarPrograma = true;\r\n break;\r\n default:\r\n System.out.println(\"Opcao invalida!\\n\");\r\n Thread.sleep(1000);\r\n break;\r\n }\r\n } while (!encerrarPrograma);\r\n }", "public MenuInfo() {\n initComponents();\n setSize(1024,768);\n }", "public void menuClicked(MenuItem menuItemSelected);", "public JMenuItem getNegrita() {return negrita;}", "public abstract Tree extractMenuBarItems (Object obj) throws SAFSException;", "private void showFullMenu() {\n final Menu[] menu = MenuFactory.showMenu();\n System.out.println(\"Food_Id\" + \"\\t\" + \"Food_Name\" + \"\\t\" + \"Price\" + \"\\t\" + \"Prepration_Time\");\n for (final Menu m : menu) {\n System.out.println(m.getFoodId() + \"\\t\" + m.getFoodName() + \"\\t\" + m.getPrice() + \"\\t\" + m.getPreprationTime());\n }\n }", "@Override\n public String[] displayMenu() {\n\n PersonalMatchDAO personalMatchDAO = new PersonalMatchDAO();\n personalMatchDAO.listAllPersonalMatches();\n\n String[] str = {selection};\n return str;\n\n }", "public SIPCommMenu getMenu()\n {\n return menu;\n }", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "protected abstract void addMenuOptions();", "public void populateMenuFields(){\n\t\t\t\n\t\t\tif (restaurant.getMenu().getItems().size()!=0)\n\t\t\t{\n\t\t\t\tfor(int i=0;i<restaurant.getMenu().getItems().size();i++)\n\t\t\t\t{\n\t\t\t\t\tlistOfItemNames.add(restaurant.getMenu().getItemAt(i).getItemName());\n\t\t\t\t\tlistOfDescription.add(restaurant.getMenu().getItemAt(i).getItemDescription());\n\t\t\t\t\tlistOfPrice.add(restaurant.getMenu().getItemAt(i).getItemPrice()+\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}", "private void initRootMenuCustomers() {\n\t\tthis.menuBar = new MenuBar();\n\n\t\t// create entries for the menu bar\n\t\tMenu menuFile = new Menu(\"Datei\");\n\t\tMenu menuEdit = new Menu(\"Bearbeiten\");\n\t\tMenu menuCreate = new Menu(\"Erstellen\");\n\t\tMenu menuHelp = new Menu(\"Hilfe\");\n\n\t\t// create entries for menuFile\n\t\t// TODO: setOnAction handling\n\t\tMenuItem save = new MenuItem(\"Kundendatei in Datei speichern\");\n\t\tMenuItem saveas = new MenuItem(\"Kundendatei Speichern unter...\");\n\t\tMenuItem load = new MenuItem(\"Kundendatei Laden...\");\n\t\tMenuItem exit = new MenuItem(\"Beenden\");\n\t\texit.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tmenuFile.getItems().addAll(save, saveas, load, new SeparatorMenuItem(), exit);\n\n\t\t// TODO: setOnAction handling\n\t\tMenuItem newCustomer = new MenuItem(\"Neuen Kunden anlegen\");\n\t\tnewCustomer.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tshowNewCustomerView(false, null);\n\t\t\t}\n\t\t});\n\n\t\t// TODO: Implement this\n\t\tMenuItem edit = new MenuItem(\"Kundendaten bearbeiten\");\n\t\tedit.setOnAction(new EventHandler<ActionEvent>(){\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t){\n\t\t\t\tif (overviewCtrl.getActCustomer() != null){\n\t\t\t\t\tshowNewCustomerView(true, overviewCtrl.getActCustomer());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tMenuItem delete = new MenuItem(\"Kundendaten löschen\");\n\t\tdelete.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tif (overviewCtrl.getActCustomer() != null) {\n\t\t\t\t\tdeleteCustomer(overviewCtrl.getActCustomer());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmenuEdit.getItems().addAll(newCustomer, edit, delete);\n\n\t\t// create entries for menuCreate\n\t\t// TODO: setOnAction handling\n\t\tMenuItem invoice = new MenuItem(\"Rechnung\");\n\t\tinvoice.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent t) {\n\t\t\t\tif (GUIMain.this.overviewCtrl.getActCustomer() == null) {\n\t\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\t\talert.setTitle(\"Fehler\");\n\t\t\t\t\talert.setHeaderText(\"Kein Kunde gewählt\");\n\t\t\t\t\talert.setContentText(\"Bitte wählen sie vor dem Erstellen einer Rechnung einen Kunden aus, \"\n\t\t\t\t\t\t\t+ \"an welchen die Rechnung gestellt werden soll.\");\n\t\t\t\t\talert.showAndWait();\n\t\t\t\t} else {\n\t\t\t\t\tshowNewInvoiceView();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// TODO: Implement this\n\t\tMenuItem offer = new MenuItem(\"Angebot\");\n\n\t\t// TODO: Implement this\n\t\tMenuItem reminder = new MenuItem(\"Zahlungserinnerung\");\n\n\t\tmenuCreate.getItems().addAll(invoice, offer, reminder);\n\n\t\t// create entries for menuHelp\n\t\t// TODO: setOnAction handling\n\t\tMenuItem help = new MenuItem(\"Hilfe\");\n\t\tMenuItem about = new MenuItem(\"Über\");\n\t\tmenuHelp.getItems().addAll(help, about);\n\n\t\tmenuBar.getMenus().addAll(menuFile, menuEdit, menuCreate, menuHelp);\n\n\t\tthis.root.setTop(menuBar);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch(id){\n case R.id.dates:\n getdatemenu();\n break;\n case R.id.keys:\n getkeymenu();\n break;\n case R.id.list:\n getlistmenu();\n case android.R.id.home:\n Intent goHome = new Intent(this,MainActivity.class);\n boolean foundHome = navigateUpTo(goHome);\n\n\n }\n\n\n\n return true;\n }", "public void navigation() {\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detail_class_list, menu);\n\n return true;\n }", "public Menu() {\r\n \r\n ingresaVehiculo (); \r\n }", "public static void architectUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the architects\");\n System.out.println(\"2 - Would you like to search for a architect's information\");\n System.out.println(\"3 - Adding a new architect's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }" ]
[ "0.6846597", "0.6801745", "0.67175317", "0.66409636", "0.649565", "0.6484766", "0.6411993", "0.6386585", "0.63536453", "0.6321463", "0.62885845", "0.6280275", "0.627855", "0.6263354", "0.6250356", "0.6224022", "0.6213687", "0.61694926", "0.61594516", "0.61368656", "0.61316085", "0.61202", "0.61003965", "0.6093216", "0.60874754", "0.60868555", "0.6086172", "0.6075256", "0.6069449", "0.60672104", "0.60630083", "0.6055621", "0.60406953", "0.6025459", "0.6021577", "0.6017141", "0.6010457", "0.5987302", "0.59715563", "0.59714335", "0.59529173", "0.59387934", "0.59257853", "0.59192437", "0.59145546", "0.58959204", "0.5886541", "0.5879289", "0.5869045", "0.5858436", "0.58533734", "0.5853119", "0.5849104", "0.5845077", "0.58425695", "0.5837739", "0.5836023", "0.58243966", "0.58136386", "0.58124685", "0.5811614", "0.58088547", "0.5805715", "0.58023894", "0.580181", "0.57997125", "0.57929933", "0.5787613", "0.5785101", "0.5784537", "0.57752055", "0.57740045", "0.57725036", "0.5765989", "0.5762706", "0.57525724", "0.57489055", "0.5744586", "0.57441956", "0.57435167", "0.5739361", "0.5738436", "0.57369775", "0.57337743", "0.57323074", "0.5732155", "0.5730667", "0.57295674", "0.57265097", "0.5725346", "0.57209486", "0.5716541", "0.5716196", "0.57123655", "0.57114303", "0.5709799", "0.5706326", "0.5698554", "0.5689498", "0.5688408", "0.5678017" ]
0.0
-1
Not sure how to do this now..
protected int getFilePriority(File file) { return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void method_4270() {}", "private void poetries() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "private void strin() {\n\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void identify() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "protected abstract Set method_1559();", "public void smell() {\n\t\t\n\t}", "private stendhal() {\n\t}", "private void m50366E() {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void skystonePos4() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public int describeContents() { return 0; }", "@Override\n public void preprocess() {\n }", "private void init() {\n\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "public abstract void mo56925d();", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "StackManipulation cached();", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "public abstract void mo70713b();", "protected void mo6255a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "private void level7() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n public void preprocess() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void skystonePos6() {\n }", "@Override\r\n\tprotected void processInit() {\n\r\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo6549b();", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public abstract void mo27385c();", "public void aff() {\n\t\t\n\t}", "public abstract void mo27386d();", "private void initialize() {\n\t\t\n\t}", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "public abstract String mo41079d();", "@Override\n public void apply() {\n }", "private void assignment() {\n\n\t\t\t}", "public abstract Object mo26777y();", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n protected void initialize() {\n }" ]
[ "0.54202545", "0.5337336", "0.5275917", "0.52639234", "0.52639127", "0.5260837", "0.5211833", "0.51774484", "0.51620173", "0.51579046", "0.5125278", "0.50051135", "0.50020003", "0.4989285", "0.49776557", "0.49760443", "0.4974508", "0.49584103", "0.49509966", "0.49454418", "0.49297816", "0.4923876", "0.4912447", "0.48747176", "0.48730502", "0.486476", "0.48540053", "0.483104", "0.48247665", "0.48173222", "0.48173222", "0.4814631", "0.4812997", "0.47993207", "0.4791107", "0.4789021", "0.4789021", "0.47881803", "0.4786292", "0.47744742", "0.47695655", "0.4763451", "0.47623068", "0.47609526", "0.4760593", "0.4760176", "0.47540957", "0.47540957", "0.47540957", "0.47540957", "0.47540957", "0.47520345", "0.47500983", "0.4746961", "0.47439113", "0.4738942", "0.47355407", "0.47273177", "0.4720562", "0.47114247", "0.47096214", "0.470936", "0.4700922", "0.46929985", "0.468562", "0.46828207", "0.46828207", "0.46828207", "0.46775332", "0.46751934", "0.46744752", "0.4671444", "0.4671444", "0.4671444", "0.46663797", "0.46663687", "0.4666173", "0.46658304", "0.46646398", "0.4664396", "0.46597454", "0.46591944", "0.4652092", "0.4652092", "0.46497032", "0.4647086", "0.4646842", "0.46436653", "0.46365857", "0.4633257", "0.46325323", "0.46322092", "0.46308258", "0.46291217", "0.4627078", "0.46251196", "0.46239585", "0.4621256", "0.4615667", "0.46153754", "0.46119067" ]
0.0
-1
private static final int temp = 910;
public GripperController() { super(GRIPPER, (min + max)/2, min, max); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTemp(){\n return temp;\n }", "public void temp();", "static int getInt(){\n return j;\n }", "public Integer getDefaultTemp() {\n return defaultTemp;\n }", "public static int nextInt() {\n\treturn 0;\r\n}", "public void setTemporaryMoney(Integer temporaryMoney) {\r\n this.temporaryMoney = temporaryMoney;\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tInteger x = Integer.valueOf(20);\r\n\t\tint temp = x.intValue();\r\n\t\ttemp++;\r\n\t\tx = Integer.valueOf(temp);\r\n\t\t\r\n\t\tSystem.out.println(x);\r\n\t\t\r\n\t\tprint(true);\r\n\t\t\r\n\t\tList<Integer> list = new ArrayList<>();\r\n\t\tlist.add(1);\r\n\t\tlist.add(2);\r\n\t\tlist.add(3);\r\n\t\t\r\n\t\tfor (int j : list) {\r\n\t\t\tSystem.out.println(j);\r\n\t\t}\r\n\t\t\r\n\t\tInteger abc = Integer.valueOf(50);\r\n\t\tint cba = abc;\r\n\t\tSystem.out.println(cba);\r\n\t\t\r\n\t\tInteger w = null;\r\n\t\tint w2 = w;\r\n\t\t\r\n\t}", "public int getInitialValue()\n {\n return _init;\n }", "static void m1(int a){\n\t\ta=Static11.a;\nSystem.out.println(a);\n\t}", "public final int zzj() {\n return this.zzab % 32;\n }", "private void tempVariableExample() {\r\n\tfor(int i =0; i < age; i++)\r\n\t{\r\n\t\t//print i\r\n\t}\r\n\r\n\r\n}", "public ArrayList<Integer> getTemp() { return temp; }", "private static int testOne(){\n var var = 10;\n return var;\n }", "private final int initializeInt() {\n\t\treturn 0;\r\n\t}", "public intHolder(int number)\n {\n storageInt=number;\n \n }", "protected abstract int getInitialValue();", "public int R(){\r\n return R;\r\n }", "private static int get() { \r\n Random r = new Random();\r\n return (r.nextInt(9));\r\n }", "public int getInitialValue() {\n return initialValue;\n }", "public int getInitialValue() {\n return initialValue;\n }", "public void setTemp(int temp) {\n \tthis.temperature = temp;\n }", "public static String generaTemp(){\n return \"t$\"+temp++;\n }", "public static String generaTemp(){\n return \"t$\"+temp++;\n }", "public static String generaTemp(){\n return \"t$\"+temp++;\n }", "public static String generaTemp(){\n return \"t$\"+temp++;\n }", "public int getTempLvl()\n {\n return tempLvl;\n }", "static int test()\n\t{\n\n\t\treturn 20;\n\t}", "private static int runStateOf(int c) { return c & ~CAPACITY; }", "public MutableInt() {}", "public void mo32111rr(int i) {\n }", "private int choose(){\n\t\tdouble temp = 10 * Math.random();\n\t\tint i = (int)temp;\n\t\treturn i;\n\t}", "void doStuff() {\n\t\tfinal int y = 20; \n\t\t\n\t}", "public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }", "public void foo() {\n\tint j;\n\tint jj = 0;\n\t// System.out.println(i); Will not compile; local variables must be initialized\n\tSystem.out.println(jj);\n }", "public int nonStatic( int x ) {\n return x * 3;\n }", "private final int[] initializeInstanceVariable() {\n\t\tint n = 10;\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {temp[i] = i;}\n\t\treturn temp;\n\t}", "public int getTempCoolDown() {\n return tempCoolDown;\n }", "IntConstant createIntConstant();", "static void checkPrime(){\n\t\tint n1=78;\r\n\t}", "public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }", "public int getNotaFinal()\r\n {\n return 4;\r\n }", "public int getNotaFinal()\r\n {\n return 4;\r\n }", "public Temp(T obj) {\t// Integer obj\r\n\t\tthis.obj = obj;\r\n\t}", "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "protected final int computeSlot(int paramInt)\n/* */ {\n/* 149 */ return (paramInt * 517 & 0x7FFFFFFF) % this.m_flagTable.length;\n/* */ }", "static void dosomething(Integer i) {\n i = 500;\n }", "public int getThirdR() {\n/* 66 */ return this.thirdR;\n/* */ }", "private int m4019b() {\n Integer num = this.f4077a.get();\n if (num == null) {\n num = 0;\n }\n int intValue = num.intValue() - 1;\n if (intValue == 0) {\n this.f4077a.remove();\n } else {\n this.f4077a.set(Integer.valueOf(intValue));\n }\n return intValue;\n }", "public static void test(int j) {\n\t\tj = 33;\n\t}", "Int(int v){\n val = v;\n }", "private FinalIntegerNode() { }", "protected void assignCurrentValue() {\n\t\tcurrentValue = new Integer(counter + incrValue);\n\t}", "int getI10();", "public int getInitialValue() {\r\n\t\treturn initialValue;\r\n\t}", "private int getMY() {\n\t\treturn 0;\r\n\t}", "public abstract int mo12578RR(int i);", "void mo107677b(Integer num);", "public int get_int() {\n return local_int;\n }", "int getTempo();", "public static int getCounter() {return counter;}", "public double getTemp(){\n return currentTemp;\n }", "public Constant (int value){\r\n this.value = value;\r\n\r\n }", "public static void main(String[] args) {\n int i=12;\n i=i++;\n System.out.println(i);\n }", "private static String localUnique(){\n\t\tfinal long counterValue = instanceCounter.getAndIncrement();\n\t\tString unique = uniqueTop + String.format(\"%08d\", counterValue);\n\t\treturn unique;\t\t\n\t}", "public Integer getTemporaryMoney() {\r\n return temporaryMoney;\r\n }", "public int mo1534c() {\n return 2;\n }", "private\tNum(int num) { value = num; }", "public int j() {\n \treturn j; \n }", "public static int randomGet() { return 0; }", "@Override\n public Integer reduceInit() { return 0; }", "protected Int() {}", "public static void main(String[] args) {\n\t\tfinal int number = 10;\n\t\t//number = 100; // Err. Modification not allowed on final container. It becomes constant or Read Only !!\n\t}", "public TestMe()\r\n/* 11: */ {\r\n/* 12:10 */ this.myNumber = (instanceCounter++);\r\n/* 13: */ }", "@Override\r\n public int getTemperature(){\r\n return 10;\r\n }", "public abstract int mo12576RP(int i);", "public IntHolder() {\r\n\t}", "public void test(String c){\n\t\tc = (Integer.parseInt(c) + 1) + \"\";//按理说修改了c的引用了啊\n\t}", "private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}", "public static void main(String[] args) {\n int a = 123;\r\n int b = 526;\r\n\r\n System.out.println(a);\r\n System.out.println(b);\r\n\r\n int temp;\r\n temp = a;\r\n a = b;\r\n b = temp;\r\n\r\n System.out.println(a);\r\n System.out.println(b);\r\n\r\n // other solution from howotodoinjava.com\r\n int x = 100;\r\n int y = 200;\r\n System.out.println(\"x original: \" + x);\r\n System.out.println(\"y original: \" + y);\r\n\r\n x = x + y;\r\n y = x - y;\r\n x = x - y;\r\n\r\n System.out.println(\"x = \" + x + \" and y = \" + y);\r\n }", "void m15858a(int i);", "public static void main(String[] args) {\nprivate final int d=20; // illegal modifier ( inside {} block private can't use\nfinal int f=20;\nprivate int g=30;\n\t}", "public abstract int mo12574RN(int i);", "public void setDefaultTemp(Integer defaultTemp) {\n this.defaultTemp = defaultTemp;\n }", "public abstract int mo12580RT(int i);", "static void opration(){ \n System.out.println(\"Final veriable value l:\"+l+\"\\nj:\"+j);\n // l=l+2; erorr it can't change it's value\n \n }", "StaticVariable(){\n count++;//incrementing the value of static variable\n System.out.println(count);\n }", "public void setMinTemp(@NonNull Integer minTemp) {\n this.minTemp = minTemp;\n }", "public abstract int finalN();", "public int getSort() {\n/* 350 */ return this.value >>> 24;\n/* */ }", "public T(int val) {\n this.val = val;\n }", "int method20()\n {\n return 579190;\n }", "int recuperar(int c);", "public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }", "public int n(){\n return n;\n }", "public int getConstant() {\n\t\treturn magicConstant;\n\t}", "public abstract int mo12572RL(int i);", "public int getValue()\r\n/* 21: */ {\r\n/* 22: 71 */ return this.value;\r\n/* 23: */ }", "@NonNull\n public Integer getMinTemp() {\n return minTemp;\n }", "public int currentTemporaryScopeDepth(){\n if(temporaryConstants == null) return 0;\n return temporaryConstants.size();\n }", "public IntHolder( final int value ) {\r\n\t\tthis.value = value;\r\n\t}", "Integer getReuse();" ]
[ "0.66296923", "0.59109235", "0.5855411", "0.553395", "0.54596037", "0.53802705", "0.5377171", "0.53363067", "0.5322076", "0.5316216", "0.5304424", "0.5288356", "0.52847683", "0.52788246", "0.5256005", "0.51964116", "0.5195076", "0.51884747", "0.518806", "0.518806", "0.518677", "0.5178666", "0.5178666", "0.5178666", "0.5178666", "0.51511633", "0.51479656", "0.5134656", "0.5131981", "0.5117446", "0.5113538", "0.5108439", "0.5097055", "0.5078303", "0.50327265", "0.503079", "0.50257903", "0.5021402", "0.50010973", "0.49934864", "0.4989855", "0.4989855", "0.49857852", "0.49645177", "0.4957915", "0.4956402", "0.49477482", "0.4946343", "0.4945779", "0.49428764", "0.49392742", "0.4931609", "0.49307978", "0.49277195", "0.492635", "0.4919482", "0.4897798", "0.48848325", "0.48847294", "0.48778486", "0.48758802", "0.48751187", "0.4871869", "0.4871592", "0.4856923", "0.48567668", "0.4853853", "0.48503727", "0.48489517", "0.4844597", "0.48383865", "0.48382095", "0.48346066", "0.48272675", "0.4826923", "0.48185006", "0.48169336", "0.48084265", "0.48054868", "0.48009294", "0.47921595", "0.4788901", "0.47882366", "0.47877276", "0.47868153", "0.47728416", "0.47694203", "0.47624502", "0.47562888", "0.47523773", "0.47462213", "0.47458136", "0.4742566", "0.47423694", "0.47402027", "0.4737856", "0.47355598", "0.47334716", "0.47293755", "0.47290158", "0.4728828" ]
0.0
-1
note: 500 is closed, but below that clamps harder angle: "single" angle (full opening of gripper is 2x single)
public int calculatePWMfromAngle(double angle) { return (int) restrict((angle + 1.04)/.00180, min, max); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AngleSmaller createAngleSmaller();", "boolean needToAim(double angle);", "private int getAttackAngle() {\n\t\treturn (160 - (level * 10));\n\t}", "public void goToAngle(){\n currentAngle = getAverageVoltage2(); \r\n if (Math.abs(elevationTarget - currentAngle) <= .1){//TODO: check angle\r\n off();\r\n // System.out.println(\"off\");\r\n } else if (elevationTarget > currentAngle && elevationTarget < maxLimit){\r\n raise();\r\n //System.out.println(\"raise\");\r\n } else if (elevationTarget < currentAngle && elevationTarget > minLimit){\r\n //System.out.println(\"lower\");\r\n } \r\n \r\n }", "@Override\n public void reAngle() {\n }", "public abstract void steer(double angle);", "private int DirectionCalculation(int angle)\r\n\t{\t\r\n\t\treturn (int) ((angle/14.28)+1); //Angle divided by (100/(parts-1)) = 1-8\r\n\t}", "AngleResource inclination();", "@org.junit.Test\n public void testTicksForDesiredAngle90From540() {\n int resultsTicks = SwerveDriveMath.ticksForDesiredAngle(testConfig,540, 90);\n\n // Shortest path is to go left 90 (360 + 90 = 460)\n assertEquals(450, resultsTicks);\n }", "double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }", "double getCalibratedLevelAngle();", "double getAngle();", "double getAngle();", "AngleGreater createAngleGreater();", "public void setAngle( double a ) { angle = a; }", "public double getAngle();", "public double getAngle() { return angle; }", "public int getOpeningAngle()\n {\n return this.openingAngle;\n }", "public void getOpeningAngle(int openingAngle)\n {\n this.openingAngle = openingAngle;\n }", "public void rotateToAngle(int newAngle) {\n\t\tint diff = newAngle - getAngle();\n\t\tint diff1=Math.abs(diff-360);\n\t\tif (newAngle == getAngle()) {\n\t\t\tstopMotors();\n\t\t\treturn;\n\t\t}\n\t\twhile (Math.abs(getAngle() - newAngle) > 3&&opModeIsActive()) {\n\t\t\ttelemetry.addData(\"newangle\", newAngle);\n\t\t\ttelemetry.addData(\"getangle()\", getAngle());\n\t\t\ttelemetry.update();\n\t\t\tdiff = newAngle - getAngle();\n\t\t\tdiff1=Math.abs(getAngle() - newAngle);\n\t\t\tif ((diff > 0 && diff < 180) || (diff < 0 && Math.abs(diff) > 180)) {\n\n\t\t\t\tif(Math.abs(diff1)<13)\n\t\t\t\t\trotate(-0.06);\n\t\t\t\telse if(Math.abs(diff1)<50)\n\t\t\t\t\trotate(-0.1);\n\t\t\t\telse if(Math.abs(diff1)<160)\n\t\t\t\t\trotate(-0.5);\n\t\t\t\telse\n\t\t\t\t\trotate(-(0.00928571*Math.abs(diff1))+0.128571);\n\t\t\t} else {\n\n\t\t\t\tif(Math.abs(diff1)<13)\n\t\t\t\t\trotate(0.06);\n\t\t\t\telse if(Math.abs(diff1)<50)\n\t\t\t\t\trotate(0.1);\n\t\t\t\telse if(Math.abs(diff1)<160)\n\t\t\t\t\trotate(0.5);\n\t\t\t\telse\n\t\t\t\t\trotate((0.00928571*Math.abs(diff1))+0.128571);\n\t\t\t}\n\n\t\t}\n\t\tstopMotors();\n\n\t}", "public double getAngleToTarget(){\n return 0d;\n }", "float getWindingConnectionAngle();", "public static double conicalAngle(double angle) \r\n {\r\n return (angle < 0.0 ? 2.0 * Math.PI + angle % (2.0 * Math.PI) : angle) % (2.0 * Math.PI);\r\n }", "private static double fixNegativeAngle(double angle) {\n\t\tif (angle < 0) {\n\t\t\tangle += 2 * Math.PI;\n\t\t}\n\n\t\treturn angle;\n\t}", "private double degToRadian(double angle)\n\t{\n\t\treturn angle/180*Math.PI;\n\t}", "@Test\r\n public void testCalculateAngle5() {\r\n System.out.println(\"calculateAngle5\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(50);\r\n double expResult = Math.toRadians(90);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "Angle createAngle();", "private boolean checkAngle() {\n\t\tint bornes = FILTER_BORNES;\n\t\treturn checkAngleBornes(angle, 0d, bornes) || checkAngleBornes(angle, 90d, bornes) || checkAngleBornes(angle, 180d, bornes);\n\t}", "public double getStartAngle();", "void resetAngle();", "public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }", "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "public void updateAngle(){\n\t\tif (turnUp && (angle < 180) ){\n\t\t\tangle+=1;\n\t\t}\n\t\tif (turnDown && (angle > 0)){\n\t\t\tangle-=1;\n\t\t}\n\t}", "public double smallerAngle(Point point) {\n \tVector vectorToPoint = vectorTo(point);\n \tdouble angleToBall = facingVector.angleDegrees(vectorToPoint);\n \tdouble unsignedAngle = Math.abs(angleToBall);\n \tdouble angleSign = Math.signum(angleToBall);\n \tif (unsignedAngle > 90) {\n \t\t// becomes -60 if it was 120\n \t\t// and 60 if it was -120\n \t\tangleToBall = -angleSign * (180 - unsignedAngle);\n \t}\n \treturn angleToBall;\n }", "public double calculateDegToRetreat() {\r\n\t\tdouble newDeg = (degToAttack + 180) % 360;\r\n\t\tSystem.out.println(newDeg);\r\n\t\treturn newDeg;\r\n\t}", "public double nextAngle()\n {\n return nextAngle();\n }", "@Test\r\n public void testCalculateAngle2() {\r\n System.out.println(\"calculateAngle2\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(0);\r\n double expResult = Math.toRadians(180);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "void setAngle(double angle);", "private double AdjustDegree(double value)\n\t{\n\t\tif(value > 360.0)\n\t\t{\n\t\t\twhile (value > 360.0)\n\t\t\t{\n\t\t\t\tvalue -= 360.0;\n\t\t\t}\n\t\t}\n\t\tif(value < 0.0)\n\t\t{\n\t\t\twhile (value < 0.0)\n\t\t\t{\n\t\t\t\tvalue += 360.0;\n\t\t\t}\n\t\t}\n\t\treturn value;\n\t}", "@Test\r\n public void testCalculateAngle1() {\r\n System.out.println(\"calculateAngle1\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(36);\r\n double expResult = Math.toRadians(115.2);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public void lowerBed(int angle) {\n truckBed.lowerRamp(angle);\n }", "@Test\r\n public void testCalculateAngle4() {\r\n System.out.println(\"calculateAngle4\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(90);\r\n double expResult = Math.toRadians(18);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public double findAngle() {\n return 0d;\n }", "void decreaseAngle() {\n this.strokeAngle -= 3;\n this.updateAcc();\n this.updateStick();\n }", "private int getBearing() {\n\t\treturn 0;\r\n\t}", "public int getAngle() {\r\n return angle;\r\n }", "public AccelerometerTurn(double angle) {\n\tthis(angle, 0.7);\n }", "private double getRawAngle() {\n return (m_pot.getVoltage() / Constants.AIO_MAX_VOLTAGE) * Constants.Hood.POT_SCALE;\n }", "public Flatbed(int angle){\r\n this.angle=angle;\r\n }", "@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }", "public void setAngle(float angle){\n\n\t}", "public void angleTurn(float angle, int timeout){\n\t\tcalculateAngles();\n\n\t\t// Get the current program time and starting encoder position before we start our drive loop\n\t\tfloat StartTime = data.time.currentTime();\n\t\tfloat StartPosition = data.drive.leftDrive.getCurrentPosition();\n\n\t\t// Reset our Integral and Derivative data.\n\t\tdata.PID.integralData.clear();\n\t\tdata.PID.derivativeData.clear();\n\n\n\t\t// Manually calculate our first target\n\t\tdata.PID.target = (calculateAngles() + (data.PID.IMURotations * 360)) + angle;\n\n\t\t// We need to keep track of how much time passes between a loop.\n\t\tfloat LoopTime = data.time.currentTime();\n\n\t\t// This is the main loop of our straight drive.\n\t\t// We use encoders to form a loop that corrects rotation until we reach our target.\n\t\twhile(StartTime + timeout > data.time.currentTime()){\n\n\t\t\t// Record the time since the previous loop.\n\t\t\tLoopTime = data.time.timeFrom(LoopTime);\n\t\t\t// Calculate our angles. This method may modify the input Rotations.\n\t\t\t//IMURotations =\n\t\t\tcalculateAngles();\n\t\t\t// Calculate our PID\n\t\t\tcalculatePID(LoopTime);\n\n\t\t\t// Calculate the Direction to travel to correct any rotational errors.\n\t\t\tfloat Direction = ((data.PID.I * data.PID.ITuning) / 2000) + ((data.PID.P * data.PID.PTuning) / 2000) + ((data.PID.D * data.PID.DTuning) / 2000);;\n\n\t\t\tif(Math.abs(Direction) <= 0.03f) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdata.drive.rightDrive.setPower(data.drive.POWER_CONSTANT - (Direction));\n\t\t\tdata.drive.leftDrive.setPower(data.drive.POWER_CONSTANT + (Direction));\n\t\t}\n\t\t// Our drive loop has completed! Stop the motors.\n\t\tdata.drive.rightDrive.setPower(0);\n\t\tdata.drive.leftDrive.setPower(0);\n\t}", "public void bounce() {\n angle = -angle;\n }", "public void setPerihelionAngle(double value) {\n this.perihelionAngle = value;\n }", "void increaseAngle() {\n this.strokeAngle += 3;\n this.updateAcc();\n this.updateStick();\n }", "public int getCurrentAngle(){\n return flatbed.currentAngle;\n }", "@org.junit.Test\n public void testTicksForDesiredAngle90From0() {\n int resultsTicks = SwerveDriveMath.ticksForDesiredAngle(testConfig,0, 90);\n assertEquals(90, resultsTicks);\n }", "public void rotateTo(double angle) {\n\t\t\n\t\tangleCache = angle;\n\t\tupdateGyro();\n\t\t\n\t\t//int goTo = angleCache; //lazy programming at its finest lmao //okay yeah no I'm fixing this\n\t\t//clockwise degrees to goTo angle\n\t\tdouble ccw = (angleCache - angleToForward < 0) ? (angleCache - angleToForward + 360) : (angleCache - angleToForward);\n\t\t\n\t\t//counter-clockwise degrees to goTo angle\n\t\tdouble cw = (angleToForward - angleCache < 0) ? (angleToForward - angleCache + 360) : (angleToForward - angleCache);\n\t\t\n\t\t//rotates the fastest way until within +- 5 of goTo angle\n\t\t\n\t\tif (angleCache >= angleToForward + 5 || angleCache <= angleToForward - 5) { //TODO Breaks when any button is pressed (continues spinning indefinitely)\n\t\t\tupdateGyro();\n\t\t\tif (cw <= ccw) {\n\t\t\t\tupdateGyro();\n\t\t\t\tmotorRB.set(-0.25);\n\t\t\t\tmotorRF.set(-0.25);\n\t\t\t\tmotorLB.set(-0.25);\n\t\t\t\tmotorLF.set(-0.25);\n\t\t\t} else {\n\t\t\t\tupdateGyro();\n\t\t\t\tmotorRB.set(0.25);\n\t\t\t\tmotorRF.set(0.25);\n\t\t\t\tmotorLB.set(0.25);\n\t\t\t\tmotorLF.set(0.25);\n\t\t\t}\n\t\t\tupdateGyro();\n\t\t}\n\t\t\n\t}", "public void updateAngle() {\n\t\tfloat ak = 0;\n\t\tfloat gk = 0;\n\t\tak = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterX() - x);\n\t\tgk = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterY() - y);\n\t\tangleDesired = (float) Math.toDegrees(Math.atan2(ak*-1, gk));\n\t\t// if the angle and the angleDesired are opposites the Vector point into the opposite direction\n\t\t// this means the angle will be the angle of the longer vector which is always angle\n\t\t// so if that happens the angleDesired is offset so this won't happen\n\t\tangle = Commons.calculateAngleAfterRotation(angle, angleDesired, rotationDelay);\n\t}", "EDataType getAngleDegrees();", "public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}", "public double getHourAngle(Coordinates c, long time) throws AstrometryException;", "public double findAngleOfAttack() {\n\t\tdouble dy = this.trailingPt.y - this.leadingPt.y; // trailingPt goes first since positive numbers are down\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// y-axis in Canvas\n\t\tdouble dx = this.leadingPt.x - this.trailingPt.x;\n\t\treturn Math.atan2(dy, dx);\n\t}", "public void right90 () {\n saveHeading = 0; //modernRoboticsI2cGyro.getHeading();\n gyroTurn(TURN_SPEED, saveHeading - 90);\n gyroHold(HOLD_SPEED, saveHeading - 90, 0.5);\n }", "public double getAngle ()\n {\n return angle_;\n }", "public boolean doorTicker()\n\t{\n\t\tif(!isDoor)\n\t\t\treturn false;\n\t\tif(stateOfDoor!=this.DOOR_STATE_OPENING)\n\t\t\treturn false;\n\t\t\n\t\t//Now, find angle to (x2,y2) (which is the moving end of the wall)\n\t\t//to (x1,y2) relative to (originalX,originalY) which is a copy of x2,y2\n\t\t//set x2,y2 so that the angle is now a little larger, if that angle is now\n\t\t//greater than PI/2, set the stateOfDoor as OPEN\n\t\t\n\t\tdouble angleTo2 = this.angleToSide2(x1,y1);\n\t\t\n\t\tdouble newAngle;\n\t\t\n\t\tif(swingingWay1)\n\t\t{\n\t\t\tnewAngle= angleTo2 + ANGLE_CHANGE;\n\t\t\tticks++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnewAngle= angleTo2 - ANGLE_CHANGE;\n\t\t\tticks--;\n\t\t}\n\t\t\n\t\t//distance from pivot\n\t\tdouble dx = this.length()*Math.cos(newAngle);\n\t\tdouble dy = this.length()*Math.sin(newAngle);\n\t\t\n\t\tx2 = x1+dx;\n\t\ty2 = y1+dy;\n\n\t\t//BECAUSE X2 and Y2 have changed, certain values need to be recalculated so that it paints ok\n\t\tmx = (x1+x2)/2;\n\t\tmy = (y1+y2)/2;\n\t\tif(x1!=x2)\n\t\t{\n\t\t\tm = (this.y1-this.y2)/(this.x1-this.x2);\n\t\t\tb = y1-m*this.x1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm = 0;\n\t\t\tb = 0;\n\t\t}\n\t\t\n\t\t\n\t\t//now check if the door is all the way open\n\t\tdouble angleToOriginal = this.angleToOriginal(x1,y1);\n\t\t\n\t\t//if((newAngle-angleToOriginal>Math.PI/2)||(newAngle-angleToOriginal<-Math.PI/2))\n\t\t//if(ArtWork.isBetween(angleToOriginal-3*Math.PI/4, ArtWork.normalizeAngle(angleToOriginal+3*Math.PI/4), newAngle))\n\t\tif((ticks*ANGLE_CHANGE>Math.PI/2)||(ticks*ANGLE_CHANGE<-Math.PI/2))\n\t\t\tstateOfDoor=this.DOOR_STATE_OPEN;//stop!\n\t\t\n\t\treturn true;\n\t}", "public void raiseBed(int angle) {\n\n if (getCurrentSpeed() == 0)\n truckBed.raiseRamp(angle);\n else\n System.out.println(\"You can't raise the bed when the truck is moving.\");\n }", "public double normalizeBearing( double angle )\n {\n while ( angle > 180 )\n {\n angle -= 360;\n }\n while ( angle < -180 )\n {\n angle += 360;\n }\n return angle;\n }", "public double getMyAngle() {\n return myAngle- STARTING_ANGLE;\n }", "void turn(double angle) {\n double absoluteAngle = angle * 0.05;\n\n drive(TURN_SPEED, angle, -angle, 0);\n\n }", "public int getAngle() {\r\n\t\treturn angle;\r\n\t}", "static double angleClock(int hour, int minutes) {\r\n\r\n // **** compute hour hand angle ****\r\n // double h = hour * (360.0 / 12.0);\r\n double h = hour * 30.0;\r\n\r\n // **** adjust it by the number of minutes ****\r\n // h += minutes * (30.0 / 60.0);\r\n h += minutes * 0.5;\r\n\r\n // **** ****\r\n if (h > 360.0)\r\n h -= 360.0;\r\n\r\n // ???? ????\r\n System.out.println(\"angleClock <<< h: \" + h);\r\n\r\n // **** compute minute hand angle ****\r\n // double m = minutes * (360.0 / 60);\r\n double m = minutes * 6.0;\r\n\r\n // ???? ????\r\n System.out.println(\"angleClock <<< m: \" + m);\r\n\r\n // **** compute difference in angles ****\r\n double a = Math.abs(h - m);\r\n\r\n // ???? ????\r\n System.out.println(\"angleClock <<< a: \" + a);\r\n\r\n // **** return the smallest angle ****\r\n return a <= 180.0 ? a : 360.0 - a;\r\n }", "@Test\r\n public void testCalculateAngle3() {\r\n System.out.println(\"calculateAngle3\");\r\n DialDraw instance = new TachometerDraw();\r\n instance.setValue(100);\r\n double expResult = Math.toRadians(0);\r\n double result = instance.calculateAngle();\r\n assertEquals(result, expResult, 0.0001);\r\n }", "public double getAngleAway(Point p) {\n if (Math.abs(p.getAngle() - getAngle()) <= 180)\n return p.getAngle() - getAngle();\n else if (p.getAngle() - getAngle() > 0)\n return p.getAngle() - getAngle() - 360;\n else\n return p.getAngle() - getAngle() + 360;\n }", "public double passAlign() {\n \tdouble angle;\n \tif (MasterController.ourSide == TeamSide.LEFT) {\n \t\tangle = angleToX();\n \t} else {\n \t\tangle = angleToNegX();\n \t}\n \tdouble amount = -0.7 * angle;\n\t\tDebug.log(\"Angle: %f, Rotating: %f\", angle, amount);\n\t\trotate(amount); // TODO: Test if works as expected\n\t\treturn amount;\n\t}", "private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n //Process the angle to keep it within (-180,180)\n //(Once angle passes +180, it will rollback to -179, and vice versa)\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n //Add the change in angle since last measurement (deltaAngle)\n //to the change in angle since last reset (globalAngle)\n globalAngle += deltaAngle;\n //Set last angle measurement to current angle measurement\n lastAngles = angles;\n\n return globalAngle;\n }", "public static void alturaArbol() {\n int angulo = 35;\n\n double anguloConvert = Math.toRadians(angulo);\n int x = 20;\n int y;\n y = (int) Math.round(x * Math.tan(anguloConvert));\n System.out.println(\"Altura del arbol: \" + y);\n }", "public void setHoodTargetAngle(double target){\r\n\t\thoodTarget = target;\r\n\t}", "public int angleOX() {\n if (B.getY() == A.getY()) {\r\n return 0;\r\n } else if (A.getX() == B.getX()) {\r\n return 90;\r\n }\r\n else {\r\n float fi = ((float) (B.getY() - A.getY()) / (B.getX() - A.getX()));\r\n if (fi<0){\r\n return (int)(fi*(-1));\r\n }\r\n else return (int)(fi);\r\n }\r\n }", "private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }", "public double turn (double degrees) {\n setHeading(getHeading() + degrees);\n return Math.abs(degrees);\n }", "public int getAngle(){\n\t\treturn (int)angle;\n\t}", "public double getAngle() {\n return angle;\n }", "public double getAngle() {\n return angle;\n }", "private short getHeadingAxe()\r\n\t{\r\n\t\t// Condition based on the angle change\r\n\t\tdouble difA = 0;\r\n\t\tshort movDir = 0;\r\n\r\n\t\t// Difference between the real and ideal angle\r\n\t\tdifA = Math.abs((this.pose.getHeading()/Math.PI*180) - Po_ExpAng);\r\n\t\t\r\n\t\t// Axe detection\r\n\t\tif ((Po_CORNER_ID % 2) == 0)\r\n\t\t{\r\n\t\t\t// Movement in x\r\n\t\t\tif (((Po_CORNER_ID == 0) && ((difA > 70) && (100*this.pose.getX() > 165))) || ((Po_CORNER_ID == 2) && ((difA > 70) && (100*this.pose.getX() < 160))) || ((Po_CORNER_ID == 4) && ((difA > 70) && (100*this.pose.getX() < 35))) || ((Po_CORNER_ID == 6) && ((difA > 70) && (100*this.pose.getX() < 5))))\r\n\t\t\t//if (difA > 70)\r\n\t\t\t{\r\n\t\t\t\tmovDir = 1;\t\t\t// y direction\r\n\t\t\t\tSound.beepSequenceUp();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmovDir = 0;\t\t\t// x direction\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Movement in y\r\n\t\t\tif (((Po_CORNER_ID == 1) && ((difA > 30) && (100*this.pose.getY() > 55))) || ((Po_CORNER_ID == 3) && ((difA > 70) && (100*this.pose.getY() < 45))) || ((Po_CORNER_ID == 5) && ((difA > 70) && (100*this.pose.getY() > 55))) || ((Po_CORNER_ID == 7) && (difA > 70) && (100*this.pose.getY() < 5)))\r\n\t\t\t//if (difA > 70)\r\n\t\t\t{\r\n\t\t\t\tmovDir = 0;\t\t\t// x direction\r\n\t\t\t\tSound.beepSequence();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmovDir = 1;\t\t\t// y direction\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (((Po_AxeP == 0) && (movDir == 1)) || ((Po_AxeP == 1) && (movDir == 0)))\r\n\t\t{\r\n\t\t\tif (Po_CORNER_ID < 7)\r\n\t\t\t{\r\n\t\t\t\tPo_CORNER_ID = Po_CORNER_ID + 1;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tPo_CORNER_ID = 0;\r\n\t\t\t\t\r\n\t\t\t\tif (this.parkingSlotDetectionIsOn)\r\n\t\t\t\t{\r\n\t\t\t\t\tPo_RoundF = 1;\t\t// Round finished, don't add any new parking slots\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tPo_Corn = 1;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tPo_Corn = 0;\r\n\t\t}\r\n\t\t\r\n\t\tPo_AxeP = movDir;\r\n\t\t\r\n\t\tLCD.drawString(\"Corn_ID: \" + (Po_CORNER_ID), 0, 6);\r\n\t\t\r\n\t\treturn movDir;\r\n\t}", "@Override\r\n\tpublic void perimetre(Graphics g) {\n\t\tswitch(this.getAngle()){\r\n\t\tcase 0 :\r\n\t\t\tg.drawRect(this.getX()+(this.getTaille()/4), this.getY(), this.getTaille()/2, this.getTaille());\r\n\t\t\tbreak;\r\n\t\tcase 90:\r\n\t\t\tg.drawRect(this.getX(), this.getY()+(this.getTaille()/4), this.getTaille(), this.getTaille()/2);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void setAngle(int angle) {\r\n\t\tthis.angle = angle;\r\n\t}", "public double translateAngle( Figure f, double angle, double dir);", "public float calculateCelestialAngle(long par1, float par3)\n {\n return 0.5F;\n }", "private float angularRounding(float input) {\n if (input >= 180.0f) {\n return input - 360.0f;\n } else if (input <= -180.0f) {\n return 360 + input;\n } else {\n return input;\n }\n }", "public void depolarize(){\n\t\t\tif(sodiumChannel.getGateStatus().equalsIgnoreCase(\"open\")) {\n\t\t\t\tfor(int i = 1; i <= threshold; i++) {\n\t\t\t\t\tcurrentVoltage = currentVoltage + sodiumIon;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public float getAngle() {\n return angle;\n }", "@Override\n public double chooseGunAngle(double bulletPower, Point2D.Double myLocation, double absoluteBearingToEnemy) {\n if (enemyLateralVelocity != 0)\n {\n if (enemyLateralVelocity < 0)\n enemyDirection = -1;\n else\n enemyDirection = 1;\n }\n\n double guessfactor = chooseGuessFactor(bulletPower, myLocation);\n\n return Utils.normalAbsoluteAngle(absoluteBearingToEnemy + enemyDirection * guessfactor * MathUtils.maxEscapeAngle(Rules.getBulletSpeed(bulletPower)));\n }", "public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale()) / 2 ) + bottomXCoord;\n\t\tfloat bottomY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale()) / 2 ) + bottomYCoord ;\n\t\t\n\t\tfloat topXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * topLineHyp);\n\t\tfloat topYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * topLineHyp);\n\t\t\n\t\tfloat topX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale() ) / 2 ) + topXCoord;\n\t\tfloat topY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale() ) / 2 ) + topYCoord;\n\t\t\n\t\tShapeRenderer shape = new ShapeRenderer();\n\t\tshape.setColor(Color.BLACK);\n\t\tshape.begin(ShapeType.Line);\n\t\tshape.line(bottomX, bottomY, topX, topY);\n\t\tshape.end();\n\t}", "public void rotateToAngle(double angle) {\n controlState = ControlState.POSITION;\n outputPosition = -angle * TurretConstants.TICKS_PER_DEGREE;\n }", "public double getTargetAngle(){\n return lastKnownAngle;\n }", "void frontAngle(float degrees) {\n float newFront = radians(degrees);\n \n // movement done from this direction from now on\n _rotVector.rotate(newFront - _front);\n \n _front = newFront;\n }", "@Override\n\tpublic float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 2.0F;\n\t}", "public double getAngle(){\n\t\treturn this.angle;\n\t}", "public void setAngle(double angle) {\n this.angle = angle;\n }" ]
[ "0.66920745", "0.6597268", "0.65716475", "0.6457552", "0.643825", "0.643136", "0.6201602", "0.6180506", "0.6178289", "0.61735106", "0.6172719", "0.6158354", "0.6158354", "0.6138898", "0.6131013", "0.6062242", "0.60560185", "0.6037712", "0.5989121", "0.597647", "0.59763074", "0.5966324", "0.595737", "0.5950701", "0.5888849", "0.58803844", "0.5869503", "0.5869274", "0.5861713", "0.5857161", "0.5850058", "0.58284086", "0.5819671", "0.5810801", "0.5801975", "0.5788996", "0.5757899", "0.5756336", "0.57382196", "0.5719755", "0.5718522", "0.57126325", "0.57103276", "0.56912714", "0.5683278", "0.56747395", "0.5666589", "0.56644374", "0.5662782", "0.5656184", "0.5649822", "0.5644789", "0.5638787", "0.5635315", "0.56287724", "0.5621495", "0.56171525", "0.5608384", "0.5606953", "0.55988115", "0.5592184", "0.55805635", "0.5577689", "0.55556947", "0.55522263", "0.5546329", "0.5540915", "0.55327636", "0.55246764", "0.5518686", "0.55127287", "0.5510647", "0.55050766", "0.5504394", "0.5501846", "0.54979455", "0.54943776", "0.54890686", "0.5489038", "0.5482638", "0.5482254", "0.5482179", "0.54807556", "0.5474415", "0.5474415", "0.5472584", "0.5472545", "0.5465583", "0.5459582", "0.5450962", "0.54461217", "0.5441789", "0.5436671", "0.5431131", "0.541619", "0.5413985", "0.54093724", "0.5403122", "0.54011923", "0.5400634", "0.5390651" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean DigRequest(int TypeID, int ButtonIndex, int Step) { if(ButtonIndex == CustomDialog.BUTTON_LEFT){ ExitGame(); //finish(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public boolean EvenRequest(int TypeID) { if(TypeID == -1){ Intent intent = new Intent(this, GameItemsActivity.class); startActivity(intent); //Constants.ItemIconCanClick = true; UIUtils.sendUIButtonChange(this, MIDlet.BTN_ITEM, true); }else if(TypeID == -2){ Intent intent = new Intent(this, GameEquipActivity.class); startActivity(intent); //Constants.EquipIconCanClick = true; UIUtils.sendUIButtonChange(this, MIDlet.BTN_EQUIP, true); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Setup the panel parameters
private void setupPanel() { this.setLayout(baseLayout); queryButton = new JButton("query"); this.add(queryButton); this.add(displayPane); displayArea = new JTextArea(10,30); add(displayArea); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setupPanel()\n {\n\n }", "@Override\r\n public void setup(Panel panel) {\n }", "private void initializePanels()\r\n\t{\r\n\t\tthis.subscribersPanel = new SubscribersPanel(DIMENSIONS);\r\n\t\tthis.consolePanel = new ConsolePanel(DIMENSIONS);\r\n\r\n\t\tthis.parametersPanel = new ParametersPanel(DIMENSIONS);\r\n\t\tthis.parametersPanel.setSize(DIMENSIONS);\r\n\r\n\t\tthis.mainPanel = new MainPanel(parametersPanel, this);\r\n\t\tthis.mainPanel.setSize(DIMENSIONS);\r\n\r\n\t\tshowParametersPanel();\r\n\t}", "public ChooseParameterPanel() {\n initComponents();\n }", "public PaperSettingsJPanel() {\n initComponents();\n }", "public void initialize() {\n \n super.initialize();\n \n PreferredSizeX = this.getPreferredSizeX();\n PreferredSizeY = this.getPreferredSizeY();\n this.setPreferredSize(new Dimension(PreferredSizeX, PreferredSizeY));\n \n this.createParameterPanel();\n \n }", "public void setPanelConfiguration(){\n\t\tthis.panelConfiguration.setStructurePanel();\n\t\tthis.panelConfiguration.setPanelConfiguration();\n\t}", "private void setupPanels() {\n\t\tsplitPanel.addEast(east, Window.getClientWidth() / 5);\n\t\tsplitPanel.add(battleMatCanvasPanel);\n\t\tpanelsSetup = true;\n\t}", "public ParamPanel() {\n Insets lft_spc = new Insets(0, 5, 0, 0);\n\n /*----------------------------------------------\n Constructor: ParamPanel\n \n \n Purpose: Sets up the control panel containing the\n user specified parameters for performing\n the LSystems image\n \n ---------------------------------------------*/\n\n initColors();\n\n b_doApply = false;\n b_gotImagePnl = false;\n\n\n Panel lPanel = new Panel();\n Panel rPanel = new Panel();\n Panel mPanel = new Panel();\n ClrPanel bPanel = new ClrPanel(aColors);\n\n\n GridBagLayout gridbag = new GridBagLayout();\n GridBagConstraints c = new GridBagConstraints();\n setLayout(gridbag);\n\n c.fill = GridBagConstraints.HORIZONTAL;\t/* fill horizontally*/\n c.weightx = 1; \t\t\t /* each of the 3 panels\n get same horiz space */\n c.insets = new Insets(0, 0, 0, 10); \t/* pad left and right */\n\n c.gridwidth = 1;\n c.anchor = GridBagConstraints.NORTH;\n\n gridbag.setConstraints(lPanel, c);\n gridbag.setConstraints(rPanel, c);\n\n gridbag.setConstraints(mPanel, c);\n\n add(lPanel);\t\t\t/* add panels left to right */\n add(mPanel);\n add(rPanel);\n\n\n\n /*------------\n color panel\n ------------*/\n\n\n\n c = new GridBagConstraints();\n c.gridx = 0;\n c.gridwidth = GridBagConstraints.REMAINDER;\n c.insets = new Insets(15, 0, 0, 0);\n c.fill = GridBagConstraints.HORIZONTAL;\n c.anchor = GridBagConstraints.WEST;\n gridbag.setConstraints(bPanel, c);\n add(bPanel);\n\n gridbag = new GridBagLayout();\n bPanel.setLayout(gridbag);\n\n\n GridBagConstraints c_num = new GridBagConstraints();\n\n c_num.gridwidth = 1; /* first in row */\n c_num.fill = GridBagConstraints.HORIZONTAL;\n c_num.weightx = 1;\n\n\n c_num.insets = new Insets(5, 20, 5, 0);\n Label label8 = new Label(\"0\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n c_num.insets = new Insets(5, 59, 5, 0);\n label8 = new Label(\"5\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"10\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"15\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"20\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"25\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n\n label8 = new Label(\"30\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n label8 = new Label(\"35\");\n gridbag.setConstraints(label8, c_num);\n bPanel.add(label8);\n\n c_num.insets = new Insets(5, 10, 5, 5);\n tb_clr = new TextField(3);\n gridbag.setConstraints(tb_clr, c_num);\n bPanel.add(tb_clr);\n\n\n\n gridbag = new GridBagLayout();\n c = new GridBagConstraints();\n setFont(new Font(\"Helvetica\", Font.PLAIN, 14));\n lPanel.setLayout(gridbag);\n\n c.fill = GridBagConstraints.NONE; /* stretch components left to right */\n\n\n\n c.fill = GridBagConstraints.HORIZONTAL; /* stretch components left to right */\n\n /*----------------------\n LSystems Samples\n ---------------------*/\n GridBagConstraints c_smpl = new GridBagConstraints();\n c_smpl.gridx = 0;\n c_smpl.gridy = 0;\n c_smpl.gridwidth = GridBagConstraints.REMAINDER;\n\n\n /* Rules Label */\n c_smpl.anchor = GridBagConstraints.WEST;\n Label label7 = new Label(\"Sample LSystems:\");\n gridbag.setConstraints(label7, c_smpl);\n lPanel.add(label7);\n\n\n GridBagConstraints c_btn = new GridBagConstraints();\n c_btn.gridwidth = 1;\n c_btn.fill = GridBagConstraints.HORIZONTAL;\n c_btn.weightx = 1;\n\n c_btn.gridx = 0;\n c_btn.gridy = 1;\n TextField tb_placeholder = new TextField(25);\n gridbag.setConstraints(tb_placeholder, c_btn);\n tb_placeholder.hide();\n lPanel.add(tb_placeholder);\n tb_placeholder.show();\n tb_placeholder.hide();\n\n /* List of Samples LSystem Patterns */\n c_smpl.fill = GridBagConstraints.HORIZONTAL;\n c_smpl.anchor = GridBagConstraints.WEST;\n c_smpl.gridy = 1;\n ch_ptrnspecs = new List(6, false);\n ch_ptrnspecs.clear();\n gridbag.setConstraints(ch_ptrnspecs, c_smpl);\n lPanel.add(ch_ptrnspecs);\n fillSpecChoices(ch_ptrnspecs);\n\n\n\n c_btn = new GridBagConstraints();\n c_btn.gridwidth = 1;\n c_btn.fill = GridBagConstraints.HORIZONTAL;\n c_btn.weightx = 1;\n c_btn.insets = new Insets(30, 0, 0, 0);\n\n\n /* Apply button */\n b_apply = new Button(\"Apply\");\n gridbag.setConstraints(b_apply, c_btn);\n lPanel.add(b_apply);\n\n\n\n\n\n\n gridbag = new GridBagLayout();\n c = new GridBagConstraints();\n setFont(new Font(\"Helvetica\", Font.PLAIN, 14));\n mPanel.setLayout(gridbag);\n c.fill = GridBagConstraints.NONE; /* stretch components left to right */\n\n /*----------------------\n Rule Controls\n ---------------------*/\n GridBagConstraints c_rule = new GridBagConstraints();\n c_rule.gridx = 0;\n c_rule.insets = lft_spc;\n c_rule.gridwidth = GridBagConstraints.REMAINDER;\n\n /* Rules Label */\n c_rule.anchor = GridBagConstraints.WEST;\n Label label5 = new Label(\"Rules:\");\n gridbag.setConstraints(label5, c_rule);\n mPanel.add(label5);\n\n\n /* List of Rules */\n c_rule.fill = GridBagConstraints.HORIZONTAL;\n c_rule.anchor = GridBagConstraints.WEST;\n lst_rules = new List(4, false);\n gridbag.setConstraints(lst_rules, c_rule);\n mPanel.add(lst_rules);\n lst_rules.clear();\n\n /* rule edit box */\n c_rule.insets = new Insets(35, 5, 0, 0);\n c_rule.anchor = GridBagConstraints.WEST;\n c_rule.fill = GridBagConstraints.NONE;\n tb_rule = new TextField(27);\n gridbag.setConstraints(tb_rule, c_rule);\n mPanel.add(tb_rule);\n\n\n\n\n\n /*------------------\n Rule Editing Buttons\n (Add, Update, Delete, New)\n ------------------*/\n\n c_btn = new GridBagConstraints();\n c_btn.insets = lft_spc;\n c_btn.gridwidth = 1;\n c_btn.fill = GridBagConstraints.HORIZONTAL;\n c_btn.weightx = 1;\n\n /* rule editing buttons */\n b_add = new Button(\"Add\");\n b_updt = new Button(\"Update\");\n b_del = new Button(\"Delete\");\n b_new = new Button(\"Clear\");\n\n\n gridbag.setConstraints(b_add, c_btn);\n\n gridbag.setConstraints(b_updt, c_btn);\n\n gridbag.setConstraints(b_del, c_btn);\n\n c_btn.gridwidth = GridBagConstraints.REMAINDER; /* last-in-row */\n gridbag.setConstraints(b_new, c_btn);\n\n\n mPanel.add(b_add);\n mPanel.add(b_updt);\n mPanel.add(b_del);\n mPanel.add(b_new);\n\n\n gridbag = new GridBagLayout();\n c = new GridBagConstraints();\n setFont(new Font(\"Helvetica\", Font.PLAIN, 14));\n rPanel.setLayout(gridbag);\n\n c.fill = GridBagConstraints.NONE; /* don't stretch components */\n\n\n cbg_Lines = new CheckboxGroup();\n\n\n /*-------------------\n Line Checkboxes\n ------------------*/\n GridBagConstraints c_line = new GridBagConstraints();\n c_line.gridx = 0;\n c_line.anchor = GridBagConstraints.WEST;\n c_line.gridwidth = GridBagConstraints.REMAINDER; /* last-in-row */\n\n\n\n /* Straight Line Checkbox*/\n\n c_line.insets = new Insets(20, 50, 0, 0);\n cb_strt = new Checkbox(\"Straight Lines\", cbg_Lines, true);\n gridbag.setConstraints(cb_strt, c_line);\n rPanel.add(cb_strt);\n\n\n /* Hermite Curve Checkbox*/\n\n c_line.insets = new Insets(0, 50, 0, 0);\n cb_hermite = new Checkbox(\"Hermite Curved Lines\", cbg_Lines, false);\n gridbag.setConstraints(cb_hermite, c_line);\n rPanel.add(cb_hermite);\n\n\n /* BSpline Curve Checkbox*/\n cb_bspline = new Checkbox(\"B-Spline Curved Lines\", cbg_Lines, false);\n c_line.insets = new Insets(0, 50, 12, 0);\n gridbag.setConstraints(cb_bspline, c_line);\n rPanel.add(cb_bspline);\n\n\n\n\n /*-------------------\n Parameter Text Boxes \n \n Axiom, Ignore, Depth, Angle, Scale\n ------------------*/\n\n GridBagConstraints c_textb = new GridBagConstraints();\n\n /* Axiom */\n c_textb.gridwidth = 1; /* first in row */\n c_textb.anchor = GridBagConstraints.WEST;\n Label label1 = new Label(\"Axiom: \");\n gridbag.setConstraints(label1, c_textb);\n rPanel.add(label1);\n\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n c_textb.gridwidth = GridBagConstraints.REMAINDER;/* last-in-row */\n tb_axiom = new TextField(26);\n gridbag.setConstraints(tb_axiom, c_textb);\n rPanel.add(tb_axiom);\n\n\n /* Ignore */\n c_textb.gridwidth = 1; /* first in row */\n c_textb.anchor = GridBagConstraints.WEST;\n Label label6 = new Label(\"Ignore: \");\n gridbag.setConstraints(label6, c_textb);\n rPanel.add(label6);\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n c_textb.gridwidth = GridBagConstraints.REMAINDER;/* last-in-row */\n tb_ignore = new TextField(26);\n gridbag.setConstraints(tb_ignore, c_textb);\n rPanel.add(tb_ignore);\n\n\n /* Depth */\n c_textb.gridwidth = 1; /* first in row */\n c_textb.anchor = GridBagConstraints.WEST;\n Label label2 = new Label(\"Depth:\");\n gridbag.setConstraints(label2, c_textb);\n rPanel.add(label2);\n\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n tb_depth = new TextField(1);\n gridbag.setConstraints(tb_depth, c_textb);\n rPanel.add(tb_depth);\n\n\n /* Angle */\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n Label label3 = new Label(\"Angle:\");\n gridbag.setConstraints(label3, c_textb);\n rPanel.add(label3);\n\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n tb_angle = new TextField(3);\n gridbag.setConstraints(tb_angle, c_textb);\n rPanel.add(tb_angle);\n\n\n /* Scale */\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n Label label4 = new Label(\"Scale:\");\n gridbag.setConstraints(label4, c_textb);\n rPanel.add(label4);\n\n\n c_textb.anchor = GridBagConstraints.WEST; /* reset */\n tb_scale = new TextField(3);\n gridbag.setConstraints(tb_scale, c_textb);\n rPanel.add(tb_scale);\n\n\n\n lPanel.show();\n rPanel.show();\n mPanel.show();\n bPanel.show();\n\n tb_placeholder.hide();\n\n\n ch_ptrnspecs.select(0);\n changeSpecs(ch_ptrnspecs.getSelectedIndex());\n\n\n }", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tthis.add(firstButton);\n\t\tthis.add(firstField);\n\t}", "private void setUpPanel() {\n\n this.add(nameLabel);\n this.add(showMetadataButton);\n this.add(compressFilesButton);\n this.add(decompressFilesButton);\n this.add(compressionResultLabel);\n this.add(messageShorteningButton);\n this.add(messageShorteningResultLabel);\n }", "public NewsParamPanel() {\n initComponents();\n titleAnalyzer.setFieldName(\"TITLE\");\n dateAnalyzer.setFieldName(\"DATE\");\n sourceExtractor.setFieldName(\"SOURCENAME\");\n authorExtractor.setFieldName(\"AUTHOR\");\n commentsExtractor.setFieldName(\"COMMENT_COUNT\");\n clicksExtractor.setFieldName(\"CLICK_COUNT\");\n transmitExtractor.setFieldName(\"TRANSMIT_COUNT\");\n summaryExtractor.setFieldName(\"SUMMARY\");\n chnlExtractor.setFieldName(\"CHANNEL\");\n contentExtractor.setFieldName(\"CONTENT\");\n }", "protected DistributionParameterPanel()\r\n\t{\r\n\t\tthis.setPreferredSize(new Dimension(this.width, this.height));\r\n\t}", "private void configurePanel(ContentPanel panel){\r\n\t\t\t\tpanel.setSize(325, 185);\t\t\t\t\r\n\t\t\t\tpanel.setHeaderVisible(false);\r\n\t\t\t\tpanel.setBodyStyle(\"padding:7px\");\r\n\t\t\t\tpanel.setScrollMode(Scroll.AUTOY);\r\n\t\t\t\tpanel.setStyleAttribute(\"marginTop\", \"15px\");\r\n\t\t\t}", "public void setPanels() {\n\t\tframe.setPreferredSize(new Dimension(3000, 2000));\n\n\t\tcontainer.setBackground(lightGray);\n\t\tcontainer.setPreferredSize(new Dimension(2300, 120));\n\t\tcontainer.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tagePanel.setBackground(lightGray);\n\t\tagePanel.setPreferredSize(new Dimension(2400, 120));\n\t\tagePanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\theightPanel.setBackground(lightGray);\n\t\theightPanel.setPreferredSize(new Dimension(1200, 120));\n\t\theightPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tweightPanel.setBackground(lightGray);\n\t\tweightPanel.setPreferredSize(new Dimension(850, 120));\n\t\tweightPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\thairPanel.setBackground(lightGray);\n\t\thairPanel.setPreferredSize(new Dimension(900, 120));\n\t\thairPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\teyePanel.setBackground(lightGray);\n\t\teyePanel.setPreferredSize(new Dimension(900, 120));\n\t\teyePanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tabilitySelectionPanel.setBackground(lightGray);\n\t\tabilitySelectionPanel.setPreferredSize(new Dimension(2400, 120));\n\t\tabilitySelectionPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tphysicalAbilityPanel.setBackground(lightGray);\n\t\tphysicalAbilityPanel.setPreferredSize(new Dimension(2400, 400));\n\t\tphysicalAbilityPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tmentalAbilityPanel.setBackground(lightGray);\n\t\tmentalAbilityPanel.setPreferredSize(new Dimension(2400, 400));\n\t\tmentalAbilityPanel.setBorder(BorderFactory.createLineBorder(black));\n\t}", "PanelOptionsVisual(PanelConfigureProject panel) {\n this.panel = panel;\n\n preInitComponents();\n initComponents();\n postInitComponents();\n }", "private void setupSettings() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "public JpSetting() {\n initComponents();\n fillThongtin();\n }", "public MazeSettingsPanel(MazeSettings settings){\r\n \tsuper();\r\n \tthis.settings=settings;\r\n \tthis.layout = new GridLayout(0,2);\r\n \tthis.layout.setVgap(10);\r\n \tthis.setLayout(this.layout);\r\n \r\n \tpadding = BorderFactory.createEmptyBorder(20,20,15,10);\r\n \tthis.setBorder(padding);\r\n \r\n \tinitFields();\r\n \tupdateFieldValues();\r\n }", "private void init() {\r\n\t\tthis.panel.setLayout(new BoxLayout(this.panel, BoxLayout.PAGE_AXIS));\r\n\t\tthis.labelTitle = new JLabel(\"Edit your weapons\");\r\n\t\tthis.labelTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.initFilter();\r\n\t\tthis.initList();\r\n\t\tthis.list.setSelectedIndex(0);\r\n\t\tthis.initInfo();\r\n\t\tthis.initButton();\r\n\r\n\t\tJPanel panelWest = new JPanel();\r\n\t\tpanelWest.setLayout(new BoxLayout(panelWest, BoxLayout.PAGE_AXIS));\r\n\t\tJPanel panelCenter = new JPanel();\r\n\t\tpanelCenter.setLayout(new BoxLayout(panelCenter, BoxLayout.LINE_AXIS));\r\n\r\n\t\tpanelWest.add(this.panelFilter);\r\n\t\tpanelWest.add(Box.createRigidArea(new Dimension(0, 5)));\r\n\t\tpanelWest.add(this.panelInfo);\r\n\t\tpanelCenter.add(panelWest);\r\n\t\tpanelCenter.add(Box.createRigidArea(new Dimension(10, 0)));\r\n\t\tthis.panelList.setPreferredSize(new Dimension(300, 150));\r\n\t\tpanelCenter.add(this.panelList);\r\n\r\n\t\tthis.panel.add(this.labelTitle);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(panelCenter);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(this.panelButton);\r\n\r\n\t}", "private void setupPanel()\n\t{\n\t\tsetLayout(numberLayout);\n\t\tsetBorder(new EtchedBorder(EtchedBorder.RAISED, Color.GRAY, Color.DARK_GRAY));\n\t\tsetBackground(Color.LIGHT_GRAY);\n\t\tadd(ans);\n\t\tadd(clear);\n\t\tadd(backspace);\n\t\tadd(divide);\n\t\tadd(seven);\n\t\tadd(eight);\n\t\tadd(nine);\n\t\tadd(multiply);\n\t\tadd(four);\n\t\tadd(five);\n\t\tadd(six);\n\t\tadd(subtract);\n\t\tadd(one);\n\t\tadd(two);\n\t\tadd(three);\n\t\tadd(add);\n\t\tadd(negative);\n\t\tadd(zero);\n\t\tadd(point);\n\t\tadd(equals);\n\t}", "public SettingsPanel() {\n initComponents();\n }", "private void initializePanels() {\n queueInfoPanel.setBackground(new Color(236, 125, 51));\n queueButtonsPanel.setBackground(new Color(93, 118, 161));\n createLabelForPanel(queueInfoPanel);\n createButtonsForPanel(queueButtonsPanel);\n }", "protected void createParameterPanel() {\n \n Collection_Button = new KButtonPanel(0, 0, 0, 0, 1, \n KButtonPanel.HORIZONTAL_RIGHT);\n Collection_Button.addSingleButton(\"...\", \n KeyEvent.VK_C, true, true, \"CollectionButton\", this,\n \"Click this button to select the collection file.\"); \n \n SourceDirectory_Button = new KButtonPanel(0, 0, 0, 0, 1,\n KButtonPanel.HORIZONTAL_RIGHT);\n SourceDirectory_Button.addSingleButton(\"...\",\n KeyEvent.VK_R, true, true, \"SourceDirectoryButton\", this,\n \"Click this button to select the Reuters-21578 file directory.\");\n \n IncludeSubdirectories_CheckBox = new KCheckBox(\n \"Include Subdirectories\", false, true, \n \"IncludeSubdirectories\", this, KeyEvent.VK_I, \n \"If this box is checked, files will be search in subdirectories \"\n + \"of Reuters-21578 directory.\");\n\n if (CastParameter != null) {\n Collection_Text = new KTextField(CastParameter\n .getCollectionFileName(), 30);\n SourceDirectory_Text = new KTextField(CastParameter\n .getSourceDirectory(), 30);\n FileNameFilter_Text = new KTextField(CastParameter\n .getFileNameFilter(), 30);\n TopicOfCollection_Text = new KTextField(CastParameter\n .getTopicOfCollection(), 30);\n if (CastParameter.includeSubdirectories()) {\n IncludeSubdirectories_CheckBox.setSelected(true);\n }\n else {\n IncludeSubdirectories_CheckBox.setSelected(false);\n }\n }\n else {\n Collection_Text = new KTextField(DiasdemProject.getProperty(\n \"DEFAULT_COLLECTION_FILE\"), 30);\n SourceDirectory_Text = new KTextField(DiasdemProject.getProperty(\n \"DEFAULT_REUTERS_21578_FILE_DIRECTORY\"), 30);\n FileNameFilter_Text = new KTextField(\".sgm\", 30);\n TopicOfCollection_Text = new KTextField(DiasdemProject.getProperty(\n \"DEFAULT_REUTERS_21578_COLLECTION_TOPIC\"), 30);\n }\n Collection_Text.setCaretAtEnding();\n SourceDirectory_Text.setCaretAtEnding();\n FileNameFilter_Text.setCaretAtEnding();\n TopicOfCollection_Text.setCaretAtEnding();\n \n Parameter_Panel = new KGridBagPanel(0, 0, 0, 0);\n Parameter_Panel.startFocusForwarding(Collection_Text);\n \n Parameter_Panel.addLabel(\"Collection File:\", 0, 0, KeyEvent.VK_C,\n Collection_Button.getDefaultButton(), true,\n \"Task input: This collection file contains references \" +\n \"to all DIAsDEM documents.\");\n Parameter_Panel.addBlankColumn(1, 0, 12);\n Parameter_Panel.addComponent(Collection_Text, 2, 0);\n Parameter_Panel.addBlankColumn(3, 0, 12);\n Parameter_Panel.addKButtonPanel(Collection_Button, 4, 0);\n Parameter_Panel.addBlankRow(0, 1, 11, this.getPreferredSizeX());\n Parameter_Panel.addLabel(\"Reuters-21578 Directory:\", 0, 2, KeyEvent.VK_R,\n SourceDirectory_Button.getDefaultButton(), true,\n \"Task input: This directory must contain \" +\n \"original Reuters-21578 SGML files to be imported.\");\n Parameter_Panel.addComponent(SourceDirectory_Text, 2, 2);\n Parameter_Panel.addKButtonPanel(SourceDirectory_Button, 4, 2);\n Parameter_Panel.addBlankRow(0, 3, 11);\n Parameter_Panel.addComponent( IncludeSubdirectories_CheckBox, 2, 4,\n new Insets(0, 0, 0, 0), 3, 1);\n Parameter_Panel.addBlankRow(0, 5, 11);\n Parameter_Panel.addLabel(\"File Name Extension:\", 0, 6, KeyEvent.VK_N,\n FileNameFilter_Text, true,\n \"Task input: Reuters-21578 files to be imported \" +\n \"must have this file name extension.\");\n Parameter_Panel.addComponent( FileNameFilter_Text, 2, 6,\n new Insets(0, 0, 0, 0), 3, 1);\n Parameter_Panel.addBlankRow(0, 7, 11);\n Parameter_Panel.addLabel(\"Topic of Collection:\", 0, 8, KeyEvent.VK_T,\n TopicOfCollection_Text, true,\n \"Task input: Reuters-21578 news to be imported \" +\n \"must have this topic (e.g., earn).\");\n Parameter_Panel.addComponent( TopicOfCollection_Text, 2, 8,\n new Insets(0, 0, 0, 0), 3, 1);\n \n this.removeAll();\n this.validate();\n this.addNorth(Parameter_Panel);\n this.validate();\n this.setComponentStatus();\n \n }", "public PanelTKPhong() {\n\t\tinitComponents();\n\t\tloaddataTable();\n\t\tloaddataLabel();\n\t}", "public void initPanel(){\r\n\t \r\n\t\t//Titre\r\n\t\tlabel.setFont(new Font(\"Verdana\",1,40));\r\n\t label.setForeground(Color.black);\r\n\t label.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label.setBounds(110,0,575,50);\r\n\t\tthis.panel.setLayout(null);\t \r\n\t this.panel.add(label);\r\n\t \r\n\t //dc\r\n\t this.panel.add(label1, BorderLayout.CENTER);\r\n\t label1.setFont(new Font(\"Verdana\",1,40));\r\n\t label1.setForeground(Color.black);\r\n\t label1.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label1.setBounds(150,500,100,50);\r\n\t //ab\r\n\t this.panel.add(label2);\r\n\t label2.setFont(new Font(\"Verdana\",1,40));\r\n\t label2.setForeground(Color.black);\r\n\t label2.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label2.setBounds(550,500,100,50);\r\n\t //Button dc\r\n\t\tdc.setBounds(50,200,300,250);\r\n\t\tthis.panel.add(dc);\r\n\t\tdc.addActionListener(this);\r\n\t\t//Button ab\r\n\t\tab.setBounds(450,200,300,250);\r\n\t\tthis.panel.add(ab);\r\n\t\tab.addActionListener(this);\r\n\t\t\r\n\t\tthis.panel.add(label3);\r\n\t label3.setFont(new Font(\"Verdana\",1,20));\r\n\t label3.setForeground(Color.black);\r\n\t label3.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label3.setBounds(90,575,220,30);\r\n\t \r\n\t this.panel.add(label4);\r\n\t label4.setFont(new Font(\"Verdana\",1,20));\r\n\t label4.setForeground(Color.black);\r\n\t label4.setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));\r\n\t label4.setBounds(490,575,220,30);\r\n\t}", "public ParamPanel() {\n this.paramService = new ParamService();\n initComponents();\n doQuery();\n }", "private void initPanel() {\n\n\t\t// Create a group with radioButtons\n\t\tButtonGroup group = new ButtonGroup();\n\t\t// add radioButtons in ButtonGroup\n\t\tgroup.add(configProfilingCondSetRBtn);\n\t\tgroup.add(useAllCondSetsRBtn);\n\n\t\t// table models\n\t\tmodelCondTable = new DefaultTableModel(translator.getTranslation(Tags.CONDTIONS_TABLE_HEAD).split(\";\"), 0);\n\t\t\n\t\t// configure table\n\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\t\ttable.setPreferredScrollableViewportSize(new Dimension(scrollPane.getWidth(), scrollPane.getHeight()));\n\t\ttable.setModel(modelCondTable);\n\n\t\t// Set element transparent.\n\t\tscrollPane.setOpaque(false);\n\n\t\t//set layout manager\n\t\tthis.setLayout(new GridBagLayout());\n\t\t\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\n\t\t// -------------- add the panel for select the document type\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\tthis.add(createSelectDocTypePanel(),gbc);\n\n\t\t// -------------- add checkBox for select to check using profiling\n\t\t// conditions\n\t\tgbc.gridy++;\n\t\tgbc.weightx = 1;\n\t\tgbc.insets.top = InsetValues.COMPONENT_TOP_INSET;\n\t\tthis.add(useProfilingCondCBox, gbc);\n\t\t\n\t\t// ------------------ add checkBox for select to check using all available\n\t\t// conditions sets and a button to display Preferences/Profiling/Conditional text.\n\t\tgbc.gridy++;\n\t\tgbc.anchor = GridBagConstraints.WEST;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tgbc.insets.left = InsetValues.NEW_LEVEL_LEFT_INSET;\n\t\tthis.add(createAvailableConditionsSetPanel(), gbc);\n\t\t\n\t\t// -------------- Radio button for select to configure a conditions set\n\t\tgbc.gridy++;\n\t\tgbc.fill = GridBagConstraints.HORIZONTAL;\n\t\tconfigProfilingCondSetRBtn.setSelected(true);\n\t\tthis.add(configProfilingCondSetRBtn, gbc);\n\n\t\t// --------------- add scrollPane, that contains conditionsTable\n\t\tgbc.gridy++;\n\t\tgbc.weighty = 1;\n\t\tgbc.insets.left = 2 * InsetValues.NEW_LEVEL_LEFT_INSET;\n\t\tgbc.fill = GridBagConstraints.BOTH;\n\t\t// add list selection listener\n\t\ttable.getSelectionModel().addListSelectionListener(listSelectionListener);\n\t\tthis.add(scrollPane, gbc);\n\n\t\t// ---------------- add getBtn, addBtn and removeBtn\n\t\tgbc.gridy++;\n\t\tgbc.weightx = 0;\n\t\tgbc.weighty = 0;\n\t\tgbc.insets.left = 0;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tgbc.anchor = GridBagConstraints.EAST;\n\n\t\t// panel that contains get, add and remove buttons\n\t\tJPanel btnsPanel = new JPanel(new GridLayout(1, 2));\n\t\tbtnsPanel.setOpaque(false);\n\n\t\tbtnsPanel.add(addBtn);\n\t\tbtnsPanel.add(remvBtn);\n\n\t\t// add table btnsPanel\n\t\tthis.add(btnsPanel, gbc);\n\n\t\t\n\t\t// ------------------ add reportUndefined checkBox\n\t\tgbc.gridy++;\n\t\tgbc.weightx = 1;\n\t\tgbc.anchor = GridBagConstraints.WEST;\n\t\tthis.add(reportUndefinedConditionsCBox,gbc);\n\n\t}", "public void setupPanel() {\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new ModifiedFlowLayout(FlowLayout.LEFT));\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setOpaque(true);\n\t}", "public BuildingConfigPanel() {\n\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setOpaque(true);\n\t\tDimension size = new Dimension(1200, 700);\n\t\tthis.setMaximumSize(size);\n\t\tthis.setPreferredSize(size);\n\t\tthis.setMinimumSize(size);\n\t\tthis.setAlignmentX(LEFT_ALIGNMENT);\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.blue));\n\t\tthis.setBackground(Color.WHITE);\n\t\tthis.setLayout(null);\n\n\t\tfont = new Font(\"Serif\", Font.BOLD, 18);\n\t\tfont1 = new Font(\"Serif\", Font.PLAIN, 15);\n\n\t\t// method to create sensors checkboxes, date and time fields\n\t\tcreateSensors();\n\t\t// method to connect to database\n\t\tcreateJDBCConnection();\n\t\t// method to highlight the area of selection\n\t\tareaTracker();\n\n\t}", "private void settings() {\n\t\tthis.setVisible(true);\n\t\tthis.setSize(800,200);\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 736, 580);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(new TitledBorder(null, \"Tablica p\\u0142atno\\u015Bci\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setBorder(new TitledBorder(null, \"Parametry symulacji\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\tpanel_2.setBorder(new TitledBorder(null, \"Rodzaj kom\\u00F3rek w symulacji\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tCAPanel = new JPanel();\r\n\t\tCAPanel.setBorder(new TitledBorder(null, \"Kom\\u00F3rki CA\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tLApanel = new JPanel();\r\n\t\tLApanel.setBorder(new TitledBorder(null, \"Kom\\u00F3rki LA\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tbtnRozpocznijSymulacje = new JButton(\"Symulacja\");\r\n\t\tbtnRozpocznijSymulacje.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\tSettings settings= new Settings();\r\n\t\t\t\t\t\r\n\t\t\t\tif(rdbtnKomrkiLaiCA.isSelected())\r\n\t\t\t\t\tsettings.agentType=typeOfAgent.CAnLA;\r\n\t\t\t\telse if (rdbtnTylkoKomrkiLa.isSelected())\r\n\t\t\t\t\tsettings.agentType=typeOfAgent.LA;\r\n\t\t\t\telse if (rdbtnTylkoKomrkiCa.isSelected())\r\n\t\t\t\t\tsettings.agentType=typeOfAgent.CA;\r\n\t\t\t\t\r\n\t\t\t\tif (rdbtnGotWspDoch.isSelected())\r\n\t\t\t\t\tsettings.probOfPayoffSharing=(double)spinnergot_wspol_doch.getValue();\r\n\t\t\t\telse \r\n\t\t\t\t\tsettings.probOfPayoffSharing=0;\r\n\t\t\t\t\r\n\t\t\t\tif(rbtnkConst.isSelected())\r\n\t\t\t\t\tsettings.isKConst=true;\r\n\t\t\t\telse\r\n\t\t\t\t\tsettings.isKConst=false;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (!rdbtnZiarno.isSelected())\r\n\t\t\t\t\tsettings.seed=new Random().nextInt();\r\n\t\t\t\telse \r\n\t\t\t\t\tsettings.seed=(int)spinnerZiarno.getValue();\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tsettings.numberOfRows=(int)spinnerLiczbaWireszy.getValue();\r\n\t\t\t\t\tsettings.numberOfColumns=(int) spinnerLiczbaKolumn.getValue();\r\n\t\t\t\t\tsettings.radiusOfNeighbor=(int)spinnerRSasiedztwa.getValue();\r\n\t\t\t\t\tsettings.qChanges=(int)spinnerQ.getValue();\r\n\t\t\t\t\tsettings.numberOfFrames=(int)spinnerIloscKrokow.getValue();\r\n\t\t\t\t\tsettings.probOfUnhabitedCell=(double)spinnerp_niezam.getValue();\r\n\t\t\t\t\tsettings.probOfInitCState=(double)spinnerp_init_C.getValue();\r\n\t\t\t\t\tsettings.numberOfExperiments=(int)spinnerIloscExperymentow.getValue();\r\n\t\t\t\t\tsettings.pDSettings= \r\n\t\t\t\t\t\t\tnew PrisonerDilema((double)spinnerR.getValue(),\r\n\t\t\t\t\t\t\t\t\t(double)spinnerS.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerT.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerP.getValue());\r\n\t\t\t\t\tsettings.probOfAgentCA=(double)SpinnerpTypAgCA.getValue();\r\n\t\t\t\t\tsettings.historyLength=(int)spinnerHistoria.getValue();\r\n\t\t\t\t\tsettings.epsilon=(double)spinnerEpsilon.getValue();\r\n\t\t\t\t\tsettings.mutation= \r\n\t\t\t\t\t\t\tnew Mutation((double)spinnerMutStrateg.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerMutPc.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerMutationHistoria.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)SpinnerMutationEpsilon.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerMutC1.getValue(), \r\n\t\t\t\t\t\t\t\t\t(int)spinnerMutationc2.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerMutationc3.getValue());\r\n\t\t\t\t\tsettings.probOfPcStrategy=(double)spinnerStrategPc.getValue();\r\n\t\t\t\t\tsettings.probOfAllCStrategy=(double)spinnerStrategAllC.getValue();\r\n\t\t\t\t\tsettings.probOfAllDStrategy=(double)SpinnerStrategAllD.getValue();\r\n\t\t\t\t\tsettings.probOfKDStrategy=(double)spinnerStrategkD.getValue();\r\n\t\t\t\t\tsettings.kMax=(int)spinnerKMAxx.getValue();\r\n\t\t\t\t\tsettings.valueOfPc=(double)spinnerPc.getValue();\r\n\t\t\t\t\tsettings.isQselected=(boolean)rdbtnQ.isSelected();\r\n\t\t\t\t\tsettings.isDebugSelected=(boolean) rdbtnDebug.isSelected();\r\n\t\t\t\t\tsettings.deltaPc=(double)spinnerDeltaPC.getValue();\r\n\t\t\t\t\tsettings.isLA1=(boolean) rdbtnLa1.isSelected();\r\n\t\t\t\t\tsettings.isLA2=(boolean) rdbtnLa2.isSelected();\r\n\t\t\t\t\tsettings.isLA3=(boolean) rdbtnLa3.isSelected();\r\n\t\t\t\t\t\r\n\t\t\t\t\talgo= new Algorithm(settings);\r\n\t\t\t\t\talgo.Calculate();\r\n\t\t\t\t\talgo.createWindow();\r\n\t\t\t\t\r\n\t\t\t\t} catch (IOException e) \r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\trdbtnDebug = new JRadioButton(\"debug\");\r\n\t\trdbtnDebug.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroupLayout groupLayout = new GroupLayout(frame.getContentPane());\r\n\t\tgroupLayout.setHorizontalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(panel_1, GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addComponent(panel, GroupLayout.PREFERRED_SIZE, 266, Short.MAX_VALUE))\r\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(24)\r\n\t\t\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t.addGap(10)\r\n\t\t\t\t\t\t\t\t\t.addComponent(btnRozpocznijSymulacje, GroupLayout.PREFERRED_SIZE, 97, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t.addComponent(rdbtnDebug, GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE))\r\n\t\t\t\t\t\t\t\t.addComponent(LApanel, 0, 0, Short.MAX_VALUE)))\r\n\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(28)\r\n\t\t\t\t\t\t\t.addComponent(panel_2, GroupLayout.PREFERRED_SIZE, 183, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addComponent(CAPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgroupLayout.setVerticalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(CAPanel, GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t.addComponent(panel_1, GroupLayout.PREFERRED_SIZE, 329, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 35, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(panel, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t.addComponent(panel_2, GroupLayout.PREFERRED_SIZE, 180, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addGap(1)\r\n\t\t\t\t\t\t\t\t.addComponent(LApanel, GroupLayout.PREFERRED_SIZE, 255, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t.addComponent(btnRozpocznijSymulacje, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t.addComponent(rdbtnDebug)))))\r\n\t\t\t\t\t.addGap(42))\r\n\t\t);\r\n\t\tGridBagLayout gbl_panel = new GridBagLayout();\r\n\t\tgbl_panel.columnWidths = new int[]{0, 0, 67, 0, 0, 0};\r\n\t\tgbl_panel.rowHeights = new int[]{0, 37, 41, 0};\r\n\t\tgbl_panel.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tgbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel.setLayout(gbl_panel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"C\");\r\n\t\tGridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel_1.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblNewLabel_1.gridx = 2;\r\n\t\tgbc_lblNewLabel_1.gridy = 0;\r\n\t\tpanel.add(lblNewLabel_1, gbc_lblNewLabel_1);\r\n\t\t\r\n\t\tJLabel lblD = new JLabel(\"D\");\r\n\t\tGridBagConstraints gbc_lblD = new GridBagConstraints();\r\n\t\tgbc_lblD.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_lblD.gridx = 4;\r\n\t\tgbc_lblD.gridy = 0;\r\n\t\tpanel.add(lblD, gbc_lblD);\r\n\t\t\r\n\t\tJLabel lblC = new JLabel(\"C\");\r\n\t\tGridBagConstraints gbc_lblC = new GridBagConstraints();\r\n\t\tgbc_lblC.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblC.gridx = 0;\r\n\t\tgbc_lblC.gridy = 1;\r\n\t\tpanel.add(lblC, gbc_lblC);\r\n\t\t\r\n\t\tJLabel lblR = new JLabel(\"R():\");\r\n\t\tGridBagConstraints gbc_lblR = new GridBagConstraints();\r\n\t\tgbc_lblR.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblR.gridx = 1;\r\n\t\tgbc_lblR.gridy = 1;\r\n\t\tpanel.add(lblR, gbc_lblR);\r\n\t\t\r\n\t\tspinnerR = new JSpinner();\r\n\t\tGridBagConstraints gbc_spinnerR = new GridBagConstraints();\r\n\t\tgbc_spinnerR.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_spinnerR.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_spinnerR.gridx = 2;\r\n\t\tgbc_spinnerR.gridy = 1;\r\n\t\tpanel.add(spinnerR, gbc_spinnerR);\r\n\t\tspinnerR.setModel(new SpinnerNumberModel(1.0,-99.99,99.99,0.01));\r\n\t\t\r\n\t\tJLabel lblS = new JLabel(\"S():\");\r\n\t\tGridBagConstraints gbc_lblS = new GridBagConstraints();\r\n\t\tgbc_lblS.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblS.gridx = 3;\r\n\t\tgbc_lblS.gridy = 1;\r\n\t\tpanel.add(lblS, gbc_lblS);\r\n\t\t\r\n\t\tspinnerS = new JSpinner();\r\n\t\tspinnerS.setModel(new SpinnerNumberModel(0,-99.99,99.99,0.01));\r\n\t\tGridBagConstraints gbc_spinnerS = new GridBagConstraints();\r\n\t\tgbc_spinnerS.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_spinnerS.gridx = 4;\r\n\t\tgbc_spinnerS.gridy = 1;\r\n\t\tpanel.add(spinnerS, gbc_spinnerS);\r\n\t\t\r\n\t\tJLabel lblD_1 = new JLabel(\"D\");\r\n\t\tGridBagConstraints gbc_lblD_1 = new GridBagConstraints();\r\n\t\tgbc_lblD_1.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_lblD_1.gridx = 0;\r\n\t\tgbc_lblD_1.gridy = 2;\r\n\t\tpanel.add(lblD_1, gbc_lblD_1);\r\n\t\t\r\n\t\tJLabel lblT = new JLabel(\"T(b):\");\r\n\t\tGridBagConstraints gbc_lblT = new GridBagConstraints();\r\n\t\tgbc_lblT.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_lblT.gridx = 1;\r\n\t\tgbc_lblT.gridy = 2;\r\n\t\tpanel.add(lblT, gbc_lblT);\r\n\t\t\r\n\t\tspinnerT = new JSpinner();\r\n\t\tGridBagConstraints gbc_spinnerT = new GridBagConstraints();\r\n\t\tgbc_spinnerT.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_spinnerT.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_spinnerT.gridx = 2;\r\n\t\tgbc_spinnerT.gridy = 2;\r\n\t\tpanel.add(spinnerT, gbc_spinnerT);\r\n\t\tspinnerT.setModel(new SpinnerNumberModel(1.4,-99.99,99.99,0.01));\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"P():\");\r\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_lblNewLabel.gridx = 3;\r\n\t\tgbc_lblNewLabel.gridy = 2;\r\n\t\tpanel.add(lblNewLabel, gbc_lblNewLabel);\r\n\t\t\r\n\t\tspinnerP = new JSpinner();\r\n\t\tspinnerP.setModel(new SpinnerNumberModel(0,-99.99,99.99,0.01));\r\n\t\tGridBagConstraints gbc_spinnerP = new GridBagConstraints();\r\n\t\tgbc_spinnerP.gridx = 4;\r\n\t\tgbc_spinnerP.gridy = 2;\r\n\t\tpanel.add(spinnerP, gbc_spinnerP);\r\n\t\t\r\n\t\tspinnerHistoria = new JSpinner();\r\n\t\tspinnerHistoria.setEnabled(false);\r\n\t\tspinnerHistoria.setModel(new SpinnerNumberModel(new Integer(8), new Integer(1), null, new Integer(1)));\r\n\t\t\r\n\t\tJLabel lblHistoria = new JLabel(\"pamiec\");\r\n\t\t\r\n\t\tspinnerEpsilon = new JSpinner();\r\n\t\tspinnerEpsilon.setEnabled(false);\r\n\t\tspinnerEpsilon.setModel(new SpinnerNumberModel(0.001,0,1,0.001));\r\n\t\t\r\n\t\tJLabel lblEpsilon = new JLabel(\"epsilon:\");\r\n\t\t\r\n\t\tJPanel panel_6 = new JPanel();\r\n\t\tpanel_6.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"mutacja\", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tGroupLayout gl_LApanel = new GroupLayout(LApanel);\r\n\t\tgl_LApanel.setHorizontalGroup(\r\n\t\t\tgl_LApanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_LApanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_LApanel.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(panel_6, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addGroup(gl_LApanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblHistoria)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerHistoria, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_LApanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblEpsilon)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerEpsilon, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_LApanel.setVerticalGroup(\r\n\t\t\tgl_LApanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_LApanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_LApanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerHistoria, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblHistoria))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_LApanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerEpsilon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblEpsilon))\r\n\t\t\t\t\t.addGap(18)\r\n\t\t\t\t\t.addComponent(panel_6, GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\t\r\n\t\tspinnerMutationHistoria = new JSpinner();\r\n\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\tspinnerMutationHistoria.setModel(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\t\r\n\t\tJLabel lblHistoria_1 = new JLabel(\"historia:\");\r\n\t\t\r\n\t\tspinnerMutationc2 = new JSpinner();\r\n\t\tspinnerMutationc2.setEnabled(false);\r\n\t\tspinnerMutationc2.setModel(new SpinnerNumberModel(1, 1, 100, 1));\r\n\t\t\r\n\t\tJLabel lblC_2 = new JLabel(\"c2:\");\r\n\t\t\r\n\t\tSpinnerMutationEpsilon = new JSpinner();\r\n\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\tSpinnerMutationEpsilon.setModel(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\t\r\n\t\tspinnerMutationc3 = new JSpinner();\r\n\t\tspinnerMutationc3.setEnabled(false);\r\n\t\tspinnerMutationc3.setModel(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\t\r\n\t\tJLabel lblEpsilon_1 = new JLabel(\"epsilon:\");\r\n\t\t\r\n\t\tJLabel lblC_3 = new JLabel(\"c3:\");\r\n\t\tGroupLayout gl_panel_6 = new GroupLayout(panel_6);\r\n\t\tgl_panel_6.setHorizontalGroup(\r\n\t\t\tgl_panel_6.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_panel_6.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap(24, Short.MAX_VALUE)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(lblHistoria_1)\r\n\t\t\t\t\t\t.addComponent(lblC_2)\r\n\t\t\t\t\t\t.addComponent(lblEpsilon_1)\r\n\t\t\t\t\t\t.addComponent(lblC_3))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.LEADING, false)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationc3, Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(SpinnerMutationEpsilon, Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationc2, Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationHistoria, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_panel_6.setVerticalGroup(\r\n\t\t\tgl_panel_6.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationHistoria, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblHistoria_1))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationc2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblC_2))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(SpinnerMutationEpsilon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblEpsilon_1))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationc3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblC_3))\r\n\t\t\t\t\t.addContainerGap(43, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tpanel_6.setLayout(gl_panel_6);\r\n\t\tLApanel.setLayout(gl_LApanel);\r\n\t\t\r\n\t\tspinnerStrategPc = new JSpinner();\r\n\t\tspinnerStrategPc.setModel(new SpinnerNumberModel(0.25, 0, 1, 0.01));\r\n\t\tspinnerStrategPc.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tdouble suma= (double)spinnerStrategAllC.getValue()+(double)SpinnerStrategAllD.getValue()+(double)spinnerStrategkD.getValue();\r\n\t\t\t\tif((suma+(double)spinnerStrategPc.getValue())>1)\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerStrategPc.setValue((double)1-suma);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"strategia Pc:\");\r\n\t\t\r\n\t\tspinnerStrategAllC = new JSpinner();\r\n\t\tspinnerStrategAllC.setModel(new SpinnerNumberModel(0.25, 0, 1, 0.01));\r\n\t\tspinnerStrategAllC.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tdouble suma= (double)spinnerStrategPc.getValue()+(double)SpinnerStrategAllD.getValue()+(double)spinnerStrategkD.getValue();\r\n\t\t\t\tif((suma+(double)spinnerStrategAllC.getValue())>1)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tspinnerStrategAllC.setValue((double)1-suma);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tSpinnerStrategAllD = new JSpinner();\r\n\t\tSpinnerStrategAllD.setModel(new SpinnerNumberModel(0.25, 0, 1, 0.01));\r\n\t\tSpinnerStrategAllD.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tdouble suma= (double)spinnerStrategPc.getValue()+(double)spinnerStrategAllC.getValue()+(double)spinnerStrategkD.getValue();\r\n\t\t\t\tif((suma+(double)SpinnerStrategAllD.getValue())>1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerStrategAllD.setValue((double)1-suma);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tspinnerStrategkD = new JSpinner();\r\n\t\tspinnerStrategkD.setModel(new SpinnerNumberModel(0.25, 0, 1, 0.01));\r\n\t\tspinnerStrategkD.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tdouble suma= (double)spinnerStrategPc.getValue()+(double)spinnerStrategAllC.getValue()+(double)SpinnerStrategAllD.getValue();\r\n\t\t\t\tif((suma+(double)spinnerStrategkD.getValue())>1)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tspinnerStrategkD.setValue((double)1-suma);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJLabel lblStrategiaAllc = new JLabel(\"strategia AllC:\");\r\n\t\t\r\n\t\tJLabel lblStrategia = new JLabel(\"strategia AllD:\");\r\n\t\t\r\n\t\tJLabel lblStrategiaKd = new JLabel(\"strategia k-D:\");\r\n\t\t\r\n\t\trbtnkConst = new JRadioButton(\"k_const\");\r\n\t\t\r\n\t\tspinnerPc = new JSpinner();\r\n\t\tspinnerPc.setModel(new SpinnerNumberModel(0.5, 0, 1, 0.01));\r\n\t\t\r\n\t\tJLabel lblPWsppracy = new JLabel(\"p_C:\");\r\n\t\t\r\n\t\tspinnerKMAxx = new JSpinner();\r\n\t\tspinnerKMAxx.setModel(new SpinnerNumberModel(3, 0, 7, 1));\r\n\t\t\r\n\t\tJPanel panel_5 = new JPanel();\r\n\t\tpanel_5.setBorder(new TitledBorder(null, \"mutacja\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tJLabel deltaP_C = new JLabel(\"delta p_C:\");\r\n\t\t\r\n\t\tspinnerDeltaPC = new JSpinner(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\tGroupLayout gl_CAPanel = new GroupLayout(CAPanel);\r\n\t\tgl_CAPanel.setHorizontalGroup(\r\n\t\t\tgl_CAPanel.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(panel_5, GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.TRAILING, false)\r\n\t\t\t\t\t\t\t\t.addComponent(lblPWsppracy)\r\n\t\t\t\t\t\t\t\t.addComponent(rbtnkConst, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(deltaP_C))\r\n\t\t\t\t\t\t\t.addGap(18)\r\n\t\t\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerDeltaPC, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerKMAxx, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerPc, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(26)\r\n\t\t\t\t\t\t\t.addComponent(label, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerStrategPc, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblStrategiaAllc)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerStrategAllC, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblStrategia)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(SpinnerStrategAllD, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblStrategiaKd)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerStrategkD, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_CAPanel.setVerticalGroup(\r\n\t\t\tgl_CAPanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerStrategPc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(label))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerStrategAllC, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblStrategiaAllc))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(SpinnerStrategAllD, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblStrategia))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerStrategkD, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblStrategiaKd))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerKMAxx, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(rbtnkConst))\r\n\t\t\t\t\t.addGap(5)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblPWsppracy)\r\n\t\t\t\t\t\t.addComponent(spinnerPc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(deltaP_C)\r\n\t\t\t\t\t\t.addComponent(spinnerDeltaPC, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 66, Short.MAX_VALUE)\r\n\t\t\t\t\t.addComponent(panel_5, GroupLayout.PREFERRED_SIZE, 156, GroupLayout.PREFERRED_SIZE))\r\n\t\t);\r\n\t\t\r\n\t\tspinnerMutStrateg = new JSpinner();\r\n\t\tspinnerMutStrateg.setModel(new SpinnerNumberModel(0,0,1,0.01));\r\n\t\t\r\n\t\tJLabel lblZmianaStrateg = new JLabel(\"strategia:\");\r\n\t\t\r\n\t\tspinnerMutPc = new JSpinner();\r\n\t\tspinnerMutPc.setModel(new SpinnerNumberModel(0,0,1,0.01));\r\n\t\t\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"parametr Pc:\");\r\n\t\t\r\n\t\tspinnerMutC1 = new JSpinner();\r\n\t\tspinnerMutC1.setModel(new SpinnerNumberModel(0.05,0,1,0.01));\r\n\t\t\r\n\t\tJLabel lblC_1 = new JLabel(\"c1:\");\r\n\t\tGroupLayout gl_panel_5 = new GroupLayout(panel_5);\r\n\t\tgl_panel_5.setHorizontalGroup(\r\n\t\t\tgl_panel_5.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap(17, Short.MAX_VALUE)\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(lblZmianaStrateg)\r\n\t\t\t\t\t\t.addComponent(lblNewLabel_2)\r\n\t\t\t\t\t\t.addComponent(lblC_1))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.LEADING, false)\r\n\t\t\t\t\t\t.addComponent(spinnerMutC1, Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(spinnerMutPc)\r\n\t\t\t\t\t\t.addComponent(spinnerMutStrateg, GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_panel_5.setVerticalGroup(\r\n\t\t\tgl_panel_5.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutStrateg, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblZmianaStrateg))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutPc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblNewLabel_2))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutC1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblC_1))\r\n\t\t\t\t\t.addContainerGap(26, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tpanel_5.setLayout(gl_panel_5);\r\n\t\tCAPanel.setLayout(gl_CAPanel);\r\n\t\t\r\n\t\trdbtnTylkoKomrkiCa = new JRadioButton(\"Tylko Kom\\u00F3rki CA\");\r\n\t\trdbtnTylkoKomrkiCa.setSelected(true);\r\n\t\trdbtnTylkoKomrkiCa.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(rdbtnTylkoKomrkiCa.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerpTypAgCA.setEnabled(false);\r\n\t\t\t\t\tLApanel.setEnabled(false);\r\n\t\t\t\t\tCAPanel.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(true);\r\n\t\t\t\t\tspinnerPc.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(true);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(true);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(true);\r\n\t\t\t\t\trbtnkConst.setEnabled(true);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(true);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(true);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(true);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(false);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(false);\r\n\t\t\t\t\trdbtnLa1.setEnabled(false);\r\n\t\t\t\t\trdbtnLa2.setEnabled(false);\r\n\t\t\t\t\trdbtnLa3.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tLApanel.setEnabled(false);\r\n\t\t\t\t\tCAPanel.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(false);\r\n\t\t\t\t\tspinnerPc.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(false);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(false);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(false);\r\n\t\t\t\t\trbtnkConst.setEnabled(false);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(false);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(false);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(false);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(false);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonGroup.add(rdbtnTylkoKomrkiCa);\r\n\t\t\r\n\t\trdbtnTylkoKomrkiLa = new JRadioButton(\"Tylko Kom\\u00F3rki LA\");\r\n\t\trdbtnTylkoKomrkiLa.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(rdbtnTylkoKomrkiLa.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerpTypAgCA.setEnabled(false);\r\n\t\t\t\t\tLApanel.setEnabled(true);\r\n\t\t\t\t\tCAPanel.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(false);\r\n\t\t\t\t\tspinnerPc.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(false);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(false);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(false);\r\n\t\t\t\t\trbtnkConst.setEnabled(false);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(false);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(false);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(false);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(true);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(true);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(true);\r\n\t\t\t\t\trdbtnLa1.setEnabled(true);\r\n\t\t\t\t\trdbtnLa2.setEnabled(true);\r\n\t\t\t\t\trdbtnLa3.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tLApanel.setEnabled(false);\r\n\t\t\t\t\tCAPanel.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(false);\r\n\t\t\t\t\tspinnerPc.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(false);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(false);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(false);\r\n\t\t\t\t\trbtnkConst.setEnabled(false);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(false);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(false);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(false);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(false);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(false);\r\n\t\t\t\t\trdbtnLa1.setEnabled(false);\r\n\t\t\t\t\trdbtnLa2.setEnabled(false);\r\n\t\t\t\t\trdbtnLa3.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonGroup.add(rdbtnTylkoKomrkiLa);\r\n\t\t\r\n\t\trdbtnKomrkiLaiCA = new JRadioButton(\"Kom\\u00F3rki LA i CA\");\r\n\t\t\r\n\t\tbuttonGroup.add(rdbtnKomrkiLaiCA);\r\n\t\t\r\n\t\trdbtnKomrkiLaiCA.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (rdbtnKomrkiLaiCA.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerpTypAgCA.setEnabled(true);\r\n\t\t\t\t\tCAPanel.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(true);\r\n\t\t\t\t\tspinnerPc.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(true);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(true);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(true);\r\n\t\t\t\t\trbtnkConst.setEnabled(true);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(true);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(true);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(true);\r\n\t\t\t\t\tLApanel.setEnabled(true);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(true);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(true);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(true);\r\n\t\t\t\t\trdbtnLa1.setEnabled(true);\r\n\t\t\t\t\trdbtnLa2.setEnabled(true);\r\n\t\t\t\t\trdbtnLa3.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerpTypAgCA.setEnabled(false);\r\n\t\t\t\t\tLApanel.setEnabled(false);\r\n\t\t\t\t\tCAPanel.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(false);\r\n\t\t\t\t\tspinnerPc.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(false);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(false);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(false);\r\n\t\t\t\t\trbtnkConst.setEnabled(false);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(false);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(false);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(false);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(false);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\t\r\n\t\tSpinnerpTypAgCA = new JSpinner();\r\n\t\tSpinnerpTypAgCA.setModel(new SpinnerNumberModel(0.5,0,1,0.01));\r\n\t\t\r\n\t\tJLabel lblTypAgentaCa = new JLabel(\"typ Agenta CA:\");\r\n\t\t\r\n\t\trdbtnLa1 = new JRadioButton(\"LA1\");\r\n\t\trdbtnLa1.setEnabled(false);\r\n\t\trdbtnLa1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonGroup_1.add(rdbtnLa1);\r\n\t\t\r\n\t\trdbtnLa2 = new JRadioButton(\"LA2\");\r\n\t\trdbtnLa2.setEnabled(false);\r\n\t\trdbtnLa2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonGroup_1.add(rdbtnLa2);\r\n\t\t\r\n\t\trdbtnLa3 = new JRadioButton(\"LA3\");\r\n\t\trdbtnLa3.setEnabled(false);\r\n\t\trdbtnLa3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\trdbtnLa3.setSelected(true);\r\n\t\tbuttonGroup_1.add(rdbtnLa3);\r\n\t\tGroupLayout gl_panel_2 = new GroupLayout(panel_2);\r\n\t\tgl_panel_2.setHorizontalGroup(\r\n\t\t\tgl_panel_2.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(Alignment.LEADING, gl_panel_2.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(rdbtnKomrkiLaiCA)\r\n\t\t\t\t\t\t.addComponent(rdbtnTylkoKomrkiCa)\r\n\t\t\t\t\t\t.addComponent(rdbtnTylkoKomrkiLa)\r\n\t\t\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblTypAgentaCa)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t.addComponent(SpinnerpTypAgCA, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(10)\r\n\t\t\t\t\t\t\t.addComponent(rdbtnLa1)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t.addComponent(rdbtnLa2)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t.addComponent(rdbtnLa3)))\r\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tgl_panel_2.setVerticalGroup(\r\n\t\t\tgl_panel_2.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addComponent(rdbtnTylkoKomrkiCa)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addComponent(rdbtnTylkoKomrkiLa)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(rdbtnLa1)\r\n\t\t\t\t\t\t.addComponent(rdbtnLa2)\r\n\t\t\t\t\t\t.addComponent(rdbtnLa3))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addComponent(rdbtnKomrkiLaiCA)\r\n\t\t\t\t\t.addGap(4)\r\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblTypAgentaCa)\r\n\t\t\t\t\t\t.addComponent(SpinnerpTypAgCA, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tpanel_2.setLayout(gl_panel_2);\r\n\t\t\r\n\t\tJLabel lblLiczbaWierszy = new JLabel(\"liczba wierszy:\");\r\n\t\t\r\n\t\tspinnerLiczbaWireszy = new JSpinner();\r\n\t\tspinnerLiczbaWireszy.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent arg0) {\r\n\t\t\t\tif (((Integer)spinnerLiczbaWireszy.getValue())==0 || ((Integer)spinnerLiczbaKolumn.getValue())==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerRSasiedztwa.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tspinnerRSasiedztwa.setEnabled(false);\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tspinnerLiczbaWireszy.setModel(new SpinnerNumberModel(50, 0, 1000, 1));\r\n\t\t\r\n\t\tspinnerLiczbaKolumn = new JSpinner();\r\n\t\tspinnerLiczbaKolumn.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tif (((Integer)spinnerLiczbaKolumn.getValue())==0 || ((Integer)spinnerLiczbaWireszy.getValue())==0 )\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerRSasiedztwa.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tspinnerRSasiedztwa.setEnabled(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tspinnerLiczbaKolumn.setModel(new SpinnerNumberModel(50, 0, 1000, 1));\r\n\t\t\r\n\t\tJLabel lblLiczbaKolumn = new JLabel(\"liczba kolumn:\");\r\n\t\t\r\n\t\tJLabel lblRozmiarSsiedztwa = new JLabel(\"r s\\u0105siedztwa:\");\r\n\t\t\r\n\t\tspinnerRSasiedztwa = new JSpinner();\r\n\t\tspinnerRSasiedztwa.setEnabled(false);\r\n\t\tspinnerRSasiedztwa.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tspinnerRSasiedztwa.setModel(new SpinnerNumberModel(new Integer(1), new Integer(1), null, new Integer(1)));\r\n\t\t\r\n\t\tspinnerp_niezam = new JSpinner();\r\n\t\tspinnerp_niezam.setModel(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\t\r\n\t\tJLabel lblPniezam = new JLabel(\"p_niezam:\");\r\n\t\t\r\n\t\tJLabel lblPinitc = new JLabel(\"p_init_C:\");\r\n\t\t\r\n\t\tspinnerp_init_C = new JSpinner();\r\n\t\tspinnerp_init_C.setModel(new SpinnerNumberModel(0.5,0,1,0.01));\r\n\t\t\r\n\t\tspinnergot_wspol_doch = new JSpinner();\r\n\t\tspinnergot_wspol_doch.setModel(new SpinnerNumberModel(0.1,0,1,0.01));\r\n\t\tspinnergot_wspol_doch.setEnabled(false);\r\n\t\t\r\n\t\trdbtnGotWspDoch = new JRadioButton(\"got. wspol. doch.\");\r\n\t\trdbtnGotWspDoch.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (rdbtnGotWspDoch.isSelected())\r\n\t\t\t\t\tspinnergot_wspol_doch.setEnabled(true);\r\n\t\t\t\telse\r\n\t\t\t\t\tspinnergot_wspol_doch.setEnabled(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tspinnerQ = new JSpinner();\r\n\t\tspinnerQ.setModel(new SpinnerNumberModel(new Integer(1), new Integer(1), null, new Integer(1)));\r\n\t\t\r\n\t\trdbtnZiarno = new JRadioButton(\"ziarno\");\r\n\t\trdbtnZiarno.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (rdbtnZiarno.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerZiarno.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerZiarno.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tspinnerZiarno = new JSpinner();\r\n\t\tspinnerZiarno.setEnabled(false);\r\n\t\t\r\n\t\tspinnerIloscExperymentow = new JSpinner();\r\n\t\tspinnerIloscExperymentow.setModel(new SpinnerNumberModel(1, 1, 999, 1));\r\n\t\t\r\n\t\tJLabel lblIloEksperymentw = new JLabel(\"ilo\\u015B\\u0107 eksperyment\\u00F3w:\");\r\n\t\t\r\n\t\tspinnerIloscKrokow = new JSpinner();\r\n\t\tspinnerIloscKrokow.setModel(new SpinnerNumberModel(100, 1, 1000, 1));\r\n\t\t\r\n\t\tJLabel lblDlugoscRundy = new JLabel(\"ilosc krokow:\");\r\n\t\t\r\n\t\trdbtnQ = new JRadioButton(\"q\");\r\n\t\trdbtnQ.setSelected(true);\r\n\t\trdbtnQ.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (rdbtnQ.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerQ.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tspinnerQ.setEnabled(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroupLayout gl_panel_1 = new GroupLayout(panel_1);\r\n\t\tgl_panel_1.setHorizontalGroup(\r\n\t\t\tgl_panel_1.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblLiczbaWierszy)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerLiczbaWireszy, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))\r\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t\t\t.addComponent(lblPinitc)\r\n\t\t\t\t\t\t\t\t.addComponent(lblPniezam, GroupLayout.PREFERRED_SIZE, 61, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t.addComponent(lblLiczbaKolumn, GroupLayout.PREFERRED_SIZE, 84, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addGap(7)\r\n\t\t\t\t\t\t\t\t\t\t.addComponent(lblRozmiarSsiedztwa)))\r\n\t\t\t\t\t\t\t\t.addComponent(rdbtnQ))\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerp_init_C, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerp_niezam, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerLiczbaKolumn, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerQ, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerRSasiedztwa, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)))\r\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t.addComponent(rdbtnGotWspDoch)\r\n\t\t\t\t\t\t\t\t\t.addComponent(rdbtnZiarno))\r\n\t\t\t\t\t\t\t\t.addComponent(lblIloEksperymentw)\r\n\t\t\t\t\t\t\t\t.addComponent(lblDlugoscRundy))\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerZiarno, GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnergot_wspol_doch, GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerIloscExperymentow, GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerIloscKrokow, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE))))\r\n\t\t\t\t\t.addGap(40))\r\n\t\t);\r\n\t\tgl_panel_1.setVerticalGroup(\r\n\t\t\tgl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t.addGap(16)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblLiczbaWierszy)\r\n\t\t\t\t\t\t.addComponent(spinnerLiczbaWireszy, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addGap(4)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerLiczbaKolumn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblLiczbaKolumn))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerRSasiedztwa, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblRozmiarSsiedztwa))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerQ, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(rdbtnQ))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerp_niezam, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblPniezam))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerp_init_C, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblPinitc))\r\n\t\t\t\t\t.addGap(10)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnergot_wspol_doch, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(rdbtnGotWspDoch))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerZiarno, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(rdbtnZiarno))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerIloscExperymentow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblIloEksperymentw))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerIloscKrokow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblDlugoscRundy))\r\n\t\t\t\t\t.addGap(4))\r\n\t\t);\r\n\t\tpanel_1.setLayout(gl_panel_1);\r\n\t\t\r\n\t\tframe.getContentPane().setLayout(groupLayout);\r\n\t}", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "public DRInitialPlotPanel() {\n initComponents();\n }", "@Override protected JComponent setupPanel()\t{ return null; }", "private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}", "private void setParameters(ConstMetaData metaData) {\n if (dialog == null) {\n return;\n }\n // Use GPU\n dialog.setUseGpuEnabled(Network.isLocalHostGpuProcessingEnabled(manager, axisID,\n manager.getPropertyUserDir()));\n dialog.setUseGpuSelected(metaData.isDefaultGpuProcessing());\n dialog.setBinning(metaData.getPosBinning(axisID));\n dialog.setSampleThickness(metaData.getSampleThickness(axisID));\n }", "protected void setupParameters() {\n \n \n\n }", "public abstract void init(JPanel panel);", "public FDRSettingsPanel() {\n initComponents();\n }", "public PanelAmigo() {\n initComponents();\n \n }", "public TitlePanel() {\n\t\tinitComponents();\n\t}", "public HoaDonJPanel() {\n initComponents(); \n this.init();\n }", "void setParameters() {\n\t\t\n\t}", "public kinpanel() {\n initComponents();\n }", "public Panel() {\n initComponents();\n\n\n }", "private void setUpPanel() { \n this.setPreferredSize(new Dimension(myWidth, myHeight)); \n // Set this panel as a grid panel with 1 column, 6 rows. \n this.setLayout(new GridLayout(NUM_ROWS, 1)); \n // Create the next piece panel.\n this.myNextPiece = new TetrisNextPiecePanel();\n this.add(myNextPiece); \n // Add another panel which will show game instruction.\n final HowToPlayPanel instructionsPanel = new HowToPlayPanel();\n this.add(instructionsPanel);\n // add the last panel which will show the scores, level, game state etc.\n this.setUpLastPanel();\n }", "public TShapePanel() {\r\ncommonInitialization();\r\n }", "private void settings() {\n\n\t\tthis.addWindowListener(controller);\n\t\tthis.setVisible(true);\n\t\tthis.setSize(1000, 660);\n\t\tthis.validate();\n\t\tthis.repaint();\n\n\t}", "private void setPanel()\r\n\t{\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setLayout(new GridLayout(5, 2));\r\n\t\t\r\n\t\tpanel.add(bubbleL);\r\n\t\tpanel.add(bubblePB);\r\n\t\t\r\n\t\tpanel.add(insertionL);\r\n\t\tpanel.add(insertionPB);\r\n\t\t\r\n\t\tpanel.add(mergeL);\r\n\t\tpanel.add(mergePB);\r\n\t\t\r\n\t\tpanel.add(quickL);\r\n\t\tpanel.add(quickPB);\r\n\t\t\r\n\t\tpanel.add(radixL);\r\n\t\tpanel.add(radixPB);\r\n\t}", "private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }", "public BindingConfigurationPanel() {\n initComponents();\n initGUI();\n }", "public ConfEGTaskPanel() {\n initComponents();\n initListenerButton(); \n initState();\n initApplyCellCheckBox();\n }", "public DrawPanel() {\n initComponents();\n }", "private void init() {\r\n\t\tthis.setBackground(Color.decode(\"#c5dfed\"));\r\n\r\n\t\tthis.initPanelButtons();\r\n\r\n\t\tUtilityClass.addBorder(this, 20, 20, 20, 20);\r\n\t\t\r\n\t\tthis.title.setFont(ConstantView.FONT_TITLE_CRUD);\r\n\t\tthis.title.setHorizontalAlignment(JLabel.CENTER);\r\n\t\tthis.add(title, BorderLayout.NORTH);\r\n\t\t\r\n\t\tthis.add(panelButtons, BorderLayout.SOUTH);\r\n\t\tthis.jPanelFormClient.setOpaque(false);\r\n\t\tthis.add(jPanelFormClient, BorderLayout.CENTER);\r\n\t}", "public PrintsPanel() {\n initComponents();\n createPanels();\n\n }", "public DataSetPanel() {\n initComponents();\n }", "public PreferencesPanel() {\n initComponents();\n }", "private void setupExportValuesWithDataPanel(){\n exportValuesWithDataPanel = new JPanel();\n exportValuesWithDataPanel.setLayout(new BoxLayout(exportValuesWithDataPanel, BoxLayout.X_AXIS));\n\n exportValuesCheckBox = new JCheckBox(\"Include associated input values\");\n exportValuesCheckBox.setSelected(true);\n exportValuesCheckBox.setToolTipText(\"Includes unit system, width and depth, diameter, and gauge length\");\n\n exportValuesWithDataPanel.add(Box.createHorizontalStrut(HORIZONTAL_BUFFER));\n exportValuesWithDataPanel.add(exportValuesCheckBox);\n exportValuesWithDataPanel.add(Box.createHorizontalGlue());\n }", "private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(this.extension.getMessages().getString(\"spiderajax.options.title\"));\n \t if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {\n \t \tthis.setSize(391, 320);\n \t }\n this.add(getPanelProxy(), getPanelProxy().getName()); \n \t}", "public WithdrawPanel() {\n initComponents();\n }", "protected void init() {\n super.init();\n prefetchCount.setPreferredSize(new Dimension(100,25));\n useTx.setPreferredSize(new Dimension(100,25));\n\n mainPanel.add(receiveTimeout);\n mainPanel.add(prefetchCount);\n mainPanel.add(purgeQueue);\n mainPanel.add(autoAck);\n mainPanel.add(readResponse);\n mainPanel.add(useTx);\n }", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "private void customize() {\r\n panel.setSize(new Dimension(width, height));\r\n panel.setLayout(new BorderLayout());\r\n }", "private void settings() {\n mainTitle = makeLabel(\"Settings\", true);\n add(mainTitle);\n add(content);\n add(diffSlider);\n add(colourChooser);\n add(mainB);//button to main menu\n diffSlider.requestFocus();\n }", "private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }", "public void graphicalSettings(int ps, int tw, int th) {\n\n setZoom(ps);\n T_WIDTH = tw;\n T_HEIGHT = th;\n\n SCREEN_WIDTH = T_WIDTH * P_SCALE + EMBOSS;\n SCREEN_HEIGHT = T_HEIGHT * P_SCALE + EMBOSS;\n }", "private void initialize() {\r\n\t\tthis.setSize(734, 710);\r\n\t\tfinal GridBagLayout gridBagLayout_1 = new GridBagLayout();\r\n\t\tgridBagLayout_1.rowWeights = new double[]{0.0, 1.0,0};\r\n\t\tgridBagLayout_1.columnWeights = new double[]{1.0};\r\n\t\tgridBagLayout_1.rowHeights = new int[] {0,0, 0}; \r\n\t\tthis.setLayout(gridBagLayout_1);\r\n\r\n\t\teditROIPanel = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_2 = new GridBagLayout();\r\n\t\tgridBagLayout_2.rowHeights = new int[] {0,0,7};\r\n\t\tgridBagLayout_2.columnWidths = new int[] {0,7};\r\n\t\teditROIPanel.setLayout(gridBagLayout_2);\r\n\t\tfinal GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();\r\n\t\tgridBagConstraints_6.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_6.insets = new Insets(2, 2, 5, 2);\r\n\t\tgridBagConstraints_6.weightx = 1.0;\r\n\t\tgridBagConstraints_6.gridy = 0;\r\n\t\tgridBagConstraints_6.gridx = 0;\r\n\t\tadd(editROIPanel, gridBagConstraints_6);\r\n\r\n\t\tfinal JLabel infoLabel = new JLabel();\r\n\t\tinfoLabel.setText(\"Data Info:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_12 = new GridBagConstraints();\r\n\t\tgridBagConstraints_12.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_12.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_12.gridy = 0;\r\n\t\tgridBagConstraints_12.gridx = 0;\r\n\t\teditROIPanel.add(infoLabel, gridBagConstraints_12);\r\n\r\n\t\ttextLabel = new JLabel();\r\n\t\ttextLabel.setPreferredSize(new Dimension(500, 20));\r\n\t\ttextLabel.setMinimumSize(new Dimension(500, 20));\r\n\t\tfinal GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();\r\n\t\tgridBagConstraints_2.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_2.weightx = 1;\r\n\t\tgridBagConstraints_2.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_2.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_2.gridy = 0;\r\n\t\tgridBagConstraints_2.gridx = 1;\r\n\t\tgridBagConstraints_2.gridwidth = 2;\r\n\t\teditROIPanel.add(textLabel, gridBagConstraints_2);\r\n\t\ttextLabel.setText(\"No FRAP DataSet loaded.\");\r\n\r\n\t\tautoCropButton = new JButton(new ImageIcon(getClass().getResource(\"/images/autoCrop.gif\")));\r\n\t\tautoCropButton.setName(\"roiAutoCropBtn\");\r\n\t\tautoCropButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_AUTOCROP_PROPERTY, null,null);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tclearROIbutton = new JButton(new ImageIcon(getClass().getResource(\"/images/clearROI.gif\")));\r\n\t\tclearROIbutton.setEnabled(false);\r\n\t\tclearROIbutton.setName(\"clearROIBtn\");\r\n\t\tclearROIbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tif(roiComboBox.getItemCount() == 0){\r\n\t\t\t\t\tgiveROIRequiredWarning(\"Clear Domain\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_CLEARROI_PROPERTY, ((ROIMultiPaintManager.ComboboxROIName)roiComboBox.getSelectedItem()), null);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tviewZLabel = new JLabel();\r\n\t\tviewZLabel.setText(\"View Z:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_17 = new GridBagConstraints();\r\n\t\tgridBagConstraints_17.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_17.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_17.gridy = 1;\r\n\t\tgridBagConstraints_17.gridx = 0;\r\n\t\teditROIPanel.add(viewZLabel, gridBagConstraints_17);\r\n\r\n\t\tfinal JPanel panel_1 = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_4 = new GridBagLayout();\r\n\t\tgridBagLayout_4.columnWeights = new double[]{1.0};\r\n\t\tgridBagLayout_4.columnWidths = new int[] {7};\r\n\t\tpanel_1.setLayout(gridBagLayout_4);\r\n\t\tfinal GridBagConstraints gridBagConstraints_18 = new GridBagConstraints();\r\n\t\tgridBagConstraints_18.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_18.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_18.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_18.weightx = 0;\r\n\t\tgridBagConstraints_18.gridy = 1;\r\n\t\tgridBagConstraints_18.gridx = 1;\r\n\t\teditROIPanel.add(panel_1, gridBagConstraints_18);\r\n\t\tfinal GridBagConstraints gridBagConstraints_19 = new GridBagConstraints();\r\n\t\tgridBagConstraints_19.insets = new Insets(0, 0, 5, 0);\r\n\t\tgridBagConstraints_19.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_19.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_19.weightx = 1;\r\n\t\tgridBagConstraints_19.gridy = 0;\r\n\t\tgridBagConstraints_19.gridx = 0;\r\n\t\tpanel_1.add(getZSlider(), gridBagConstraints_19);\r\n\r\n\t\tviewTLabel = new JLabel();\r\n\t\tviewTLabel.setText(\"View Time:\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_13 = new GridBagConstraints();\r\n\t\tgridBagConstraints_13.insets = new Insets(0, 0, 0, 4);\r\n\t\tgridBagConstraints_13.anchor = GridBagConstraints.EAST;\r\n\t\tgridBagConstraints_13.gridy = 2;\r\n\t\tgridBagConstraints_13.gridx = 0;\r\n\t\teditROIPanel.add(viewTLabel, gridBagConstraints_13);\r\n\r\n\t\tfinal JPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new GridBagLayout());\r\n\t\tfinal GridBagConstraints gridBagConstraints_15 = new GridBagConstraints();\r\n\t\tgridBagConstraints_15.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_15.weightx = 1;\r\n\t\tgridBagConstraints_15.insets = new Insets(0, 0, 0, 0);\r\n\t\tgridBagConstraints_15.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_15.gridy = 0;\r\n\t\tgridBagConstraints_15.gridx = 0;\r\n\t\tpanel.add(getTimeSlider(), gridBagConstraints_15);\r\n\t\t\r\n\t\tfinal GridBagConstraints gridBagConstraints_14 = new GridBagConstraints();\r\n\t\tgridBagConstraints_14.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_14.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_14.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_14.gridy = 2;\r\n\t\tgridBagConstraints_14.gridx = 1;\r\n\t\teditROIPanel.add(panel, gridBagConstraints_14);\r\n\r\n\t\tfinal JPanel editROIButtonPanel = new JPanel();\r\n\t\tfinal GridBagLayout gridBagLayout_3 = new GridBagLayout();\r\n\t\tgridBagLayout_3.rowWeights = new double[]{0.0, 1.0};\r\n\t\tgridBagLayout_3.columnWeights = new double[]{0.0, 1.0, 0.0, 0.0, 0.0, 0.0};\r\n\t\tgridBagLayout_3.columnWidths = new int[] {0, 0,7,7, 0, 0};\r\n\t\teditROIButtonPanel.setLayout(gridBagLayout_3);\r\n\t\tfinal GridBagConstraints gridBagConstraints_8 = new GridBagConstraints();\r\n\t\tgridBagConstraints_8.gridwidth = 2;\r\n\t\tgridBagConstraints_8.weightx = 0;\r\n\t\tgridBagConstraints_8.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_8.insets = new Insets(0, 2, 0, 0);\r\n\t\tgridBagConstraints_8.anchor = GridBagConstraints.WEST;\r\n\t\tgridBagConstraints_8.gridy = 3;\r\n\t\tgridBagConstraints_8.gridx = 0;\r\n\t\teditROIPanel.add(editROIButtonPanel, gridBagConstraints_8);\r\n\t\t\r\n\t\tpanel_2 = new JPanel();\r\n\t\tGridBagConstraints gbc_panel_2 = new GridBagConstraints();\r\n\t\tgbc_panel_2.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_panel_2.weighty = 1.0;\r\n\t\tgbc_panel_2.weightx = 1.0;\r\n\t\tgbc_panel_2.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_2.gridx = 0;\r\n\t\tgbc_panel_2.gridy = 1;\r\n\t\tadd(panel_2, gbc_panel_2);\r\n\t\tGridBagLayout gbl_panel_2 = new GridBagLayout();\r\n\t\tgbl_panel_2.columnWidths = new int[]{0, 0, 0};\r\n\t\tgbl_panel_2.rowHeights = new int[]{0};\r\n\t\tgbl_panel_2.columnWeights = new double[]{0, 1.0, 0.0};\r\n\t\tgbl_panel_2.rowWeights = new double[]{0.0};\r\n\t\tpanel_2.setLayout(gbl_panel_2);\r\n\t\t\r\n\t\tpanel_3 = new JPanel();\r\n\t\tpanel_3.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_panel_3 = new GridBagConstraints();\r\n\t\tgbc_panel_3.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_3.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_panel_3.gridx = 0;\r\n\t\tgbc_panel_3.gridy = 0;\r\n\t\tpanel_2.add(panel_3, gbc_panel_3);\r\n\t\tGridBagLayout gbl_panel_3 = new GridBagLayout();\r\n\t\tgbl_panel_3.columnWidths = new int[]{0, 0};\r\n\t\tgbl_panel_3.rowHeights = new int[]{0, 0, 0, 0};\r\n\t\tgbl_panel_3.columnWeights = new double[]{0.0, Double.MIN_VALUE};\r\n\t\tgbl_panel_3.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel_3.setLayout(gbl_panel_3);\r\n\t\t\r\n\t\tdomainRegionLabel = new JLabel(DOMAIN_LIST_TEXT);\r\n\t\tGridBagConstraints gbc_domainRegionLabel = new GridBagConstraints();\r\n\t\tgbc_domainRegionLabel.insets = new Insets(0, 0, 2, 0);\r\n\t\tgbc_domainRegionLabel.gridx = 0;\r\n\t\tgbc_domainRegionLabel.gridy = 0;\r\n\t\tpanel_3.add(domainRegionLabel, gbc_domainRegionLabel);\r\n\t\t\r\n\t\tscrollPane = new JScrollPane();\r\n\t\tGridBagConstraints gbc_scrollPane = new GridBagConstraints();\r\n\t\tgbc_scrollPane.insets = new Insets(0, 2, 0, 0);\r\n\t\tgbc_scrollPane.weighty = 1.0;\r\n\t\tgbc_scrollPane.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_scrollPane.gridx = 0;\r\n\t\tgbc_scrollPane.gridy = 1;\r\n\t\tpanel_3.add(scrollPane, gbc_scrollPane);\r\n\t\tscrollPane.setPreferredSize(new Dimension(125, 10));\r\n\t\tscrollPane.setMinimumSize(new Dimension(125,10));\r\n\t\tscrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tscrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\t\r\n\t\tresolvedList = new JList();\r\n\t\tresolvedList.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\tsuper.mouseClicked(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(e.getClickCount() == 2){\r\n\t\t\t\t\tfirePropertyChange(FRAP_DATA_FINDROI_PROPERTY, null, resolvedList.getSelectedValue());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.mousePressed(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tsuper.mouseReleased(e);\r\n\t\t\t\tif(showConvertPopup(e,false) == SHOWCONVERT.HANDLED){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tresolvedList.addListSelectionListener(resolvedListSelectionListener);\r\n\t\tresolvedList.setCellRenderer(resolvedObjectListCellRenderer);\r\n\t\tscrollPane.setViewportView(resolvedList);\r\n\t\t\r\n\t\tmergeButton = new JButton(\"Auto-Merge\");\r\n\t\tmergeButton.setToolTipText(\"Remove regions by merging with neighbor\");\r\n\t\tmergeButton.setEnabled(false);\r\n\t\tmergeButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tresolvedListSelection(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_mergeButton = new GridBagConstraints();\r\n\t\tgbc_mergeButton.gridx = 0;\r\n\t\tgbc_mergeButton.gridy = 2;\r\n\t\tpanel_3.add(mergeButton, gbc_mergeButton);\r\n\t\tGridBagConstraints gbc_jScrollPane2 = new GridBagConstraints();\r\n\t\tgbc_jScrollPane2.weighty = 1.0;\r\n\t\tgbc_jScrollPane2.weightx = 1.0;\r\n\t\tgbc_jScrollPane2.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_jScrollPane2.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_jScrollPane2.gridx = 1;\r\n\t\tgbc_jScrollPane2.gridy = 0;\r\n\t\tpanel_2.add(getJScrollPane2(), gbc_jScrollPane2);\r\n\t\tGridBagConstraints gbc_toolButtonPanel = new GridBagConstraints();\r\n\t\tgbc_toolButtonPanel.weighty = 1.0;\r\n\t\tgbc_toolButtonPanel.insets = new Insets(2, 2, 0, 2);\r\n\t\tgbc_toolButtonPanel.anchor = GridBagConstraints.NORTH;\r\n\t\tgbc_toolButtonPanel.gridx = 2;\r\n\t\tgbc_toolButtonPanel.gridy = 0;\r\n\t\tpanel_2.add(getToolButtonPanel(), gbc_toolButtonPanel);\r\n\r\n\t\troiComboBox = new JComboBox();\r\n\t\troiComboBox.setName(\"activeROIComboBox\");\r\n\t\troiComboBox.setRenderer(new ListCellRenderer() {\r\n\t\t\tprivate DefaultListCellRenderer listCellRender = new DefaultListCellRenderer();\r\n\t\t\tpublic Component getListCellRendererComponent(JList list, Object value,\r\n\t\t\t\t\tint index, boolean isSelected, boolean cellHasFocus) {\r\n\t\t\t\tROIMultiPaintManager.ComboboxROIName comboboxROIName = (ROIMultiPaintManager.ComboboxROIName)value;\r\n\t\t\t\tif(comboboxROIName == null){//return blank\r\n\t\t\t\t\treturn listCellRender.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);\r\n\t\t\t\t}\r\n\t\t\t\tif(comboboxROIName.getHighlightColor() == null){//return text only\r\n\t\t\t\t\treturn listCellRender.getListCellRendererComponent(list, comboboxROIName.getROIName(), index, isSelected, cellHasFocus);\r\n\t\t\t\t}\r\n\t\t\t\t//return text with small color box\r\n\t\t\t\tIcon icon = new ColorIcon(20,20,comboboxROIName.getHighlightColor());\r\n\t\t\t\tJLabel jlable = (JLabel)listCellRender.getListCellRendererComponent(list, icon, index, isSelected, cellHasFocus);\r\n\t\t\t\tjlable.setText(comboboxROIName.getROIName());\r\n\t\t\t\treturn jlable;\r\n\t\t\t}\r\n\t\t});\r\n\t\troiComboBox.addActionListener(ROI_COMBOBOX_ACTIONLISTENER);\r\n\t\t\r\n\t\tlblNewLabel = new JLabel(\"Active Domain:\");\r\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel.insets = new Insets(4, 4, 4, 4);\r\n\t\tgbc_lblNewLabel.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_lblNewLabel.gridx = 0;\r\n\t\tgbc_lblNewLabel.gridy = 0;\r\n\t\teditROIButtonPanel.add(lblNewLabel, gbc_lblNewLabel);\r\n\t\tfinal GridBagConstraints gridBagConstraints_1 = new GridBagConstraints();\r\n\t\tgridBagConstraints_1.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgridBagConstraints_1.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_1.weightx = 1;\r\n\t\tgridBagConstraints_1.gridy = 0;\r\n\t\tgridBagConstraints_1.gridx = 1;\r\n\t\teditROIButtonPanel.add(roiComboBox, gridBagConstraints_1);\r\n\r\n\t\taddROIButton = new JButton();\r\n\t\taddROIButton.setName(\"roiAddBtn\");\r\n\t\taddROIButton.addActionListener(addROIActionListener);\r\n\t\taddROIButton.setText(\"Add Domain...\");\r\n\t\tfinal GridBagConstraints gridBagConstraints_3 = new GridBagConstraints();\r\n\t\tgridBagConstraints_3.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_3.gridy = 0;\r\n\t\tgridBagConstraints_3.gridx = 2;\r\n\t\teditROIButtonPanel.add(addROIButton, gridBagConstraints_3);\r\n\r\n\t\tdelROIButton = new JButton();\r\n\t\tdelROIButton.setName(\"roiDeleteBtn\");\r\n\t\tdelROIButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(final ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_DELETEROI_PROPERTY, ((ROIMultiPaintManager.ComboboxROIName)roiComboBox.getSelectedItem()), null);\r\n\t\t\t}\r\n\t\t});\r\n\t\tdelROIButton.setText(\"Delete Domain...\");\r\n\t\tdelROIButton.setEnabled(false);\r\n\t\tfinal GridBagConstraints gridBagConstraints_4 = new GridBagConstraints();\r\n\t\tgridBagConstraints_4.insets = new Insets(4, 4, 5, 5);\r\n\t\tgridBagConstraints_4.gridy = 0;\r\n\t\tgridBagConstraints_4.gridx = 3;\r\n\t\teditROIButtonPanel.add(delROIButton, gridBagConstraints_4);\r\n\t\t\r\n\t\tdiscardHighlightsButton = new JButton(\"Clear Selections\");\r\n\t\tdiscardHighlightsButton.setEnabled(false);\r\n\t\tdiscardHighlightsButton.setName(\"clearHighlightsBtn\");\r\n\t\tdiscardHighlightsButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tfirePropertyChange(FRAP_DATA_DISCARDHIGHLIGHT_PROPERTY,null,null);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tGridBagConstraints gbc_specialActionsButton = new GridBagConstraints();\r\n\t\tgbc_specialActionsButton.insets = new Insets(4, 4, 5, 5);\r\n\t\tgbc_specialActionsButton.gridx = 4;\r\n\t\tgbc_specialActionsButton.gridy = 0;\r\n\t\teditROIButtonPanel.add(discardHighlightsButton, gbc_specialActionsButton);\r\n\t\t\r\n\t\tchannelComboBox = new JComboBox();\r\n\t\tGridBagConstraints gbc_channelComboBox = new GridBagConstraints();\r\n\t\tgbc_channelComboBox.insets = new Insets(4, 4, 5, 4);\r\n\t\tgbc_channelComboBox.gridx = 5;\r\n\t\tgbc_channelComboBox.gridy = 0;\r\n\t\teditROIButtonPanel.add(channelComboBox, gbc_channelComboBox);\r\n\t\tchannelComboBox.addActionListener(channelActionListener);\r\n\t\tchannelComboBox.setPreferredSize(new Dimension(100, 22));\r\n\t\tchannelComboBox.setMinimumSize(new Dimension(100, 20));\r\n\t\t\r\n\t\tblendPercentPanel = new JPanel();\r\n\t\tblendPercentPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_panel_2a = new GridBagConstraints();\r\n\t\tgbc_panel_2a.gridwidth = 6;\r\n\t\tgbc_panel_2a.insets = new Insets(4, 4, 4, 4);\r\n\t\tgbc_panel_2a.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_panel_2a.gridx = 0;\r\n\t\tgbc_panel_2a.gridy = 1;\r\n\t\teditROIButtonPanel.add(blendPercentPanel, gbc_panel_2a);\r\n\t\tGridBagLayout gbl_panel_2a = new GridBagLayout();\r\n\t\tblendPercentPanel.setLayout(gbl_panel_2a);\r\n\t\t\r\n\t\tblendPercentROILabel = new JLabel(\"Domains\");\r\n\t\tGridBagConstraints gbc_blendPercentROILabel = new GridBagConstraints();\r\n\t\tgbc_blendPercentROILabel.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_blendPercentROILabel.gridx = 0;\r\n\t\tgbc_blendPercentROILabel.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentROILabel, gbc_blendPercentROILabel);\r\n\t\t\r\n\t\tblendPercentSlider = new JSlider();\r\n\t\tblendPercentSlider.setToolTipText(\"Mix view of Domains and background image\");\r\n\t\tblendPercentSlider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tsetBlendPercent(blendPercentSlider.getValue());\r\n//\t\t\t\tif(!blendPercentSlider.getValueIsAdjusting()){\r\n//\t\t\t\t\tsetBlendPercent(blendPercentSlider.getValue());\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_blendPercentSlider = new GridBagConstraints();\r\n\t\tgbc_blendPercentSlider.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_blendPercentSlider.weightx = 0.5;\r\n\t\tgbc_blendPercentSlider.gridx = 1;\r\n\t\tgbc_blendPercentSlider.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentSlider, gbc_blendPercentSlider);\r\n\t\t\r\n\t\tblendPercentImageLabel = new JLabel(\"Image\");\r\n\t\tGridBagConstraints gbc_blendPercentImageLabel = new GridBagConstraints();\r\n\t\tgbc_blendPercentImageLabel.anchor = GridBagConstraints.EAST;\r\n\t\tgbc_blendPercentImageLabel.gridx = 2;\r\n\t\tgbc_blendPercentImageLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(blendPercentImageLabel, gbc_blendPercentImageLabel);\r\n\t\t\r\n\t\tsmoothOrigLabel = new JLabel(\"Original\");\r\n\t\tGridBagConstraints gbc_smoothOrigLabel = new GridBagConstraints();\r\n\t\tgbc_smoothOrigLabel.insets = new Insets(0, 20, 0, 0);\r\n\t\tgbc_smoothOrigLabel.gridx = 3;\r\n\t\tgbc_smoothOrigLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(smoothOrigLabel, gbc_smoothOrigLabel);\r\n\t\t\r\n\t\tsmoothslider = new JSlider();\r\n\t\tsmoothslider.setToolTipText(\"Smooth background image\");\r\n\t\tsmoothslider.setSnapToTicks(true);\r\n\t\tsmoothslider.setPaintTicks(true);\r\n\t\tsmoothslider.setMajorTickSpacing(1);\r\n\t\tsmoothslider.setMaximum(10);\r\n\t\tsmoothslider.setValue(0);\r\n\t\tsmoothslider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tif(!smoothslider.getValueIsAdjusting()){\r\n\t\t\t\t\tfirePropertyChange(FRAP_DATA_UNDERLAY_SMOOTH_PROPERTY, null, new Integer(smoothslider.getValue()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_smoothslider = new GridBagConstraints();\r\n\t\tgbc_smoothslider.fill = GridBagConstraints.HORIZONTAL;\r\n\t\tgbc_smoothslider.weightx = 0.5;\r\n\t\tgbc_smoothslider.gridx = 4;\r\n\t\tgbc_smoothslider.gridy = 0;\r\n\t\tblendPercentPanel.add(smoothslider, gbc_smoothslider);\r\n\t\t\r\n\t\tsmootherLabel = new JLabel(\"Smoother\");\r\n\t\tGridBagConstraints gbc_smootherLabel = new GridBagConstraints();\r\n\t\tgbc_smootherLabel.gridx = 5;\r\n\t\tgbc_smootherLabel.gridy = 0;\r\n\t\tblendPercentPanel.add(smootherLabel, gbc_smootherLabel);\r\n\t\t\r\n\t\troiDrawButtonGroup.add(selectButton);\r\n\t\troiDrawButtonGroup.add(paintButton);\r\n\t\troiDrawButtonGroup.add(eraseButton);\r\n\t\troiDrawButtonGroup.add(fillButton);\r\n\t\troiDrawButtonGroup.add(cropButton);\r\n\t\troiDrawButtonGroup.add(translateToolButton);\r\n\t\troiDrawButtonGroup.add(scaleToolButton);\r\n\t\t\r\n\t\tBeanUtils.enableComponents(getToolButtonPanel(), false);\r\n\t\tBeanUtils.enableComponents(editROIPanel, false);\r\n\t\t\r\n\t\thistogramPanel = new HistogramPanel();\r\n\t\thistogramPanel.addPropertyChangeListener(new PropertyChangeListener() {\r\n\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n\t\t\t\tif(evt.getPropertyName().equals(HistogramPanel.HISTOGRAM_SELECT_PROPERTY)){\r\n\t\t\t\t\tOverlayEditorPanelJAI.this.firePropertyChange(\r\n\t\t\t\t\tOverlayEditorPanelJAI.FRAP_DATA_HISTOUPDATEHIGHLIGHT_PROPERTY, null, (ListSelectionModel)evt.getNewValue());\r\n\t\t\t\t}else if(evt.getPropertyName().equals(HistogramPanel.HISTOGRAM_APPLY_ACTION)){\r\n\t\t\t\t\tfirePropertyChange(OverlayEditorPanelJAI.FRAP_DATA_UPDATEROI_WITHHIGHLIGHT_PROPERTY,null,null);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\thistogramPanel.setVisible(false);\r\n\t\thistogramPanel.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\tGridBagConstraints gbc_histogramButton = new GridBagConstraints();\r\n\t\tgbc_histogramButton.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_histogramButton.insets = new Insets(2, 2, 2, 2);\r\n\t\tgbc_histogramButton.gridx = 0;\r\n\t\tgbc_histogramButton.gridy = 2;\r\n\t\tadd(histogramPanel, gbc_histogramButton);\r\n\t}", "private void initialize() {\r\n\r\n\t\ttitleFont = new Font(\"宋体\", Font.BOLD + Font.PLAIN, 16);\r\n\t\tfont = new Font(\"宋体\", Font.PLAIN, 12);\r\n\t\ttry {\r\n\t\t\tcolor = new Color(Integer.parseInt(\"D3D3D3\", 16));\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t// codes to deal with this exception\r\n\t\t}\r\n\t\tdaojLabel = new JLabel();\r\n\t\tdaojLabel.setBounds(new Rectangle(255, 33, 15, 18));\r\n\t\tdaojLabel.setText(\"到\");\r\n\t\tdaojLabel.setFont(font);\r\n\t\tdaojLabel.setForeground(color);\r\n\t\tcxsjjLabel = new JLabel();\r\n\t\tcxsjjLabel.setBounds(new Rectangle(92, 33, 59, 18));\r\n\t\tcxsjjLabel.setText(\"查询时间:\");\r\n\t\tcxsjjLabel.setFont(font);\r\n\t\tcxsjjLabel.setForeground(color);\r\n\t\t// 设置导航panel\r\n\t\tnavigatePanel = new JPanel();\r\n\t\tnavigatePanel.setLayout(null);\r\n\t\tnavigatePanel.add(this.getProjButton());\r\n\t\tnavigatePanel.add(this.getNextjButton());\r\n\t\tnavigatePanel.setBounds(new Rectangle(95, 510, 788, 20));\r\n\t\tColor color = new Color(35, 35, 35);\r\n\t\t// navigatePanel.setBackground(Color.GRAY);\r\n\t\tnavigatePanel.setBackground(color);\r\n\t\tthis.add(navigatePanel);\r\n\r\n\t\tthis.setSize(976, 601);\r\n\t\tthis.setLayout(null);\r\n\t\tthis.add(cxsjjLabel, null);\r\n\t\tthis.add(getBegjTextField(), null);\r\n\t\tthis.add(daojLabel, null);\r\n\t\tthis.add(getEndjTextField(), null);\r\n\t\tthis.add(getCxjButton(), null);\r\n\r\n\t\tgetylcs = new GetYlcs();\r\n\t\tthis.add(getMainjPanel(), null);\r\n\r\n\t}", "public ECCPanel() {\n initComponents();\n \n }", "public EQU_GAINSetup()\n\t{\n\t\tinitComponents();\n\t\tthis.pack();\n\t\tthis.setPreferredSize(new Dimension(500, 600));\n\t}", "@Override\r\n\tpublic void setParameterValuesToGUI() {\r\n\t\tthis.pb = this.workPackage.getParameters();\r\n\r\n\t\tjSpinnerLeft.removeChangeListener(this);\r\n\t\tjSpinnerRight.removeChangeListener(this);\r\n\t\tjSpinnerTop.removeChangeListener(this);\r\n\t\tjSpinnerBottom.removeChangeListener(this);\r\n\t\tjSpinnerConst.removeChangeListener(this);\r\n\r\n\t\tjSpinnerLeft.setValue(pb.getIntParameter(\"Left\"));\r\n\t\tjSpinnerRight.setValue(pb.getIntParameter(\"Right\"));\r\n\t\tjSpinnerTop.setValue(pb.getIntParameter(\"Top\"));\r\n\t\tjSpinnerBottom.setValue(pb.getIntParameter(\"Bottom\"));\r\n\t\tjSpinnerConst.setValue(pb.getIntParameter(\"Const\"));\r\n\r\n\t\tjSpinnerLeft.addChangeListener(this);\r\n\t\tjSpinnerRight.addChangeListener(this);\r\n\t\tjSpinnerTop.addChangeListener(this);\r\n\t\tjSpinnerBottom.addChangeListener(this);\r\n\t\tjSpinnerConst.addChangeListener(this);\r\n\r\n\t\tjSpinnerNewWidth.removeChangeListener(this);\r\n\t\tjSpinnerNewHeight.removeChangeListener(this);\r\n\t\tjSpinnerNewWidth.setValue(pb.getIntParameter(\"NewWidth\"));\r\n\t\tjSpinnerNewHeight.setValue(pb.getIntParameter(\"NewHeight\"));\r\n\t\tjSpinnerNewWidth.addChangeListener(this);\r\n\t\tjSpinnerNewHeight.addChangeListener(this);\r\n\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.ZERO) buttZero.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.CONSTANT) buttConst.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.COPY) buttCopy.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.REFLECT) buttReflect.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"Method\") == IqmOpBorderDescriptor.WRAP) buttWrap.setSelected(true);\r\n\r\n\t\tif (buttConst.isSelected()) {\r\n\t\t\tjSpinnerConst.setEnabled(true);\r\n\t\t} else {\r\n\t\t\tjSpinnerConst.setEnabled(false);\r\n\t\t}\r\n\r\n\t\tif (pb.getIntParameter(\"BorderOrSize\") == IqmOpBorderDescriptor.PREFERENCE_BORDER) buttBorder.setSelected(true);\r\n\t\tif (pb.getIntParameter(\"BorderOrSize\") == IqmOpBorderDescriptor.PREFERENCE_SIZE) buttSize.setSelected(true);\r\n\r\n\t}", "public PixxPanel(PixxConfiguration config)\n {\n _pixxConfiguration=config;\n }", "private void initialize() {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setBounds(new Rectangle(0, 0, 943, 615));\n this.setPreferredSize(new Dimension(890,570));\n this.setMinimumSize(new Dimension(890,570));\n\n\t\tm_GraphControlGradient = new GraphControl();\n\t\tm_GraphControlGradient.setBounds(new Rectangle(4, 16, 461, 285));\n\t\tm_GraphControlGradient.setControlsEnabled(false);\n\n\t\tm_GraphControlFlowRate = new GraphControl();\n\t\tm_GraphControlFlowRate.setBounds(new Rectangle(3, 16, 462, 241));\n\t\tm_GraphControlFlowRate.setControlsEnabled(false);\n\n\t\tthis.add(getJbtnPreviousStep(), null);\n\t\tthis.add(getJpanelGradientProfile(), null);\n\t\tthis.add(getJpanelFlowProfile(), null);\n\t\tthis.setVisible(true);\n\t\tthis.add(getJbtnHelp(), null);\n\t\tthis.add(getJpanelStep5(), null);\n\t\t\n\t\tthis.tmOutputModel.addTableModelListener(this);\n\t\tthis.addComponentListener(this);\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(374, 288));\r\n this.setContentPane(getJPanel());\r\n this.setResizable(false);\r\n this.setModal(true);\r\n this.setTitle(\"颜色选择面板\");\r\n addJPanel();\r\n\t}", "private void setUpPanel() {\n this.panel = new JPanel();\n functions = new JPanel();\n panel.setPreferredSize(new Dimension(Screen.screenWidth, Screen.screenHeight));\n\n int borderBottom = Screen.screenHeight / 8;\n if (Screen.screenHeight > 1400) {\n borderBottom = Screen.screenHeight / 7;\n }\n\n panel.setBorder(BorderFactory.createEmptyBorder(80, Screen.border, borderBottom, Screen.border));\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n functions.setPreferredSize(new Dimension(600, 500));\n functions.setLayout(cardLayout);\n }", "public TemporizadorPanel() {\n initComponents();\n }", "public PanelSobre() {\n initComponents();\n }", "public PanelSobre() {\n initComponents();\n }", "public void settings() {\r\n size(WIDTH, HEIGHT); // Set size of screen\r\n }", "public PanelIniciarSesion() {\n initComponents();\n }", "public AppoinmentPanel() {\n initComponents();\n }", "public CarPanel(GlobalController session, GUImain parent) {\r\n\t\tmySession = session;\r\n\t\tthis.parent = parent;\r\n\t\tGridBagLayout gridBagLayout = new GridBagLayout();\r\n\t\tgridBagLayout.columnWidths = new int[]{364, 0};\r\n\t\tgridBagLayout.rowHeights = new int[]{0, 0, 0, 0};\r\n\t\tgridBagLayout.columnWeights = new double[]{1.0, Double.MIN_VALUE};\r\n\t\tgridBagLayout.rowWeights = new double[]{0.0, 0.0, 1.0, Double.MIN_VALUE};\r\n\t\tsetLayout(gridBagLayout);\r\n\t\t\r\n\t\tJPanel titleAndMenuPanel = new JPanel();\r\n\t\tGridBagConstraints gbc_titleAndMenuPanel = new GridBagConstraints();\r\n\t\tgbc_titleAndMenuPanel.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_titleAndMenuPanel.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_titleAndMenuPanel.gridx = 0;\r\n\t\tgbc_titleAndMenuPanel.gridy = 0;\r\n\t\tadd(titleAndMenuPanel, gbc_titleAndMenuPanel);\r\n\t\tGridBagLayout gbl_titleAndMenuPanel = new GridBagLayout();\r\n\t\tgbl_titleAndMenuPanel.columnWidths = new int[]{0, 0, 51, 0, 0, 0};\r\n\t\tgbl_titleAndMenuPanel.rowHeights = new int[]{14, 0};\r\n\t\tgbl_titleAndMenuPanel.columnWeights = new double[]{1.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};\r\n\t\tgbl_titleAndMenuPanel.rowWeights = new double[]{0.0, Double.MIN_VALUE};\r\n\t\ttitleAndMenuPanel.setLayout(gbl_titleAndMenuPanel);\r\n\t\t\r\n\t\tJButton btnSettings = new JButton(\"Settings\");\r\n\t\tbtnSettings.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\r\n\t\t\t\tshowAdvanced();\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_btnSettings = new GridBagConstraints();\r\n\t\tgbc_btnSettings.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_btnSettings.gridx = 1;\r\n\t\tgbc_btnSettings.gridy = 0;\r\n\t\ttitleAndMenuPanel.add(btnSettings, gbc_btnSettings);\r\n\t\t\r\n\t\tJLabel lblCarTitle = new JLabel(\"CAR\");\r\n\t\tlblCarTitle.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlblCarTitle.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tGridBagConstraints gbc_lblCarTitle = new GridBagConstraints();\r\n\t\tgbc_lblCarTitle.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_lblCarTitle.gridx = 2;\r\n\t\tgbc_lblCarTitle.gridy = 0;\r\n\t\ttitleAndMenuPanel.add(lblCarTitle, gbc_lblCarTitle);\r\n\t\t\r\n\t\tJPanel statusPanel = new JPanel();\r\n\t\tGridBagConstraints gbc_statusPanel = new GridBagConstraints();\r\n\t\tgbc_statusPanel.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_statusPanel.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_statusPanel.gridx = 0;\r\n\t\tgbc_statusPanel.gridy = 1;\r\n\t\tadd(statusPanel, gbc_statusPanel);\r\n\t\tGridBagLayout gbl_statusPanel = new GridBagLayout();\r\n\t\tgbl_statusPanel.columnWidths = new int[]{0, 0, 0};\r\n\t\tgbl_statusPanel.rowHeights = new int[]{0, 0};\r\n\t\tgbl_statusPanel.columnWeights = new double[]{1.0, 1.0, Double.MIN_VALUE};\r\n\t\tgbl_statusPanel.rowWeights = new double[]{0.0, Double.MIN_VALUE};\r\n\t\tstatusPanel.setLayout(gbl_statusPanel);\r\n\t\t\r\n\t\tlblLastDataReceived = new JLabel(\"Last Data Received: NONE\");\r\n\t\tGridBagConstraints gbc_lblLastDataReceived = new GridBagConstraints();\r\n\t\tgbc_lblLastDataReceived.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_lblLastDataReceived.gridx = 0;\r\n\t\tgbc_lblLastDataReceived.gridy = 0;\r\n\t\tstatusPanel.add(lblLastDataReceived, gbc_lblLastDataReceived);\r\n\t\t\r\n\t\tlblCarLoadedName = new JLabel(\"Car Loaded: NONE\");\r\n\t\tGridBagConstraints gbc_lblCarLoadedName = new GridBagConstraints();\r\n\t\tgbc_lblCarLoadedName.gridx = 1;\r\n\t\tgbc_lblCarLoadedName.gridy = 0;\r\n\t\tstatusPanel.add(lblCarLoadedName, gbc_lblCarLoadedName);\r\n\t\t\r\n\t\tJPanel containterPanelForUpdateLabels = new JPanel();\r\n\t\tGridBagConstraints gbc_containterPanelForUpdateLabels = new GridBagConstraints();\r\n\t\tgbc_containterPanelForUpdateLabels.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_containterPanelForUpdateLabels.gridx = 0;\r\n\t\tgbc_containterPanelForUpdateLabels.gridy = 2;\r\n\t\tadd(containterPanelForUpdateLabels, gbc_containterPanelForUpdateLabels);\r\n\t\tGridBagLayout gbl_containterPanelForUpdateLabels = new GridBagLayout();\r\n\t\tgbl_containterPanelForUpdateLabels.columnWidths = new int[]{0, 76, 88, 68, 0, 0};\r\n\t\tgbl_containterPanelForUpdateLabels.rowHeights = new int[]{0, 0};\r\n\t\tgbl_containterPanelForUpdateLabels.columnWeights = new double[]{1.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};\r\n\t\tgbl_containterPanelForUpdateLabels.rowWeights = new double[]{1.0, Double.MIN_VALUE};\r\n\t\tcontainterPanelForUpdateLabels.setLayout(gbl_containterPanelForUpdateLabels);\r\n\t\t\r\n\t\tJPanel temperatureDispPanel = new JPanel();\r\n\t\tGridBagConstraints gbc_temperatureDispPanel = new GridBagConstraints();\r\n\t\tgbc_temperatureDispPanel.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_temperatureDispPanel.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_temperatureDispPanel.gridx = 1;\r\n\t\tgbc_temperatureDispPanel.gridy = 0;\r\n\t\tcontainterPanelForUpdateLabels.add(temperatureDispPanel, gbc_temperatureDispPanel);\r\n\t\ttemperatureDispPanel.setLayout(new BoxLayout(temperatureDispPanel, BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\tlblTempuratures = new JLabel(\"Temps (\\u00B0C)\");\r\n\t\tlblTempuratures.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlblTempuratures.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblTempuratures.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\ttemperatureDispPanel.add(lblTempuratures);\r\n\t\t\r\n\t\tlblTempitem1 = new JLabel(\"None received\");\r\n\t\tlblTempitem1.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlblTempitem1.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\ttemperatureDispPanel.add(lblTempitem1);\r\n\t\t\r\n\t\tlblTempitem_2_1 = new JLabel(\"tempItem1\");\r\n\t\tlblTempitem_2_1.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tlblTempitem_2_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttemperatureDispPanel.add(lblTempitem_2_1);\r\n\t\t\r\n\t\tlblTempitem_3_1 = new JLabel(\"TempItem 3\");\r\n\t\tlblTempitem_3_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblTempitem_3_1.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\ttemperatureDispPanel.add(lblTempitem_3_1);\r\n\t\t\r\n\t\tlblTempitem_4 = new JLabel(\"TempItem5\");\r\n\t\tlblTempitem_4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblTempitem_4.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\ttemperatureDispPanel.add(lblTempitem_4);\r\n\t\t\r\n\t\tlblTempitem_5 = new JLabel(\"d\");\r\n\t\tlblTempitem_5.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tlblTempitem_5.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttemperatureDispPanel.add(lblTempitem_5);\r\n\t\t\r\n\t\tlblTempitem_6 = new JLabel(\"TempItem6\");\r\n\t\tlblTempitem_6.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblTempitem_6.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\ttemperatureDispPanel.add(lblTempitem_6);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tJPanel cellVoltagePanel = new JPanel();\r\n\t\tGridBagConstraints gbc_cellVoltagePanel = new GridBagConstraints();\r\n\t\tgbc_cellVoltagePanel.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_cellVoltagePanel.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_cellVoltagePanel.gridx = 2;\r\n\t\tgbc_cellVoltagePanel.gridy = 0;\r\n\t\tcontainterPanelForUpdateLabels.add(cellVoltagePanel, gbc_cellVoltagePanel);\r\n\t\tcellVoltagePanel.setLayout(new BoxLayout(cellVoltagePanel, BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\tJLabel lblCellVoltages = new JLabel(\"Avg Cell V\");\r\n\t\tlblCellVoltages.setFont(new Font(\"Tahoma\", Font.BOLD, 13));\r\n\t\tlblCellVoltages.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tcellVoltagePanel.add(lblCellVoltages);\r\n\t\t\r\n\t\tlblPackv1 = new JLabel(\"Pack1: 23v\");\r\n\t\tlblPackv1.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tcellVoltagePanel.add(lblPackv1);\r\n\t\t\r\n\t\tlblPackv2 = new JLabel(\"Pack 2: 322\");\r\n\t\tlblPackv2.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tcellVoltagePanel.add(lblPackv2);\r\n\t\t\r\n\t\tlblPackv_3 = new JLabel(\"Pack 3: 10v\");\r\n\t\tlblPackv_3.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tcellVoltagePanel.add(lblPackv_3);\r\n\t\t\r\n\t\tlblPackv_4 = new JLabel(\"Pack 4: 13v\");\r\n\t\tlblPackv_4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblPackv_4.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tcellVoltagePanel.add(lblPackv_4);\r\n\t\t\r\n\t\tJPanel speedDisplayPanel = new JPanel();\r\n\t\tGridBagConstraints gbc_speedDisplayPanel = new GridBagConstraints();\r\n\t\tgbc_speedDisplayPanel.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_speedDisplayPanel.fill = GridBagConstraints.BOTH;\r\n\t\tgbc_speedDisplayPanel.gridx = 3;\r\n\t\tgbc_speedDisplayPanel.gridy = 0;\r\n\t\tcontainterPanelForUpdateLabels.add(speedDisplayPanel, gbc_speedDisplayPanel);\r\n\t\tspeedDisplayPanel.setLayout(new BoxLayout(speedDisplayPanel, BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\tJLabel lblSpeedTitle = new JLabel(\"Speed\");\r\n\t\tlblSpeedTitle.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlblSpeedTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tspeedDisplayPanel.add(lblSpeedTitle);\r\n\t\t\r\n\t\tlblSpeed = new JLabel(\"20\");\r\n\t\tlblSpeed.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tlblSpeed.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\r\n\t\tlblSpeed.setBackground(Color.WHITE);\r\n\t\tspeedDisplayPanel.add(lblSpeed);\r\n\t\t\r\n\t\tJLabel lblKmh = new JLabel(\"KM/H\");\r\n\t\tlblKmh.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tspeedDisplayPanel.add(lblKmh);\r\n\t\t\r\n\t\tlabel_1 = new JLabel(\"_________\");\r\n\t\tlabel_1.setAlignmentX(0.5f);\r\n\t\tspeedDisplayPanel.add(label_1);\r\n\t\t\r\n\t\tlblSoC = new JLabel(\"SoC\");\r\n\t\tlblSoC.setFont(new Font(\"Tahoma\", Font.BOLD, 15));\r\n\t\tlblSoC.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tspeedDisplayPanel.add(lblSoC);\r\n\t\t\r\n\t\tSoC = new JLabel(\"\");\r\n\t\tSoC.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\r\n\t\tSoC.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tspeedDisplayPanel.add(SoC);\r\n\t\t\r\n\t\tlabel = new JLabel(\"\");\r\n\t\tspeedDisplayPanel.add(label);\r\n\t\t\r\n\t\tif(mySession != null) { //NullPointerException protection. And now they'll show up in a \r\n\t\t\t\t\t\t\t\t//WYSIWYG editor. \r\n\t\t\r\n\t\tregister();\r\n\t\t}\r\n\t\t//To make the labels show up better in the WYSYWIG, uncomment these \r\n\t\t //and comment out the defualt label values call. \r\n\t\t/* \r\n\t\tlblTempitem1.setText(\"NONE\"); //first temp item\r\n\t\tlblTempitem_2_1.setText(\"Label2\"); //2nd temp item\r\n\t\tlblTempitem_3_1.setText(\"Label3\"); //3rd item in temperature list\r\n\t\tlblTempitem_4.setText(\"Label4\"); //4th...\r\n\t\tlblTempitem_5.setText(\"label5\"); //5th item in temperature list.\r\n\t\tlblPackv1.setText(\"NONE\"); //first item in voltage pack list\r\n\t\tlblPackv2.setText(\"Label 2\"); //second item in voltage pack list\r\n\t\tlblPackv_3.setText(\"Label 3\"); //the third\r\n\t\tlblPackv_4.setText(\"Label 4\"); //and fourth. Can add more as needed \r\n\t\tlblSpeed.setText(\"NONE\");; //the label showing speed (update this one!)\r\n\t\tlblLastDataReceived.setText(\"Last Received: NONE\"); //Time of last data received\r\n\t\tlblCarLoadedName.setText(\"No Car Connected\");; // the name of the currently loaded car.\r\n\t\t*/\r\n\t\tthis.setLabelsTODefaultValues();\r\n\t}", "public static void initialisePanel(){\n\t\t\n\t\tBrewPanel = new JPanel();\n\t\tBrewPanel.setLayout(new MigLayout(\"\", \"[grow][65px:n:65px]\", \"[20px:n:20px][25px:n:25px][grow]\"));\n\t\t\n\t\t\n\t\t//Header\n\t\tBrewHeader = new JLabel(\"Brew\");\n\t\tBrewHeader.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tBrewPanel.add(BrewHeader, \"cell 0 0,grow\");\n\t\t\n\t\t\n\t\t//Subtitle\n\t\tBrewSubtitle = new JLabel(\"Browse and edit the brew database.\");\n\t\tBrewSubtitle.setFont(new Font(\"Tahoma\", Font.ITALIC, 13));\n\t\tBrewPanel.add(BrewSubtitle, \"cell 0 1,growx,aligny top\");\n\t\t\n\t\tbtnPrintBrew = new JButton();\n\t\tbtnPrintBrew.setIcon(new ImageIcon(BrewPanel.class.getResource(\"/images/print.png\")));\n\t\tbtnPrintBrew.setToolTipText(\"Save currently selected brew data to printable .pdf\");\n\t\tBrewPanel.setVisible(true);\n \tbtnPrintBrew.setVisible(false);\n\t\tbtnPrintBrew.setEnabled(false);\n\t\tBrewPanel.add(btnPrintBrew, \"cell 1 0\");\n\t\t\n\t\t//Tabbed Pane\n\t\ttabbedBrewPane = new JTabbedPane(JTabbedPane.TOP);\n\t\tBrewPanel.add(tabbedBrewPane, \"cell 0 2 2,grow\");\n\t\t\t\t\n\t\t\n\t\t//Brew Search Tab\n\t\tBrewSearchPanel.initialisePanel();\t\t\n\t\ttabbedBrewPane.addTab(\"Search\", null, BrewSearchPanel.tabbedBrewSearchPanel, null);\n\t\t\n\t\t\n\t\t//Brew Data Tab\n\t\tBrewDataPanel.initialisePanel();\t\t\n\t\ttabbedBrewPane.addTab(\"Brew Data\", null, BrewDataPanel.tabbedBrewDataPanel, null);\n\t\t\n\t\t\n\t\t//Brew Notes Tab\n\t\tBrewNotesPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Notes\", null, BrewNotesPanel.tabbedBrewNotesPanel, null);\n\t\t\n\t\t\n\t\t//Brew Pictures Tab\n\t\tBrewPicturesPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Pictures\", null, BrewPicturesPanel.tabbedBrewPicturesPanel, null);\n\t\t\n\t\t\n\t\t//Brew Pictures Tab\n\t\tBrewCostPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Costs\", null, BrewCostPanel.tabbedBrewCostPanel, null);\n\t\t\t\t\n\t\t\n\t\t//Add New Brew Tab\n\t\tBrewAddPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Add New Brew\", new ImageIcon(BrewPanel.class.getResource(\"/images/new.png\")), BrewAddPanel.tabbedBrewAddPanel, null);\n\t\t\n\t\t\n\t\t//Set some tabs disabled initially\n\t\ttabbedBrewPane.setEnabledAt(1, false);\n\t\ttabbedBrewPane.setEnabledAt(2, false);\n\t\ttabbedBrewPane.setEnabledAt(3, false);\n\t\ttabbedBrewPane.setEnabledAt(4, false);\n\t\t\n\t \t\n\t\t//Add it all to the main window\n\t\tLegacyApp.WineBrewDBFrame.getContentPane().add(BrewPanel, \"cell 0 0,grow\");\n\t\tBrewPanel.setVisible(false);\n\n\t\t\n\t\tBrewPanelStatus = \"Initialised\";\n\t\t\n\t\t\n\t\t//Add print button listener\n\t\tbtnPrintBrew.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser c = new JFileChooser();\n\t\t\t int rVal = c.showSaveDialog(LegacyApp.WineBrewDBFrame);\n\t\t\t if (rVal == JFileChooser.APPROVE_OPTION) {\t\t\t \t \t \n\t\t\t\t\tString pdflocation = c.getCurrentDirectory().toString() + LegacyApp.OSSlash + c.getSelectedFile().getName() + \".pdf\";\n\t\t\t\t\tBrewPDF.createPDF(pdflocation);\t \t \n\t\t\t \t \n\t\t\t }\n\t\t\t if (rVal == JFileChooser.CANCEL_OPTION) {\n\t\t\t \t \n\t\t\t }\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\ttabbedBrewPane.addChangeListener(new ChangeListener() {\n\t\t // This method is called whenever the selected tab changes\n\t\t public void stateChanged(ChangeEvent evt) {\n\t\t JTabbedPane pane = (JTabbedPane)evt.getSource();\n\n\t\t // Get current tab\n\t\t int sel = pane.getSelectedIndex();\n\t\t if(sel == 0 || sel == 5){\n\t\t \tbtnPrintBrew.setVisible(false);\n\t\t \t\tbtnPrintBrew.setEnabled(false);\n\t\t }else{\n\t\t \tbtnPrintBrew.setVisible(true);\n\t\t \t\tbtnPrintBrew.setEnabled(true);\n\t\t }\n\t\t }\n\t\t});\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "public SettingsPanelEmployee() {\n initComponents();\n \n setBackground (new Color (51, 51, 51)); \n \n bgGender.add(rbMale);\n bgGender.add(rbFemale);\n \n txtfAccountImageTextBox.setEditable(false);\n \n accountImageDialog.setUndecorated (true);\n accountImageDialog.getContentPane().setBackground(new Color (35, 35, 35));\n \n updateAccountInformation ();\n \n }", "private void setupLayout() {\r\n\t\tgetContentPane().add(panel);\r\n\t}", "@Override\n public void settings() {\n size(800, 800, P3D);\n }", "public PuzzleFrame() {\n initComponents();\n this.setLayout(new BorderLayout());\n this.setTitle(\"15-Puzzle - Team Gorila - Praktikum PBO\");\n\n // Mengatur ukuran default tile menjadi 4 x 4\n panelSize = 4;\n initPanel();\n }", "private void initPanel() {\n final JPanel mainPanel = new JPanel(new BorderLayout());\n mainPanel.setBorder(new TitledBorder(\"Edit Indegree Condition\"));\n\n final JPanel operatorPanel = new JPanel(new BorderLayout());\n operatorPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n operatorPanel.add(m_operatorBox, BorderLayout.CENTER);\n\n final JPanel inputPanel = new JPanel(new BorderLayout());\n inputPanel.setBorder(new EmptyBorder(5, 0, 5, 5));\n inputPanel.add(m_inputField, BorderLayout.CENTER);\n\n final JPanel containerPanel = new JPanel(new BorderLayout());\n containerPanel.add(operatorPanel, BorderLayout.WEST);\n containerPanel.add(inputPanel, BorderLayout.CENTER);\n\n mainPanel.add(containerPanel, BorderLayout.NORTH);\n\n add(mainPanel, BorderLayout.CENTER);\n }", "protected void createSettingsComponents() {\r\n periodTimeComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_PERIOD_TIME, MIN_PERIOD_TIME, MAX_PERIOD_TIME, 1 ) );\r\n maxNumberOfPlayersComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_MAX_NUMBER_OF_PLAYERS, MIN_MAX_NUMBER_OF_PLAYERS, MAX_MAX_NUMBER_OF_PLAYERS, 1 ) );\r\n mapWidthComponent = new JComboBox( MAP_WIDTH_NAMES );\r\n mapHeightComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_MAP_HEIGHT, MIN_MAP_HEIGHT, MAX_MAP_HEIGHT, 1 ) );\r\n welcomeMessageComponent = new JTextArea( 10, 20 );\r\n gameTypeComponent = new JComboBox( GAME_TYPE_NAMES );\r\n isKillLimitComponent = new JCheckBox( \"Kill limit:\" );\r\n killLimitComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_KILL_LIMIT, MIN_KILL_LIMIT, MAX_KILL_LIMIT, 1 ) );\r\n isTimeLimitComponent = new JCheckBox( \"Time limit:\" );\r\n timeLimitComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_TIME_LIMIT, MIN_TIME_LIMIT, MAX_TIME_LIMIT, 1 ) );\r\n passwordComponent = new JTextField( 10 );\r\n amountOfWallRubblesComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_WALL_RUBBLES, MIN_AMOUNT_OF_WALL_RUBBLES, MAX_AMOUNT_OF_WALL_RUBBLES, 1 ) );\r\n amountOfBloodComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_BLOOD, MIN_AMOUNT_OF_BLOOD, MAX_AMOUNT_OF_BLOOD, 1 ) );\r\n amountOfWallComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_WALL, MIN_AMOUNT_OF_WALL, MAX_AMOUNT_OF_WALL, 1 ) );\r\n amountOfStoneComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_STONE, MIN_AMOUNT_OF_STONE, MAX_AMOUNT_OF_STONE, 1 ) );\r\n amountOfWaterComponent = new JSpinner( new SpinnerNumberModel( DEFAULT_AMOUNT_OF_WATER, MIN_AMOUNT_OF_WATER, MAX_AMOUNT_OF_WATER, 1 ) );\r\n }", "public ParametersInternalFrame() {\n initComponents();\n jLabel2.setText(MainFrame.sessionParams.getOrganization().getName());\n \n initData();\n }", "public PanelConBoton() {\n initComponents();\n }", "public void setUpPanel() {\n\t\tsetBorder(new CompoundBorder(new EtchedBorder(EtchedBorder.LOWERED,\n\t\t\t\tnull, null), new TitledBorder(null, \"Manage Auction Records\",\n\t\t\t\tTitledBorder.CENTER, TitledBorder.TOP, null, null)));\n\n\t\tgridBagLayout.columnWidths = new int[] { 48, 215, 228, 150, 0 };\n\t\tgridBagLayout.rowHeights = new int[] { 70, 15, 21, 57, 15, 21, 58, 15,\n\t\t\t\t21, 85, 39, 0 };\n\t\tgridBagLayout.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0,\n\t\t\t\tDouble.MIN_VALUE };\n\t\tgridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,\n\t\t\t\t0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };\n\t\tsetLayout(gridBagLayout);\n\n\t\tlblArtistFirstName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblArtistFirstName = new GridBagConstraints();\n\t\tgbc_lblArtistFirstName.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblArtistFirstName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblArtistFirstName.gridx = 1;\n\t\tgbc_lblArtistFirstName.gridy = 1;\n\t\tadd(lblArtistFirstName, gbc_lblArtistFirstName);\n\n\t\tformattedFirstName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedFirstName.setColumns(20);\n\t\tGridBagConstraints gbc_formattedFirstName = new GridBagConstraints();\n\t\tgbc_formattedFirstName.anchor = GridBagConstraints.NORTH;\n\t\tgbc_formattedFirstName.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_formattedFirstName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_formattedFirstName.gridx = 1;\n\t\tgbc_formattedFirstName.gridy = 2;\n\t\tadd(formattedFirstName, gbc_formattedFirstName);\n\n\t\tlblArtistLastName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblArtistLastName = new GridBagConstraints();\n\t\tgbc_lblArtistLastName.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblArtistLastName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblArtistLastName.gridx = 1;\n\t\tgbc_lblArtistLastName.gridy = 4;\n\t\tadd(lblArtistLastName, gbc_lblArtistLastName);\n\n\t\tformattedLastName.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedLastName.setColumns(20);\n\t\tGridBagConstraints gbc_formattedLastName = new GridBagConstraints();\n\t\tgbc_formattedLastName.anchor = GridBagConstraints.NORTH;\n\t\tgbc_formattedLastName.fill = GridBagConstraints.HORIZONTAL;\n\t\tgbc_formattedLastName.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_formattedLastName.gridx = 1;\n\t\tgbc_formattedLastName.gridy = 5;\n\t\tadd(formattedLastName, gbc_formattedLastName);\n\t\tlblTitleOfWork = new JLabel(\"Title Of Work (max 40 characters)\");\n\n\t\tlblTitleOfWork.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tGridBagConstraints gbc_lblTitleOfWork = new GridBagConstraints();\n\t\tgbc_lblTitleOfWork.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_lblTitleOfWork.insets = new Insets(0, 0, 5, 5);\n\t\tgbc_lblTitleOfWork.gridx = 1;\n\t\tgbc_lblTitleOfWork.gridy = 7;\n\t\tadd(lblTitleOfWork, gbc_lblTitleOfWork);\n\n\t\tformattedTitleOfWork.setFont(new Font(\"Century\", Font.PLAIN, 12));\n\t\tformattedTitleOfWork.setColumns(40);\n\t\tGridBagConstraints gbc_formattedTitleOfWork = new GridBagConstraints();\n\t\tgbc_formattedTitleOfWork.anchor = GridBagConstraints.NORTHWEST;\n\t\tgbc_formattedTitleOfWork.insets = new Insets(0, 0, 5, 0);\n\t\tgbc_formattedTitleOfWork.gridwidth = 3;\n\t\tgbc_formattedTitleOfWork.gridx = 1;\n\t\tgbc_formattedTitleOfWork.gridy = 8;\n\t\tadd(formattedTitleOfWork, gbc_formattedTitleOfWork);\n\n\t\tbtnSearch.setMnemonic('S');\n\t\tbtnSearch.setFont(new Font(\"Cambria\", Font.BOLD, 12));\n\t\tGridBagConstraints gbc_btnSearch = new GridBagConstraints();\n\t\tgbc_btnSearch.fill = GridBagConstraints.BOTH;\n\t\tgbc_btnSearch.insets = new Insets(0, 0, 0, 5);\n\t\tgbc_btnSearch.gridx = 1;\n\t\tgbc_btnSearch.gridy = 10;\n\t\tadd(btnSearch, gbc_btnSearch);\n\n\t\tbtnCancel.setMnemonic('C');\n btnCancel.setFont(new Font(\"Cambria\", Font.BOLD, 12));\n\t\tGridBagConstraints gbc_btnCancel = new GridBagConstraints();\n\t\tgbc_btnCancel.fill = GridBagConstraints.BOTH;\n\t\tgbc_btnCancel.gridx = 3;\n\t\tgbc_btnCancel.gridy = 10;\n\t\tadd(btnCancel, gbc_btnCancel);\n\n\t}", "public void initializePanelToFrame() {\n\t\tnew ColorResources();\n\t\tnew TextResources().changeLanguage();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(null);\n\t\tpanel.setPreferredSize(new Dimension(375, 812));\n\n\t\tconfigureLabels();\n\t\tconfigureButtons();\n\t\taddListeners();\n\t\taddComponentsToPanel();\n\n\t\tthis.setContentPane(panel);\n\t\tthis.pack();\n\t}", "public void editSimulationParameters() {\r\n \t\tdialogFactory.getDialog(new SimulationPanel(model, model, model, this), \"Define Simulation Parameters\");\r\n \t}", "private void init() {\r\n setForeground(Color.black);\r\n setTitle(\"Particle Analysis New\");\r\n\r\n labelNIterOpen = new JLabel(\"Number of open (1-20)\");\r\n labelNIterOpen.setForeground(Color.black);\r\n labelNIterOpen.setFont(serif12);\r\n\r\n textNIterOpen = new JTextField(5);\r\n textNIterOpen.setText(\"1\");\r\n textNIterOpen.setFont(serif12);\r\n\r\n labelKernelOpen = new JLabel(\"Kernel selection\");\r\n labelKernelOpen.setForeground(Color.black);\r\n labelKernelOpen.setFont(serif12);\r\n\r\n buildComboBox();\r\n comboBoxKernelOpen.addItemListener(this);\r\n\r\n String unitString = null;\r\n\r\n unitString = Unit.getUnitFromLegacyNum(image.getFileInfo()[0].getUnitsOfMeasure(0)).toString();\r\n\r\n if (image.getNDims() == 2) {\r\n labelKernelSizeOpen = new JLabel(\"Circle diameter - \" + unitString);\r\n } else {\r\n labelKernelSizeOpen = new JLabel(\"Sphere diameter - \" + unitString);\r\n }\r\n\r\n labelKernelSizeOpen.setForeground(Color.black);\r\n labelKernelSizeOpen.setBounds(75, 120, 155, 25);\r\n labelKernelSizeOpen.setFont(serif12);\r\n labelKernelSizeOpen.setEnabled(false);\r\n\r\n textKernelSizeOpen = new JTextField(5);\r\n textKernelSizeOpen.setText(\"1\");\r\n textKernelSizeOpen.setFont(serif12);\r\n textKernelSizeOpen.setEnabled(false);\r\n\r\n maskPanelOpen = new JPanel(new GridBagLayout());\r\n maskPanelOpen.setForeground(Color.black);\r\n maskPanelOpen.setBorder(buildTitledBorder(\"Open Parameters\"));\r\n\r\n GridBagConstraints gbc = new GridBagConstraints();\r\n gbc.gridwidth = 1;\r\n gbc.gridheight = 1;\r\n gbc.anchor = GridBagConstraints.WEST;\r\n gbc.insets = new Insets(5, 5, 5, 5);\r\n\r\n gbc.gridx = 0;\r\n gbc.gridy = 0;\r\n gbc.weightx = 0;\r\n gbc.fill = GridBagConstraints.NONE;\r\n maskPanelOpen.add(labelNIterOpen, gbc);\r\n gbc.gridx = 1;\r\n gbc.gridy = 0;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n maskPanelOpen.add(textNIterOpen, gbc);\r\n gbc.gridx = 0;\r\n gbc.gridy = 1;\r\n gbc.weightx = 0;\r\n gbc.fill = GridBagConstraints.NONE;\r\n maskPanelOpen.add(labelKernelOpen, gbc);\r\n gbc.gridx = 1;\r\n gbc.gridy = 1;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n maskPanelOpen.add(comboBoxKernelOpen, gbc);\r\n gbc.gridx = 0;\r\n gbc.gridy = 2;\r\n gbc.weightx = 0;\r\n gbc.fill = GridBagConstraints.NONE;\r\n maskPanelOpen.add(labelKernelSizeOpen, gbc);\r\n gbc.gridx = 1;\r\n gbc.gridy = 2;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n maskPanelOpen.add(textKernelSizeOpen, gbc);\r\n\r\n labelNIterClose = new JLabel(\"Number of close (1-20)\");\r\n labelNIterClose.setForeground(Color.black);\r\n labelNIterClose.setFont(serif12);\r\n\r\n textNIterClose = new JTextField(5);\r\n textNIterClose.setText(\"1\");\r\n textNIterClose.setFont(serif12);\r\n\r\n labelKernelClose = new JLabel(\"Kernel selection\");\r\n labelKernelClose.setForeground(Color.black);\r\n labelKernelClose.setFont(serif12);\r\n\r\n comboBoxKernelClose = new JComboBox();\r\n comboBoxKernelClose.setFont(serif12);\r\n comboBoxKernelClose.setBackground(Color.white);\r\n\r\n if (image.getNDims() == 2) {\r\n comboBoxKernelClose.addItem(\"3x3 - 4 connected\");\r\n comboBoxKernelClose.addItem(\"5x5 - 12 connected\");\r\n comboBoxKernelClose.addItem(\"User sized circle.\");\r\n comboBoxKernelClose.setSelectedIndex(2);\r\n } else if (image.getNDims() == 3) {\r\n comboBoxKernelClose.addItem(\"3x3x3 - 6 connected (2.5D: 4)\");\r\n comboBoxKernelClose.addItem(\"5x5x5 - 24 connected (2.5D: 12)\");\r\n comboBoxKernelClose.addItem(\"User sized sphere.\");\r\n }\r\n\r\n comboBoxKernelClose.addItemListener(this);\r\n\r\n unitString = null;\r\n\r\n unitString = Unit.getUnitFromLegacyNum(image.getFileInfo()[0].getUnitsOfMeasure(0)).toString();\r\n\r\n if (image.getNDims() == 2) {\r\n labelKernelSizeClose = new JLabel(\"Circle diameter - \" + unitString);\r\n } else {\r\n labelKernelSizeClose = new JLabel(\"Sphere diameter - \" + unitString);\r\n }\r\n\r\n labelKernelSizeClose.setForeground(Color.black);\r\n labelKernelSizeClose.setBounds(75, 120, 155, 25);\r\n labelKernelSizeClose.setFont(serif12);\r\n labelKernelSizeClose.setEnabled(false);\r\n\r\n textKernelSizeClose = new JTextField(5);\r\n textKernelSizeClose.setText(\"1\");\r\n textKernelSizeClose.setFont(serif12);\r\n textKernelSizeClose.setEnabled(false);\r\n\r\n maskPanelClose = new JPanel(new GridBagLayout());\r\n maskPanelClose.setForeground(Color.black);\r\n maskPanelClose.setBorder(buildTitledBorder(\"Close Parameters\"));\r\n\r\n gbc = new GridBagConstraints();\r\n\r\n gbc.gridwidth = 1;\r\n gbc.gridheight = 1;\r\n gbc.anchor = GridBagConstraints.WEST;\r\n gbc.insets = new Insets(5, 5, 5, 5);\r\n\r\n gbc.gridx = 0;\r\n gbc.gridy = 0;\r\n gbc.weightx = 0;\r\n gbc.fill = GridBagConstraints.NONE;\r\n maskPanelClose.add(labelNIterClose, gbc);\r\n gbc.gridx = 1;\r\n gbc.gridy = 0;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n maskPanelClose.add(textNIterClose, gbc);\r\n gbc.gridx = 0;\r\n gbc.gridy = 1;\r\n gbc.weightx = 0;\r\n gbc.fill = GridBagConstraints.NONE;\r\n maskPanelClose.add(labelKernelClose, gbc);\r\n gbc.gridx = 1;\r\n gbc.gridy = 1;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n maskPanelClose.add(comboBoxKernelClose, gbc);\r\n gbc.gridx = 0;\r\n gbc.gridy = 2;\r\n gbc.weightx = 0;\r\n gbc.fill = GridBagConstraints.NONE;\r\n maskPanelClose.add(labelKernelSizeClose, gbc);\r\n gbc.gridx = 1;\r\n gbc.gridy = 2;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n maskPanelClose.add(textKernelSizeClose, gbc);\r\n\r\n\r\n // build erode panel\r\n labelNIterErode = new JLabel(\"Number of erode (1-20)\");\r\n labelNIterErode.setForeground(Color.black);\r\n labelNIterErode.setFont(serif12);\r\n\r\n textErode = new JTextField(5);\r\n textErode.setText(\"1\");\r\n textErode.setFont(serif12);\r\n\r\n erodePanel = new JPanel(new GridBagLayout());\r\n erodePanel.setForeground(Color.black);\r\n erodePanel.setBorder(buildTitledBorder(\"Erode Parameters\"));\r\n\r\n gbc = new GridBagConstraints();\r\n\r\n gbc.gridwidth = 1;\r\n gbc.gridheight = 1;\r\n gbc.anchor = GridBagConstraints.WEST;\r\n gbc.insets = new Insets(5, 5, 5, 5);\r\n\r\n /*\r\n gbc.gridx = 0;\r\n gbc.gridy = 0;\r\n gbc.weightx = 0;\r\n gbc.fill = GridBagConstraints.NONE;\r\n erodePanel.add(labelNIterErode, gbc);\r\n gbc.gridx = 1;\r\n gbc.gridy = 0;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n erodePanel.add(textErode, gbc); */\r\n\r\n /*image25D = new JCheckBox(\"Process image in 2.5D\", false);\r\n image25D.setFont(serif12);\r\n if (image.getNDims() == 3) {\r\n image25D.setEnabled(true);\r\n } else {\r\n image25D.setEnabled(false);\r\n }*/\r\n \r\n showResultCB = new JCheckBox(\"Show intermediate result frames\");\r\n showResultCB.addItemListener(this);\r\n showResultCB.setSelected(false);\r\n showResultCB.setFont(serif12);\r\n\r\n PanelManager optionsManager = new PanelManager(\"Options\");\r\n //optionsManager.add(image25D);\r\n optionsManager.addOnNextLine(showResultCB);\r\n \r\n outputPanel = new JPanelAlgorithmOutputOptions(image);\r\n\r\n JPanel mainPanel = new JPanel(new GridBagLayout());\r\n\r\n gbc = new GridBagConstraints();\r\n gbc.gridx = 0;\r\n gbc.gridy = 0;\r\n gbc.gridwidth = 2;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n mainPanel.add(maskPanelOpen, gbc);\r\n\r\n \r\n gbc.gridx = 0;\r\n gbc.gridy = 1;\r\n gbc.gridwidth = 2;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL; mainPanel.add(\r\n maskPanelClose, gbc );\r\n \r\n\r\n gbc.gridx = 0;\r\n gbc.gridy = 1;\r\n gbc.gridwidth = 2;\r\n gbc.weightx = 1;\r\n gbc.fill = GridBagConstraints.HORIZONTAL;\r\n mainPanel.add(erodePanel, gbc);\r\n\r\n JPanel rowPanel = new JPanel(new GridBagLayout());\r\n gbc.gridx = 0;\r\n gbc.gridy = 0;\r\n gbc.fill = GridBagConstraints.BOTH;\r\n rowPanel.add(outputPanel, gbc);\r\n gbc.gridx = 0;\r\n gbc.gridy = 2;\r\n gbc.gridwidth = 1;\r\n mainPanel.add(rowPanel, gbc);\r\n\r\n gbc.gridx = 0;\r\n gbc.gridy = 3;\r\n gbc.gridwidth = 1;\r\n gbc.fill = GridBagConstraints.BOTH;\r\n mainPanel.add(optionsManager.getPanel(), gbc);\r\n\r\n JPanel buttonPanel = new JPanel();\r\n\r\n buildOKButton();\r\n buttonPanel.add(OKButton);\r\n buildCancelButton();\r\n buttonPanel.add(cancelButton);\r\n buildHelpButton();\r\n buttonPanel.add(helpButton);\r\n\r\n getContentPane().add(mainPanel);\r\n getContentPane().add(buttonPanel, BorderLayout.SOUTH);\r\n\r\n textKernelSizeOpen.setEnabled(true);\r\n labelKernelSizeOpen.setEnabled(true);\r\n textKernelSizeClose.setEnabled(true);\r\n labelKernelSizeClose.setEnabled(true);\r\n\r\n pack();\r\n setVisible(true);\r\n }", "private void setPanelOverview() {\n\t\tfinal String methodName = \"setPanelOverview\";\n\t\tdetailedDescription.setEditable(false);\n\t\tdetailedDescription.setLineWrap(true);\n\t\t// set layout for contentPanel\n\t\tGridBagLayout layout = new GridBagLayout();\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\n\t\tcontentPanel.setLayout(layout);\n\n\t\t//Add sessionTitle\n\t\tLoggerFactory.logp(Level.CONFIG, className, methodName, \"Add component sessionTitle to contentPanel.\");\n\t\tgbc.weightx = 0;\n\t\tgbc.weighty = 0;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridheight = 1;\n\t\tgbc.anchor = GridBagConstraints.CENTER;\n\t\tcontentPanel.add(sessionTitle, gbc);\n\n\t\t//Add detailedDescription\n\t\tLoggerFactory.logp(Level.CONFIG, className, methodName, \"Add component detailedDescription to contentPanel.\");\n\t\tgbc.weightx = 1;\n\t\tgbc.weighty = 1;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 1;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridheight = 5;\n\t\tgbc.anchor = GridBagConstraints.CENTER;\n\t\tgbc.fill = GridBagConstraints.BOTH;\n\t\tcontentPanel.add(detailedDescription, gbc);\n\n\t\t//Add exitButton\n\t\tLoggerFactory.logp(Level.CONFIG, className, methodName, \"Add component detailedDescription to contentPanel.\");\n\t\tgbc.weightx = 0;\n\t\tgbc.weighty = 0;\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 6;\n\t\tgbc.gridwidth = 1;\n\t\tgbc.gridheight = 1;\n\t\tgbc.anchor = GridBagConstraints.CENTER;\n\t\tgbc.fill = GridBagConstraints.NONE;\n\t\tcontentPanel.add(exitButton, gbc);\n\t}", "public PanelControl() {\r\n initComponents();\r\n VersionEImageIcon versionEImageIcon = new VersionEImageIcon();\r\n versionEImageIcon.newColorFromPanel(panelColor);\r\n jLabel1.setText(INFO_LABEL);\r\n Usuario usuarioTipo = Login.getUsuario();\r\n this.administrador = usuarioTipo.isAdmin();\r\n if (!administrador)\r\n {\r\n rangos.setEnabled(false);\r\n controles.setEnabled(false);\r\n alta_usuarios.setEnabled(false);\r\n verificacion.setEnabled(false);\r\n }\r\n }", "protected final void setPanelDatos(){\n panel_datos.setBackground(fondo);\n panel_datos.setBorder(BorderFactory.createTitledBorder(null,\"Datos\",TitledBorder.CENTER,TitledBorder.DEFAULT_POSITION, titulo, titulos));\n\n titulo_funcion.setFont(titulo); \n titulo_funcion.setForeground(titulos);\n titulo_h.setFont(titulo); \n titulo_h.setForeground(titulos);\n titulo_x.setFont(titulo); \n titulo_x.setForeground(titulos);\n titulo_n.setFont(titulo); \n titulo_n.setForeground(titulos);\n titulo_condiciones.setFont(titulo); \n titulo_condiciones.setForeground(titulos);\n titulo_y.setFont(titulo); \n titulo_y.setForeground(titulos);\n titulo_val.setFont(titulo); \n titulo_val.setForeground(titulos);\n titulo_metodo.setFont(titulo); \n titulo_metodo.setForeground(titulos);\n\n calcular.setBackground(titulos);\n calcular.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n limpiar.setBackground(titulos);\n limpiar.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n agregar.setBackground(titulos);\n agregar.setBorder(BorderFactory.createLineBorder(fondo,2));\n\n funcion.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n h.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n x.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n n.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n y.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n val.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n variables.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\n GroupLayout panel_datosLayout = new GroupLayout(panel_datos);\n panel_datos.setLayout(panel_datosLayout);\n\n panel_datosLayout.setHorizontalGroup(\n panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_funcion))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_metodo)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(metodo, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_n)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(n, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_x)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(x, GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_h)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(h, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addComponent(calcular, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(limpiar, GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGap(99, 99, 99)\n .addComponent(agregar,GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(titulo_y)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(y, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(titulo_val)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(val, GroupLayout.PREFERRED_SIZE,50, GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(funcion)\n .addContainerGap())\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(titulo_condiciones)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addComponent(titulo_variables, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(variables, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)\n .addGap(16, 16, 16))))\n );\n\n panel_datosLayout.setVerticalGroup(\n panel_datosLayout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(panel_datosLayout.createSequentialGroup()\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(titulo_variables)\n .addComponent(variables, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(5, 5, 5)\n .addComponent(titulo_funcion)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(funcion, GroupLayout.PREFERRED_SIZE, 26, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(titulo_condiciones)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_y)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(y, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)\n .addComponent(titulo_val)\n .addComponent(val, GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)))\n .addGap(11,11,11)\n .addComponent(agregar,GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_h)\n .addComponent(h, GroupLayout.PREFERRED_SIZE,22, GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_x)\n .addComponent(x, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_n)\n .addComponent(n, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(titulo_metodo)\n .addComponent(metodo, GroupLayout.PREFERRED_SIZE,24, GroupLayout.PREFERRED_SIZE))\n .addGap(28, 28, 28)\n .addGroup(panel_datosLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(calcular, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)\n .addComponent(limpiar, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11))\n );\n }" ]
[ "0.75993264", "0.7253656", "0.7137139", "0.7095023", "0.7055665", "0.7024363", "0.7012918", "0.6996994", "0.6950447", "0.6913392", "0.69023144", "0.6826957", "0.6805111", "0.67964226", "0.6784733", "0.66998976", "0.6699311", "0.6652747", "0.65716887", "0.6535305", "0.6532963", "0.65317214", "0.6519095", "0.6506105", "0.650408", "0.6468808", "0.64636207", "0.6456548", "0.6440168", "0.64353895", "0.6434315", "0.6405804", "0.63916713", "0.63663024", "0.6361674", "0.6356095", "0.6351237", "0.6312004", "0.6303123", "0.6297756", "0.6287953", "0.6276751", "0.6271662", "0.6262153", "0.62585795", "0.6256366", "0.62539893", "0.62522644", "0.6250862", "0.62433094", "0.6231118", "0.6224517", "0.62082076", "0.62041354", "0.620273", "0.61946845", "0.61927897", "0.6188238", "0.61821586", "0.6182035", "0.61798257", "0.61795694", "0.61766255", "0.6173345", "0.61686605", "0.615944", "0.61589015", "0.61547834", "0.61518794", "0.6151184", "0.6148866", "0.614845", "0.61383665", "0.61365753", "0.61257523", "0.61224264", "0.61111176", "0.6097466", "0.6097466", "0.6096831", "0.6092318", "0.6090017", "0.60858405", "0.6080746", "0.60788524", "0.60693794", "0.606774", "0.6066687", "0.6066213", "0.6062187", "0.60612184", "0.6055135", "0.6054536", "0.60515404", "0.6048661", "0.60410726", "0.6040187", "0.60363376", "0.60328346", "0.60282266" ]
0.67059475
15
Represents a source of the current time in nanoseconds.
public interface Clock { public long nanoTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic long getTime()\n\t{\n\t\treturn source.getTime();\n\t}", "@Override\n public void timingSourceTick(TimingSource source, long nanoTime) {\n if (isRunning())\n notifyListenersAboutATimingSourceTick(nanoTime);\n }", "@Override\n public float getTimeInSeconds() {\n return getTime() * INVERSE_TIMER_RESOLUTION;\n }", "public long startTimeNanos();", "@Override\n public Timepoint getTime() {\n return new StandardTimepoint(getTimeInternal(), NANO);\n }", "public double getTime() { return time; }", "long getCurrentClockNs() {\n return System.nanoTime();\n }", "@Override\n public Instant getInstant()\n {\n return this.epoch.getGlobalTime().plusNanos(this.nanoTime);\n }", "public TimingSource getTimingSource() {\n return f_timingSource;\n }", "public double getTime() {return _time;}", "private long getSampleTime() {\n return System.currentTimeMillis();\n\n }", "public long getCpuTimeNanos() {\n return cpuTimeToNanos(cpu.getTime());\n }", "public abstract double sensingTime();", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public static long now() {\n return System.nanoTime();\n }", "public double getTime();", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "public double getTime() {\n return this.time;\n }", "TickSource getSource();", "@Nonnull\r\n\tpublic static <T> Observable<T> sample(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\tfinal long time,\r\n\t\t\t@Nonnull final TimeUnit unit) {\r\n\t\treturn sample(source, time, unit, scheduler());\r\n\t}", "public double getCircleTime();", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "@Override\n\tpublic long currentTimeMillis() {\n\t\treturn this.currentTime;\n\t}", "public Double nanometersPerSecond()\n\t{\n\t\treturn getValue(VelocityUnit.NANOMETERS_PER_SECOND);\n\t}", "public static Velocity newNanometersPerSecondValue()\n\t{\n\t\treturn new Velocity(0.0, VelocityUnit.NANOMETERS_PER_SECOND);\n\t}", "public static double getTimeMs(){\n return System.nanoTime()*nanoToMs;\n }", "public static String GetElapsedTime(long nanoseconds) {\n return GetTimeString(System.nanoTime() - nanoseconds);\n }", "public interface TimeTracker {\n\n /**\n * Tell tracker to start timer\n */\n void startTracking();\n\n /**\n * Get time elapsed since tracker was started (#startTracking)\n * @return elapsed time\n */\n long getElapsedTime();\n\n /**\n * Get type\n * @return tracker type\n */\n Type type();\n\n\n /**\n * Type of time trackers available\n */\n public enum Type {\n /**\n * Millisecond time tracking (System.currentTimeMillis)\n */\n MILLIS (\"ms\") {\n @Override\n TimeTracker get() {\n return new TimeTracker() {\n private long start;\n @Override\n public void startTracking() {\n start = System.currentTimeMillis();\n }\n @Override\n public long getElapsedTime() {\n return System.currentTimeMillis() - start;\n }\n @Override\n public Type type() {\n return MILLIS;\n }\n };\n }\n },\n /**\n * Nanosecond time tracking (System.nanoTime)\n */\n NANOS (\"ns\") {\n @Override\n TimeTracker get() {\n return new TimeTracker() {\n private long start;\n @Override\n public void startTracking() {\n start = System.nanoTime();\n }\n @Override\n public long getElapsedTime() {\n return System.nanoTime() - start;\n }\n @Override\n public Type type() {\n return NANOS;\n }\n };\n }\n };\n\n private String units;\n Type(String units) {\n this.units = units;\n }\n\n /**\n * Provide time units based on tracker ('ms', 'ns')\n * @return time units string\n */\n public String getUnits() {\n return units;\n }\n\n abstract TimeTracker get();\n }\n}", "public double getFullTime() {\n return fullTime_;\n }", "public double getCurrentTime() {\n\t\treturn currentTime;\n\t}", "T getEventTime();", "public float getTimeSeconds() { return getTime()/1000f; }", "public static long currentTimeInSecond() {\n return Instant.now().getEpochSecond();\n }", "public double getFullTime() {\n return fullTime_;\n }", "public double getTimestamp() {\n switch (randomType) {\n case EXPONENT:\n return forArrive ? (-1d / LAMBDA) * Math.log(Math.random()) : (-1d / NU) * Math.log(Math.random());\n\n default:\n return 0;\n }\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> sample(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\tfinal long time,\r\n\t\t\t@Nonnull final TimeUnit unit,\r\n\t\t\t@Nonnull final Scheduler pool) {\r\n\t\treturn new Sample.ByTime<T>(source, time, unit, pool);\r\n\t}", "public long getSimTime() {\n\t return now;\n\t}", "public long nanosToCpuTime(long nanosecs) {\n return nanosecs * clockFrequency / NANOSECS_IN_MSEC;\n }", "public double getTime()\n {\n long l = System.currentTimeMillis()-base;\n return l/1000.0;\n }", "@Override protected String getRateUnit() {\n return \"events/\" + super.getRateUnit();\n }", "public double getStartTime();", "String getSourceUsageDateTime();", "public NTPTimeStamp64(long raw) {\n _secs = (raw >> 32)& 0xFFFFFFFFL; // force unsigned\n \n _frac = raw & 0xFFFFFFFFL; // force unsigned\n _fracDouble = _frac / SCALE;\n System.out.println(\"raw ctor: _secs, _frac = \" + Long.toHexString(_secs) + \n \", \" + Long.toHexString(_frac));\n }", "public long getEventTime();", "public long cpuTimeToNanos(long cpuTime) {\n return cpuTime * NANOSECS_IN_MSEC / clockFrequency;\n }", "public TimeUnit() {\n localTime = LocalDateTime.now();\n }", "public double getTime(int timePt);", "@java.lang.Override\n public long getTime() {\n return instance.getTime();\n }", "public Rational getStartTime ()\r\n {\r\n return startTime;\r\n }", "public double Time() {\n return OCCwrapJavaJNI.Units_Dimensions_Time(swigCPtr, this);\n }", "double getTime();", "public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}", "public double nextServiceTime() {\n return (-1 / mu) * Math.log(1 - randomST.nextDouble());\n }", "@Override\n public long getTime() {\n return time;\n }", "public static float getCurrentTime(){\n return (float)(System.currentTimeMillis()-t0)/1000.0f;\r\n }", "public float getCurrentTime()\n\t{\n\t\treturn currentTime;\n\t}", "public Instant now() {\n return _clock.instant();\n }", "@java.lang.Override\n public long getTime() {\n return time_;\n }", "Double currentTime() {\n return execute(\"player.currentTime\");\n }", "public double getServiceTime() {\r\n\t\treturn serviceTime.sample();\r\n\t}", "public int getTime() { return _time; }", "public double getTime() { return duration; }", "public float eventAgeSeconds() { return neventAgeSeconds(address()); }", "public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}", "public double nextArrivalTime() {\n return (-1 / lambda) * Math.log(1 - randomAT.nextDouble());\n }", "public Time(){\r\n Seconds = 0; \r\n }", "@Override\r\n\tpublic void update( ReceiverSource r ) {\n\t\tSystem.out.println( \"I am number \" + num + \"! It is \" + ((GameTimer) r).getSeconds() + \"!\" );\r\n\t}", "long getCurrentTimeMs();", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public double getCurrentTime() {\n\t\tif (playing)\n\t\t\treturn (System.nanoTime() - startNanoTime) / 1e9 + startTime;\n\t\telse if (currentFile == null)\n\t\t\treturn -1;\n\t\tif (debug)\n\t\t\tSystem.err.println(\"getCurrentTime(): not playing\");\n\t\treturn currentPosition / currentFile.frameSize / currentFile.frameRate;\n\t}", "long getDurationNanos();", "public double GenerateTime() {\r\n double d = R.nextDouble();\r\n double generatedtime=mean+range*(d-0.5);\r\n return generatedtime;\r\n }", "private long timeNow()\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return (System.currentTimeMillis() * 1000L) + DUTC.get() * 1000000L + 3506716800000000L;\n }", "@Override\n public float getStateTime() {\n return stateTime;\n }", "public double getAsSeconds()\n {\n return itsValue / 1000000.0;\n }", "private static Timestamp getCurrentTimeInSeconds() {\n\t\tLong mseconds = System.currentTimeMillis();\n\t\tmseconds = mseconds - mseconds % 1000;\n\t\treturn new Timestamp(mseconds);\n\t}", "public float getSecondsElapsed() { return _startTime==0? 0 : (System.currentTimeMillis() - _startTime)/1000f; }", "double getFullTime();", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "public double readClock()\n {\n return (System.currentTimeMillis() - startingTime) / 1000.0;\n }", "public long mo130408c() {\n return System.nanoTime();\n }", "public double getUserTimeSec() {\n\treturn getUserTime() / Math.pow(10, 9);\n}", "public Time() {\r\n\t\tsecond = (System.currentTimeMillis() / 1000) % 60;\r\n\t\tminute = (System.currentTimeMillis() / 1000) / 60 % 60;\r\n\t\thour = ((System.currentTimeMillis() / 1000) / 3600) % 24;\r\n\t}", "public static long getTime() \r\n {\r\n return System.nanoTime(); \r\n }", "public Time() {\n this(System.currentTimeMillis());\n }", "public float getCurrentTime () {\n\t\treturn timer;\n\t}", "public int getTT()\n {\n return toTime;\n }", "public long getEventTime() {\n return eventTime;\n }", "public double getTotalTime()\n\t{\n\t\tdouble elapsedTime = 0. ;\n\t\tEnumeration<SpItem> children = children() ;\n\t\tSpItem child = null ;\n\t\tboolean hasObsChild = false ;\n\n\t\twhile( children.hasMoreElements() )\n\t\t{\n\t\t\tchild = children.nextElement() ;\n\t\t\tif( child instanceof SpObs )\n\t\t\t{\n\t\t\t\thasObsChild = true ;\n\t\t\t\telapsedTime += (( SpObs )child).getElapsedTime() ;\n\t\t\t}\n\t\t\telse if( child instanceof SpMSB )\n\t\t\t{\n\t\t\t\telapsedTime += (( SpMSB )child).getTotalTime() ;\n\t\t\t}\n\t\t}\n\n\t\t// If there is an Obs child, we should add a slew time as well,\n\t\t// which is just the instrument slew time times the number of\n\t\t// targets. We don't do this if the child is an MSB since this\n\t\t// already adds a slew time\n\t\tdouble slewTime = 0. ;\n\t\tif( hasObsChild )\n\t\t{\n\t\t\tSpInstObsComp inst = SpTreeMan.findInstrument( this ) ;\n\t\t\tif( inst != null )\n\t\t\t\tslewTime = inst.getSlewTime() * size() ;\n\t\t}\n\n\t\t// Get the total number of repeats for each target\n\t\tint totRemaining = 0 ;\n\t\tfor( int i = 0 ; i < size() ; i++ )\n\t\t\ttotRemaining += getRemaining( i ) ;\n\n\t\telapsedTime *= totRemaining ;\n\t\telapsedTime += slewTime ;\n\n\t\treturn elapsedTime ;\n\t}", "public long getTs() {\n return ts;\n }", "public Geotemporal() {\n }", "private int getNanoseconds(TemporalAccessor partialValue) {\n int nanoSecs = 0;\r\n try {\r\n nanoSecs = partialValue.get(ChronoField.NANO_OF_SECOND);\r\n } catch (DateTimeException e) {\r\n // these errors may be common do not print them\r\n }\r\n return nanoSecs;\r\n }", "public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }", "public static native double now() /*-{\n return Date.now();\n }-*/;", "@Override\n\tpublic long getCurrentTime() {\n\t\treturn 0;\n\t}", "long getOpenedTimestampNanos();", "public Double getTime() {\n\t\treturn new Double((double) length * 36) / ((((double) speed) * 100));\n\t}", "NumberVariable getSource();", "public Integer getCusTime() {\r\n return cusTime;\r\n }" ]
[ "0.6100652", "0.5998227", "0.586545", "0.5830658", "0.57420844", "0.5691621", "0.5611379", "0.5602757", "0.55474687", "0.5544514", "0.5485918", "0.54484993", "0.54483145", "0.5411026", "0.53942996", "0.53612965", "0.5360825", "0.5314391", "0.5306229", "0.52896637", "0.5287835", "0.5286024", "0.5286024", "0.52748823", "0.5274383", "0.5264968", "0.52609515", "0.5242088", "0.524015", "0.52297586", "0.5201813", "0.5182618", "0.517262", "0.5172187", "0.51682854", "0.5163468", "0.51593024", "0.5151838", "0.51471823", "0.5144709", "0.5143176", "0.51385754", "0.51230055", "0.51062936", "0.51021725", "0.5095882", "0.50789666", "0.50708246", "0.50583607", "0.5056314", "0.50537634", "0.5050797", "0.5043812", "0.50403076", "0.50401205", "0.5030573", "0.50247073", "0.50241894", "0.50160474", "0.50110304", "0.5008999", "0.50083524", "0.50055975", "0.5002436", "0.4998415", "0.49887735", "0.49630943", "0.49492046", "0.49463776", "0.49460238", "0.49416327", "0.49368244", "0.49365816", "0.49312153", "0.4930379", "0.49259", "0.49223948", "0.49210826", "0.4916948", "0.4915887", "0.49145323", "0.49131516", "0.4908589", "0.49077502", "0.4906152", "0.49030352", "0.49010125", "0.49006462", "0.48890936", "0.48781234", "0.48726636", "0.487131", "0.4869243", "0.48608884", "0.48468074", "0.4845468", "0.48441008", "0.48408368", "0.48385927", "0.4837647" ]
0.5385622
15
visits a basic fighting pokemon
public void visitBasicFightingPokemon(BasicFightingPokemon basicFightingPokemon) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int attackPokemon(Pokemon pokemon1, Pokemon pokemon2, Player player);", "public void fight();", "public void attack();", "@Test\r\n\tpublic void testAttacks()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tCommand[] attacks = pk.getAttacks();\r\n\t\tassertEquals(\"FireSpin\", attacks[0].getAttackName());\r\n\t\tassertEquals(\"Ember\", attacks[1].getAttackName());\r\n\t\tassertEquals(\"Flamethrower\", attacks[2].getAttackName());\r\n\t\tassertEquals(\"Inferno\", attacks[3].getAttackName());\r\n\t}", "public static void main(String[] args) {\n\t\tPokemon firstPokemon = new Pokemon(\" P1 Typhlosion \", 1600, \" Fire \" , \" Healthy \" , \"Scratch\" , \"Bite\" , \"Fire Blast\", 300 , 375 , 450);\r\n\t\t Pokemon secondPokemon = new Pokemon(\" P2 Snorlax \", 1300, \" Normal \" , \" Healthy \" , \"Body Slam\" , \"Sleep\" , \"Swallow\", 500 , 100 , 200);\r\n\t\t System.out.println (firstPokemon.name + firstPokemon.health + firstPokemon.type + firstPokemon.status );\r\n\t\t System.out.println (secondPokemon.name + secondPokemon.health + secondPokemon.type + secondPokemon.status );\r\n\t\t Scanner myObj = new Scanner(System.in);\r\n\t\t\r\n\t\t \r\n\t\t System.out.println( \"P1 Turn. Enter number for corresponding attack! \" );\r\n\t\t System.out.println( \" 1(\" + firstPokemon.pAttack1 +\")\"+ \" 2(\" + firstPokemon.pAttack2 +\")\"+ \" 3(\" + firstPokemon.pAttack3 +\")\" );\r\n\t\t String battleCommand = myObj.nextLine();\r\n\t\t System.out.println (battleCommand);\r\n\t\t if (battleCommand.charAt(0) == '1') {\r\n\t\t\t System.out.println (firstPokemon.pAttack1);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '2') {\r\n\t\t\t System.out.println (firstPokemon.pAttack2);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '3') {\r\n\t\t\t System.out.println (firstPokemon.pAttack3);\r\n\t\t }\r\n\t\t else {\r\n\t\t\t System.out.println(\"Please enter the correct number.\");\r\n\t\t\t \r\n\t\t }\r\n\t}", "void ponderhit();", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public PerformAbilityVisitor(IPokemonCard pokemon) {\n this.pokemon = pokemon;\n }", "boolean checkFighterEnergy(AbstractFighterPokemon pokemon);", "public void actionCombat(Party p1) {\n System.out.println(\"______________________________________________________________________________\\n\");\n System.out.println(this.Name + \" is attacking ...\");\n int choice = (int)(Math.random() * p1.getTeam().size());\n Character target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n\n if (this.SPEED - target.getSPEED() < 5) {\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n }\n else {\n int n = 0;\n while ((target.actualHP != 0) && (n < 2)) {\n if (n == 1) {\n choice = (int)(Math.random() * p1.getTeam().size() + 1);\n target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n }\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n if (n == 0) System.out.println(this.Name + \" attacks again ...\");\n n++;\n }\n }\n }", "public void attack(User p)\n\t{\n\t\tint damage = getAttack() - p.getDefense();\n\t\tint evade = 0;\n\t\tif(damage <= 0)\n\t\t{\n\t\t\tevade = p.getDefense() - getAttack();\n\t\t\tdamage = 1;\n\t\t}\n\t\t\n\t\tif(Math.random() * 100 < evade * 5)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Miss\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tp.reduce(damage);\n JOptionPane.showMessageDialog(null,\"Enemy attacked you! User's health = \" + p.getHealth() + \"\\n\" + \"Damage dealt = \" + damage); \n\t}", "public void drawPokemon() {\n setAttackText();\n drawImage();\n }", "@Override\n\t\tpublic void attack() {\n\t\t\tSystem.out.println(\"잽을 날리다\");\n\t\t}", "@Override\n\t\tpublic void attack() {\n\t\t\tSystem.out.println(\"날으면서 원거리 공격을 하다.\");\n\t\t}", "public void attack() {\n\n }", "public abstract void attack(Player p);", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"땅밑에서 공격하다\");\n\t}", "public void goAdventuring() {\n\n game.createRandomMonster(4);\n if(RandomClass.getRandomTenPercent() == 5) {\n System.out.println(\"Your are walking down the road... Everything looks peaceful and calm.. Hit enter to continue!\");\n sc.nextLine();\n\n } else {\n game.battle();\n p.checkXp();\n }\n }", "public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }", "public abstract void attack(Game g);", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"Woof! Woof! *Crunch!*\");\n\t}", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\"빠르게 근접공격을 하다\");\n\t}", "public static void main(String[] args) {\n\t\tPokedex pokedex = new Pokedex();\n\t\tPokemon Pikachu = pokedex.createPokemon(\"Pikachu\", 100, \"Electrico\");\n\t\tPokemon Evee = pokedex.createPokemon(\"Evee\", 80, \"Normal\");\n\t\t\n\t\tPikachu.attackPokemon(Evee);\n\t\tpokedex.listPokemon();\n\t}", "static void startMatch()\n {\n // suggests that we should first use the pokedex menu\n if (Player.current.pokedex.isEmpty())\n {\n System.out.println(\"\\nYou have no pokemon to enter the match with kid. Use your pokedex and get some pokemon first.\");\n pause();\n return;\n }\n\n // print stuff\n clrscr();\n System.out.println(title());\n\n // print more stuff\n System.out.println(Player.opponent.name.toUpperCase() + \" IS PREPARING HIS POKEMON FOR BATTLE!\");\n \n // initialises the opponent logic - pokemon often enter evolved states\n Pokemon two = Opponent.init();\n\n System.out.println(\"\\n\"\n + Player.opponent.name.toUpperCase() + \" HAS CHOSEN \" + two +\"\\n\"\n + Player.current.name.toUpperCase() + \"! CHOOSE A POKEMON!!\");\n\n // displays the list of pokemon available for battle\n Player.current.showNamesPokedex();\n System.out.print(\"Gimme an index (Or type anything else to return)! \");\n int option = input.hasNextInt()? input.nextInt() - 1 : Player.current.pokedex.size();\n\n // sends back to mainMenu if option is out of bounds \n if (option >= Player.current.pokedex.size() || option < 0)\n {\n mainMenu();\n }\n\n // definitions, aliases for the two combatting pokemon\n Pokemon one = Player.current.pokedex.get(option);\n Pokemon.Move oneMove1 = one.listMoves.get(0);\n Pokemon.Move oneMove2 = one.listMoves.get(1);\n\n // if there's a bit of confusion regarding why two pokemon have the same nickname ...\n if (one.nickname.equals(two.nickname))\n System.out.println(one.nickname.toUpperCase() + \" vs ... \" + two.nickname.toUpperCase() + \"?? Okey-dokey, LET'S RUMBLE!!\");\n else // ... handle it\n System.out.println(one.nickname.toUpperCase() + \" vs \" + two.nickname.toUpperCase() + \"!! LET'S RUMBLE!!\");\n\n pause();\n clrscr();\n\n // Battle start!\n Pokemon winner = new Pokemon();\n // never give up!\n // unless it's addiction to narcotics \n boolean giveUp = false;\n while (one.getHp() > 0 && two.getHp() > 0 && !giveUp)\n {\n // returns stats of the pokemon\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n\n // 30% chance dictates whether the pokemon recover in a battle, but naturally so\n if (random.nextInt(101) + 1 < 30 && one.getHp() < one.maxHp)\n ++one.hp;\n\n if (random.nextInt(101) + 1 < 30 && two.getHp() < two.maxHp)\n ++two.hp;\n\n // the in-game selection menu\n System.out.print(\"\\n\"\n + Player.current.name.toUpperCase() + \"! WHAT WILL YOU HAVE \" + one.getFullName().toUpperCase() + \" DO?\\n\"\n + \"(a) Attack\\n\"\n + (oneMove1.isUsable? \"(1) Use \" + oneMove1.name.toUpperCase() + \"\\n\" : \"\")\n + (oneMove2.isUsable? \"(2) Use \" + oneMove2.name.toUpperCase() + \"\\n\" : \"\")\n + \"(f) Flee\\n\"\n + \"Enter the index from the brackets (E.g. (a) -> 'A' key): \");\n\n char choice = input.hasNext(\"[aAfF12]\")? input.next().charAt(0) : 'a';\n\n // a switch to handle the options supplied\n switch (choice)\n {\n case 'a': case 'A': default:\n one.attack(two);\n break;\n\n case 'f': case 'F':\n winner = two;\n giveUp = true;\n break;\n\n case '1':\n one.attack(two, oneMove1.name);\n break;\n\n case '2':\n one.attack(two, oneMove2.name);\n break;\n }\n\n // Opponent's turn, always second\n pause();\n clrscr();\n\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n Opponent.fight(one);\n pause();\n clrscr();\n }\n\n // find out the winner from combat or withdrawal\n winner = giveUp? two : one.getHp() > 0? one : two;\n System.out.println(\"\\nWINNER: \" + winner.getFullName() + \" of \" + winner.owner.name + \"!\\n\");\n\n if (winner == one)\n {\n // register the victory\n Player.current.gems += 100;\n System.out.println(\"You got 100 gems as a reward!\\n\");\n ++Player.current.wins;\n }\n else\n {\n // register the defeat\n ++Player.current.losses;\n System.out.println(\"Tough luck. Do not be worried! There's always a next time!\\n\");\n }\n\n pause();\n }", "public void attack(String spell, character opponent){\n Random rand = new Random();\n int prob;\n String attack;\n \n prob = rand.nextInt(2); //we need two random numbers to allow us to use the two attacks:\n if(prob==0){\n attack = \"punch\";\n opponent.setHealth(opponent.getHealth() - 10);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n else if(prob==1){\n attack = \"kick\";\n opponent.setHealth(opponent.getHealth() - 15);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n \n }", "void fight(Player attackingPlayer, Player attackedPlayer){\n\n // Ask what kind of attack\n Scanner scanner = new Scanner(System.in);\n System.out.println(attackingPlayer.getName() + \" (\" + attackingPlayer.getVitality()+ \" vitalité) veuillez choisir votre action ( 1: Attaque Basique\" + \" 2: Attaque Speciale\");\n\n int attack = scanner.nextInt();\n\n switch (attack) {\n case 1:\n attackingPlayer.basicAttack(attackedPlayer);\n break;\n case 2:\n attackingPlayer.specialAttack(attackedPlayer);\n break;\n default:\n }\n\n }", "public static void main(String[] args) {\n\t\tPokemon first = new Pokemon(\"Pikachu\", 90, \"Electric\");\n\t\tPokemon second = new Pokemon(\"Bulbasaur\", 95, \"Grass\");\n\t\tfirst.getName();\n\t\tfirst.attackPokemon(second);\n\t\tsecond.attackPokemon(first);\n\t}", "public void gameAttack(){\n int counter = 0;\n while (currentPlayer.wantToAttack(this)){\n counter++;\n if (counter > 100) break;\n /*In rare cases, AI players will repeatedly select the same attackers and defenders\n while also not wanting to dice fight. That will infinitely loop here and this counter will prevent it\n Under normal circumstances, no reasonable player will ever try to do more than 100 separate attacks in the same turn\n */\n\n String[] attackerDefender = {\"\",\"\"};\n //AttackStarterSelection\n attackerDefender[0] = currentPlayer.chooseAttackStarter(this);\n\n //AttackDefenderSelection\n attackerDefender[1] = currentPlayer.chooseAttackDefender(this, attackerDefender[0]);\n\n //DiceFightOrQuit\n int attackerDice, defenderDice;\n while (currentPlayer.wantToDiceFight(this, attackerDefender[0]+ \",\" + attackerDefender[1])){\n //DiceFightAttackerChoice\n attackerDice = currentPlayer.getAttackerDice(this, getTerritory(attackerDefender[0]));\n\n //DiceFightDefenderChoice\n Player defender = this.getPlayerFromList(this.getTerritory(attackerDefender[1]).getOwner());\n defenderDice = defender.getDefenderDice(this, this.getTerritory(attackerDefender[1]));\n\n\n //DiceFight results\n displayMessage(this.diceFight(attackerDefender, attackerDice,defenderDice));\n\n //Possible elimination and announcement of winner\n //Current diceFight ends if attacker has 1 troop left, or territory is conquered\n if (endDiceFight(attackerDefender, attackerDice)) break;\n\n }//End diceFightOrQuit\n\n\n }//End wantToAttack\n //Proceed to fortify stage of turn\n }", "public void catchPokemon(Pokemon p)\n\t{\n\t\tDate d = new Date();\n\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd:HH-mm-ss\").format(d);\n\t\tp.setDateCaught(date);\n\t\tp.setOriginalTrainer(getName());\n\t\tp.setDatabaseID(-1);\n\t\taddPokemon(p);\n\t\taddTrainingExp(1000 / p.getRareness());\n\t\tif(!isPokemonCaught(p.getPokedexNumber()))\n\t\t\tsetPokemonCaught(p.getPokedexNumber());\n\t}", "public void attack(Player p){\n p.takeDamage(damage);\n }", "public void Beginattack(HW10Trainer[] people, int numTrainer,Scanner scan)\n{\nString name1, name2;\nname1=scan.next();//reads the first part and sets it as a string \nname2=scan.next();//reads the second part and sets it as a string \nscan.nextLine();\nHW10Trainer a = new HW10Trainer();//pre set\nHW10Trainer b= new HW10Trainer(); \n\nfor (int i =0; i<numTrainer; i++)///matches the trainer with there name\n{\n\tif(name1.equals(people[i].getName()))//determines which trainer in the array goes with this name\n\t{\n\t\ta=people[i];\n\t}\n\tif(name2.equals(people[i].getName()))\n\t{\n\t\tb=people[i];\n\t}\n}\nint max1,max2;\nmax1=a.getNumMonsters();//gets the total amount of pokemen for that trainer\nmax2=b.getNumMonsters();\nint curr1,curr2; //acts as the index place value for the array \ncurr1=0;//starts the array at poistion 0\ncurr2=0;\nHW10Monster side1,side2;//sets the side for the battle \nside1= a.getMonster(curr1);//sets side one for all of the first trainers monsters\nside2=b.getMonster(curr2);//side two = all seconds trainers monsters\nSystem.out.println(a.getName() + \" is fighting \" + b.getName());\nSystem.out.println(\"Starting battle is \" + side1.name + \" versus \" + side2.name);\nwhile(curr1 < max1 && curr2<=max2)//if curr1 is less then max and curr2 is less then max2 then run\n{\n\t\n\tint result = fight(side1,side2,a,b);//sends the fight method the pokemon information and the Trainers information\nif(result==1)\n{\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\tif(curr2<max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n}\n else if(result == 2)\n{\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n}\n else if(result == 3)\n{\n\tSystem.out.println(\"*Draw*\");\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\t\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\t\n\tif(curr2 < max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n\tSystem.out.println(\"* End Draw *\");\n}\n\n\n\t\n}\n\tif( curr1<max1 && curr2>max2)//if the first trainer still has pokemon and the second does not\n\t{\n\t\tSystem.out.println(a.getName() + \" won the match\");\n\t}\n\telse if (curr2<max2 && curr1>max1)//if the second trainer still has pokemon and the first does not\n\t{\n\t\t\n\t\tSystem.out.println(b.getName() + \" won the match\");\n\t}\n\telse if(curr2<max2 && curr1<max1)//if both sides dont have any pokemon left\n\t\tSystem.out.println(\"Battle is a draw\");\n\n}", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(\" 원거리 공격을 하다\");\n\t}", "int attack(Unit unit, Unit enemy);", "private void goAdventure() {\n\n\t\tint experience = playern.getExp();\n\t\tint random = randomHelper.randomten();\n\n\t\t/**\n\t\t * Random part that starts with 10% occurance when user chooses goAdventuring()\n\t\t */\n\t\tif (random == 0) {\n\t\t\tSystem.out.println(\"You see nothing but unicorns running in the swaying grass..\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\n\t\t/**\n\t\t * Chooses storyboard and battle depending on experience level\n\t\t */\n\t\tif (experience >= 40) {\n\t\t\tStoryboardTwo.leveltwo();\n\t\t\tbattleSpider();\n\t\t}else {\n\t\t\tStoryboard.intro();\n\t\t\tbattleVampire();\n\t\t}\n\t\t}", "private void attackPhase(Player p) \n\t{\n\t\tp.attack();\n\t}", "@Override\r\n\tpublic void visit(Fighter fighter)\r\n\t{\n\t\t\r\n\t}", "public Attack fight(String opponent) {\n \n if (this.eat) { // If hungry, Scratch.\n return Attack.SCRATCH;\n }\n // Otherwise Pounce.\n return Attack.POUNCE;\n }", "public void doAction()\n {\n \n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n \n //Basic action:\n //Grab Gold if we can.\n if (w.hasGlitter(cX, cY))\n {\n w.doAction(World.A_GRAB);\n return;\n }\n \n //Basic action:\n //We are in a pit. Climb up.\n if (w.isInPit())\n {\n w.doAction(World.A_CLIMB);\n return;\n }\n //Test the environment\n /*if (w.hasBreeze(cX, cY))\n {\n System.out.println(\"I am in a Breeze\");\n }\n if (w.hasStench(cX, cY))\n {\n System.out.println(\"I am in a Stench\");\n }\n if (w.hasPit(cX, cY))\n {\n System.out.println(\"I am in a Pit\");\n }\n if (w.getDirection() == World.DIR_RIGHT)\n {\n System.out.println(\"I am facing Right\");\n }\n if (w.getDirection() == World.DIR_LEFT)\n {\n System.out.println(\"I am facing Left\");\n }\n if (w.getDirection() == World.DIR_UP)\n {\n System.out.println(\"I am facing Up\");\n }\n if (w.getDirection() == World.DIR_DOWN)\n {\n System.out.println(\"I am facing Down\");\n }\n */\n \n //decide next move\n if(w.hasStench(cX, cY)&&w.hasArrow())//Wumpus can be shot if located\n {\n if((w.hasStench(cX, cY+2))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX+2, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX, cY-1))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX, cY+1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX, cY-2))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX-2, cY))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX, cY+1))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX, cY-1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n else if(cX==1&&cY==1) //First tile. Shoot North. If wumpus still alive, store its location as (2,1) to avoid it\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n if(w.hasStench(cX, cY))\n {\n wumpusLoc[0] = 2;\n wumpusLoc[1] = 1;\n }\n }\n else if(cX==1&&cY==4) //Condition for corner\n {\n if(w.isVisited(1, 3))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(2, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==1) //Condition for corner\n {\n if(w.isVisited(3, 1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 2))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==4) //Condition for corner\n {\n if(w.isVisited(3, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 3))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if((cX==1)&&(w.isVisited(cX+1, cY-1))) //Condition for edge\n {\n \n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cX==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==1)&&(w.isVisited(cX-1, cY+1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else //Can't locate wumpus, go back to safe location\n {\n turnTo((w.getDirection()+2)%4);\n w.doAction(World.A_MOVE);\n }\n }\n else // No stench. Explore \n {\n if(w.isValidPosition(cX, cY-1)&&!w.isVisited(cX, cY-1)&&isSafe(cX, cY-1)) \n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY)&&!w.isVisited(cX+1, cY)&&isSafe(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY)&&!w.isVisited(cX-1, cY)&&isSafe(cX-1,cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n else\n {\n if(w.isValidPosition(cX, cY+1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n }\n }\n \n }", "@Override\n\tpublic void takeHit(int attack) {\n\n\t}", "public boolean whatNow (String action, player friday, player you){ // Method which will allow the ia to choose his action\n\t\tString testAction = \"Tank\"; // Create a String we will use a lot to test other string\n\t\tint actionIa; // If the ia is a Tank, forbid him to use his special attack. The purpose is to prevent him from useless turns\n\t\tif (friday.getName().equals(testAction)){ // If the name of the ia's class is Tank\n\t\t\t actionIa = (int)(Math.random() * 2); // His random will be between 0 or 1\n\t\t}\n\t\t\n\t\telse {\n\t\t\t actionIa = (int)(Math.random() * 3); // Else, his random will be between 0, 1 and 2\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Will be use to test if you attacked\n\t\t\n\t\t\n\t\tswitch (actionIa){ // Test ia's action\n\t\t\tcase 0: // 0, the enemy attack\n\t\t\t\tfriday.setSprite(\"attack\");\n\t\t\t\tSystem.out.println(\"The enemy attack\\n\"); // Warns the user\n\t\t\t\ttestAction = \"block\"; // Will be use to test if you block\n\t\t\t\tif (action.equals(testAction)){ // If you block\n\t\t\t\t\tSystem.out.println(\"You blocked the enemy's attack.\"); // Warns the user\n\t\t\t\t\tyou.setHp(you.getHp() - you.getDp()); // You loose as much hp as your dp\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tyou.setHp(you.getHp() - friday.getAp()); // Else, you loose as much hp as your enemy's ap\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: // 1, the enemy block\n\t\t\t\tfriday.setSprite(\"block\");\n\t\t\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\t\t\tfriday.setHp(friday.getHp() - friday.getDp()); // The enemy loose as much hp as his dp\n\t\t\t\t\taction = \"\"; // Prevent you from attack a second time\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The enemy blocked your attack\\n\"); // Warns the user\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // 2, the enemy use his special power if he isn't a tank\n\t\t\t\tfriday.setSprite(\"special\");\n\t\t\t\tSystem.out.println(\"The enemy uses his special power.\"); // Warns the user\n\t\t\t\tfriday.special(); // Execute ia's special attack\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Reset testAction\n\t\t\n\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\tfriday.setHp(friday.getHp() - you.getAp()); // The enemy loose as much hp as your ap\n\t\t} // Nota Bene : if the enemy blocked your attack, this won't be executed because 'action = \"\";'\n\t\t\n\t\tSystem.out.println(\"You have \" + you.getHp() + \" HP left.\"); // Warns the user\n\t\tSystem.out.println(\"The ennemy have \" + friday.getHp() + \" HP left.\\n\"); // Warns the user\n\t\t\n\t\tif(you.getHp() <= 0){ // If you or the ia has no hp left, warn the system that the fight is over by setting 'end' on true and tell who died\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You died!\");\n\t\t\tyou.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse if(friday.getHp() <= 0){\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You killed the ennemy!\");\n\t\t\tfriday.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse { // Else, it just asks you what you want to do\n\t\t\tSystem.out.println(\"What do you want to do, attack, block or use your special power ?\"); // Asks what you want to do\n\t\t}\n\t\treturn end;\n\t}", "AttackResult userAttack();", "public void move1(Pokemon enemy){\n int randCrit = (int)(22 * Math.random()+1);\n boolean crit = false;\n boolean superEffective = false;\n boolean reduced = false;\n boolean moveHit = true;\n\n //CHANGE ATTACK TO FALSE IF MOVE DOES NO DAMAGE<<<<<<<<<<<<<\n boolean attack = true;\n //CHANGE TYPE TO TYPE OF MOVE POWER AND ACCURACY<<<<<<<<<<<<<\n String type = \"Dark\";\n int power = 70;\n int accuracy = 100;\n\n //DO NOT CHANGE BELOW THIS\n int damage = ((CONSTANT * power * ( getAtt() / enemy.getDef() )) /50);\n if(randCrit == CONSTANT){\n damage = damage * 2;\n crit = true;\n }\n if(checkSE(type,enemy.getType())){\n damage = damage * 2;\n superEffective = true;\n }\n if(checkNVE(type, enemy.getType())){\n damage = damage / 2;\n reduced = true;\n }\n if(attack && hit(accuracy)){\n enemy.lowerHp(damage);\n }\n else{\n if(hit(accuracy)){\n //DO STATUS EFFECT STUFF HERE (ill figure out later)\n }\n\n }\n lowerM1PP();\n }", "@Override\n\tpublic void attack() {\n\n\t}", "private void CheckFaintedPokemon() {\n \tif(user.getTeam(user.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\tuser.getTeam(user.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tbattleMessage.add(user.getTeam(user.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \tif(opponent.getTeam(opponent.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\topponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tCalculateXP(user.getTeam(),opponent.getTeam(opponent.getCurrentPokemonIndex()));\n \t\tbattleMessage.add(opponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \t\n }", "POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();", "@Override\n\tpublic void attack() {\n\t\t\n\t}", "public void printAssistants(Player player);", "private void hitP1(int attack) {\n game_PB_p1HP.setProgress(attack + game_PB_p1HP.getProgress());\n if (game_PB_p1HP.getProgress() > GameVariables.CRITICAL_HP)\n game_PB_p1HP.setProgressDrawable(ContextCompat.getDrawable(this, R.drawable.game_progressbar_low_hp));\n if (game_PB_p1HP.getProgress() >= GameVariables.MAX_HP)\n announceWinner(GameVariables.P2_WIN);\n\n }", "@Override\n public void attack() {\n\n }", "@Override\r\n\tpublic boolean fight(String oponent) {\n\t\tint x = Critter.getRandomInt(1);\r\n\t\tif (x == 1) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void attack() {\n\t}", "public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n public void executeAttack() {\r\n \t\r\n \tSystem.out.println();\r\n System.out.println(\"**** Attack Phase Begins for player \" + this.playerName + \"..****\\n\");\r\n \r\n boolean hasConnqueredAtleastOneCountry = false;\r\n \r\n\t System.out.println(\"\\n\" + \"Fetching potential attack scenarios for \" + this.playerName + \"...\\n\");\r\n\t \r\n\t // get all scenarios but we're only interested in attacking with the strongest country & in all-out mode\r\n\t HashMap<String, ArrayList<String>> potentialAttackScenarios = getPotentialAttackScenarios();\r\n\t \r\n\t if (potentialAttackScenarios == null) {\r\n\t System.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t\r\n\t if (potentialAttackScenarios.isEmpty()) {\r\n\t System.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t \r\n\t \t \r\n\t String enemyCountryToAttack = null;\r\n\t String strongestCountry = getStrongestCountryConqueredByPlayer(potentialAttackScenarios);\r\n\t if(strongestCountry == null) {\r\n\t \tSystem.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t \r\n\t \r\n // implement a mini-strategy within this aggressive strategy to target the weakest enemy country first\r\n\t // build map of all enemy countries and their respective army counts\r\n\t ArrayList<String> allAdjacentEnemyCountries = potentialAttackScenarios.get(strongestCountry); \r\n\t HashMap<String,Integer> allAdjacentEnemyCountriesAndArmyCounts = new HashMap<String,Integer>();\r\n\t \r\n\t for(String enemyCountry: allAdjacentEnemyCountries) {\r\n \tInteger currentEnemyCountryArmyCount = gameData.gameMap.getCountry(enemyCountry).getCountryArmyCount();\r\n \tallAdjacentEnemyCountriesAndArmyCounts.putIfAbsent(enemyCountry, currentEnemyCountryArmyCount);\r\n\t }\r\n\t \r\n\t // sort in ascending order based on lowest army count -> highest\r\n\t Object[] sortedAdjacentEnemyCountriesAndArmyCounts = allAdjacentEnemyCountriesAndArmyCounts.entrySet().toArray();\r\n\t Arrays.sort(sortedAdjacentEnemyCountriesAndArmyCounts, (o1, o2) -> ((Map.Entry<String, Integer>) o1).getValue()\r\n\t\t .compareTo(((Map.Entry<String, Integer>) o2).getValue()));\r\n\t \r\n\r\n\t HashSet<String> countriesConquered = new HashSet<>();\r\n\t \r\n\t // attack each surrounding enemy country while you can\r\n\t for (Object e : sortedAdjacentEnemyCountriesAndArmyCounts) {\r\n\r\n\t \t// setup phase state\r\n\t \tAttackPhaseState attackPhase = new AttackPhaseState();\r\n\t \t attackPhase.setAttackingPlayer(this.playerName);\r\n\t \t attackPhaseState.add(attackPhase);\r\n\t \t notifyView();\r\n\t \t // attacking country will be the same for a given turn\r\n\t \t attackPhase.setAttackingCountry(strongestCountry);\r\n\t notifyView();\r\n\t \t\r\n\t \tenemyCountryToAttack = ((Map.Entry<String, Integer>) e).getKey(); \r\n\t \tattackPhase.setDefendingCountry(enemyCountryToAttack);\r\n\t \tnotifyView();\r\n\t\r\n\t \tString defendingPlayer = gameData\r\n\t .getPlayer(this.gameData.gameMap.getCountry(enemyCountryToAttack).getCountryConquerorID())\r\n\t .getStrategyType().getPlayerName();\r\n\t \tattackPhase.setDefendingPlayer(defendingPlayer);\r\n\t \tnotifyView();\r\n\t \r\n\t \t// fight in all out mode until you win or run out of armies on the ground\r\n\t\t while (!attackPhase.getBattleOutcomeFlag() && this.gameData.gameMap.getCountry(strongestCountry).getCountryArmyCount() > 1) {\r\n\t // proceed with max allowed dice count for both sides\r\n\t Integer attackerDiceCount = getActualMaxAllowedDiceCountForAction(\"attack\", strongestCountry, 3);\r\n\t\t attackPhase.setAttackerDiceCount(attackerDiceCount);\r\n\t\t //Integer defenderDiceCount = getActualMaxAllowedDiceCountForAction(\"defend\",enemyCountryToAttack, 2);\r\n\t\t // always set defender dice count to the min to maximize aggression \r\n\t\t Integer defenderDiceCount = 1;\r\n\t\t attackPhase.setDefenderDiceCount(defenderDiceCount);\r\n\t\t rollDiceBattle(attackPhase);\r\n\t hasConnqueredAtleastOneCountry = fight(attackPhase) || hasConnqueredAtleastOneCountry;\r\n\t \r\n\t if(attackPhase.getBattleOutcomeFlag()) {\r\n\t \tcountriesConquered.add(strongestCountry);\r\n\t \tcountriesConquered.add(enemyCountryToAttack);\r\n\t \t\r\n\t }\r\n\t \r\n\t }\r\n\t\t \r\n\t }\r\n\t \r\n\t String weakestCountry = getCountryWithMostNumberOfBordersShared(countriesConquered);\r\n\t \r\n\t if(weakestCountry != strongestCountry) {\r\n\t \t\r\n\t \tInteger strongestCountryArmyCount = this.gameData.gameMap.getCountry(strongestCountry).getCountryArmyCount();\r\n\t \t\r\n\t \tif(strongestCountryArmyCount > 1) {\r\n\t \t\tthis.gameData.gameMap.deductArmyToCountry(strongestCountry, strongestCountryArmyCount - 1);\r\n\t\t\t\tthis.gameData.gameMap.addArmyToCountry(weakestCountry, strongestCountryArmyCount - 1);\r\n\t \t}\r\n\t \t\r\n\t }\r\n\t \r\n checkIfPlayerHasConqueredTheWorld();\r\n \r\n\t\t\r\n\t if (hasConnqueredAtleastOneCountry) {\r\n\t\t \tCard card = gameData.cardsDeck.getCard();\r\n\t \r\n\t\t if(card == null) {\r\n\t\t \tSystem.out.println(\"No more cards left in the deck\");\r\n\t\t } else {\r\n\t\t \t\tthis.cardList.add(card);\r\n\t\t \t\tSystem.out.println(\"PlayerStrategy received 1 card => Army Type: \" + card.getArmyType() + \", Country: \" + card.getCountry().getCountryName());\r\n\t\t \t\tSystem.out.println(\"Total cards : \" + this.cardList.size());\r\n\t\t \t}\r\n\t\t} \r\n\t \r\n\t HashSet<String> conqueredCountryByThisPlayer = gameData.gameMap.getConqueredCountries(playerID);\r\n System.out.println(\"\\nOverview of army counts: \\n\");\r\n for(String country: conqueredCountryByThisPlayer){\r\n System.out.println(\"Country: \"+country+\", Army Count: \"+gameData.gameMap.getCountry(country).getCountryArmyCount());\r\n }\r\n\t \r\n\t endAttack();\r\n }", "public void attack() { \n db.attack(creatures.get(creatureId), players.get(playerId));\n creatures.set(creatureId, db.getCreature(creatures.get(creatureId).getId()));\n players.set(playerId, db.getPlayer(players.get(playerId).getId()));\n setTextFields();\n }", "public abstract void attackPlayer(Player p);", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(getKind()+\" 공격하다\");\n\t}", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(getKind()+\" 공격하다\");\n\t}", "@Override\n\tpublic void attack() {\n\t\tSystem.out.println(getKind()+\" 공격하다\");\n\t}", "public void attack() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n\n lista[i].attack();\n }\n }", "@Override\n public void attack(){\n\n }", "int getIndividualAttack();", "public String attack() {\r\n\t\t\tthis.getCurrentEnemy().setHealth(this.getCurrentEnemy().getHealth()-this.getPlayer().getWeapon().getAttack());\r\n\t\t\tif(this.getCurrentEnemy().isDefeated()) {\r\n\t\t\t\tthis.setInBattle(false);\r\n\t\t\t\t\r\n\t\t\t\tthis.handleQuestrelatedEnemy(this.getCurrentEnemy());\r\n\t\t\t\t\r\n\t\t\t\tif(this.getCurrentEnemy().getLoot() != null) {\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addItem(this.getCurrentEnemy().getLoot());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.getPlayer().gainXp(this.getCurrentEnemy().getXpYield());\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeNpc(this.getCurrentEnemy().getName());\r\n\t\t\t\tif(this.getCurrentEnemy().getClass().getName().equals(\"game.EnemyGuardian\")) {\r\n\t\t\t\t\t// adds paths between current location and location in the guardian, path names are specified in the guardian construction\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addPaths(this.getPlayer().getCurrentLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathTo(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((EnemyGuardian)this.getCurrentEnemy()).getGuardedLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathFrom());\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ ((EnemyGuardian)this.getCurrentEnemy()).getRevelationMessage() + \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \".\";\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.triggerEnemyAttack();\r\n\t\t\t\t\tif(this.getPlayer().getHealth() <= 0) {\r\n\r\n\t\t\t\t\t\tthis.gameOver();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n You DIED.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n\"\r\n\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().getName() + \" attacked you for \" + this.getCurrentEnemy().getAttack() + \" damage.\\n\"\r\n\t\t\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().printHealth();\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic String fight() {\n\t\treturn \"Ready to fight!\";\n\t}", "boolean checkPsychicEnergy(AbstractPsychicPokemon pokemon);", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }", "private void attackPlayer()\n\t{\n\t\tif(shootTimer.done())\n\t\t{\n\t\t\tProjectile spiderWeb = new SpiderWeb(x, y);\n\t\t\tGame.objectWaitingRoom.add(spiderWeb);\n\t\t\tspiderWeb.shoot();\n\t\t\tshootTimer.setTime(200);\n\t\t}\n\t}", "public void battle(AbstractPokemon otherPokemon)\n {\n boolean capturedPokemon = false;\n AbstractPokemon myPokemon = caughtPokemon.get(0);\n while(caughtPokemon.size() > 0 && otherPokemon.getHealth() > 0 && myPokemon.getHealth() > 0 && capturedPokemon == false)\n {\n System.out.println(otherPokemon.toString() + \" has \" + otherPokemon.getHealth() + \" HP.\");\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has \" + myPokemon.getHealth() + \" HP.\");\n while (otherPokemon.getHealth() > 0 && myPokemon.getHealth() > 0 && capturedPokemon == false)\n {\n boolean willingToCapture = false;\n if(faveType == AbstractPokemon.Type.ANY_TYPE)\n willingToCapture = true;\n else if(otherPokemon.getType() == faveType)\n willingToCapture = true;\n if(!otherPokemon.canCapture() || !willingToCapture)\n {\n otherPokemon.takeDamage(myPokemon);\n if(otherPokemon.getHealth() < 0)\n otherPokemon.setHealth(0);\n System.out.println(otherPokemon.toString() + \" has \" + otherPokemon.getHealth() + \" HP.\");\n if(otherPokemon.getHealth() > 0)\n {\n myPokemon.takeDamage(otherPokemon);\n if(myPokemon.getHealth() < 0)\n myPokemon.setHealth(0);\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has \" + myPokemon.getHealth() + \" HP.\");\n }\n }\n else\n {\n if(throwPokeball(otherPokemon))\n {\n System.out.println(otherPokemon.toString() + \" has been captured!\");\n otherPokemon.setHealth(20);\n caughtPokemon.add(otherPokemon);\n otherPokemon.removeSelfFromGrid();\n capturedPokemon = true;\n }\n else\n {\n myPokemon.takeDamage(otherPokemon);\n if(myPokemon.getHealth() < 0)\n myPokemon.setHealth(0);\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has \" + myPokemon.getHealth() + \" HP.\");\n }\n }\n }\n if (myPokemon.getHealth() <= 0)\n {\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has fainted!\");\n caughtPokemon.remove(0);\n }\n if (caughtPokemon.size() > 0)\n {\n System.out.println(toString() + \" sent out \" + caughtPokemon.get(0).toString() + \".\");\n myPokemon = caughtPokemon.get(0);\n }\n }\n if(capturedPokemon == false)\n {\n if (otherPokemon.getHealth() <= 0)\n {\n System.out.println(otherPokemon.toString() + \" has fainted!\");\n otherPokemon.removeSelfFromGrid();\n myPokemon.setHealth(20);\n }\n else\n {\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n removeSelfFromGrid();\n otherPokemon.setHealth(20);\n }\n }\n System.out.println(\"\");\n }", "@Override\n\tpublic boolean fight(String opponent) {\n\t\treturn true;\n\t}", "public void Attack(Character Opponent) {\n int damage = 0;\n\n System.out.print(\"\\n\\n\\t***************** Giant Attacks! *****************\\n\"\n + \"\\tBefore Attack: Giant Hit = \" + getHealth() + \" \"\n + Opponent.getName() + \" Hit = \" + Opponent.getHealth()\n + \"\\n\");\n\n Random rand = new Random();\n damage = (rand.nextInt(10) + 1) + getAttack();\n \n if (damage > Opponent.getDefense()) {\n damage -= Opponent.getDefense();\n } else {\n damage = 0;\n }\n if (Opponent.hasFullBodyArmor()) {\n if (damage > 4) {\n damage -= 4;\n }\n }\n if (Opponent.hasChainMail()) {\n if (damage > 2) {\n damage -= 2;\n }\n }\n\n Opponent.damage(damage);\n \n System.out.print(\"\\tAfter Attack: Giant Hit = \" + getHealth() + \" \"\n + Opponent.getName() + \" Hit = \" + Opponent.getHealth()\n + \"\\n\\n\");\n\n try { Thread.sleep(3000); } catch (Exception e) {}\n }", "public abstract boolean attack(PermanentCharm i);", "@Override\n\tvoid attack() {\n\n\t}", "public void fightClick(View view) {\n this.player.incrementTries();\n this.player.setTarget(level);\n Intent fightIntent = new Intent(this, FightActivity.class);\n fightIntent.putExtra(\"player\", player);\n fightIntent.putExtra(\"level\", level);\n startActivity(fightIntent);\n }", "void playSoldierCard(int victimIndex, HexLocation location);", "private void parseAttack()\n\t{\n\n\t\tMatcher rankMatcher = Pattern.compile( \"Your current PvP Ranking is (\\\\d+)\" ).matcher( responseText );\n\t\tif ( rankMatcher.find() )\n\t\t\tKoLCharacter.setPvpRank( StaticEntity.parseInt( rankMatcher.group(1) ) );\n\n\t\t// Trim down the response text so it only includes\n\t\t// the information related to the fight.\n\n\t\tint index = responseText.indexOf( \"<p>Player to attack\" );\n\t\tresponseText = responseText.substring( 0, index == -1 ? responseText.length() : index );\n\t\tsuper.processResults();\n\t}", "public Pokemon start() {\n System.out.println(\"\\n\" + this.pokemonOne.getName() + \" affronte \" + this.pokemonTwo.getName() + \" dans un combat qui s'annonce extraordinaire\\n\");\n\n this.pokemonOne.speakFightShout();\n this.pokemonTwo.speakFightShout();\n\n while (true) {\n if (this.PokemonOneIsAlive()) {\n this.pokemonOne.giveDamage(pokemonTwo);\n } else {\n this.pokemonOne.speakDefeatShout();\n this.pokemonTwo.speakVictoryShout();\n return this.pokemonOne;\n }\n if (this.PokemonTwoIsAlive()) {\n this.pokemonTwo.giveDamage(pokemonOne);\n } else {\n this.pokemonTwo.speakDefeatShout();\n this.pokemonOne.speakVictoryShout();\n return this.pokemonTwo;\n }\n }\n }", "@Override\n public void doAction() {\n String move = agent.getBestMove(currentPosition);\n execute(move);\n\n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n\n if (w.hasWumpus(cX, cY)) {\n System.out.println(\"Wampus is here\");\n w.doAction(World.A_SHOOT);\n } else if (w.hasGlitter(cX, cY)) {\n System.out.println(\"Agent won\");\n w.doAction(World.A_GRAB);\n } else if (w.hasPit(cX, cY)) {\n System.out.println(\"Fell in the pit\");\n }\n\n// //Basic action:\n// //Grab Gold if we can.\n// if (w.hasGlitter(cX, cY)) {\n// w.doAction(World.A_GRAB);\n// return;\n// }\n//\n// //Basic action:\n// //We are in a pit. Climb up.\n// if (w.isInPit()) {\n// w.doAction(World.A_CLIMB);\n// return;\n// }\n//\n// //Test the environment\n// if (w.hasBreeze(cX, cY)) {\n// System.out.println(\"I am in a Breeze\");\n// }\n// if (w.hasStench(cX, cY)) {\n// System.out.println(\"I am in a Stench\");\n// }\n// if (w.hasPit(cX, cY)) {\n// System.out.println(\"I am in a Pit\");\n// }\n// if (w.getDirection() == World.DIR_RIGHT) {\n// System.out.println(\"I am facing Right\");\n// }\n// if (w.getDirection() == World.DIR_LEFT) {\n// System.out.println(\"I am facing Left\");\n// }\n// if (w.getDirection() == World.DIR_UP) {\n// System.out.println(\"I am facing Up\");\n// }\n// if (w.getDirection() == World.DIR_DOWN) {\n// System.out.println(\"I am facing Down\");\n// }\n//\n// //decide next move\n// rnd = decideRandomMove();\n// if (rnd == 0) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 1) {\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 2) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 3) {\n// w.doAction(World.A_TURN_RIGHT);\n// w.doAction(World.A_MOVE);\n// }\n }", "public void attackTargetCharacter() {\n }", "public void gainExperience(Combatant opponent) { }", "@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}", "public int basicAttack() {\n\t\t// lots of logic\n\t\treturn 5;\n\t}", "private void combatPhase() {\n \t\n \tpause();\n \tDice.setFinalValMinusOne();\n\n \t// Go through each battle ground a resolve each conflict\n \tfor (Coord c : battleGrounds) {\n \t\t\n \tClickObserver.getInstance().setTerrainFlag(\"\");\n \t\n \tSystem.out.println(\"Entering battleGround\");\n \t\tfinal Terrain battleGround = Board.getTerrainWithCoord(c);\n \t\t\n \t\t// find the owner of terrain for post combat\n \tPlayer owner = battleGround.getOwner();\n \t\n \t\t// simulate a click on the first battleGround, cover all other terrains\n \t\tClickObserver.getInstance().setClickedTerrain(battleGround);\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tClickObserver.getInstance().whenTerrainClicked();\n \t\tBoard.applyCovers();\n \t\tClickObserver.getInstance().getClickedTerrain().uncover();\n \tClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n }\n });\n \t\t\n \t\t// Get the fort\n \t Fort battleFort = battleGround.getFort(); \n \t\t\n \t\t// List of players to battle in the terrain\n \t\tArrayList<Player> combatants = new ArrayList<Player>();\n \t\t\n \t\t// List of pieces that can attack (including forts, city/village)\n \t\tHashMap<String, ArrayList<Piece>> attackingPieces = new HashMap<String, ArrayList<Piece>>();\n \t\t\n \t\tSystem.out.println(battleGround.getContents().keySet());\n \t\t\n \t\tIterator<String> keySetIterator = battleGround.getContents().keySet().iterator();\n\t \twhile(keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n \t\t\tcombatants.add(battleGround.getContents().get(key).getOwner());\n \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n \t\t\t\n\t \t}\n\t \t\n\t \t\n\t \t\n\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n\t\t\tif (!combatants.contains(battleGround.getOwner()) && battleFort != null) {\n\t\t\t\tcombatants.add(battleGround.getOwner());\n\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n\t\t\t}\n\n \t\t// add forts and city/village to attackingPieces\n \t\tif (battleFort != null) {\n \t\t\tattackingPieces.get(battleGround.getOwner().getName()).add(battleFort);\n \t\t}\n \t\t\n \t\tkeySetIterator = attackingPieces.keySet().iterator();\n\t \twhile (keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n\t \t\tfor (Piece p : attackingPieces.get(key)) {\n\t \t\t\tif (p.getName().equals(\"Baron Munchhausen\") || p.getName().equals(\"Grand Duke\")) {\n\t \t\t\t\tif (p.getOwner() != battleGround.getOwner())\n\t \t\t\t\t\t((Performable)p).specialAbility();\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t}\n\t \t}\n \t\t// TODO implement city/village\n// \t\tif (City and village stuff here)\n \t\tSystem.out.println(combatants);\n \t\t\n \t\tboolean exploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t// Fight until all attackers are dead, or until the attacker becomes the owner of the hex\n \t\twhile (combatants.size() > 1 || exploring) {\n \t\t\t\n /////////////Exploration\n \t// Check if this is an exploration battle:\n \t\t// Must fight other players first\n \t\t\tboolean fightingWildThings = false;\n \tif (exploring) {\n\n \t\t\t\t// Set the battleGround explored\n \t\t\t\tbattleGround.setExplored(true);\n \t\n \t\tString exploringPlayer = null;\n \t\tIterator<String> keySetIter = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIter.hasNext()) {\n \t \t\tString key = keySetIter.next();\n \t \t\texploringPlayer = key;\n \t \t}\n \t\tplayer = battleGround.getContents(exploringPlayer).getOwner();\n \t\tplayer.flipAllUp();\n \t \t\n \t\t// Get user to roll die to see if explored right away\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tDiceGUI.getInstance().uncover();\n \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t \t\t\t+ \", roll the die. You need a 1 or a 6 to explore this terrain without a fight!\");\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\tint luckyExplore = -1;\n \t\t\t\twhile (luckyExplore == -1) {\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\tluckyExplore = Dice.getFinalVal();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// If success TODO FIX this \n \t\t\t\tif (luckyExplore == 1 || luckyExplore == 6) {\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Congrats!\" + player.getName() \n \t\t \t\t\t+ \"!, You get the terrain!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\texploring = false;\n \t\t\t\t\tbreak;\n \t\t\t\t\t\n \t\t\t\t} else { // Else failure. Must fight or bribe\n \t\t\t\t\t\n \t\t\t\t\tfightingWildThings = true;\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tbattleGround.coverPieces();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Boooo!\" + player.getName() \n \t\t \t\t\t+ \"!, You have to bribe, or fight for your right to explore!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// add luckyExplore amount of pieces to terrain under wildThing player\n \t\t\t\t\tfinal ArrayList<Piece> wildPieces = TheCup.getInstance().draw(luckyExplore);\n \t\t\t\t\t\t\n \t\t\t\t\t// Update the infopanel with played pieces. Active done button\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \twildThings.playWildPieces(wildPieces, battleGround);\n \t\t GUI.getDoneButton().setDisable(false);\n \t\t battleGround.coverPieces();\n \t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t \n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t//////Bribing here\n \t\t\t\t\tpause();\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectCreatureToBribe\");\n \t\t\t\t\t\n \t\t\t\t\t// Uncover the pieces that the player can afford to bribe\n \t\t\t\t\t// canPay is false if there are no Pieces that the user can afford to bribe\n \t\t\t\t\tboolean canPay = false;\n \t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n \t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n \t\t\t\t\t\t\tcanPay = true;\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tp.uncover();\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\ttry { Thread.sleep(50); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// Continue looping until there are no more pieces user can afford to bribe, or user hits done button\n \t\t\t\t\twhile (canPay && isPaused) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t\t @Override\n\t \t\t public void run() {\n\t \t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t\t \t\t\t+ \", Click on creatures you would like to bribe\");\n\t \t\t }\n \t\t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t\t// wait for user to hit done, or select a piece\n \t\t\t\t\t\tpieceClicked = null;\n \t\t\t\t\t\twhile(pieceClicked == null && isPaused) {\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (pieceClicked != null) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// spend gold for bribing. Remove clicked creature\n \t\t\t\t\t\t\tplayer.spendGold(((Combatable)pieceClicked).getCombatValue());\n \t\t\t\t\t\t\t((Combatable)pieceClicked).inflict();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// cover pieces that are too expensive\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t\t\t \t\t\t+ \" bribed \" + pieceClicked.getName());\n \t\t\t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t \tif (battleGround.getContents(wildThings.getName()) != null) {\n\t \t\t\t\t for (Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t \tif (((Combatable)p).getCombatValue() > player.getGold())\n\t \t\t\t\t \t\tp.cover();\n\t \t\t\t\t }\n \t\t\t\t \t}\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Check if there are any pieces user can afford to bribe and set canPay to true if so\n \t\t\t\t\t\t\tcanPay = false;\n \t\t\t\t\t\t\tif (battleGround.getContents(wildThings.getName()) == null || battleGround.getContents(wildThings.getName()).getStack().size() == 1)\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n\t \t\t\t\t\t\t\t\t\tcanPay = true;\n\t \t\t\t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t\t \t\t\t+ \" done bribing\");\n\t\t\t }\n \t\t\t\t\t});\n \t\t\t\t\tSystem.out.println(\"Made it past bribing\");\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\t\n \t\t\t\t\t// Done bribing, on to fighting\n \t\t\t\t\t\n \t\t\t\t\t// find another player to control wildThings and move on to regular combat\n \t\t\t\t\t// to be used later \n \t\t\t\t\tPlayer explorer = player;\n \t\t\t\t\tPlayer wildThingsController = null;\n \t\t\t\t\tfor (Player p : playerList) {\n \t\t\t\t\t\tif (!p.getName().equals(player.getName()))\n \t\t\t\t\t\t\twildThingsController = p;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// If wild things still has pieces left:\n \t\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName())) {\n\t \t\t\t\t\tcombatants.add(battleGround.getContents().get(wildThings.getName()).getOwner());\n\t \t \t\t\tattackingPieces.put(wildThings.getName(), (ArrayList<Piece>) battleGround.getContents().get(wildThings.getName()).getStack().clone()); \n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// cover pieces again\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tbattleGround.coverPieces();\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t\t\t\tplayer.flipAllDown();\n \t} // end if (exploring)\n \t\t\t\n \t\t\tSystem.out.println(\"combatants.size() > 1 : \" + combatants.size());\n \t\t\tSystem.out.println(combatants);\n \t\t\t\n \t\t\t// This hashMap keeps track of the player to attack for each player\n \t\t\tHashMap<String, Player> toAttacks = new HashMap<String, Player>();\n\n\t\t\t\t// each player selects which other player to attack in case of more than two combatants\n \t\t\tif (combatants.size() > 2) {\n \t\t\t\t\n \t\t\t\tfor (final Player p : combatants) {\n \t\t\t\t\tif (!p.isWildThing()) {\n\t \t \t\tpause();\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"Attacking: SelectPlayerToAttack\");\n\t \t \t\tplayer = p;\n\t\t \tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tPlayerBoard.getInstance().applyCovers();\n\t\t \t \tbattleGround.coverPieces();\n\t\t \t \t GUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", select which player to attack\");\n\t\t\t \t \t}\n\t\t \t });\n\t\t \tfor (final Player pl : combatants) {\n\t\t \t\tif (!pl.getName().equals(player.getName())) {\n\t\t \t\t\tPlatform.runLater(new Runnable() {\n\t\t \t \t @Override\n\t\t \t \t public void run() {\n\t\t \t \t \tPlayerBoard.getInstance().uncover(pl);\n\t\t \t \t }\n\t\t \t\t\t});\n\t\t \t\t}\n\t\t \t}\n\t\t \twhile (isPaused) {\n\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t \t }\n\t\t \t\n\t\t \t// ClickObserver sets playerClicked, then unpauses. This stores what player is attacking what player\n\t\t \ttoAttacks.put(p.getName(), playerClicked);\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\t \t\n\t \t \t} \n \t\t\t\t}\n \t\t\t\tcombatants.remove(wildThings);\n \t\t\t\tPlayerBoard.getInstance().removeCovers();\n \t\t\t\t\n \t } else { // Only two players fighting\n \t \t\n \t \tfor (Player p1 : combatants) {\n \t \t\tfor (Player p2 : combatants) {\n \t \t\t\tif (!p1.getName().equals(p2.getName())) {\n \t \t \ttoAttacks.put(p1.getName(), p2);\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t\t\t\n ///////////////////Call out bluffs here:\n \t\t\tbattleGround.flipPiecesUp();\n \t\t\tfor (final Player p : combatants) {\n \t\t\t\t\n \t\t\t\t// Make sure not wildThings\n \t\t\t\tif (!p.isWildThing()) {\n \t\t\t\t\t\n \t\t\t\t\tArrayList <Piece> callOuts = new ArrayList<Piece>();\n \t\t\t\t\t\n \t\t\t\t\tfor (final Piece ap : attackingPieces.get(p.getName())) {\n \t\t\t\t\t\t\n \t\t\t\t\t\t// If not supported the gtfo\n \t\t\t\t\t\tif (!ap.isSupported()) {\n\n \t\t\t\t\t\t\tcallOuts.add(ap);\n \t\t\t\t\t\t\t((Combatable)ap).inflict();\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t \tInfoPanel.showTileInfo(battleGround);\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: \" + p.getName()\n\t\t\t \t + \" lost their \" + ap.getName() + \" in a called bluff!\");\n\t \t \t }\n\t \t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor (Piece co : callOuts) {\n \t\t\t\t\t\tattackingPieces.get(p.getName()).remove(co);\n \t\t\t\t\t}\n\t\t\t\t\t\tif (attackingPieces.get(p.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(p.getName());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tPlayer baby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\t// Set up this HashMap that will store successful attacking pieces\n \t\t\tHashMap<String, ArrayList<Piece>> successAttacks = new HashMap<String, ArrayList<Piece>>();\n \t\t\t// Set up this HashMap that will store piece marked to get damage inflicted\n\t\t\t\tHashMap<String, ArrayList<Piece>> toInflict = new HashMap<String, ArrayList<Piece>>();\n \t\t\tfor (Player p : combatants) {\n \t\t\t\t\n \t\t\t\tsuccessAttacks.put(p.getName(), new ArrayList<Piece>());\n \t\t\t\ttoInflict.put(p.getName(), new ArrayList<Piece>());\n \t\t\t}\n \t\t\t\n \t\t\t// Array List of pieces that need to be used during a particular phase\n\t\t\t\tfinal ArrayList<Piece> phaseThings = new ArrayList<Piece>();\n\t\t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Magic!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n/////////////////////// Magic phase\n \t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its magic. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isMagic() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover magic pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mag : phaseThings) \n\t \t\t\t\t\tmag.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n\n\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\"attackingPieces.size(): \" + attackingPieces.size());\n\t\t\t\t\tSystem.out.println(\"attackingPieces.keySet(): \" + attackingPieces.keySet());\n\t\t\t\t\tIterator<String> keySetIte = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIte.hasNext()) {\n \t \t\tString key = keySetIte.next();\n\n \t\t\t\t\tSystem.out.println(\"key: \" + key);\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key).size():\\n\" + attackingPieces.get(key).size());\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key):\\n\" + attackingPieces.get(key));\n \t \t}\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more magic pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a magic piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a magic piece to attack with\");\n\t \t }\n\t \t });\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t \t\t\t+ \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName()); // 'defender'\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ti++;\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Ranged!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n//////////////////// Ranged phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its ranged. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isRanged() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover ranged pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece ran : phaseThings) \n\t \t\t\t\t\tran.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more ranged pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a ranged piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a ranged piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Melee!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\n///////////////////////////// Melee phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its melee. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && !(((Combatable)p).isRanged() || ((Combatable)p).isMagic()) && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover melee pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mel : phaseThings) \n\t \t\t\t\t\tmel.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more melee pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a melee piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a melee piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// Is it a charging piece?\n\t \t\t\t\tint charger;\n\t \t\t\t\tif (((Combatable)pieceClicked).isCharging()) {\n\t \t\t\t\t\tcharger = 2;\n\t \t\t\t\t} else\n\t \t\t\t\t\tcharger = 1;\n\t \t\t\t\t\n\t \t\t\t\t// do twice if piece is a charger\n\t \t\t\t\tfor (int i = 0; i < charger; i++) {\n\t \t\t\t\t\t\n\t\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tpieceClicked.highLight();\n\t\t \t \tDiceGUI.getInstance().uncover();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t\t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\n\t\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t \t\t\t\t\tint attackStrength = -1;\n\t \t\t\t\t\twhile (attackStrength == -1) {\n\t \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n\t \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n\t \t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n\t \t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t\t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t\t \t }\n\t\t \t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// If piece is charging, and it is its first attack, remove the cover again\n\t \t\t\t\t\tif (((Combatable)pieceClicked).isCharging() && i == 0) {\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t \tpieceClicked.uncover();\n\t\t\t \t }\n\t \t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n\t \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t \t\t\t\t}\n\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n \t\t\t\t\t\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Retreat!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n \t\t\t\n \t\t\t\n//////////////////////// Retreat phase\n\t\t\t\t// Can only retreat to a Terrain that has been explored and has no ememies on it\n\t\t\t\t\n\t\t\t\t// Display message, activate done button\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Attack phase: Retreat some of your armies?\");\n\t\t GUI.getDoneButton().setDisable(false);\n\t }\n\t }); \t\t\t\t\n\t\t\t\t\n\t\t\t\t// For each combatant, ask if they would like to retreat\n\t\t for (Player pl : combatants) {\n\t\t \t\n\t\t \t// Make sure wildThings aren't trying to get away\n\t\t \tif (!pl.isWildThing()) {\n\t\t\t \tplayer = pl;\n\t \t InfoPanel.uncover(player.getName());\n\t\t\t\t ClickObserver.getInstance().setActivePlayer(player);\n\t\t\t\t ClickObserver.getInstance().setCreatureFlag(\"Combat: SelectRetreaters\");\n\t\t\t\t \n\t\t\t\t // Pause and wait for player to hit done button\n\t\t\t\t pause();\n\t\t\t Platform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tbattleGround.coverPieces();\n\t\t\t \tbattleGround.uncoverPieces(player.getName());\n\t\t\t \tbattleGround.coverFort();\n\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \", You can retreat your armies\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t while (isPaused && battleGround.getContents(player.getName()) != null) {\n\t\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t\t\t }\t \n\t\t\t\t ClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n\t\t\t\t \n\t\t\t\t // TODO, maybe an if block here asking user if they would like to attack \n\t\t\t\t System.out.println(attackingPieces + \"---BEFORE CLEARING\");\n\t\t\t\t // Re-populate attackingPieces to check for changes\n\t\t\t\t attackingPieces.clear();\n\t\t\t\t Iterator<String> keySetIterator2 = battleGround.getContents().keySet().iterator();\n\t\t\t\t \twhile(keySetIterator2.hasNext()) {\n\t\t\t\t \t\tString key = keySetIterator2.next();\n System.out.println(key + \"=====key\");\n\t\t\t \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n\t\t\t\t \t}\n // System.out.println(attackingPieces);\n\t\t\t\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n System.out.println(\"===battleground\"+battleGround);\n System.out.println(\"===attackingPieces\"+attackingPieces);\n System.out.println(combatants.contains(battleGround.getOwner()) ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\tif (combatants.contains(battleGround.getOwner()) && battleFort != null) {\n System.out.println(battleGround + \"===battleground\");\n\t\t\t\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n System.out.println(attackingPieces + \"===attacking pieces\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (battleFort != null) {\n System.out.println(battleFort.getName() + \"===battlefort\");\n System.out.println(battleFort.getOwner().getName() + \"===battlefort's owner\");\n \n\t\t\t\t\t\t\tattackingPieces.get(battleFort.getOwner().getName()).add(battleFort);\n System.out.println(attackingPieces.get(battleFort.getOwner().getName()));\n\t\t\t\t\t\t}\n\t//\t\t\t\t\tif (battleGround city/village)\n\t\t\t\t\t\t// TODO city/village\n\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t // Check if all the players pieces are now gone\n\t\t\t\t if (!attackingPieces.containsKey(player.getName())) {\n\t\t\t\t \t\n\t\t\t\t \t// Display message, and remove player from combatants\n\t\t\t\t \tPlatform.runLater(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run() {\n\t\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \" has retreated all of their pieces!\");\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t \t\n\t\t\t\t \t// If there is only 1 player fighting for the hex, \n\t\t\t\t \tif (attackingPieces.size() == 1) \n\t\t\t\t \t\tbreak;\n\t\t\t\t \t\n\t\t\t\t \t// Pause because somebody just retreated\n\t\t\t\t \ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t }\n\t\t\t\t \n\n\t \t InfoPanel.cover(player.getName());\n\t\t\t\t \n\t\t\t }\n\t\t }\n\t\t \n\t\t // Done button no longer needed\n\t\t Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t GUI.getDoneButton().setDisable(true);\n\t\t }\n\t\t });\n\t\t ClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t ClickObserver.getInstance().setFortFlag(\"\");\n\t\t \n\t\t // Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\n\t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n\t\t\t\t\n\t\t\t\t// Add wildthings back to combatants if they were removed\n\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName()) && !combatants.contains(wildThings))\n\t\t\t\t\tcombatants.add(wildThings);\n\t\t\t\t\n \t\t} // end while (combatants.size() > 1 || exploring)\n \t\tbattleGround.coverFort();\n \t\t\n////////////////// Post Combat\n \t\t\n \t\t// sets player as the winner of the combat\n \t\t// Can be null if battle takes place on a hex owned by nobody, and each player lost all pieces\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tbattleGround.removeBattleHex();\n }\n \t\t});\n \t\t\n \t\tif (combatants.size() == 0)\n \t\t\tplayer = battleGround.getOwner();\n \t\telse if (combatants.size() == 1 && combatants.get(0).getName().equals(wildThings.getName()))\n \t\t\tplayer = null;\n \t\telse\n \t\t\tplayer = combatants.get(0);\n \t\t\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\tSystem.out.println(\"combatants: \" + combatants);\n \t\tfor (Player p : combatants) {\n \t\tSystem.out.println(\"p.getName(): \"+ p.getName());\n \t\t\t\n \t\t}\n \t\tSystem.out.println(\"owner: \" + owner);\n \t\tSystem.out.println(\"combatants.get(0): \" + combatants.get(0));\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\t\n \t\t\n \t\t// Change ownership of hex to winner\n \t\tboolean ownerChanged = false;\n \t\tif (owner != null && combatants.size() > 0 && !battleGround.getOwner().equals(combatants.get(0))) {\n \t\t\tbattleGround.getOwner().removeHex(battleGround);\n \t\t\tcombatants.get(0).addHexOwned(battleGround);\n \t\t\townerChanged = true;\n \t\t}\n\t\t\t\n \t\t// See if fort is kept or downgraded.\n \t\tif (battleFort != null) {\n if (battleFort.getName().equals(\"Citadel\")) {\n owner.setCitadel(false);\n player.setCitadel(true);\n battleFort.healFort();\n player.addHexOwned(battleGround);\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n }\n });\n checkWinners();\n return;\n }\n \t\t\n\t\t\t\t// Get player to click dice to see if fort is kept\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", roll the die to see if the fort is kept or downgraded\");\n\t \tDiceGUI.getInstance().uncover();\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t\t\t\tint oneOrSixGood = -1;\n\t\t\t\twhile (oneOrSixGood == -1) {\n\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t\t\t\t\toneOrSixGood = Dice.getFinalVal();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if a 1 or 6, keep fort (Keep it.... not turn it into a keep)\n\t\t\t\tif (oneOrSixGood == 1 || oneOrSixGood == 6) {\n\t\t\t\t\tbattleFort.healFort();\n\t\t\t\t\tplayer.addHexOwned(battleGround);\n\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tbattleFort.downgrade();Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", the fort was destroyed!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n \t\t}\n\n \t\tbattleGround.flipPiecesDown();\n\t\t\t// TODO city/village and special incomes if they are kept or lost/damaged \n \t\t\n \t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t}/// end Post combat\n\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n//\t\t\t\tInfoPanel.showBattleStats();\n \tBoard.removeCovers();\n }\n\t\t});\n \t\n\t\tClickObserver.getInstance().setTerrainFlag(\"\");\n\t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\tbattleGrounds.clear();\n }", "public Location attack() {\n resetBoard();\n\n if (getHits().isEmpty()) {\n// System.out.println(\"Hunting\");\n\n for (final int[] r : board) {\n for (int c = 0; c < r.length; c++) {\n if (getIntegers().contains(5) && (c < (r.length - 4)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3]) && (-1 != r[c + 4])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n ++r[c + 4];\n }\n\n if (getIntegers().contains(4) && (c < (r.length - 3)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n }\n if (getIntegers().contains(3) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(2) && (c < (r.length - 1)))\n if ((-1 != r[c]) && (-1 != r[c + 1])) {\n ++r[c];\n ++r[c + 1];\n }\n }\n }\n\n for (int c = 0; c < board[0].length; c++) {\n for (int r = 0; r < board.length; r++) {\n if (getIntegers().contains(5) && (r < (board.length - 4)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n\n if (getIntegers().contains(4) && (r < (board.length - 3)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n if (getIntegers().contains(3) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(2) && (r < (board.length - 1)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n }\n }\n } else {\n// System.out.println(\"Hitting\");\n\n for (final Location hit : getHits()) {\n final int r = hit.getRow();\n final int c = hit.getCol();\n\n if (getIntegers().contains(2)) {\n if ((0 <= (c - 1)) && (-1 != board[r][c]) && (-1 != board[r][c - 1])) {\n ++board[r][c];\n ++board[r][c - 1];\n }\n\n\n if (((c + 1) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1])) {\n ++board[r][c];\n ++board[r][c + 1];\n }\n\n if ((0 <= (r - 1)) && (-1 != board[r][c]) && (-1 != board[r - 1][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n }\n\n if (((r + 1) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n\n\n }\n if (getIntegers().contains(3)) {\n final int inc = Collections.frequency(getIntegers(), 3);\n\n if ((0 <= (c - 2)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2])) {\n board[r][c] += inc;\n board[r][c - 1] += inc;\n board[r][c - 2] += inc;\n }\n if (((c + 2) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2])) {\n board[r][c] += inc;\n board[r][c + 1] += inc;\n board[r][c + 2] += inc;\n }\n if ((0 <= (r - 2)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c])) {\n board[r][c] += inc;\n board[r - 1][c] += inc;\n board[r - 2][c] += inc;\n }\n if (((r + 2) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n board[r][c] += inc;\n board[r + 1][c] += inc;\n board[r + 2][c] += inc;\n }\n\n\n }\n if (getIntegers().contains(4)) {\n if ((0 <= (c - 3)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n }\n if (((c + 3) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n }\n if ((0 <= (r - 3)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n }\n if (((r + 3) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n\n\n }\n if (getIntegers().contains(5)) {\n if ((0 <= (c - 4)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3]) && (-1 != board[r][c - 4])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n ++board[r][c - 4];\n }\n if (((c + 4) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3]) && (-1 != board[r][c + 4])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n ++board[r][c + 4];\n }\n if ((0 <= (r - 4)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c]) && (-1 != board[r - 4][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n ++board[r - 4][c];\n }\n if (((r + 4) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n }\n }\n\n for (final Location hit : getHits()) {\n board[hit.getRow()][hit.getCol()] = 0;\n }\n }\n\n// for (int[] i : board)\n// System.out.println(Arrays.toString(i));\n return findLargest();\n }", "@Override\n public void chooseAction(){\n healthDecay = getHealth() - 5;\n //now scan for Nazguls\n\n if(healthDecay == 0){\n death(this);\n }\n int scan_result = scan();\n\n if(scan_result == 1){\n move();\n }\n\n if(scan_result == 0 && healthDecay < 75){\n stay();\n }\n\n if(scan_result == 0 && hobbitCounter == 15){\n replicate();\n hobbitCounter = 0;\n }\n\n else{\n move();\n \n }\n hobbitCounter = hobbitCounter + 1;\n }", "boolean hasActivePokemon();", "public Pokemon(boolean isFishing, boolean isFighting, int hitPoints, String name) {\n this.isFishing = isFishing;\n this.isFighting = isFighting;\n this.hitPoints = hitPoints;\n this.name = name;\n \n // ensures that hitPoints is never over 255\n this.tooHigh();\n\n }", "public void afterfight(int n){\n n = n*2;\r\n hp = 100;\r\n xp+=n;\r\n xpincrease += n/10;\r\n if(xpincrease>=5){\r\n xp -= 5;\r\n damage+=1;\r\n }\r\n\r\n }", "@Override\n public void onClickPokemon(PokemonItem pokemon) {\n// Toast.makeText(PokemonBankActivity.this, \"clicked \"+ pokemon.id, Toast.LENGTH_LONG).show();\n //\n gotoPkmDetail(pokemon);\n }", "private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }", "public void doAttackMoove(Point player, int move){\n MoveAction action = new MoveAction();\n action.setSource(this.player);\n VisualArea tab[] = action.getVisualArea( this.engine.getGameInformation() );\n Point better = player;\n for( int i = 0 ; i < tab.length ; i++ ){\n if( team == 0 ){\n if( tab[i].getX() > better.getX() )better = tab[i];\n }else if ( team == 1 ) {\n if( tab[i].getX() < better.getX() )better = tab[i];\n }else{\n new JOptionPane(\"Error\");\n }\n action.setDestination(better);\n this.engine.performAction( action );\n }\n }", "public abstract void attack(Monster mon);", "void robPlayer(HexLocation location, int victimIndex);", "public void attack(Role opponent) {\r\n\t\tSystem.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n\t\tthis.checkPoison();\r\n\t\tif(!this.skip) {\r\n\t\t\topponent.getAttacked(this);\r\n\t\t\tif( !opponent.dodge ) {\r\n\t\t\t\tif(opponent.poisoned == 0) {\r\n\t\t\t\t\topponent.poisoned =3;\r\n\t\t\t\t\tSystem.out.println(this.name+\" throws a poisoned dart at \"+opponent.name);\r\n\t\t\t\t\topponent.setName(opponent.name+\" (poisoned) \");\r\n\t\t\t\t}else {\r\n\t\t\t\t\topponent.poisoned =3;\r\n\t\t\t\t\tSystem.out.println(opponent.name+\" is poisoned again by a whizzing dart of \"+this.name);\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(this.name+\"'s dart misses.\");\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tSystem.out.println(this.name+\" Skips a turn.\");\r\n\t\t\tthis.skip=false;\r\n\t\t\tint startIndex = this.getName().indexOf(\"(\");\r\n\t\t\tthis.setName(this.getName().substring(0,startIndex));\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\r\n\t}", "public int performPokeAction() {\n\t\tAction action = pokemon.chooseAction();\n\t\tif (action == Action.ATTACK) {\n\t\t\ttrainer.takeDamage(pokemon.performAttack());\n\t\t}\n\t\treturn action.getValue();\n\t\t//return Action.ATTACK.getValue();\n\t}", "@Override\n\tpublic void battleChoices(DungeonCharacter opponent)\n\t{\n\t\tsuper.battleChoices(opponent);\n\n\t\t\tdo\n\t\t\t{\n\t\t\t System.out.println(\"1. Attack Opponent\");\n\t\t\t System.out.println(\"2. Pet Attack\");\n\t\t\t \n\t\t\t if(moveSelector() == 1) {\n\t\t\t \tattack(opponent);\n\t\t\t \t\n\t\t\t }\n\t\t\t \n\t\t\t else {\n\t\t\t \tsurpriseAttack(opponent);\n\t\t\t \t\n\t\t\t }\n\t\t\t \n\t\t\t\tnumTurns--;\n\t\t\t\tif (numTurns > 0)\n\t\t\t\t System.out.println(\"Number of turns remaining is: \" + numTurns);\n\n\t\t\t} while(numTurns > 0);\n\n\t}", "int hitGfx();", "@Override\n\tpublic String attack(Game game) {\n\t\tString text = \"\";\n\t\tremoved_laketile = new ArrayList<LakeTile>();\n\t\tremoved_position = new ArrayList<Position>();\n\t\tLakeTile[][] board = game.getPlayArea().getLakeTilesOnBoard();\n\t\tRandom r = new Random();\n\t\tint number_laketile_onboard = countLakeTileOnBoard(board);\n\t\tif (number_laketile_onboard == 0) {\n\t\t\treturn \"Passing Power Boat attacking but there is nothing on the board\";\n\t\t} else {\n\t\t\tint number_remove_laketile = r.nextInt(number_laketile_onboard) + 1;\n\t\t\tfor (int i = 0; i < number_remove_laketile; i++) {\n\t\t\t\tremoveALakeTile(game);\n\t\t\t}\n\t\t\ttext += showText();\n\t\t\treturn \"Passing Power Boat attacking on position ::\\n\" + text + \"\\n\";\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\tHero hero = new Hero(\"Nighthawk\");\r\n\t\thero.show();\r\n\t\thero.fight();\r\n\t}", "void basicAttack(Character attacked);", "public void battleSpider() {\n\n\t\tPlayer playern = this.playern;\n\t\tgiantSpider = new GiantSpider(\"Giant spider\", 35, 60); //Bad way to initiate with hp and exp, see new cyborgvampire\n\t\tSystem.out.println(\"*gosh* this monster is dangerous\");\n\t\tSystem.out.println(\"[press enter to fight]\");\n\t\tsc.nextLine();\n\n\t\twhile (true) {\n\t\t\tgiantSpider.takeDamage(playern.attack());\n\t\t\tif (!giantSpider.getisDead()) {\n\t\t\t\tSystem.out.println(\"You kill the Giant spider, earned \" + giantSpider.giveExp() + \" experience\");\n\t\t\t\tplayern.setExp(giantSpider.giveExp());\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\t//playern.restoreHpAfterBattle();\n\t\t\t\tSystem.out.println();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tplayern.takeDamage(giantSpider.attack());\n\t\t\tif (!playern.getIsAlive()){\n\t\t\t\tSystem.out.println(\"You are killed\");\n\t\t\t\tSystem.out.println(\"You have lost the game\");\n\t\t\t\tplayern.afterBattleStats();\n\t\t\t\tbreak;\n\t\t\t\t//System.exit(0);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"* \" + playern.getName() + \": \" + playern.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"* \" + giantSpider.getName() + \": \" + giantSpider.getHp() + \" hp\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\n\t\ttopScore();\n\t}" ]
[ "0.69219244", "0.67582226", "0.6569717", "0.6520394", "0.6476709", "0.64282507", "0.62782896", "0.6267874", "0.6260976", "0.6246648", "0.6232138", "0.62230724", "0.61460584", "0.61169976", "0.6099484", "0.60990256", "0.6086639", "0.6077341", "0.6064362", "0.6058761", "0.60573924", "0.6046253", "0.60392666", "0.6036882", "0.60289806", "0.6026817", "0.6023123", "0.6020213", "0.6005607", "0.60036427", "0.5996815", "0.59962827", "0.5995012", "0.59916323", "0.598951", "0.59807134", "0.5976034", "0.5960203", "0.5956374", "0.5955317", "0.5953359", "0.5946233", "0.59208274", "0.5916852", "0.5909358", "0.5895354", "0.5881908", "0.58756477", "0.5871744", "0.58393466", "0.58357024", "0.58267194", "0.5826277", "0.5823589", "0.58212125", "0.58193475", "0.58193475", "0.58193475", "0.5814069", "0.5809488", "0.58001447", "0.57986987", "0.5797936", "0.5787205", "0.5782065", "0.57808334", "0.57792103", "0.57606363", "0.57478243", "0.57432777", "0.574131", "0.5740359", "0.5739084", "0.57373947", "0.57370025", "0.57348174", "0.5725928", "0.5724206", "0.57238036", "0.5723102", "0.57199", "0.57176405", "0.57101053", "0.57061535", "0.57047886", "0.5704389", "0.57040703", "0.5699684", "0.5699399", "0.56985945", "0.56923866", "0.5689381", "0.56842685", "0.5676899", "0.56711197", "0.56667656", "0.56637895", "0.5663569", "0.566262", "0.565651" ]
0.7086728
0
visits a phase one electric pokemon
public void visitPhaseOneElectricPokemon(PhaseOneElectricPokemon phaseOneElectricPokemon) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void attackPhase(Player p) \n\t{\n\t\tp.attack();\n\t}", "public PerformAbilityVisitor(IPokemonCard pokemon) {\n this.pokemon = pokemon;\n }", "@Override\n public void onClickPokemon(PokemonItem pokemon) {\n// Toast.makeText(PokemonBankActivity.this, \"clicked \"+ pokemon.id, Toast.LENGTH_LONG).show();\n //\n gotoPkmDetail(pokemon);\n }", "public void promote() {\r\n\t\tif (exp >= 20) {\r\n\t\t\tstage +=1;\r\n\t\t\texp = 0;\r\n\t\t\thp *= 2;\r\n\t\t\tenergy *= 2;\r\n\t\t\tattackPoint *= 2;\r\n\t\t\tresistancePoint *= 2;\r\n\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.printf(\"Pokemon has evolved!\\n\");\r\n\t}", "public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }", "public void visitBasicFightingPokemon(BasicFightingPokemon basicFightingPokemon) {\n }", "void ponderhit();", "public int attackPokemon(Pokemon pokemon1, Pokemon pokemon2, Player player);", "@Override\n public void acceptEffect(EffectVisitor visitor){\n visitor.visitedPokemonPark(this);\n }", "boolean checkPsychicEnergy(AbstractPsychicPokemon pokemon);", "Pokemon() {\n // we want to set level to 1 for every pokemon initially\n count++;\n level = 1;\n }", "public void catchPokemon(Pokemon p)\n\t{\n\t\tDate d = new Date();\n\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd:HH-mm-ss\").format(d);\n\t\tp.setDateCaught(date);\n\t\tp.setOriginalTrainer(getName());\n\t\tp.setDatabaseID(-1);\n\t\taddPokemon(p);\n\t\taddTrainingExp(1000 / p.getRareness());\n\t\tif(!isPokemonCaught(p.getPokedexNumber()))\n\t\t\tsetPokemonCaught(p.getPokedexNumber());\n\t}", "public void atacar(Pokemon t){\n\tif(t.obtenerTipo()==tipoPokeMasDano){\n\t dano*=2;\n\t System.out.println(\"El ataque se hace más fuerte contra este tipo de Pokemon\");\n\t}\n\tSystem.out.println(\"Has ejecutado \"+obtenerNombreAtaque()+\"\\nEl ataque le causa un daño de \"+obtenerDano()+\" a \"+\n\t\t\t t.obtenerApodo()+\":\\n\"+obtenerDescripcionAtaque());\n\tt.puntosVida-=dano;\n\tcontadorNivel++;\n\tSystem.out.println(\"Los puntos de vida restantes de \"+t.obtenerApodo()+\" son \" +t.obtenerPuntosVida());\n }", "public static void main(String[] args) {\n\t\tPokemon firstPokemon = new Pokemon(\" P1 Typhlosion \", 1600, \" Fire \" , \" Healthy \" , \"Scratch\" , \"Bite\" , \"Fire Blast\", 300 , 375 , 450);\r\n\t\t Pokemon secondPokemon = new Pokemon(\" P2 Snorlax \", 1300, \" Normal \" , \" Healthy \" , \"Body Slam\" , \"Sleep\" , \"Swallow\", 500 , 100 , 200);\r\n\t\t System.out.println (firstPokemon.name + firstPokemon.health + firstPokemon.type + firstPokemon.status );\r\n\t\t System.out.println (secondPokemon.name + secondPokemon.health + secondPokemon.type + secondPokemon.status );\r\n\t\t Scanner myObj = new Scanner(System.in);\r\n\t\t\r\n\t\t \r\n\t\t System.out.println( \"P1 Turn. Enter number for corresponding attack! \" );\r\n\t\t System.out.println( \" 1(\" + firstPokemon.pAttack1 +\")\"+ \" 2(\" + firstPokemon.pAttack2 +\")\"+ \" 3(\" + firstPokemon.pAttack3 +\")\" );\r\n\t\t String battleCommand = myObj.nextLine();\r\n\t\t System.out.println (battleCommand);\r\n\t\t if (battleCommand.charAt(0) == '1') {\r\n\t\t\t System.out.println (firstPokemon.pAttack1);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '2') {\r\n\t\t\t System.out.println (firstPokemon.pAttack2);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '3') {\r\n\t\t\t System.out.println (firstPokemon.pAttack3);\r\n\t\t }\r\n\t\t else {\r\n\t\t\t System.out.println(\"Please enter the correct number.\");\r\n\t\t\t \r\n\t\t }\r\n\t}", "public void atacarWithPokemon(Integer ataqIndex, Pokemon oponente) {\n\t\t\n\t\tpokemons[0].atacar(ataqIndex, oponente);\n\t\t\n\t}", "private void actionPhase() {\n field.generateRandomFood( 100 );\n List<Blob> k = new ArrayList<>( this );\n Iterator<Blob> kIter;\n Blob currentBlob;\n\n while (!k.isEmpty()) {\n for (kIter = k.iterator(); kIter.hasNext(); ) {\n currentBlob = kIter.next();\n if ( currentBlob.getEnergy() > 0 && !currentBlob.isAtHome() ) {\n currentBlob.move();\n } else {\n kIter.remove();\n }\n }\n }\n }", "boolean checkElectricEnergy(AbstractElectricPokemon pokemon);", "public PokemonHielo(Pokemon pokemon) {\n \tsuper(pokemon,500,100,120);\n }", "public int performPokeAction() {\n\t\tAction action = pokemon.chooseAction();\n\t\tif (action == Action.ATTACK) {\n\t\t\ttrainer.takeDamage(pokemon.performAttack());\n\t\t}\n\t\treturn action.getValue();\n\t\t//return Action.ATTACK.getValue();\n\t}", "boolean checkFighterEnergy(AbstractFighterPokemon pokemon);", "boolean hasActivePokemon();", "public void drawPokemon() {\n setAttackText();\n drawImage();\n }", "public static void main(String[] args) {\n\t\tPokedex pokedex = new Pokedex();\n\t\tPokemon Pikachu = pokedex.createPokemon(\"Pikachu\", 100, \"Electrico\");\n\t\tPokemon Evee = pokedex.createPokemon(\"Evee\", 80, \"Normal\");\n\t\t\n\t\tPikachu.attackPokemon(Evee);\n\t\tpokedex.listPokemon();\n\t}", "public void zoomPokemon(){\n }", "private void hitP1(int attack) {\n game_PB_p1HP.setProgress(attack + game_PB_p1HP.getProgress());\n if (game_PB_p1HP.getProgress() > GameVariables.CRITICAL_HP)\n game_PB_p1HP.setProgressDrawable(ContextCompat.getDrawable(this, R.drawable.game_progressbar_low_hp));\n if (game_PB_p1HP.getProgress() >= GameVariables.MAX_HP)\n announceWinner(GameVariables.P2_WIN);\n\n }", "private void fortificationPhase(Player p) \n\t{\n\t\tp.fortify();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n public void executeAttack() {\r\n \t\r\n \tSystem.out.println();\r\n System.out.println(\"**** Attack Phase Begins for player \" + this.playerName + \"..****\\n\");\r\n \r\n boolean hasConnqueredAtleastOneCountry = false;\r\n \r\n\t System.out.println(\"\\n\" + \"Fetching potential attack scenarios for \" + this.playerName + \"...\\n\");\r\n\t \r\n\t // get all scenarios but we're only interested in attacking with the strongest country & in all-out mode\r\n\t HashMap<String, ArrayList<String>> potentialAttackScenarios = getPotentialAttackScenarios();\r\n\t \r\n\t if (potentialAttackScenarios == null) {\r\n\t System.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t\r\n\t if (potentialAttackScenarios.isEmpty()) {\r\n\t System.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t \r\n\t \t \r\n\t String enemyCountryToAttack = null;\r\n\t String strongestCountry = getStrongestCountryConqueredByPlayer(potentialAttackScenarios);\r\n\t if(strongestCountry == null) {\r\n\t \tSystem.out.println(\r\n\t \"There are currently no attack opportunities for \" + this.playerName + \".. Sorry!\\n\");\r\n\t System.out.println(\"\\n****Attack Phase Ends for player \" + this.playerName + \"..****\\n\");\r\n\t return;\r\n\t }\r\n\t \r\n\t \r\n // implement a mini-strategy within this aggressive strategy to target the weakest enemy country first\r\n\t // build map of all enemy countries and their respective army counts\r\n\t ArrayList<String> allAdjacentEnemyCountries = potentialAttackScenarios.get(strongestCountry); \r\n\t HashMap<String,Integer> allAdjacentEnemyCountriesAndArmyCounts = new HashMap<String,Integer>();\r\n\t \r\n\t for(String enemyCountry: allAdjacentEnemyCountries) {\r\n \tInteger currentEnemyCountryArmyCount = gameData.gameMap.getCountry(enemyCountry).getCountryArmyCount();\r\n \tallAdjacentEnemyCountriesAndArmyCounts.putIfAbsent(enemyCountry, currentEnemyCountryArmyCount);\r\n\t }\r\n\t \r\n\t // sort in ascending order based on lowest army count -> highest\r\n\t Object[] sortedAdjacentEnemyCountriesAndArmyCounts = allAdjacentEnemyCountriesAndArmyCounts.entrySet().toArray();\r\n\t Arrays.sort(sortedAdjacentEnemyCountriesAndArmyCounts, (o1, o2) -> ((Map.Entry<String, Integer>) o1).getValue()\r\n\t\t .compareTo(((Map.Entry<String, Integer>) o2).getValue()));\r\n\t \r\n\r\n\t HashSet<String> countriesConquered = new HashSet<>();\r\n\t \r\n\t // attack each surrounding enemy country while you can\r\n\t for (Object e : sortedAdjacentEnemyCountriesAndArmyCounts) {\r\n\r\n\t \t// setup phase state\r\n\t \tAttackPhaseState attackPhase = new AttackPhaseState();\r\n\t \t attackPhase.setAttackingPlayer(this.playerName);\r\n\t \t attackPhaseState.add(attackPhase);\r\n\t \t notifyView();\r\n\t \t // attacking country will be the same for a given turn\r\n\t \t attackPhase.setAttackingCountry(strongestCountry);\r\n\t notifyView();\r\n\t \t\r\n\t \tenemyCountryToAttack = ((Map.Entry<String, Integer>) e).getKey(); \r\n\t \tattackPhase.setDefendingCountry(enemyCountryToAttack);\r\n\t \tnotifyView();\r\n\t\r\n\t \tString defendingPlayer = gameData\r\n\t .getPlayer(this.gameData.gameMap.getCountry(enemyCountryToAttack).getCountryConquerorID())\r\n\t .getStrategyType().getPlayerName();\r\n\t \tattackPhase.setDefendingPlayer(defendingPlayer);\r\n\t \tnotifyView();\r\n\t \r\n\t \t// fight in all out mode until you win or run out of armies on the ground\r\n\t\t while (!attackPhase.getBattleOutcomeFlag() && this.gameData.gameMap.getCountry(strongestCountry).getCountryArmyCount() > 1) {\r\n\t // proceed with max allowed dice count for both sides\r\n\t Integer attackerDiceCount = getActualMaxAllowedDiceCountForAction(\"attack\", strongestCountry, 3);\r\n\t\t attackPhase.setAttackerDiceCount(attackerDiceCount);\r\n\t\t //Integer defenderDiceCount = getActualMaxAllowedDiceCountForAction(\"defend\",enemyCountryToAttack, 2);\r\n\t\t // always set defender dice count to the min to maximize aggression \r\n\t\t Integer defenderDiceCount = 1;\r\n\t\t attackPhase.setDefenderDiceCount(defenderDiceCount);\r\n\t\t rollDiceBattle(attackPhase);\r\n\t hasConnqueredAtleastOneCountry = fight(attackPhase) || hasConnqueredAtleastOneCountry;\r\n\t \r\n\t if(attackPhase.getBattleOutcomeFlag()) {\r\n\t \tcountriesConquered.add(strongestCountry);\r\n\t \tcountriesConquered.add(enemyCountryToAttack);\r\n\t \t\r\n\t }\r\n\t \r\n\t }\r\n\t\t \r\n\t }\r\n\t \r\n\t String weakestCountry = getCountryWithMostNumberOfBordersShared(countriesConquered);\r\n\t \r\n\t if(weakestCountry != strongestCountry) {\r\n\t \t\r\n\t \tInteger strongestCountryArmyCount = this.gameData.gameMap.getCountry(strongestCountry).getCountryArmyCount();\r\n\t \t\r\n\t \tif(strongestCountryArmyCount > 1) {\r\n\t \t\tthis.gameData.gameMap.deductArmyToCountry(strongestCountry, strongestCountryArmyCount - 1);\r\n\t\t\t\tthis.gameData.gameMap.addArmyToCountry(weakestCountry, strongestCountryArmyCount - 1);\r\n\t \t}\r\n\t \t\r\n\t }\r\n\t \r\n checkIfPlayerHasConqueredTheWorld();\r\n \r\n\t\t\r\n\t if (hasConnqueredAtleastOneCountry) {\r\n\t\t \tCard card = gameData.cardsDeck.getCard();\r\n\t \r\n\t\t if(card == null) {\r\n\t\t \tSystem.out.println(\"No more cards left in the deck\");\r\n\t\t } else {\r\n\t\t \t\tthis.cardList.add(card);\r\n\t\t \t\tSystem.out.println(\"PlayerStrategy received 1 card => Army Type: \" + card.getArmyType() + \", Country: \" + card.getCountry().getCountryName());\r\n\t\t \t\tSystem.out.println(\"Total cards : \" + this.cardList.size());\r\n\t\t \t}\r\n\t\t} \r\n\t \r\n\t HashSet<String> conqueredCountryByThisPlayer = gameData.gameMap.getConqueredCountries(playerID);\r\n System.out.println(\"\\nOverview of army counts: \\n\");\r\n for(String country: conqueredCountryByThisPlayer){\r\n System.out.println(\"Country: \"+country+\", Army Count: \"+gameData.gameMap.getCountry(country).getCountryArmyCount());\r\n }\r\n\t \r\n\t endAttack();\r\n }", "public void move1(Pokemon enemy){\n int randCrit = (int)(22 * Math.random()+1);\n boolean crit = false;\n boolean superEffective = false;\n boolean reduced = false;\n boolean moveHit = true;\n\n //CHANGE ATTACK TO FALSE IF MOVE DOES NO DAMAGE<<<<<<<<<<<<<\n boolean attack = true;\n //CHANGE TYPE TO TYPE OF MOVE POWER AND ACCURACY<<<<<<<<<<<<<\n String type = \"Dark\";\n int power = 70;\n int accuracy = 100;\n\n //DO NOT CHANGE BELOW THIS\n int damage = ((CONSTANT * power * ( getAtt() / enemy.getDef() )) /50);\n if(randCrit == CONSTANT){\n damage = damage * 2;\n crit = true;\n }\n if(checkSE(type,enemy.getType())){\n damage = damage * 2;\n superEffective = true;\n }\n if(checkNVE(type, enemy.getType())){\n damage = damage / 2;\n reduced = true;\n }\n if(attack && hit(accuracy)){\n enemy.lowerHp(damage);\n }\n else{\n if(hit(accuracy)){\n //DO STATUS EFFECT STUFF HERE (ill figure out later)\n }\n\n }\n lowerM1PP();\n }", "private void goAdventure() {\n\n\t\tint experience = playern.getExp();\n\t\tint random = randomHelper.randomten();\n\n\t\t/**\n\t\t * Random part that starts with 10% occurance when user chooses goAdventuring()\n\t\t */\n\t\tif (random == 0) {\n\t\t\tSystem.out.println(\"You see nothing but unicorns running in the swaying grass..\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\n\t\t/**\n\t\t * Chooses storyboard and battle depending on experience level\n\t\t */\n\t\tif (experience >= 40) {\n\t\t\tStoryboardTwo.leveltwo();\n\t\t\tbattleSpider();\n\t\t}else {\n\t\t\tStoryboard.intro();\n\t\t\tbattleVampire();\n\t\t}\n\t\t}", "void playSoldierCard(int victimIndex, HexLocation location);", "public Pokemon(int hp){\r\n this.hp = hp;\r\n }", "PaulEigon() {\n\treadCurrentPingisState();\n\tscanState();\n\tprintResult();\n }", "boolean checkFireEnergy(AbstractFirePokemon pokemon);", "public Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}", "public void attack();", "boolean checkGrassEnergy(AbstractGrassPokemon pokemon);", "@Override\n public Action action(Player p) {\n p.setGold(p.getGold() + this.getGold());\n return new Action(0, \"Vous avez ouvert un coffre contenant \" + this.getGold() + \" pièces d'or.\");\n }", "boolean hasPokemon();", "POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();", "public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}", "@Override\n public void pp(){\n PP=3+2*nivel;\n }", "@Override\n public void chooseAction(){\n healthDecay = getHealth() - 5;\n //now scan for Nazguls\n\n if(healthDecay == 0){\n death(this);\n }\n int scan_result = scan();\n\n if(scan_result == 1){\n move();\n }\n\n if(scan_result == 0 && healthDecay < 75){\n stay();\n }\n\n if(scan_result == 0 && hobbitCounter == 15){\n replicate();\n hobbitCounter = 0;\n }\n\n else{\n move();\n \n }\n hobbitCounter = hobbitCounter + 1;\n }", "private void combatPhase() {\n \t\n \tpause();\n \tDice.setFinalValMinusOne();\n\n \t// Go through each battle ground a resolve each conflict\n \tfor (Coord c : battleGrounds) {\n \t\t\n \tClickObserver.getInstance().setTerrainFlag(\"\");\n \t\n \tSystem.out.println(\"Entering battleGround\");\n \t\tfinal Terrain battleGround = Board.getTerrainWithCoord(c);\n \t\t\n \t\t// find the owner of terrain for post combat\n \tPlayer owner = battleGround.getOwner();\n \t\n \t\t// simulate a click on the first battleGround, cover all other terrains\n \t\tClickObserver.getInstance().setClickedTerrain(battleGround);\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tClickObserver.getInstance().whenTerrainClicked();\n \t\tBoard.applyCovers();\n \t\tClickObserver.getInstance().getClickedTerrain().uncover();\n \tClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n }\n });\n \t\t\n \t\t// Get the fort\n \t Fort battleFort = battleGround.getFort(); \n \t\t\n \t\t// List of players to battle in the terrain\n \t\tArrayList<Player> combatants = new ArrayList<Player>();\n \t\t\n \t\t// List of pieces that can attack (including forts, city/village)\n \t\tHashMap<String, ArrayList<Piece>> attackingPieces = new HashMap<String, ArrayList<Piece>>();\n \t\t\n \t\tSystem.out.println(battleGround.getContents().keySet());\n \t\t\n \t\tIterator<String> keySetIterator = battleGround.getContents().keySet().iterator();\n\t \twhile(keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n \t\t\tcombatants.add(battleGround.getContents().get(key).getOwner());\n \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n \t\t\t\n\t \t}\n\t \t\n\t \t\n\t \t\n\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n\t\t\tif (!combatants.contains(battleGround.getOwner()) && battleFort != null) {\n\t\t\t\tcombatants.add(battleGround.getOwner());\n\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n\t\t\t}\n\n \t\t// add forts and city/village to attackingPieces\n \t\tif (battleFort != null) {\n \t\t\tattackingPieces.get(battleGround.getOwner().getName()).add(battleFort);\n \t\t}\n \t\t\n \t\tkeySetIterator = attackingPieces.keySet().iterator();\n\t \twhile (keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n\t \t\tfor (Piece p : attackingPieces.get(key)) {\n\t \t\t\tif (p.getName().equals(\"Baron Munchhausen\") || p.getName().equals(\"Grand Duke\")) {\n\t \t\t\t\tif (p.getOwner() != battleGround.getOwner())\n\t \t\t\t\t\t((Performable)p).specialAbility();\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t}\n\t \t}\n \t\t// TODO implement city/village\n// \t\tif (City and village stuff here)\n \t\tSystem.out.println(combatants);\n \t\t\n \t\tboolean exploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t// Fight until all attackers are dead, or until the attacker becomes the owner of the hex\n \t\twhile (combatants.size() > 1 || exploring) {\n \t\t\t\n /////////////Exploration\n \t// Check if this is an exploration battle:\n \t\t// Must fight other players first\n \t\t\tboolean fightingWildThings = false;\n \tif (exploring) {\n\n \t\t\t\t// Set the battleGround explored\n \t\t\t\tbattleGround.setExplored(true);\n \t\n \t\tString exploringPlayer = null;\n \t\tIterator<String> keySetIter = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIter.hasNext()) {\n \t \t\tString key = keySetIter.next();\n \t \t\texploringPlayer = key;\n \t \t}\n \t\tplayer = battleGround.getContents(exploringPlayer).getOwner();\n \t\tplayer.flipAllUp();\n \t \t\n \t\t// Get user to roll die to see if explored right away\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tDiceGUI.getInstance().uncover();\n \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t \t\t\t+ \", roll the die. You need a 1 or a 6 to explore this terrain without a fight!\");\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\tint luckyExplore = -1;\n \t\t\t\twhile (luckyExplore == -1) {\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\tluckyExplore = Dice.getFinalVal();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// If success TODO FIX this \n \t\t\t\tif (luckyExplore == 1 || luckyExplore == 6) {\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Congrats!\" + player.getName() \n \t\t \t\t\t+ \"!, You get the terrain!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\texploring = false;\n \t\t\t\t\tbreak;\n \t\t\t\t\t\n \t\t\t\t} else { // Else failure. Must fight or bribe\n \t\t\t\t\t\n \t\t\t\t\tfightingWildThings = true;\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tbattleGround.coverPieces();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Boooo!\" + player.getName() \n \t\t \t\t\t+ \"!, You have to bribe, or fight for your right to explore!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// add luckyExplore amount of pieces to terrain under wildThing player\n \t\t\t\t\tfinal ArrayList<Piece> wildPieces = TheCup.getInstance().draw(luckyExplore);\n \t\t\t\t\t\t\n \t\t\t\t\t// Update the infopanel with played pieces. Active done button\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \twildThings.playWildPieces(wildPieces, battleGround);\n \t\t GUI.getDoneButton().setDisable(false);\n \t\t battleGround.coverPieces();\n \t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t \n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t//////Bribing here\n \t\t\t\t\tpause();\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectCreatureToBribe\");\n \t\t\t\t\t\n \t\t\t\t\t// Uncover the pieces that the player can afford to bribe\n \t\t\t\t\t// canPay is false if there are no Pieces that the user can afford to bribe\n \t\t\t\t\tboolean canPay = false;\n \t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n \t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n \t\t\t\t\t\t\tcanPay = true;\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tp.uncover();\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\ttry { Thread.sleep(50); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// Continue looping until there are no more pieces user can afford to bribe, or user hits done button\n \t\t\t\t\twhile (canPay && isPaused) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t\t @Override\n\t \t\t public void run() {\n\t \t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t\t \t\t\t+ \", Click on creatures you would like to bribe\");\n\t \t\t }\n \t\t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t\t// wait for user to hit done, or select a piece\n \t\t\t\t\t\tpieceClicked = null;\n \t\t\t\t\t\twhile(pieceClicked == null && isPaused) {\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (pieceClicked != null) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// spend gold for bribing. Remove clicked creature\n \t\t\t\t\t\t\tplayer.spendGold(((Combatable)pieceClicked).getCombatValue());\n \t\t\t\t\t\t\t((Combatable)pieceClicked).inflict();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// cover pieces that are too expensive\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t\t\t \t\t\t+ \" bribed \" + pieceClicked.getName());\n \t\t\t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t \tif (battleGround.getContents(wildThings.getName()) != null) {\n\t \t\t\t\t for (Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t \tif (((Combatable)p).getCombatValue() > player.getGold())\n\t \t\t\t\t \t\tp.cover();\n\t \t\t\t\t }\n \t\t\t\t \t}\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Check if there are any pieces user can afford to bribe and set canPay to true if so\n \t\t\t\t\t\t\tcanPay = false;\n \t\t\t\t\t\t\tif (battleGround.getContents(wildThings.getName()) == null || battleGround.getContents(wildThings.getName()).getStack().size() == 1)\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n\t \t\t\t\t\t\t\t\t\tcanPay = true;\n\t \t\t\t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t\t \t\t\t+ \" done bribing\");\n\t\t\t }\n \t\t\t\t\t});\n \t\t\t\t\tSystem.out.println(\"Made it past bribing\");\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\t\n \t\t\t\t\t// Done bribing, on to fighting\n \t\t\t\t\t\n \t\t\t\t\t// find another player to control wildThings and move on to regular combat\n \t\t\t\t\t// to be used later \n \t\t\t\t\tPlayer explorer = player;\n \t\t\t\t\tPlayer wildThingsController = null;\n \t\t\t\t\tfor (Player p : playerList) {\n \t\t\t\t\t\tif (!p.getName().equals(player.getName()))\n \t\t\t\t\t\t\twildThingsController = p;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// If wild things still has pieces left:\n \t\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName())) {\n\t \t\t\t\t\tcombatants.add(battleGround.getContents().get(wildThings.getName()).getOwner());\n\t \t \t\t\tattackingPieces.put(wildThings.getName(), (ArrayList<Piece>) battleGround.getContents().get(wildThings.getName()).getStack().clone()); \n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// cover pieces again\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tbattleGround.coverPieces();\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t\t\t\tplayer.flipAllDown();\n \t} // end if (exploring)\n \t\t\t\n \t\t\tSystem.out.println(\"combatants.size() > 1 : \" + combatants.size());\n \t\t\tSystem.out.println(combatants);\n \t\t\t\n \t\t\t// This hashMap keeps track of the player to attack for each player\n \t\t\tHashMap<String, Player> toAttacks = new HashMap<String, Player>();\n\n\t\t\t\t// each player selects which other player to attack in case of more than two combatants\n \t\t\tif (combatants.size() > 2) {\n \t\t\t\t\n \t\t\t\tfor (final Player p : combatants) {\n \t\t\t\t\tif (!p.isWildThing()) {\n\t \t \t\tpause();\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"Attacking: SelectPlayerToAttack\");\n\t \t \t\tplayer = p;\n\t\t \tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tPlayerBoard.getInstance().applyCovers();\n\t\t \t \tbattleGround.coverPieces();\n\t\t \t \t GUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", select which player to attack\");\n\t\t\t \t \t}\n\t\t \t });\n\t\t \tfor (final Player pl : combatants) {\n\t\t \t\tif (!pl.getName().equals(player.getName())) {\n\t\t \t\t\tPlatform.runLater(new Runnable() {\n\t\t \t \t @Override\n\t\t \t \t public void run() {\n\t\t \t \t \tPlayerBoard.getInstance().uncover(pl);\n\t\t \t \t }\n\t\t \t\t\t});\n\t\t \t\t}\n\t\t \t}\n\t\t \twhile (isPaused) {\n\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t \t }\n\t\t \t\n\t\t \t// ClickObserver sets playerClicked, then unpauses. This stores what player is attacking what player\n\t\t \ttoAttacks.put(p.getName(), playerClicked);\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\t \t\n\t \t \t} \n \t\t\t\t}\n \t\t\t\tcombatants.remove(wildThings);\n \t\t\t\tPlayerBoard.getInstance().removeCovers();\n \t\t\t\t\n \t } else { // Only two players fighting\n \t \t\n \t \tfor (Player p1 : combatants) {\n \t \t\tfor (Player p2 : combatants) {\n \t \t\t\tif (!p1.getName().equals(p2.getName())) {\n \t \t \ttoAttacks.put(p1.getName(), p2);\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t\t\t\n ///////////////////Call out bluffs here:\n \t\t\tbattleGround.flipPiecesUp();\n \t\t\tfor (final Player p : combatants) {\n \t\t\t\t\n \t\t\t\t// Make sure not wildThings\n \t\t\t\tif (!p.isWildThing()) {\n \t\t\t\t\t\n \t\t\t\t\tArrayList <Piece> callOuts = new ArrayList<Piece>();\n \t\t\t\t\t\n \t\t\t\t\tfor (final Piece ap : attackingPieces.get(p.getName())) {\n \t\t\t\t\t\t\n \t\t\t\t\t\t// If not supported the gtfo\n \t\t\t\t\t\tif (!ap.isSupported()) {\n\n \t\t\t\t\t\t\tcallOuts.add(ap);\n \t\t\t\t\t\t\t((Combatable)ap).inflict();\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t \tInfoPanel.showTileInfo(battleGround);\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: \" + p.getName()\n\t\t\t \t + \" lost their \" + ap.getName() + \" in a called bluff!\");\n\t \t \t }\n\t \t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor (Piece co : callOuts) {\n \t\t\t\t\t\tattackingPieces.get(p.getName()).remove(co);\n \t\t\t\t\t}\n\t\t\t\t\t\tif (attackingPieces.get(p.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(p.getName());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tPlayer baby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\t// Set up this HashMap that will store successful attacking pieces\n \t\t\tHashMap<String, ArrayList<Piece>> successAttacks = new HashMap<String, ArrayList<Piece>>();\n \t\t\t// Set up this HashMap that will store piece marked to get damage inflicted\n\t\t\t\tHashMap<String, ArrayList<Piece>> toInflict = new HashMap<String, ArrayList<Piece>>();\n \t\t\tfor (Player p : combatants) {\n \t\t\t\t\n \t\t\t\tsuccessAttacks.put(p.getName(), new ArrayList<Piece>());\n \t\t\t\ttoInflict.put(p.getName(), new ArrayList<Piece>());\n \t\t\t}\n \t\t\t\n \t\t\t// Array List of pieces that need to be used during a particular phase\n\t\t\t\tfinal ArrayList<Piece> phaseThings = new ArrayList<Piece>();\n\t\t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Magic!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n/////////////////////// Magic phase\n \t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its magic. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isMagic() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover magic pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mag : phaseThings) \n\t \t\t\t\t\tmag.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n\n\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\"attackingPieces.size(): \" + attackingPieces.size());\n\t\t\t\t\tSystem.out.println(\"attackingPieces.keySet(): \" + attackingPieces.keySet());\n\t\t\t\t\tIterator<String> keySetIte = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIte.hasNext()) {\n \t \t\tString key = keySetIte.next();\n\n \t\t\t\t\tSystem.out.println(\"key: \" + key);\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key).size():\\n\" + attackingPieces.get(key).size());\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key):\\n\" + attackingPieces.get(key));\n \t \t}\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more magic pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a magic piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a magic piece to attack with\");\n\t \t }\n\t \t });\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t \t\t\t+ \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName()); // 'defender'\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ti++;\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Ranged!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n//////////////////// Ranged phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its ranged. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isRanged() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover ranged pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece ran : phaseThings) \n\t \t\t\t\t\tran.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more ranged pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a ranged piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a ranged piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t \t }\n\t \t\t\t\t\t});\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Melee!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\n///////////////////////////// Melee phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its melee. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && !(((Combatable)p).isRanged() || ((Combatable)p).isMagic()) && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover melee pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mel : phaseThings) \n\t \t\t\t\t\tmel.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more melee pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a melee piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a melee piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// Is it a charging piece?\n\t \t\t\t\tint charger;\n\t \t\t\t\tif (((Combatable)pieceClicked).isCharging()) {\n\t \t\t\t\t\tcharger = 2;\n\t \t\t\t\t} else\n\t \t\t\t\t\tcharger = 1;\n\t \t\t\t\t\n\t \t\t\t\t// do twice if piece is a charger\n\t \t\t\t\tfor (int i = 0; i < charger; i++) {\n\t \t\t\t\t\t\n\t\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tpieceClicked.highLight();\n\t\t \t \tDiceGUI.getInstance().uncover();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t\t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\n\t\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t \t\t\t\t\tint attackStrength = -1;\n\t \t\t\t\t\twhile (attackStrength == -1) {\n\t \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n\t \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n\t \t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n\t \t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t\t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t\t \t }\n\t\t \t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// If piece is charging, and it is its first attack, remove the cover again\n\t \t\t\t\t\tif (((Combatable)pieceClicked).isCharging() && i == 0) {\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t \tpieceClicked.uncover();\n\t\t\t \t }\n\t \t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n\t \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t \t\t\t\t}\n\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n \t\t\t\t\t\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Retreat!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n \t\t\t\n \t\t\t\n//////////////////////// Retreat phase\n\t\t\t\t// Can only retreat to a Terrain that has been explored and has no ememies on it\n\t\t\t\t\n\t\t\t\t// Display message, activate done button\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Attack phase: Retreat some of your armies?\");\n\t\t GUI.getDoneButton().setDisable(false);\n\t }\n\t }); \t\t\t\t\n\t\t\t\t\n\t\t\t\t// For each combatant, ask if they would like to retreat\n\t\t for (Player pl : combatants) {\n\t\t \t\n\t\t \t// Make sure wildThings aren't trying to get away\n\t\t \tif (!pl.isWildThing()) {\n\t\t\t \tplayer = pl;\n\t \t InfoPanel.uncover(player.getName());\n\t\t\t\t ClickObserver.getInstance().setActivePlayer(player);\n\t\t\t\t ClickObserver.getInstance().setCreatureFlag(\"Combat: SelectRetreaters\");\n\t\t\t\t \n\t\t\t\t // Pause and wait for player to hit done button\n\t\t\t\t pause();\n\t\t\t Platform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tbattleGround.coverPieces();\n\t\t\t \tbattleGround.uncoverPieces(player.getName());\n\t\t\t \tbattleGround.coverFort();\n\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \", You can retreat your armies\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t while (isPaused && battleGround.getContents(player.getName()) != null) {\n\t\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t\t\t }\t \n\t\t\t\t ClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n\t\t\t\t \n\t\t\t\t // TODO, maybe an if block here asking user if they would like to attack \n\t\t\t\t System.out.println(attackingPieces + \"---BEFORE CLEARING\");\n\t\t\t\t // Re-populate attackingPieces to check for changes\n\t\t\t\t attackingPieces.clear();\n\t\t\t\t Iterator<String> keySetIterator2 = battleGround.getContents().keySet().iterator();\n\t\t\t\t \twhile(keySetIterator2.hasNext()) {\n\t\t\t\t \t\tString key = keySetIterator2.next();\n System.out.println(key + \"=====key\");\n\t\t\t \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n\t\t\t\t \t}\n // System.out.println(attackingPieces);\n\t\t\t\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n System.out.println(\"===battleground\"+battleGround);\n System.out.println(\"===attackingPieces\"+attackingPieces);\n System.out.println(combatants.contains(battleGround.getOwner()) ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\tif (combatants.contains(battleGround.getOwner()) && battleFort != null) {\n System.out.println(battleGround + \"===battleground\");\n\t\t\t\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n System.out.println(attackingPieces + \"===attacking pieces\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (battleFort != null) {\n System.out.println(battleFort.getName() + \"===battlefort\");\n System.out.println(battleFort.getOwner().getName() + \"===battlefort's owner\");\n \n\t\t\t\t\t\t\tattackingPieces.get(battleFort.getOwner().getName()).add(battleFort);\n System.out.println(attackingPieces.get(battleFort.getOwner().getName()));\n\t\t\t\t\t\t}\n\t//\t\t\t\t\tif (battleGround city/village)\n\t\t\t\t\t\t// TODO city/village\n\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t // Check if all the players pieces are now gone\n\t\t\t\t if (!attackingPieces.containsKey(player.getName())) {\n\t\t\t\t \t\n\t\t\t\t \t// Display message, and remove player from combatants\n\t\t\t\t \tPlatform.runLater(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run() {\n\t\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \" has retreated all of their pieces!\");\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t \t\n\t\t\t\t \t// If there is only 1 player fighting for the hex, \n\t\t\t\t \tif (attackingPieces.size() == 1) \n\t\t\t\t \t\tbreak;\n\t\t\t\t \t\n\t\t\t\t \t// Pause because somebody just retreated\n\t\t\t\t \ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t }\n\t\t\t\t \n\n\t \t InfoPanel.cover(player.getName());\n\t\t\t\t \n\t\t\t }\n\t\t }\n\t\t \n\t\t // Done button no longer needed\n\t\t Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t GUI.getDoneButton().setDisable(true);\n\t\t }\n\t\t });\n\t\t ClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t ClickObserver.getInstance().setFortFlag(\"\");\n\t\t \n\t\t // Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\n\t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n\t\t\t\t\n\t\t\t\t// Add wildthings back to combatants if they were removed\n\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName()) && !combatants.contains(wildThings))\n\t\t\t\t\tcombatants.add(wildThings);\n\t\t\t\t\n \t\t} // end while (combatants.size() > 1 || exploring)\n \t\tbattleGround.coverFort();\n \t\t\n////////////////// Post Combat\n \t\t\n \t\t// sets player as the winner of the combat\n \t\t// Can be null if battle takes place on a hex owned by nobody, and each player lost all pieces\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tbattleGround.removeBattleHex();\n }\n \t\t});\n \t\t\n \t\tif (combatants.size() == 0)\n \t\t\tplayer = battleGround.getOwner();\n \t\telse if (combatants.size() == 1 && combatants.get(0).getName().equals(wildThings.getName()))\n \t\t\tplayer = null;\n \t\telse\n \t\t\tplayer = combatants.get(0);\n \t\t\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\tSystem.out.println(\"combatants: \" + combatants);\n \t\tfor (Player p : combatants) {\n \t\tSystem.out.println(\"p.getName(): \"+ p.getName());\n \t\t\t\n \t\t}\n \t\tSystem.out.println(\"owner: \" + owner);\n \t\tSystem.out.println(\"combatants.get(0): \" + combatants.get(0));\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\t\n \t\t\n \t\t// Change ownership of hex to winner\n \t\tboolean ownerChanged = false;\n \t\tif (owner != null && combatants.size() > 0 && !battleGround.getOwner().equals(combatants.get(0))) {\n \t\t\tbattleGround.getOwner().removeHex(battleGround);\n \t\t\tcombatants.get(0).addHexOwned(battleGround);\n \t\t\townerChanged = true;\n \t\t}\n\t\t\t\n \t\t// See if fort is kept or downgraded.\n \t\tif (battleFort != null) {\n if (battleFort.getName().equals(\"Citadel\")) {\n owner.setCitadel(false);\n player.setCitadel(true);\n battleFort.healFort();\n player.addHexOwned(battleGround);\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n }\n });\n checkWinners();\n return;\n }\n \t\t\n\t\t\t\t// Get player to click dice to see if fort is kept\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", roll the die to see if the fort is kept or downgraded\");\n\t \tDiceGUI.getInstance().uncover();\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t\t\t\tint oneOrSixGood = -1;\n\t\t\t\twhile (oneOrSixGood == -1) {\n\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t\t\t\t\toneOrSixGood = Dice.getFinalVal();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if a 1 or 6, keep fort (Keep it.... not turn it into a keep)\n\t\t\t\tif (oneOrSixGood == 1 || oneOrSixGood == 6) {\n\t\t\t\t\tbattleFort.healFort();\n\t\t\t\t\tplayer.addHexOwned(battleGround);\n\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tbattleFort.downgrade();Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", the fort was destroyed!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n \t\t}\n\n \t\tbattleGround.flipPiecesDown();\n\t\t\t// TODO city/village and special incomes if they are kept or lost/damaged \n \t\t\n \t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t}/// end Post combat\n\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n//\t\t\t\tInfoPanel.showBattleStats();\n \tBoard.removeCovers();\n }\n\t\t});\n \t\n\t\tClickObserver.getInstance().setTerrainFlag(\"\");\n\t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\tbattleGrounds.clear();\n }", "public Pokemon start() {\n System.out.println(\"\\n\" + this.pokemonOne.getName() + \" affronte \" + this.pokemonTwo.getName() + \" dans un combat qui s'annonce extraordinaire\\n\");\n\n this.pokemonOne.speakFightShout();\n this.pokemonTwo.speakFightShout();\n\n while (true) {\n if (this.PokemonOneIsAlive()) {\n this.pokemonOne.giveDamage(pokemonTwo);\n } else {\n this.pokemonOne.speakDefeatShout();\n this.pokemonTwo.speakVictoryShout();\n return this.pokemonOne;\n }\n if (this.PokemonTwoIsAlive()) {\n this.pokemonTwo.giveDamage(pokemonOne);\n } else {\n this.pokemonTwo.speakDefeatShout();\n this.pokemonOne.speakVictoryShout();\n return this.pokemonTwo;\n }\n }\n }", "public void addNewPokemon(Pokemon pokemon) {\n try {\n PokemonSpecies pokemonSpecies = findSeenSpeciesData(pokemon.getSpecies());\n // then this Pokemon has been encountered before, just add to inventory\n pokemonSpecies.addNewPokemon(pokemon);\n } catch (PokedexException e) {\n // then this Pokemon has not been encountered before, make record of it then add to inventory\n PokemonSpecies pokemonSpecies = new PokemonSpecies(pokemon.getPokedexNumber(), pokemon.getSpecies(), 0);\n pokemonSpecies.addNewPokemon(pokemon);\n addNewSpecies(pokemonSpecies);\n }\n }", "public Pokemon getEnemyPokemon()\r\n {\r\n return enemyPokemon;\r\n }", "private void teclaPressionada(KeyEvent event) {\n Iterator<Janela> it = Mediador.getInstancia().getJanelas().values().iterator();\n while (it.hasNext()) {\n Janela janela = it.next();\n if (janela.isVisivel()) {\n janela.getCena().getControlador().teclaPressionada(event);\n }\n }\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t//If the phaseButton is clicked\r\n\t\tJButton btn = (JButton) e.getSource();\r\n\t\tif (btn.getText().equals(\"Next Phase\")) {\r\n\t\t\t\r\n\t\t\t//Every time the phase switches, the phase must initialize - this counter ensures it only initializes once\r\n\t\t\tphaseInit = 0;\r\n\t\t\t\r\n\t\t\t//This switch statement switches the phase from the current one to the next\r\n\t\t\tswitch (phase) {\r\n\t\t\tcase DEPLOY:\r\n\t\t\t\tphase = Phase.ATTACK;\r\n\t\t\t\tbreak;\r\n\t\t\tcase ATTACK:\r\n\t\t\t\tphase = Phase.REINFORCE;\r\n\t\t\t\tbreak;\r\n\t\t\tcase REINFORCE:\r\n\t\t\t\tphase = Phase.DEPLOY;\r\n\t\t\t\t\r\n\t\t\t\tdo {\t\t\t\t\t\r\n\t\t\t\t\tturnCounter++;\r\n\t\t\t\t\tif (turnCounter >= players.size()) {\r\n\t\t\t\t\t\tturnCounter = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}while(players.get(turnCounter).getCountries().size() == 0);\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t//Call the phaseManager method which will call whatever method the current phase is in\r\n\t\t\t//Ex: if in the attack phase it will call attack();\r\n\t\t\ttry {\r\n\t\t\t\tphaseManager();\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t//Catch\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Else if the cash in button is clicked\r\n\t\t} else if (btn.getText().equals(\"<html>Cash<br /> ~In~ <br /> Cards</html>\")) {\r\n\t\t\tsaveButton.setVisible(false);\r\n\t\r\n\t\t\t\r\n\t\t\tint cannon = 0;\r\n\t\t\tint horse = 0;\r\n\t\t\tint soldier = 0;\r\n\t\t\t//Goes through the cards that the player has selected\r\n\t\t\tfor (int x = 0; x < selectedCards.size(); x++) {\r\n\t\t\t\tif (selectedCards.get(x).getCardType().equals(\"Soldier\"))\r\n\t\t\t\t\tsoldier++;\r\n\t\t\t\tif (selectedCards.get(x).getCardType().equals(\"Horse\"))\r\n\t\t\t\t\thorse++;\r\n\t\t\t\tif (selectedCards.get(x).getCardType().equals(\"Cannon\"))\r\n\t\t\t\t\tcannon++;\r\n\t\t\t}\r\n\t\t\t//Based on the combination of cards picked, that will give players a bonus to their troop spendage\r\n\t\t\tif (soldier == 3) {\r\n\t\t\t\ttroopSpendage += 3;\r\n\t\t\t\tcashIn();\r\n\t\t\t} else if (horse == 3) {\r\n\t\t\t\ttroopSpendage += 5;\r\n\t\t\t\tcashIn();\r\n\t\t\t} else if (cannon == 3) {\r\n\t\t\t\ttroopSpendage += 7;\r\n\t\t\t\tcashIn();\r\n\t\t\t} else if (cannon == 1 && horse == 1 && soldier == 1) {\r\n\t\t\t\ttroopSpendage += 10;\r\n\t\t\t\tcashIn();\r\n\t\t\t}\r\n\t\t} else if (btn.getText().equals(\"Save Game\")) {\r\n\t\t\tsaveButton.setVisible(false);\r\n\t\t\ttry {\r\n\t\t\t\tFileRhiger.saveGame();\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t// Catch\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t} else if (btn.getText().equals(\"Load Game\")) {\r\n\t\t\ttry {\r\n\t\t\t\tFileRhiger.loadGame();\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t// Catch\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\tphaseButton.setVisible(true);\r\n\t\t\ttry {\r\n\t\t\t\tdeploy();\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\t//Catch\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsaveButton.setVisible(false);\r\n\t\t\tcontinentData.setVisible(true);\r\n\t\t\tcardsData.setVisible(true);\r\n\t\t\tcardBackground.setVisible(true);\r\n\t\t\tphaseLabel.setVisible(true);\r\n\t\t\tphaseLabel2.setVisible(true);\r\n\t\t\t\r\n\t\t\tplayerPicker.setVisible(false);\r\n\t\t\tplayerNum.setVisible(false);\r\n\t\t\tstartGame.setVisible(false);\r\n\t\t\tloadButton.setVisible(false);\r\n\t\t\tloadButton.setVisible(false);\r\n\t\t\tstarted = true;\r\n\t\t\t\r\n\t\t} else if (btn.getText().equals(\"Start Game\")) {\r\n\t\t\tstarted = true;\r\n\t\t\t\r\n\t\t\tsaveButton.setVisible(false);\r\n\t\t\tcontinentData.setVisible(true);\r\n\t\t\tcardsData.setVisible(true);\r\n\t\t\tcardBackground.setVisible(true);\r\n\t\t\tphaseLabel.setVisible(true);\r\n\t\t\tphaseLabel2.setVisible(true);\r\n\t\t\t\r\n\t\t\tplayerPicker.setVisible(false);\r\n\t\t\tplayerNum.setVisible(false);\r\n\t\t\tstartGame.setVisible(false);\r\n\t\t\tloadButton.setVisible(false);\r\n\t\t\t\r\n\t\t\tnumberOfPlayers = playerPicker.getValue();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < numberOfPlayers; i++) {\r\n\t\t\t\tswitch (i) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tPlayer p1 = new Player(\"player\", Color.cyan, 0);\r\n\t\t\t\t\tplayers.add(p1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tPlayer p2 = new Player(\"player\", Color.red, 1);\r\n\t\t\t\t\tplayers.add(p2);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tPlayer p3 = new Player(\"player\", Color.blue, 2);\r\n\t\t\t\t\tplayers.add(p3);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tPlayer p4 = new Player(\"player\", Color.yellow, 3);\r\n\t\t\t\t\tplayers.add(p4);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tPlayer p5 = new Player(\"player\", Color.green, 4);\r\n\t\t\t\t\tplayers.add(p5);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tPlayer p6 = new Player(\"player\", Color.magenta, 5);\r\n\t\t\t\t\tplayers.add(p6);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Sets up how many troops the players can divy out at the start of the game\r\n\t\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\t\tinitialtroops = 5 * players.size();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t}", "int hit();", "@Override\n public boolean add(IPokemon pokemon) {\n if (!this.isFull()){\n this.bench.add(pokemon);\n return true;\n } return false;\n }", "public void switchPhase() {\n\n\t\t/* Remove all events related to this virus */\n\t\tfor (int i = 0; i < Sim.events.size(); i++)\n\t\t\tif (Sim.events.elementAt(i).org.equals(this))\n\t\t\t\tSim.events.elementAt(i).delete = true;\n\n\t\t/* Remove this virus from lambda vector */\n\t\tfor (int i = 0; i < Sim.lps.size(); i++)\n\t\t\tif (Sim.lps.elementAt(i).equals(this)) {\n\t\t\t\tSim.lps.remove(i);\n\t\t\t\tSim.lps_sum_sr += this.prob_surface;\n\t\t\t\tSim.lps_sum_enz += this.prob_enzymes;\n\t\t\t}\n\n\t\t/* kill infected bacteria */\n\t\tthis.current_ba.death(); \n\n\t\t/* Create new virus progeny */\n\t\tfor (int i = 0; i < progeny; i++)\n\t\t\tSim.lps.add(new Lambda_phage(prob_surface, prob_enzymes));\n\n\t}", "@Override\r\n\tpublic void onPlayerHit(Player p) {\n\t\tParUtils.createParticle(Particles.EXPLOSION, loc, 0, 0, 0, 1, 0);\r\n\t\tplaySound(Sound.ENTITY_DRAGON_FIREBALL_EXPLODE,loc,1,1);\r\n\t\t//p.setVelocity(dir.multiply(speed/2));\r\n\t\tdoKnockback(p, caster.getLocation(), 1 );\r\n\t\tdamage(p, 2, caster);\r\n\t}", "public void onePointVisitor(View view) {\r\n visitorScore += 1;\r\n displayVisitorScore(visitorScore);\r\n }", "public void prisonerUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tcreature.setAttacking(false);\r\n\t\troamArea();\r\n\t\tif (!checkCollision(x, y)) {\r\n\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}", "boolean checkWaterEnergy(AbstractWaterPokemon pokemon);", "public Pokemon(String name, int health, int speed, String type)\n {\n this.name = name;\n this.health = health;\n this.speed = speed;\n this.type = type;\n }", "public void goAdventuring() {\n\n game.createRandomMonster(4);\n if(RandomClass.getRandomTenPercent() == 5) {\n System.out.println(\"Your are walking down the road... Everything looks peaceful and calm.. Hit enter to continue!\");\n sc.nextLine();\n\n } else {\n game.battle();\n p.checkXp();\n }\n }", "public abstract void attack(Player p);", "@Override\r\n\tpublic void pass(Vehicle veh) {\r\n if (qCur == 0)\r\n vCur = veh.v;\r\n else\r\n vCur = ((vCur*qCur)+veh.v)/(qCur+1);\t// add velocity to average\r\n qCur++;\r\n }", "public void variation() {\r\n\t\t\r\n\t\tSystem.out.println(\"Line & Score\");\r\n\t\tSystem.out.println(\"Elevator Up\");\r\n\t\tElevator.setTargetPos(TeleopHandler.ElevatorStates.SCALE_POSITION_L);\r\n\t\tElevator.run(0);\r\n\t\tif(time.get()<5)\r\n\t\t\tDrive.runAt(0.25, 0.25);\r\n\t\telse {\r\n\t\t\tDrive.runAt(0, 0);\r\n\t\t\tSystem.out.println(\"Outtaking Cube\");\r\n\t\t\tIntake.run(TeleopHandler.IntakeStates.SLOW_OUTTAKING);\r\n\t\t}\r\n\t\t\t\r\n\t}", "public Phase1Edge action(Phase1Edge p1e){\n Phase1Edge r = new Phase1Edge();\n r.ep = ep.action(p1e.ep);\n r.eo = eo.times(ep.action(p1e.eo));\n return r;\n }", "private void reinforcementPhase(Player p) \n\t{\n\t\tint armyNum = map.calculateArmyNum(p);\n\t\tp.setArmies(armyNum);\n\t\tp.reinforce();\n\t}", "public PDAction getPV() {\n/* 307 */ COSDictionary pv = (COSDictionary)this.actions.getDictionaryObject(\"PV\");\n/* 308 */ PDAction retval = null;\n/* 309 */ if (pv != null)\n/* */ {\n/* 311 */ retval = PDActionFactory.createAction(pv);\n/* */ }\n/* 313 */ return retval;\n/* */ }", "public void attack(User p)\n\t{\n\t\tint damage = getAttack() - p.getDefense();\n\t\tint evade = 0;\n\t\tif(damage <= 0)\n\t\t{\n\t\t\tevade = p.getDefense() - getAttack();\n\t\t\tdamage = 1;\n\t\t}\n\t\t\n\t\tif(Math.random() * 100 < evade * 5)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Miss\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tp.reduce(damage);\n JOptionPane.showMessageDialog(null,\"Enemy attacked you! User's health = \" + p.getHealth() + \"\\n\" + \"Damage dealt = \" + damage); \n\t}", "public static void main(String[] args) {\n\t\tPokemon p=new Pokemon(\"Pikachu\", \"Pikachu.png\", \"tuono\", \"azione\", \"elettro\", \"normale\",\"elettro\");\r\n\t\tSystem.out.println(p.getMossa1());\r\n\t\tSystem.out.println(p.toString());\r\n\t}", "long getPokemonId();", "private void specialPowersPhase() {\n \tSpecialCharacter tmpPiece = null;\n \tTerrain theHex = null;\n\n for (Player p : playerList) {\n pause();\n this.player = p;\n player.flipAllUp();\n ClickObserver.getInstance().setActivePlayer(this.player);\n \n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n Game.getRackGui().setOwner(player);\n }\n });\n /*\n * Loops through all of the hexes that the player has pieces on.\n * If one of the pieces is either Master Thief or Assassin Primus, perform their\n * special ability.\n */\n for (Terrain hex : player.getHexesWithPiece()) {\n for (Piece pc : hex.getContents(player.getName()).getStack()) {\n if (pc.getName().equals(\"Master Thief\") || pc.getName().equals(\"Assassin Primus\")) { \n ((Performable)pc).specialAbility();\n if (MasterThief.isReturnPiece() || AssassinPrimus.isReturnPiece()) {\n \ttmpPiece = (SpecialCharacter)pc;\n \ttheHex = hex;\n \ttmpPiece.returnToBank(theHex);\n \tbreak;\n }\n }\n }\n }\n player.flipAllDown();\n }\n ClickObserver.getInstance().setPlayerFlag(\"\");\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n DiceGUI.getInstance().setFaceValue(0);\n DiceGUI.getInstance().cover();\n }\n });\n }", "static void startMatch()\n {\n // suggests that we should first use the pokedex menu\n if (Player.current.pokedex.isEmpty())\n {\n System.out.println(\"\\nYou have no pokemon to enter the match with kid. Use your pokedex and get some pokemon first.\");\n pause();\n return;\n }\n\n // print stuff\n clrscr();\n System.out.println(title());\n\n // print more stuff\n System.out.println(Player.opponent.name.toUpperCase() + \" IS PREPARING HIS POKEMON FOR BATTLE!\");\n \n // initialises the opponent logic - pokemon often enter evolved states\n Pokemon two = Opponent.init();\n\n System.out.println(\"\\n\"\n + Player.opponent.name.toUpperCase() + \" HAS CHOSEN \" + two +\"\\n\"\n + Player.current.name.toUpperCase() + \"! CHOOSE A POKEMON!!\");\n\n // displays the list of pokemon available for battle\n Player.current.showNamesPokedex();\n System.out.print(\"Gimme an index (Or type anything else to return)! \");\n int option = input.hasNextInt()? input.nextInt() - 1 : Player.current.pokedex.size();\n\n // sends back to mainMenu if option is out of bounds \n if (option >= Player.current.pokedex.size() || option < 0)\n {\n mainMenu();\n }\n\n // definitions, aliases for the two combatting pokemon\n Pokemon one = Player.current.pokedex.get(option);\n Pokemon.Move oneMove1 = one.listMoves.get(0);\n Pokemon.Move oneMove2 = one.listMoves.get(1);\n\n // if there's a bit of confusion regarding why two pokemon have the same nickname ...\n if (one.nickname.equals(two.nickname))\n System.out.println(one.nickname.toUpperCase() + \" vs ... \" + two.nickname.toUpperCase() + \"?? Okey-dokey, LET'S RUMBLE!!\");\n else // ... handle it\n System.out.println(one.nickname.toUpperCase() + \" vs \" + two.nickname.toUpperCase() + \"!! LET'S RUMBLE!!\");\n\n pause();\n clrscr();\n\n // Battle start!\n Pokemon winner = new Pokemon();\n // never give up!\n // unless it's addiction to narcotics \n boolean giveUp = false;\n while (one.getHp() > 0 && two.getHp() > 0 && !giveUp)\n {\n // returns stats of the pokemon\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n\n // 30% chance dictates whether the pokemon recover in a battle, but naturally so\n if (random.nextInt(101) + 1 < 30 && one.getHp() < one.maxHp)\n ++one.hp;\n\n if (random.nextInt(101) + 1 < 30 && two.getHp() < two.maxHp)\n ++two.hp;\n\n // the in-game selection menu\n System.out.print(\"\\n\"\n + Player.current.name.toUpperCase() + \"! WHAT WILL YOU HAVE \" + one.getFullName().toUpperCase() + \" DO?\\n\"\n + \"(a) Attack\\n\"\n + (oneMove1.isUsable? \"(1) Use \" + oneMove1.name.toUpperCase() + \"\\n\" : \"\")\n + (oneMove2.isUsable? \"(2) Use \" + oneMove2.name.toUpperCase() + \"\\n\" : \"\")\n + \"(f) Flee\\n\"\n + \"Enter the index from the brackets (E.g. (a) -> 'A' key): \");\n\n char choice = input.hasNext(\"[aAfF12]\")? input.next().charAt(0) : 'a';\n\n // a switch to handle the options supplied\n switch (choice)\n {\n case 'a': case 'A': default:\n one.attack(two);\n break;\n\n case 'f': case 'F':\n winner = two;\n giveUp = true;\n break;\n\n case '1':\n one.attack(two, oneMove1.name);\n break;\n\n case '2':\n one.attack(two, oneMove2.name);\n break;\n }\n\n // Opponent's turn, always second\n pause();\n clrscr();\n\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n Opponent.fight(one);\n pause();\n clrscr();\n }\n\n // find out the winner from combat or withdrawal\n winner = giveUp? two : one.getHp() > 0? one : two;\n System.out.println(\"\\nWINNER: \" + winner.getFullName() + \" of \" + winner.owner.name + \"!\\n\");\n\n if (winner == one)\n {\n // register the victory\n Player.current.gems += 100;\n System.out.println(\"You got 100 gems as a reward!\\n\");\n ++Player.current.wins;\n }\n else\n {\n // register the defeat\n ++Player.current.losses;\n System.out.println(\"Tough luck. Do not be worried! There's always a next time!\\n\");\n }\n\n pause();\n }", "public void visit(Personnes p) {\n pers = p;\n tpsAttentePerso = p.getTpsAttente();\n tpsAttentePerso2 = p.getTpsArrive();\n totalTime += tpsAttentePerso;\n\tnbVisited += 1;\n moyenne = totalTime/nbVisited; \n }", "public void train() {\r\n\t\texp += 2;\r\n\t\tenergy -= 5;\r\n\t\tSystem.out.println(\"Gained 2 experience.\");\t\r\n\t}", "@Test\r\n\tpublic void testAttacks()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tCommand[] attacks = pk.getAttacks();\r\n\t\tassertEquals(\"FireSpin\", attacks[0].getAttackName());\r\n\t\tassertEquals(\"Ember\", attacks[1].getAttackName());\r\n\t\tassertEquals(\"Flamethrower\", attacks[2].getAttackName());\r\n\t\tassertEquals(\"Inferno\", attacks[3].getAttackName());\r\n\t}", "public void attack(Player p){\n p.takeDamage(damage);\n }", "public void secrete() {\n\t\t/* Instantiate a new virus particle */\n\t\tSim.lps.add(new Lambda_phage(prob_surface, prob_enzymes));\n\t}", "public Location attack() {\n resetBoard();\n\n if (getHits().isEmpty()) {\n// System.out.println(\"Hunting\");\n\n for (final int[] r : board) {\n for (int c = 0; c < r.length; c++) {\n if (getIntegers().contains(5) && (c < (r.length - 4)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3]) && (-1 != r[c + 4])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n ++r[c + 4];\n }\n\n if (getIntegers().contains(4) && (c < (r.length - 3)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n }\n if (getIntegers().contains(3) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(2) && (c < (r.length - 1)))\n if ((-1 != r[c]) && (-1 != r[c + 1])) {\n ++r[c];\n ++r[c + 1];\n }\n }\n }\n\n for (int c = 0; c < board[0].length; c++) {\n for (int r = 0; r < board.length; r++) {\n if (getIntegers().contains(5) && (r < (board.length - 4)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n\n if (getIntegers().contains(4) && (r < (board.length - 3)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n if (getIntegers().contains(3) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(2) && (r < (board.length - 1)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n }\n }\n } else {\n// System.out.println(\"Hitting\");\n\n for (final Location hit : getHits()) {\n final int r = hit.getRow();\n final int c = hit.getCol();\n\n if (getIntegers().contains(2)) {\n if ((0 <= (c - 1)) && (-1 != board[r][c]) && (-1 != board[r][c - 1])) {\n ++board[r][c];\n ++board[r][c - 1];\n }\n\n\n if (((c + 1) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1])) {\n ++board[r][c];\n ++board[r][c + 1];\n }\n\n if ((0 <= (r - 1)) && (-1 != board[r][c]) && (-1 != board[r - 1][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n }\n\n if (((r + 1) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n\n\n }\n if (getIntegers().contains(3)) {\n final int inc = Collections.frequency(getIntegers(), 3);\n\n if ((0 <= (c - 2)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2])) {\n board[r][c] += inc;\n board[r][c - 1] += inc;\n board[r][c - 2] += inc;\n }\n if (((c + 2) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2])) {\n board[r][c] += inc;\n board[r][c + 1] += inc;\n board[r][c + 2] += inc;\n }\n if ((0 <= (r - 2)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c])) {\n board[r][c] += inc;\n board[r - 1][c] += inc;\n board[r - 2][c] += inc;\n }\n if (((r + 2) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n board[r][c] += inc;\n board[r + 1][c] += inc;\n board[r + 2][c] += inc;\n }\n\n\n }\n if (getIntegers().contains(4)) {\n if ((0 <= (c - 3)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n }\n if (((c + 3) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n }\n if ((0 <= (r - 3)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n }\n if (((r + 3) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n\n\n }\n if (getIntegers().contains(5)) {\n if ((0 <= (c - 4)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3]) && (-1 != board[r][c - 4])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n ++board[r][c - 4];\n }\n if (((c + 4) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3]) && (-1 != board[r][c + 4])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n ++board[r][c + 4];\n }\n if ((0 <= (r - 4)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c]) && (-1 != board[r - 4][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n ++board[r - 4][c];\n }\n if (((r + 4) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n }\n }\n\n for (final Location hit : getHits()) {\n board[hit.getRow()][hit.getCol()] = 0;\n }\n }\n\n// for (int[] i : board)\n// System.out.println(Arrays.toString(i));\n return findLargest();\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "POGOProtos.Rpc.PokemonProto getPokemon();", "public abstract boolean attack(PermanentCharm i);", "private void inAvanti() {\n\t\tif (Game.getInstance().isOnGround) {\n\t\t\tjump=false;\n\t\t\tGame.getInstance().getPersonaggio().setStato(Protagonista.RUN);\n\t\t\tGraficaProtagonista.getInstance().cambiaAnimazioni(Protagonista.RUN);\n\t\t}\n\t}", "public void attack() {\n\n }", "private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }", "@Override\n\t\tpublic void attack() {\n\t\t\tSystem.out.println(\"잽을 날리다\");\n\t\t}", "public Pokemon() {\n }", "void gameTied(Piece piece);", "public void addPokemon(Pokemon pokemon) {\r\n\t\tif (caughtPokemon.containsKey(pokemon.getName())) {\r\n\t\t\tcaughtPokemon.put(pokemon.getName(), caughtPokemon.get(pokemon.getName()) + 1);\r\n\t\t} else {\r\n\t\t\tcaughtPokemon.put(pokemon.getName(), 1);\r\n\t\t}\r\n\r\n\t\tif (!(ownedPokemon.contains(pokemon))) {\r\n\r\n\t\t\townedPokemon.add(pokemon);\r\n\t\t}\r\n\t}", "int hitGfx();", "public void move4(Pokemon enemy){\n boolean crit = false;\n boolean superEffective = false;\n boolean reduced = false;\n boolean moveHit = true;\n int randCrit = (int)(22 * Math.random()+1);\n\n //CHANGE ATTACK TO FALSE IF MOVE DOES NO DAMAGE<<<<<<<<<<<<<\n boolean attack = true;\n //CHANGE TYPE TO TYPE OF MOVE POWER AND ACCURACY<<<<<<<<<<<<<\n String type = \"Steel\";\n int power = 50;\n int accuracy = 95;\n\n //DO NOT CHANGE BELOW THIS\n int damage = ((CONSTANT * power * ( getAtt() / enemy.getDef() )) /50);\n if(randCrit == CONSTANT){\n damage = damage * 2;\n crit = true;\n }\n if(checkSE(type,enemy.getType())){\n damage = damage * 2;\n superEffective = true;\n }\n if(checkNVE(type, enemy.getType())){\n damage = damage / 2;\n reduced = true;\n }\n if(attack && hit(accuracy)){\n enemy.lowerHp(damage);\n }\n else{\n if(hit(accuracy)){\n //DO STATUS EFFECT STUFF HERE (ill figure out later)\n }\n }\n lowerM4PP();\n }", "public AttackPhaseAction(MagicStoneGame magicStoneGame, CardClicker clicker) {\n super(\"Attack\");\n this.magicStoneGame = magicStoneGame;\n this.clicker = clicker;\n }", "public void juice()\n\t{\n\t\tSystem.out.println(\"Pepsi juice\");\n\t}", "@Override\n\tpublic void doTimeStep() {\n\t\tint activity = Critter.getRandomInt(3);\n\t\tif(activity == 0) {\n\t\t\twalk(Critter.getRandomInt(8));\n\t\t\tthis.moveFlag = true;\n\t\t}\n\t\telse if(activity == 1) {\t\t\t\t\n\t\t\trun(Critter.getRandomInt(8));\n\t\t\tthis.moveFlag = true;\n\t\t}\n\t\telse if(this.getEnergy() >= Params.min_reproduce_energy) {\n\t\t\tCritter4 egg = new Critter4();\n\t\t\tthis.reproduce(egg,Critter.getRandomInt(8));\n\t\t}\n\t\telse {\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if(magicStoneGame.getBattlefield().getPlayer().untappedCreatures()) {\n magicStoneGame.getBattlefield().setAttackPhase(true);\n clicker.startAttackPhase();\n }\n else magicStoneGame.getBattlefield().setPlayerTurn(false);\n }", "public void move3(Pokemon enemy){\n boolean crit = false;\n boolean superEffective = false;\n boolean reduced = false;\n boolean moveHit = true;\n int randCrit = (int)(22 * Math.random()+1);\n\n //CHANGE ATTACK TO FALSE IF MOVE DOES NO DAMAGE<<<<<<<<<<<<<\n boolean attack = false;\n //CHANGE TYPE TO TYPE OF MOVE POWER AND ACCURACY<<<<<<<<<<<<<\n String type = \"Normal\";\n int power = 0;\n int accuracy = 100;\n\n //DO NOT CHANGE BELOW THIS\n int damage = ((CONSTANT * power * ( getAtt() / enemy.getDef() )) /50);\n if(randCrit == CONSTANT){\n damage = damage * 2;\n crit = true;\n }\n if(checkSE(type,enemy.getType())){\n damage = damage * 2;\n superEffective = true;\n }\n if(checkNVE(type, enemy.getType())){\n damage = damage / 2;\n reduced = true;\n }\n if(attack && hit(accuracy)){\n enemy.lowerHp(damage);\n }\n else{\n if(hit(accuracy)){\n //DO STATUS EFFECT STUFF HERE (ill figure out later)\n }\n }\n lowerM3PP();\n }", "public Pokemon (int id, String nombre, int evolucion, String tipo,String rutaImagen)\r\n\t{\r\n\t\tthis.id = id;\r\n\t\tthis.nombre = nombre;\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=tipo;\r\n\t\tthis.evolucion = evolucion;\r\n\t\tthis.rutaImagen = rutaImagen;\r\n\t}", "@Override\n public void action() {\n while (turn.getPlayer().getFightDecision() == null){\n ;\n }\n FightDecision decision = turn.getPlayer().getFightDecision();\n if (decision== FightDecision.IGNORE){\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new MovePhase(y));\n }else{\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new FightPhase());\n }\n }", "public static void main(String[] args) {\n\t\tPokemon first = new Pokemon(\"Pikachu\", 90, \"Electric\");\n\t\tPokemon second = new Pokemon(\"Bulbasaur\", 95, \"Grass\");\n\t\tfirst.getName();\n\t\tfirst.attackPokemon(second);\n\t\tsecond.attackPokemon(first);\n\t}", "public void play() {\n List<String> playersData = getGameInput().getPlayersData();\n for (int id = 0; id < playersData.size() / Constants.DATAENTITY; id++) {\n getHeroes().add(getHeroFactory().getHero(\n playersData.get(id * Constants.DATAENTITY),\n Integer.parseInt(\n playersData.get(\n id * Constants.DATAENTITY\n + Constants.INDEXPOSX)),\n Integer.parseInt(\n playersData.get(\n id * Constants.DATAENTITY\n + Constants.INDEXPOSY)),\n id));\n }\n // We create the angels and add them to angels list.\n List<Integer> numOfAngels = getGameInput().getNumOfAngels();\n List<String> angelsData = getGameInput().getAngelsData();\n for (int i = 0; i < angelsData.size() / Constants.DATAENTITY; i++) {\n getAngels().add(getAngelsFactory().getAngel(\n angelsData.get(i * Constants.DATAENTITY),\n Integer.parseInt(\n angelsData.get(\n i * Constants.DATAENTITY\n + Constants.INDEXPOSX)),\n Integer.parseInt(\n angelsData.get(\n i * Constants.DATAENTITY\n + Constants.INDEXPOSY))));\n }\n\n getUtl().prepareAdmins();\n\n int angelCounter = 0; // To iterate through all angels only once.\n // We start the actual game.\n for (int i = 0; i < getMovements().size(); i++) { // For every round.\n\n getUtl().printRound(i + 1); // We start printing from round 1...\n\n for (int j = 0; j < getHeroes().size(); j++) {\n /* Apply overtime ability if the case and then hero chooses\n * strategy and moves if he is not rooted. Lastly we decrease\n * the amount of rounds that a hero must be affected by. */\n if (!getHeroes().get(j).isDead()) {\n if (getHeroes().get(j).isAffectedByAoT()) {\n getUtl().applyAoT(getHeroes().get(j));\n }\n if (!getHeroes().get(j).isRooted()) {\n getHeroes().get(j).chooseStrategy();\n getHeroes().get(j).move(getMovements().get(i).get(j));\n }\n if (getHeroes().get(j).isAffectedByAoT()) {\n getHeroes().get(j).setAffectedByAoTRounds(\n getHeroes().get(j).getAffectedByAoTRounds()\n - 1);\n }\n }\n }\n\n // Check if there are any players on the same terrain.\n for (int j = 0; j < getHeroes().size(); j++) {\n for (int k = 0; k < getHeroes().size(); k++) {\n if (k == j) {\n continue; // So a hero doesn't fight himself.\n }\n if ((getHeroes().get(j).getPosX()\n == getHeroes().get(k).getPosX())\n && (getHeroes().get(j).getPosY()\n == getHeroes().get(k).getPosY())) {\n // If they are both alive, fight.\n if (!getHeroes().get(j).isDead()\n && !getHeroes().get(k).isDead()) {\n getUtl().fight(getHeroes().get(k),\n getHeroes().get(j), getMap());\n }\n }\n }\n }\n\n // Selecting the angels that appear on round i\n for (int j = 0; j < numOfAngels.get(i); j++) {\n getUtl().spawnAngel(getAngels().get(angelCounter));\n for (int k = 0; k < getHeroes().size(); k++) {\n /* Checking if the selected angel and player k are on the\n * same terrain. */\n if (getAngels().get(angelCounter).getPosX()\n == getHeroes().get(k).getPosX()\n && (getAngels().get(angelCounter).getPosY()\n == getHeroes().get(k).getPosY())) {\n getUtl().affectHeroByAngel(\n getAngels().get(angelCounter),\n getHeroes().get(k));\n }\n }\n angelCounter++;\n }\n\n // When round is complete, everyone can fight again\n for (AbstractHero hero : getHeroes()) {\n hero.setFought(false);\n }\n getUtl().getOutput().add(\"\\n\");\n }\n printResults();\n }", "public Pokemon(String species, Type type1, Type type2, int hp, int atk, int def, int spc, int spd, int baseSpd, Move move1, Move move2, Move move3, Move move4) {\n this.SPECIES = species;\n this.TYPE1 = type1;\n this.TYPE2 = type2;\n\n this.HP = hp;\n this.currentHp = hp;\n this.ATK = atk;\n this.currentAtk = atk;\n this.DEF = def;\n this.currentDef = def;\n this.SPC = spc;\n this.currentSpc = spc;\n this.SPD = spd;\n this.currentSpd = spd;\n\n this.baseSpd = baseSpd;\n\n this.atkStageMultiplier = 0;\n this.defStageMultiplier = 0;\n this.spcStageMultiplier = 0;\n this.spdStageMultiplier = 0;\n\n this.moves = new ArrayList<Move>();\n moves.add(move1);\n moves.add(move2);\n moves.add(move3);\n moves.add(move4);\n\n this.status1 = Status.HEALTHY;\n this.status1Counter = 0;\n this.status2 = Status.HEALTHY;\n this.status2Counter = 0;\n\n this.hyperBeamRecharge = false;\n }", "public void act()\r\n {\r\n if(worldTimer == 1)\r\n {\r\n if(wildPokemon)\r\n {\r\n textInfoBox.displayText(\"Wild \" + enemyPokemon.getName() + \" appeared!\", true, false);\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(\"Enemy trainer sent out \" + enemyPokemon.getName() + \"!\", true, false);\r\n }\r\n textInfoBox.displayText(\"Go \" + playerPokemon.getName() + \"!\", true, false);\r\n textInfoBox.updateImage();\r\n\r\n worldTimer++;\r\n }\r\n else if(worldTimer == 0)\r\n {\r\n worldTimer++;\r\n }\r\n\r\n if(getObjects(Pokemon.class).size() < 2)\r\n {\r\n ArrayList<Pokemon> pokemon = (ArrayList<Pokemon>) getObjects(Pokemon.class);\r\n for(Pokemon pkmn : pokemon)\r\n {\r\n if(pkmn.getIsPlayers() == true)\r\n {\r\n textInfoBox.displayText(\"Enemy \" + enemyPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n int expGain = StatCalculator.experienceGainCalc(playerPokemon.getName(), playerPokemon.getLevel());\r\n textInfoBox.displayText(playerPokemon.getName().toUpperCase() + \" gained \" + expGain + \"\\nEXP. Points!\", true, false);\r\n playerPokemon.addEXP(expGain);\r\n if(playerPokemon.getCurrentExperience() >= StatCalculator.experienceToNextLevel(playerPokemon.getLevel()))\r\n {\r\n int newEXP = playerPokemon.getCurrentExperience() - StatCalculator.experienceToNextLevel(playerPokemon.getLevel());\r\n playerPokemon.setEXP(newEXP);\r\n playerPokemon.levelUp();\r\n playerPokemon.newPokemonMoves();\r\n\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" grew to level \" + playerPokemon.getLevel() + \"!\", true, false);\r\n }\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n\r\n textInfoBox.updateImage();\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n String playerName = Reader.readStringFromFile(\"gameInformation\", 0, 0);\r\n textInfoBox.displayText(playerName + \" blacked out!\", true, false);\r\n\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n String newWorld = Reader.readStringFromFile(\"gameInformation\", 0, 4);\r\n int newX = Reader.readIntFromFile(\"gameInformation\", 0, 5);\r\n int newY = Reader.readIntFromFile(\"gameInformation\", 0, 6);\r\n\r\n GameWorld gameWorld = new GameWorld(newWorld, newX, newY, \"Down\");\r\n gameWorld.healPokemon();\r\n Greenfoot.setWorld(gameWorld);\r\n\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n }\r\n } \r\n\r\n if(isBattleOver)\r\n {\r\n isPlayersTurn = true;\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n newGameWorld();\r\n }\r\n }", "@Test\n public void testVaticanReport() {\n Game game = new Game(2);\n FaithTrack faith = game.getPlayers().get(0).getFaithTrack();\n faith.increasePos(5);\n assertTrue(faith.isVatican());\n faith.vaticanReport(1);\n assertEquals(faith.getBonusPoints()[0], 2);\n faith.increasePos(5);\n faith.vaticanReport(2);\n assertEquals(faith.getBonusPoints()[0], 2);\n }", "@SuppressWarnings(\"unchecked\")\n \tprotected void startTracking(final ArenaPlayer p){\n \t\tfinal MatchState ms = MatchState.ONENTER;\n \t\tMethodController.updateEventListeners(this, ms,p,PlayerQuitEvent.class,PlayerRespawnEvent.class);\n \t\tMethodController.updateEventListeners(this, ms,p, PlayerCommandPreprocessEvent.class);\n \t\tMethodController.updateEventListeners(this,ms, p,PlayerDeathEvent.class);\n \t\tMethodController.updateEventListeners(this,ms, p,PlayerInteractEvent.class); /// for sign clicks\n \t\tif (needsDamageEvents){\n \t\t\tMethodController.updateEventListeners(this,ms, p,EntityDamageEvent.class);}\n \t\tif (WorldGuardInterface.hasWorldGuard() && arena.getRegion() != null){\n \t\t\tpsc.addMember(p, arena.getRegion(), arena.getRegionWorld());}\n \t\tif (noLeave){\n \t\t\tMethodController.updateEventListeners(this,ms, p,PlayerMoveEvent.class);}\n \t\tif (needsBlockEvents){\n \t\t\tMethodController.updateEventListeners(this,ms, p,BlockBreakEvent.class, BlockPlaceEvent.class);}\n \t\tupdateBukkitEvents(ms,p);\n \t\tp.setChosenClass(null);\n \t}", "public void getStarterPokemon() {\r\n\t\taddPokemon(new Persian(\"Persian\", null, 30, 30, 30, 30));\r\n\t\tresetCaughtPokemon();\r\n\t}" ]
[ "0.63228464", "0.62359434", "0.6101662", "0.59918934", "0.59603006", "0.5959611", "0.59211934", "0.58953446", "0.58950496", "0.5815135", "0.57917297", "0.5790322", "0.5700158", "0.56996185", "0.5639628", "0.56251985", "0.56213397", "0.55838317", "0.55457103", "0.55454916", "0.5496424", "0.5472134", "0.5454159", "0.54459345", "0.5418661", "0.5413776", "0.53859067", "0.5382878", "0.5381056", "0.53779966", "0.5364107", "0.5347792", "0.5328875", "0.5323643", "0.5316651", "0.53153944", "0.5310929", "0.5302368", "0.5291403", "0.5274097", "0.52671385", "0.5260567", "0.52568185", "0.52464104", "0.52395606", "0.5230903", "0.5225908", "0.52236354", "0.52114165", "0.52019846", "0.52017814", "0.5190922", "0.51851135", "0.51809627", "0.51746356", "0.51706797", "0.5166417", "0.5162487", "0.51572365", "0.5156364", "0.5147305", "0.51468897", "0.5145978", "0.513942", "0.5138575", "0.5133195", "0.51331013", "0.5132085", "0.5127732", "0.5127726", "0.51199645", "0.5118376", "0.51182884", "0.51174694", "0.5116928", "0.51124734", "0.5108341", "0.5106676", "0.51031166", "0.5101343", "0.5099956", "0.5093398", "0.5091433", "0.5088795", "0.5086435", "0.5085344", "0.50841343", "0.5080994", "0.50732785", "0.50727034", "0.50722414", "0.5072127", "0.5065886", "0.50642186", "0.5064054", "0.5062645", "0.50578403", "0.5057035", "0.50518674", "0.5046125" ]
0.7399503
0
TODO Autogenerated method stub return false;
@Override public boolean isViewFromObject(View arg0, Object arg1) { return arg0 == arg1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean method_218() {\r\n return false;\r\n }", "@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}", "public boolean method_2453() {\r\n return false;\r\n }", "public boolean method_4093() {\n return false;\n }", "public boolean method_214() {\r\n return false;\r\n }", "public boolean method_4088() {\n return false;\n }", "public boolean method_216() {\r\n return false;\r\n }", "public boolean method_108() {\r\n return false;\r\n }", "protected boolean func_70814_o() { return true; }", "public boolean method_2434() {\r\n return false;\r\n }", "public boolean method_4102() {\n return false;\n }", "protected boolean func_70041_e_() { return false; }", "public boolean method_210() {\r\n return false;\r\n }", "public boolean method_198() {\r\n return false;\r\n }", "public boolean method_3897() {\r\n return false;\r\n }", "public boolean method_194() {\r\n return false;\r\n }", "public boolean method_196() {\r\n return false;\r\n }", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "@Override\n public boolean c() {\n return false;\n }", "public boolean method_208() {\r\n return false;\r\n }", "public boolean method_109() {\r\n return true;\r\n }", "public boolean method_4132() {\n return false;\n }", "@Override\n\tpublic boolean model() {\n\t\treturn false;\n\t}", "public boolean emprunter() {\n // TODO: implement\n return false;\n }", "@Override\n\tpublic boolean status() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean status() {\n\t\treturn false;\n\t}", "protected boolean isValid()\r\n {\r\n \treturn true;\r\n }", "@Override\r\n\tpublic boolean isValid() {\n\t\treturn false;\r\n\t}", "public boolean method_195() {\r\n return false;\r\n }", "@Override\n\t\tpublic boolean isValid() {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isReturn() {\n return true;\n }", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValid() {\n\t\treturn false;\n\t}", "public boolean mo7079r() {\n return false;\n }", "@Override\n\tpublic boolean paie() {\n\n\t\treturn true;\n\t}", "@Override\n public boolean d() {\n return false;\n }", "@Override\n\tpublic boolean postIt() {\n\t\treturn false;\n\t}", "public boolean b()\n {\n return false;\n }", "public boolean b()\n {\n return false;\n }", "public boolean b()\r\n {\r\n return false;\r\n }", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean istBerechtigt() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean update() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean livre() {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isRented() {\n\t\treturn false;\n\t}", "public boolean c()\n {\n return false;\n }", "public boolean execute(){\n return false;\n }", "@Override\n\tpublic boolean javaMethodBaseWithBooleanRet() {\n\t\treturn false;\n\t}", "public boolean mo100108c() {\n return false;\n }", "@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}", "public boolean mo55998a() {\n return false;\n }", "boolean invokeOperation() {\n return false;\n }", "@Override\n\t\t\t\tpublic boolean isEnabled() {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n\tpublic boolean isNew() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isNew() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isNew() {\n\t\treturn false;\n\t}", "public boolean isValid() {\n\t\treturn false;\n\t}", "public boolean method_1456() {\r\n return true;\r\n }", "public boolean isValid(){\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean execute() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean erTom() {\n\t\treturn (bak == null);\n\t}", "@Override\npublic boolean isEnabled() {\n\treturn false;\n}", "public boolean finListe(){\n\treturn true;\n}", "public boolean isActive(){\n\t\treturn false;\n\t}", "public boolean isValid()\n\t{\n\t\treturn false;\n\t}", "@Override\n public boolean active() {\n return false;\n }", "@Override\n public boolean execute() {\n return false;\n }", "@Override\n public boolean execute() {\n return false;\n }", "@Override\n void generateFalseData() {\n \n }", "public boolean validate(){\n return true;\n }", "@Override\n\tpublic boolean ate() {\n\t\treturn false;\n\t}", "public boolean guardar()\r\n\t{\r\n\t\treturn false;\r\n\t}", "public boolean mo9210d() {\n return false;\n }", "@Override\n public boolean save()\n {\n return false;\n }", "public boolean cp() {\n return false;\n }", "public boolean d() {\n return false;\n }", "@Override\n\t\tpublic boolean isSuccess() {\n\t\t\treturn false;\n\t\t}", "@Override\n\tprotected void resetFalseClause() {\n\t\t\n\t}", "@Override public boolean isEnabled() {\n return true;\n }", "public boolean mo72a() {\n return false;\n }", "@Override\n\tpublic boolean updateStatus() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\t\t\n\t}", "boolean test() {\n return false; // REPLACE WITH SOLUTION\n }", "@Override\r\n\t\tpublic boolean editItem() {\n\t\t\treturn false;\r\n\t\t}", "@Override\n public boolean isEnabled() {\n return false;\n }", "@Override\n public boolean isEnabled() {\n return false;\n }", "boolean valid() {\n return true;\n }", "boolean valid() {\n return true;\n }", "boolean valid() {\n return true;\n }", "@Override\n\tpublic boolean isOpen() { return false; }", "@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn false;\r\n\t}", "public boolean mo1490a() {\n return false;\n }", "public boolean mo8810b() {\n return false;\n }", "public boolean a()\r\n {\r\n return false;\r\n }", "public boolean mo7339w() {\n return false;\n }" ]
[ "0.75644237", "0.7549609", "0.7278403", "0.72512615", "0.7232777", "0.7156432", "0.71557397", "0.71438265", "0.713694", "0.71019363", "0.70491886", "0.7041244", "0.7024102", "0.7015872", "0.69929415", "0.6981114", "0.69546676", "0.6944537", "0.6911757", "0.6905579", "0.6861607", "0.6859577", "0.68373424", "0.6828779", "0.6806974", "0.6806974", "0.67783105", "0.67613935", "0.6748179", "0.67466104", "0.6722734", "0.6680277", "0.6680277", "0.6680277", "0.66771746", "0.667366", "0.66698587", "0.6666345", "0.6665102", "0.6665102", "0.6662816", "0.66377085", "0.66377085", "0.6628824", "0.66203916", "0.66203916", "0.66203916", "0.6602787", "0.65926397", "0.6584997", "0.6575974", "0.6573986", "0.65662766", "0.65569526", "0.6555662", "0.65555704", "0.65412843", "0.6537874", "0.6536841", "0.6536841", "0.6536841", "0.6516145", "0.6492861", "0.64920914", "0.64912415", "0.64604795", "0.6438998", "0.6425217", "0.64213365", "0.64182377", "0.63793147", "0.63787305", "0.63787305", "0.635765", "0.6338895", "0.63309056", "0.6329045", "0.6326794", "0.6309435", "0.630702", "0.6303666", "0.62933373", "0.62833494", "0.6282275", "0.62799925", "0.6279239", "0.62675565", "0.6262063", "0.6252457", "0.6242573", "0.6242573", "0.6237639", "0.6237639", "0.6237639", "0.6235447", "0.6234149", "0.6234149", "0.6219345", "0.62175965", "0.62014735", "0.6201091" ]
0.0
-1
TODO Autogenerated method stub super.destroyItem(container, position, object);
@Override public void destroyItem(View container, int position, Object object) { ((ViewPager)container).removeView(viewContainter.get(position)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void destroyItem(View container, int position, Object object) {\n\t\tsuper.destroyItem(container, position, object);\r\n\t}", "@Override\n\tpublic void destroyItem(View container, int position, Object object) {\n\t}", "@Override\n\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t\tcontainer.removeView((View)object); \t\n\t\t}", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n }", "@Override\r\n\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\tcontainer.removeView((View) object);\r\n\t}", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n container.removeView((View)object);\n }", "@Override\r\n\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t\tcontainer.removeView(viewList.get(position));\r\n\t\t}", "@Override\n public void destroyItem(ViewGroup container, int position, Object object){\n container.removeView((View)object);\n }", "@Override\n\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t\tcontainer.removeView(viewList.get(position));\n\t\t}", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n container.removeView((RelativeLayout) object);\n\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n container.removeView((RelativeLayout) object);\n\n }", "@Override\n public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {\n container.removeView((View) object);\n }", "@Override\r\n public void destroyItem( ViewGroup container, int position, Object object ){\n container.removeView( (View) object );\r\n }", "@Override\n\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t\tToast.makeText(getBaseContext(), \"item destroyed\", Toast.LENGTH_SHORT).show();\n\t\t}", "@Override\n\tpublic void destroyItem(View container, int position, Object object) {\n\t\t((ViewPager) container).removeView(mList.get(position));\n\t}", "@Override\r\n\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t((ViewPager)container).removeView(list.get(position));\r\n\t}", "@Override\n\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t((ViewPager) container).removeView((RelativeLayout) object);\n\t}", "@Override\r\n\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t((ViewPager) container).removeView(mViews.get(position));\r\n\t\t\r\n\t}", "@Override\n\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t( (ViewPager)container).removeView((View)object);\n\t}", "@Override\n public void destroyItem(ViewGroup container, int position, Object object)\n {\n \n container.removeView(mPagersList.get(position));\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n container.removeView((LinearLayout) object);\n\n }", "@Override\n public void destroyItem(View container, int position, Object object) {\n\n View view = (View) object;\n ((ViewPager) container).removeView(view);\n view = null;\n\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n ((ViewPager) container).removeView((View) object);\n }", "@Override\r\n public void destroyItem(ViewGroup container, int position, Object object) {\n ((ViewPager) container).removeView((View) object);\r\n }", "@Override\n\t\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\t\t\t\t((ViewPager) container).removeView((View) object);\n\t\t\t}", "@Override\n public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {\n container.removeView((LinearLayout)object);\n }", "@Override\r\n public void destroyItem(ViewGroup container, int position, Object object) {\n ((ViewPager) container).removeView((RelativeLayout) object);\r\n \r\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n ((ViewPager) container).removeView((CardView) object);\n\n }", "@Override\n public void destroyItem(ViewGroup view, int position, Object object) {\n view.removeView(images.get(position));\n }", "@Override\n public void destroyItem(ViewGroup container, int position, Object object) {\n registeredFragments.remove(position);\n super.destroyItem(container, position, object);\n }", "public void removeItem(){\n\t\tthis.item = null;\n\t}", "@Override\n public void deleteItem(int position) {\n originalData.remove(currentData.get(position));\n //Removed of the current data using the current position gotten from the click listener\n currentData.remove(position);\n\n //Notify changes to adapter through presenter\n }", "private void deleteItem(int position){\n deleteItem(dataset.get(position),position);\n }", "@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}", "@Override\n public void deleteItem(P_CK t) {\n \n }", "public void deleteItem(int position) {\n Expense expense = expenses.get(position);\n expense.deleteInBackground();\n \n }", "@Override\n\tpublic void deleteItem(Object toDelete) {}", "public void delete(int position) {\r\n dataTag.remove(position);\r\n data.remove(position);\r\n }", "public void deleteItem(MySmsMessage item,int position){\n dataset.remove(item);\n notifyItemRemoved(position);\n }", "public void deletePolynom(int position) {\n collection.remove(position);\n }", "@Override\n public void deleteItem(int position) {\n GlobalValue.arrMyMenuShop.remove(position);\n shopAdapter.notifyDataSetChanged();\n }", "void onItemDelete(int position);", "@Override\n public void onItemDismiss(int position) {\n Cursor c = getCursor();\n c.moveToPosition(position);\n String symbol = c.getString(c.getColumnIndex(QuoteColumns.SYMBOL));\n mContext.getContentResolver().delete(QuoteProvider.Quotes.withSymbol(symbol), null, null);\n notifyItemRemoved(position);\n }", "@Override\r\n\t\tpublic boolean deleteItem() {\n\t\t\treturn false;\r\n\t\t}", "public void rmItem(Item item) {\n\t\titems.remove(item);\n\t}", "void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}", "@Override\n\t\tpublic void deleteItem(int index) {\n\t\t\tmGuanzhuList.remove(index);\n\t\t}", "public void deleteItem(int index) {\n this.items.remove(index);\n }", "@Override\n public void onItemDismiss(int position) {\n dummyDataList.remove(position);\n notifyItemRemoved(position);\n\n }", "public void deleteItem(String nomItem) {\r\n \t\titems.removeItem(nomItem);\r\n \t}", "public void deleteReminderItem(int position){\n reminderItems.remove(position);\n recyclerAdapter.notifyDataSetChanged();\n }", "protected void removeItemFromList(final int position) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(getString(R.string.str_title_delete_dialog));\n builder.setMessage(getString(R.string.str_delete_safezone))\n .setPositiveButton(getString(R.string.fire_yes), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(getActivity(), \"delete device \" + deletePosition, Toast.LENGTH_SHORT).show();\n //Device.deleteDevice(deviceList.get(deletePosition).deviceID);\n Safezone.delete(safezoneArrayList.get(position).get_id());\n }\n })\n .setNegativeButton(getString(R.string.fire_no), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n // Create the AlertDialog object and return it\n builder.show();\n }", "public boolean deleteItem(int index);", "@Override\r\n\tpublic void destroy()\r\n\t{\n\t\t\r\n\t}", "protected abstract void removeItem();", "void onDeleteItem(E itemElementView);", "void deleteItem(IDAOSession session, int id);", "private void deleteItem() {\n // Only perform the delete if this is an existing inventory item\n if (mCurrentInventoryUri != null) {\n // Call the ContentResolver to delete the inventory item at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentInventoryUri\n // content URI already identifies the inventory item that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentInventoryUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "public void itemRemoved(E item);", "public void deleteItem() {\n\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-deleteItem(): ERROR \" + caught.toString());\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(BmUpdateResult result) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tprocessItemDelete(result);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Llamada al servicio RPC\n\t\t\ttry {\n\t\t\t\tif (!isLoading()) {\n\t\t\t\t\tstartLoading();\n\t\t\t\t\tgetUiParams().getBmObjectServiceAsync().delete(bmoRequisitionItem.getPmClass(), bmoRequisitionItem, callback);\n\t\t\t\t}\n\t\t\t} catch (SFException e) {\n\t\t\t\tstopLoading();\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-deleteItem(): ERROR \" + e.toString());\n\t\t\t}\n\t\t}", "public void deleteItem() {\n\t\tIntent intent = new Intent(this, AlarmActivity.class);\n\t\tint alarmId = itemsAdapter.getSelectedItem().getId();\n\t\tLog.d(TAG, \"Cancelling Alarm with ID \" + alarmId); \n\t\tPendingIntent sender = PendingIntent.getBroadcast(this, alarmId, intent, 0);\n\t\tAlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n\t\talarmManager.cancel(sender);\n\t\t\n\t\titemsAdapter.remove(itemsAdapter.getSelectedPosition());\n\t\titemsAdapter.unsetSelectedPosition();\n\t\tgetActionBar().hide();\n\t}", "public void removeItem(int position) {\n mPapers.remove(position);\n notifyItemRemoved(position);\n }", "public void removeItem() {\n tvItem.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n // Notify the listener which position was long pressed.\n longClickListener.onItemLongClicked(getBindingAdapterPosition());\n return true;\n }\n });\n }", "private void removecompanyObj(final int position) {\n //Creating an alert dialog to confirm the deletion\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Are you sure you want to delete this?\");\n\n //if the response is positive in the alert\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n //removing the item\n companyObjList.remove(position);\n\n //reloading the list\n notifyDataSetChanged();\n }\n });\n\n //if response is negative nothing is being done\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n }\n });\n\n //creating and displaying the alert dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public final void destroy(){\n\t\tListHandler.get().remove(this);\n\t\tactivated = false;\n\t\tonDestroy();\n\t}", "public void destroy() {\n\t\tsuper.destroy(); \n\t\t// Put your code here\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() {\n\t\t\r\n\t}", "public void destroy()\r\n\t{\n\t\t\r\n\t}", "public boolean deletePlayerItem(PlayerItem playerItem);", "@Override\r\n\t\tpublic void destroy() {\n\t\t\t\r\n\t\t}", "public void hapusItem(Item objItem) {\n arrItem.remove(objItem); //buang item\n }", "@Override\n protected void dataItemRemoved(Data item, Series series) {\n Node frame = item.getNode();\n getPlotChildren().remove(frame);\n removeDataItemFromDisplay(series,item);\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.v(TAG, \"onDestroy\");\r\n\t\t//Toast.makeText(getActivity(), TAG+ \" \"+i+\" onDestroy\", Toast.LENGTH_SHORT).show();\r\n\t\tbigSceneListAdapter.destroy();\r\n\t\tbigSceneListAdapter = null;\r\n\t}", "@Override\r\n\tpublic void onDestory() {\n\t\t\r\n\t}", "@Override\n public void deleteItem(int position) {\n // User feedback that he deleted an ingredient\n Toast.makeText(getContext(), \"Deleted \" + ingredients.get(position).getTitle() + \" Successfully\", Toast.LENGTH_SHORT).show();\n // Actually removing the ingredient from the list\n ingredients.remove(position);\n // Notifying the adapter so he updates his display\n rv_adapt.notifyItemRemoved(position);\n\n // In case the last item was deleted, we shouldn't be able to perform a search\n if (ingredients.isEmpty()) {\n Button button_search = v.findViewById(R.id.button_search);\n button_search.setEnabled(false);\n }\n }", "public void destroy() {\n this.game.deleteObject(this);\n }", "@Override\t\n\tpublic void destroy() {\n\t\t\n\t}", "@Override\n public void destroy() {\n }", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}", "@Override\n\tpublic void destroy() {\n\n\t}" ]
[ "0.85541385", "0.8544359", "0.8452405", "0.83865285", "0.8356034", "0.82519215", "0.82297397", "0.8221939", "0.82193196", "0.80860865", "0.80860865", "0.80401635", "0.80350685", "0.8003115", "0.7822246", "0.77630955", "0.7665142", "0.76488024", "0.76440763", "0.7606762", "0.7605089", "0.75527835", "0.75322014", "0.75251764", "0.75173444", "0.75021935", "0.74928844", "0.7456403", "0.7409576", "0.7257622", "0.69317985", "0.6626004", "0.66150624", "0.66078526", "0.62822324", "0.6253826", "0.62221533", "0.62218726", "0.61619693", "0.6149858", "0.6139454", "0.60932064", "0.6038722", "0.6037673", "0.60231", "0.59968096", "0.59911317", "0.59780335", "0.59772563", "0.59732425", "0.5971212", "0.5956398", "0.5935504", "0.59289706", "0.5922813", "0.5914663", "0.59144497", "0.58889604", "0.58782226", "0.58651286", "0.5849313", "0.5838655", "0.58381164", "0.583589", "0.5835692", "0.5834379", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.58340305", "0.5833366", "0.5830436", "0.58283466", "0.58008677", "0.5800352", "0.5793946", "0.57885283", "0.57845986", "0.57812244", "0.57800734", "0.5774984", "0.57643944", "0.57643944", "0.57643944", "0.57643944", "0.57448375", "0.57448375", "0.57448375", "0.57448375", "0.57448375" ]
0.75731695
21
TODO Autogenerated method stub
@Override public int getItemPosition(Object object) { return super.getItemPosition(object); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub return super.instantiateItem(container, position);
@Override public Object instantiateItem(ViewGroup container, int position) { ((ViewPager)container).addView(viewContainter.get(position)); return viewContainter.get(position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic View instantiateItem(ViewGroup container, int position) {\n\t\t\tToast.makeText(getBaseContext(), \"item instantiated\", Toast.LENGTH_SHORT).show();\n\t\t\treturn list.get(position);\n\t\t}", "@Override\r\n\t\tpublic Object instantiateItem(ViewGroup container, int position) {\n\t\t\tcontainer.addView(viewList.get(position));\r\n\t\t\treturn viewList.get(position);\r\n\t\t}", "@Override\n public Object instantiateItem(ViewGroup container, int position) {\n return null;\n }", "@Override\r\n public Object instantiateItem(ViewGroup container, int position) {\n container.addView(mListViews.get(position), 0);\r\n return mListViews.get(position);\r\n }", "public Object instantiateItem(ViewGroup container, int position)\n {\n \n container.addView(mPagersList.get(position));\n return mPagersList.get(position);\n \n }", "@Override\r\n\tpublic Object instantiateItem(View container, int position) {\n\t\t((ViewPager)container).addView(mViews.get(position));\r\n\t\treturn mViews.get(position);\r\n\t}", "@Override\n public Object instantiateItem(ViewGroup container, int position) {\n View itemView = LayoutInflater.from(context).inflate(R.layout.pager_item, container, false);\n\n Resources res = context.getResources();\n String[] pagerContents = res.getStringArray(R.array.pagerContents);\n String[] pagerTitles = res.getStringArray(R.array.pagerTitles);\n\n int index = position - 1;\n if (position == 0) {\n index = count - 1;\n } else if (position == count + 1) {\n index = 0;\n }\n TextView title = (TextView) itemView.findViewById(R.id.viewPager_Title);\n TextView content = (TextView) itemView.findViewById(R.id.viewPager_Content);\n\n title.setText(pagerTitles[index]);\n content.setText(pagerContents[index]);\n\n\n container.addView(itemView);\n return itemView;\n }", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n\tpublic Object getItem(int position) \n\t{\n\t\treturn position;\n\t}", "@Override\n\tpublic Object instantiateItem(ViewGroup container, int position) {\n\n\t\tLayoutInflater inflater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);\n\t\tView page;\n\n\t\tLog.e(\"position == \", \"\" + position);\n\n\t\tpage = inflater.inflate(R.layout.featured_pager_item, null);\n\t\tImageView image = (ImageView) page.findViewById(R.id.imageView1);\n\t\tTextView title = (TextView) page.findViewById(R.id.textTitle);\n\t\tTextView textcontent = (TextView) page.findViewById(R.id.textContent);\n\t\tTextView textcontent1 = (TextView) page.findViewById(R.id.textContent1);\n\n\t\t// ().setBackgroundResource(urls.get(position));\n\t\t// Add the page to the front of the queue\n\t\tImageLoader loader = new ImageLoader(context);\n\n\t\t//loader.DisplayImage(MainActivity.featured.get(position).getShow_img(), image);\n\t\tPicasso.with(this.context).load(MainActivity.featured.get(position).getShow_img()).into(image);\n\t\ttitle.setText(MainActivity.featured.get(position).getTitle());\n\t\ttextcontent.setText(MainActivity.featured.get(position).getCat_name());\n\t\ttextcontent1.setText(\"Episodes: \" + MainActivity.featured.get(position).getNo_of_episode());\n\t\t((ViewPager) container).addView(page, 0);\n\n\n\t\treturn page;\n\t}", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn position;\r\n\t}", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn position;\r\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn position;\n\t}", "@Override\n public Object instantiateItem(ViewGroup container, int position) {\n String url = \"http://\" + ServerConfig.VTDRIP + \"/SD0/PHOTO/\" + mPhotoLists.get\n (position).getName();\n PhotoView photoView = new PhotoView(activity);\n Glide.with(activity).load(url).into(photoView);\n container.addView(photoView);\n\n photoView.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() {\n @Override\n public void onPhotoTap(View view, float v, float v1) {\n showTitleBar();\n }\n\n @Override\n public void onOutsidePhotoTap() {\n showTitleBar();\n }\n });\n return photoView;\n }", "@Override\n public Object instantiateItem(ViewGroup view, int position) {\n view.addView(images.get(position));\n return images.get(position);\n }", "@Override\n public Object instantiateItem(ViewGroup container, int position) {\n container.addView(mSplashPics.get(position));\n\n return mSplashPics.get(position);\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn getItem(position);\n\t}", "@Override\n\t\t\tpublic Object instantiateItem(ViewGroup container, int position) {\n\t\t\t\t\tView view = null;\n\t\t\t\t\tTextView index_tv = null;\n\t\t\t\t\tTextView title_tv = null;\n\t\t\t\t\tImageView scroll_iv = null;\n\t\t\t\t\tview = lin.inflate(R.layout.viewpager_layout, null);\n\t\t\t \tindex_tv = (TextView) view.findViewById(R.id.index_tv);\n\t\t\t title_tv = (TextView) view.findViewById(R.id.index_title_tv);\n\t\t\t \tscroll_iv = (ImageView) view.findViewById(R.id.scroll_iv);\n\t\t\t \t\n\t\t\t\t//感谢上帝在此处帮助我。\n\t\t\t\t\tNewsBean nb = course_list.get(position);\n\t\t \tindex_tv.setText((position+1)+\"/\"+course_list.size());\n\t\t \ttitle_tv.setText(nb.getTitle());\n\t\t \ttitle_tv.setSingleLine(true);\n\t\t \ttitle_tv.setEllipsize(android.text.TextUtils.TruncateAt.END);\n\t\t \tindex_tv.setBackgroundColor(Color.argb(120, 255, 0, 0));\n\t\t \ttitle_tv.setBackgroundColor(Color.argb(120, 0, 0, 0));\n\t\t \tmImageFetcher.loadImage(Constants.SERVER_URL + nb.getImage(), scroll_iv);\n\t\t \t\n\t\t ((ViewPager) container).addView(view, 0); \n\t\t return view;\n\t\t\t}", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object instantiateItem(ViewGroup container, int position) {\n ImageView imageView = new ImageView(getContext());\n imageView.setImageURI(m_step.getImage(position).getImageURI());\n\n container.addView(imageView, new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT\n ));\n return imageView;\n }", "public Object getItem(int position)\r\n {\n return position;\r\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn imageItem.get(position);\n\t}", "public Object getItem(int position) {\r\n\t\t\treturn position;\r\n\t\t}", "public Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "public Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "public Object getItem(int position) {\n\t\t\treturn position;\n\t\t}", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n public Object getItem(int position) {\n return position;\n }", "@Override\n\tpublic Object getItem(int position) {\n\t\treturn spiele.get(position);\n\t}", "@Override\r\n\t\tpublic Object getItem(int position) {\n\t\t\treturn null;\r\n\t\t}", "@Override\r\n\t\tpublic Object getItem(int position) {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\t\t\tpublic Object getItem(int position){\n\t\t\t\treturn null;\n\t\t\t}", "public Product getItem(int position) {\n return super.getItem(position);\n }", "@Override\r\n\t\t\tpublic Object getItem(int position) {\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n public Object getItem(int pos) {\n return mItems.get(pos);\n }", "public Object getItem(int position) {\n return position;\n }", "public Object getItem(int position) {\n return position;\n }", "public Object getItem(int position) {\n return position;\n }", "public Object getItem(int position) {\n return position;\n }", "public Object getItem(int position) {\n return position;\n }", "@Override\n public MyItem getItem(int position){\n return mItems.get(position);\n }", "@Override\n public Object instantiateItem(ViewGroup container, int position) {\n Fragment fragment = (Fragment) super.instantiateItem(container, position);\n registeredFragments.put(position, fragment);\n return fragment;\n }", "@Override\n\t\t\tpublic Object getItem(int position) {\n\t\t\t\treturn null;\n\t\t\t}", "public void getItem(int pos){\n getItemCard(itemList.get(pos).getId());\n itemPos = pos;\n }", "public Object getItem(int position) {\n return position;\n }", "public Object getItem(int position) {\n return position;\n }", "@Override\n\t\t\t\t\t\tpublic Object getItem(int position) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn null;\n\t\t}", "@Override\n\t\tpublic Object getItem(int position) {\n\t\t\treturn null;\n\t\t}" ]
[ "0.78069556", "0.7567638", "0.75309354", "0.7365308", "0.7321629", "0.7194566", "0.7186243", "0.70598406", "0.70598406", "0.70598406", "0.70598406", "0.70598406", "0.70598406", "0.70598406", "0.70598406", "0.7045528", "0.7042597", "0.7018311", "0.7018311", "0.7018311", "0.7018311", "0.7018311", "0.7018311", "0.7018311", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6987881", "0.6969313", "0.6959276", "0.69562715", "0.694219", "0.6898452", "0.68698907", "0.68698907", "0.68698907", "0.68698907", "0.68698907", "0.68698907", "0.68698907", "0.6816577", "0.6761408", "0.6749151", "0.67446625", "0.6738177", "0.6738177", "0.6738177", "0.6736266", "0.6736266", "0.6736266", "0.6736266", "0.6736266", "0.6736266", "0.6736266", "0.6736266", "0.6736266", "0.6736266", "0.6680589", "0.6672368", "0.6672368", "0.6669812", "0.666644", "0.6662531", "0.66536397", "0.66524297", "0.66524297", "0.66524297", "0.66524297", "0.66524297", "0.66499645", "0.66458493", "0.6640378", "0.6630741", "0.6623679", "0.6623679", "0.66215295", "0.6611936", "0.6611936", "0.6611936", "0.6611936", "0.6611936" ]
0.6983676
47
Return the number of matching entities in the database.
@Transactional(readOnly = true) public long countByCriteria(EstadoCandidaturaCriteria criteria) { log.debug("count by criteria : {}", criteria); final Specification<EstadoCandidatura> specification = createSpecification(criteria); return estadoCandidaturaRepository.count(specification); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int findAllCount() ;", "public int count() {\n\t Query count = getEntityManager().createQuery(\"select count(u) from \" + getEntityClass().getSimpleName() + \" u\");\n\t return Integer.parseInt(count.getSingleResult().toString());\n\t }", "public int count() {\n return Query.count(iterable);\n }", "public Integer entitiesCount() {\n return this.entitiesCount;\n }", "long countNumberOfProductsInDatabase();", "public long getPersonesCount()throws personNotFoundExeption{\n EntityManager em = emf.createEntityManager();\n try{\n long personesCount = (long)em.createQuery(\"SELECT COUNT(p) FROM Person p\").getSingleResult();\n return personesCount;\n }finally{ \n em.close();\n }\n }", "@Override\r\n\tpublic int count() throws StrumentoNotFoundException {\n\t\treturn (int) strumentoRepository.count();\r\n\t}", "public int count() {\r\n Session session = getSession();\r\n Long count = new Long(0);\r\n try {\r\n count = (Long) session.createQuery(\"select count(t) from \" + getPersistentClass().getName() + \" t \").uniqueResult();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in count Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return count.intValue();\r\n }", "public int getNumEntities()\n\t{\n\t\treturn this.entities.size();\n\t}", "public int findAllCount() {\n\t\treturn mapper.selectCount(null);\n\t}", "public int getMatchesRowNumber() {\n\t\tint nMatches = 0;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT COUNT(*) FROM \" + match_table;\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tnMatches = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn nMatches;\n\t}", "public Long getCountAllResults() {\n\n //create a querybuilder for count\n QueryBuilder queryBuilderCount = dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .join(joinBuilder)\n .add(getCurrentQueryRestrictions())\n .debug(debug);\n\n Long rowCount;\n //added distinct verification\n if (joinBuilder != null && joinBuilder.isDistinct()) {\n rowCount = queryBuilderCount.countDistinct(joinBuilder.getRootAlias());\n } else {\n rowCount = queryBuilderCount.count();\n }\n\n return rowCount;\n }", "@Override\r\n\tpublic int countAll() {\r\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\tFINDER_ARGS_EMPTY, this);\r\n\r\n\t\tif (count == null) {\r\n\t\t\tSession session = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsession = openSession();\r\n\r\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_SHARE);\r\n\r\n\t\t\t\tcount = (Long)q.uniqueResult();\r\n\r\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\r\n\t\t\t\t\tcount);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\t\tFINDER_ARGS_EMPTY);\r\n\r\n\t\t\t\tthrow processException(e);\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcloseSession(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn count.intValue();\r\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CAMPUS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int bookCount() {\r\n\t\tint rowCount = jdbcTemplate.queryForInt(\"select count(1) from persone\");\r\n\t\treturn rowCount;\r\n\t}", "@SuppressWarnings(\"deprecation\")\r\n\tprivate int countEntities(){\r\n\t\tQuery query = new Query(\"UserProfile\");\r\n\t\treturn datastore.prepare(query).countEntities();\r\n\t}", "public long countAllUserEntitys() {\n return userEntityRepository.count();\n }", "Object getNumberMatched();", "public static int getCountofPeople(){\n int training_set = 0;\n \n try (Connection con = DriverManager.getConnection(url, user, password)){\n String query = \"SELECT count(*) FROM \"+DATABASE_NAME+\".People;\";\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n if (rs.next()) {\n training_set = rs.getInt(1);\n }\n con.close();\n }catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return training_set;\n }", "int getResultsCount();", "int getResultsCount();", "public int numMatches();", "@Override\n\tpublic Integer findCount() {\n\t\tInteger total;\n\t\tString hql=\"from Commodity\";\n\t\tList<Commodity> commoditylist=(List<Commodity>) this.getHibernateTemplate().find(hql, null);\n\t\ttotal=commoditylist.size();\n\t\treturn total;\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_VCMSPORTION);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int findCount();", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_APPROVATORE);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "@Override\n\tpublic int findCounts(DetachedCriteria detachedCriteria) {\n\t\treturn scoreDao.findCounts(detachedCriteria);\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(\n\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_ANSWER);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception exception) {\n\t\t\t\tfinderCache.removeResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(exception);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "Long queryCount(ProductSearchParm productSearchParm);", "public int getSize(){\r\n return repo.findAll().size();\r\n }", "public int countAll() throws SQLException\n {\n return countWhere(\"\");\n }", "public int countAll() throws SQLException\n {\n return countWhere(\"\");\n }", "public int countAll() throws SQLException\n {\n return countWhere(\"\");\n }", "Long count();", "Long count();", "Long count();", "Long count();", "Long count();", "@Override\n\tpublic int queryCount() {\n\t\treturn (int) tBasUnitClassRepository.count();\n\t}", "@Override\n\tpublic int queryCountOfRows() {\n\t\treturn parentDao.queryCountOfRows();\n\t}", "@Transactional\n\tpublic Integer countProductImagess() {\n\t\treturn ((Long) productImagesDAO.createQuerySingleResult(\"select count(o) from ProductImages o\").getSingleResult()).intValue();\n\t}", "Long getAllCount();", "Long recordCount();", "public int countAll() throws DAOException;", "int get_row_count(String table) {\n //table does not exist\n if (!get_table_names().contains(table) && !table.equals(\"relationship\")) {\n throw new RuntimeException(\"Table does not exist.\");\n }\n\n //maybe use select count(id) from table instead\n String sql = \"select * from \" + table;\n int count = 0;\n\n ResultSet resultSet = execute_statement(sql, true);\n try {\n while (resultSet.next()) {\n count++; //count number of entities\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n\n try {\n this.disconnect(resultSet, null, null); //disconnect from database\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return count;\n }", "public int size()\n {\n return queries.size();\n }", "public int getCount() {\n\n int counter = 0;\n SQLiteDatabase db = getReadableDatabase();\n String GOALS_SELECT_QUERY =\n String.format(\"SELECT * FROM %s \", TABLE_GOALS);\n Cursor cursor = db.rawQuery(GOALS_SELECT_QUERY, null);\n\n try {\n counter = cursor.getCount();\n } catch (Exception e) {\n Log.d(TAG, \"Error while trying to get count from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n return counter;\n }", "int getQueriesCount();", "@Override\n public int countAll() {\n\n Query qry = this.em.createQuery(\n \"select count(assoc) \" +\n \"from WorkToSubjectEntity assoc\");\n\n return ((Long) qry.getSingleResult()).intValue();\n }", "public int getNumOfMatchedBets();", "public int countEntities(Map<String, Object> parms) {\n\t\treturn 0;\n\t}", "public int countEntities(Map<String, Object> parms) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_TESTUNIT);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "@Transactional(readOnly = true)\n\t@Override\n\tpublic long count() throws Exception {\n\t\treturn personaRepository.count();\n\t}", "public long countRecords();", "@Query(\"SELECT count(*) FROM DemoEntity d\")\r\n\tpublic Integer countDemo();", "public int searchRowsCount(SearchCriteria cri);", "public int getListCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n cursor.close();\n return cursor.getCount();\n }", "@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)\r\n\tpublic Integer queryCount() {\n\t\tInteger count = musicdao.selectCount();\r\n\t\treturn count;\r\n\t}", "public int query() {\n return count;\n }", "protected static int countQuestionByText(Question entity, Connection connection)\n throws ApplicationException {\n\n int result = 0;\n\n StringBuilder query = new StringBuilder(\"\");\n query.append(\"SELECT COUNT (*)\");\n query.append(\" FROM \" + TABLE);\n query.append(\" WHERE (\" + COL_QUESTION_TEXT);\n query.append(\" = ?\");\n query.append(\" AND \" + COL_REPORTED);\n query.append(\" <= 3);\");\n\n PreparedStatement statement = null;\n try {\n try {\n // set parameters and execute query\n statement = connection.prepareStatement(query.toString());\n statement.setString(1, entity.getQuestionText());\n ResultSet resultSet = statement.executeQuery();\n\n if (resultSet.next()) {\n result = resultSet.getInt(1);\n }\n } finally {\n if (statement != null) {\n statement.close();\n }\n }\n } catch (SQLException e) {\n throw new ApplicationException(\"Failed to fetch\", e);\n }\n\n return result;\n }", "public int countArticle(){\n\n DatabaseHelper databaseHelper = DatabaseHelper.getInstance(this.mExecutionContext);\n SQLiteDatabase sqLiteDatabase = databaseHelper.getReadableDatabase();\n\n Cursor Count= sqLiteDatabase.rawQuery(\"select count(*) from\"+ ConfigDAO.TABLE_AISLE, null);\n Count.moveToFirst();\n int count= Count.getInt(0);\n Count.close();\n return count;\n }", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(\n\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_PHATVAY);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int getcount() {\n\t\tString countQuery = \"SELECT * FROM \" + DATABASE_TABLE1;\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int cnt = cursor.getCount();\n\t cursor.close();\n\t return cnt;\n\t\n\t}", "public int numberOfRows(){\n SQLiteDatabase db = this.getReadableDatabase();\n int numRows = (int) DatabaseUtils.queryNumEntries(db,TABLE_NAME);\n return numRows;\n }", "long count(String query);", "long count(String query);", "@Override\n public long count() {\n String countQuery = \"SELECT COUNT(*) FROM \" + getTableName();\n return getJdbcTemplate().query(countQuery, SingleColumnRowMapper.newInstance(Long.class))\n .get(0);\n }", "default long count() {\n\t\treturn select(Wildcard.count).fetchCount();\n\t}", "public int size() {\n\t\treturn db.size();\n\t}", "public void executeRowCountCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT COUNT(*)\n // FROM Product p\n Criteria criteria = session.createCriteria(Product.class);\n criteria.setProjection(Projections.rowCount());\n\n displayObjectList(criteria.list());\n transaction.commit();\n }", "@IntRange(from = 0)\n public int getEntityCount() {\n return mEntityConfidence.getEntities().size();\n }", "public static int countQuestionByText(Question entity) throws ApplicationException {\n int result = 0;\n\n Connection connection = null;\n\n try {\n connection = ConnectionPool.getConnection();\n result = QuestionDatabaseAccess.countQuestionByText(entity, connection);\n } finally {\n ConnectionPool.releaseConnection(connection);\n }\n\n return result;\n }", "@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_PAPER);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "@Override\n public int countAll() throws SystemException {\n Long count = (Long) FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n FINDER_ARGS_EMPTY, this);\n\n if (count == null) {\n Session session = null;\n\n try {\n session = openSession();\n\n Query q = session.createQuery(_SQL_COUNT_ENTITYDEALER);\n\n count = (Long) q.uniqueResult();\n\n FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n FINDER_ARGS_EMPTY, count);\n } catch (Exception e) {\n FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n FINDER_ARGS_EMPTY);\n\n throw processException(e);\n } finally {\n closeSession(session);\n }\n }\n\n return count.intValue();\n }", "int countAssociations();", "public int countAll() {\n\t\treturn transactionDAO.countAll();\n\t}", "long getDbCount();", "public int size() {\n return results.size();\n }", "int findCountByCriteria(String eCriteria, Object... parameters);", "@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_COUNT));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(resultSet.next()){\n\t\t\t\tcountRows = resultSet.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn countRows;\n\t}", "@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_COUNT));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(resultSet.next()){\n\t\t\t\tcountRows = resultSet.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn countRows;\n\t}", "public int getMembreCount() {\n try {\n// CriteriaQuery cq = entManager.getCriteriaBuilder().createQuery();\n// Root<Membre> rt = cq.from(Membre.class);\n// cq.select(entManager.getCriteriaBuilder().count(rt));\n// Query q = entManager.createQuery(cq);\n// return ((Long) q.getSingleResult()).intValue();\n \n Query q = entManager.createNamedQuery(\"Membre.findAll\");\n return q.getResultList().size();\n \n } finally {\n// em.close();\n }\n }", "@Override\n\tpublic int incheoncount() throws Exception {\n\t\treturn dao.incheoncount();\n\t}", "int getGrammarMatchCount();", "private int countMatchingPerson(final ExpressionJpa expression) {\n\n int matchCount = 0;\n\n for (MarcDataField field700 : this.marcRecord.getDataFields(\"700\")) {\n for (String relatorSubfield : field700.getValueList('4')) {\n if (\"prf\".equals(relatorSubfield)\n || \"cnd\".equals(relatorSubfield)) {\n final String persAuthIdent =\n PersonMapper.getAuthIdent(field700);\n // now have a personIdent from the MarcRecord\n // is there a matching persisted personIdent\n // under the expression.realizedBy relationship\n for (ExpressionToResponsibleParty realizedBy :\n expression.getHasRealizers()) {\n // this should be a PersonJpa, but ...\n // TODO better way to screen ResponsiblePartyJpa subclasses?\n try {\n final PersonJpa responPers =\n (PersonJpa) realizedBy.\n getTargetResponsibleParty();\n if (persAuthIdent.equals(responPers.getAuthIdent())) {\n matchCount++;\n }\n } catch (ClassCastException notPerson) {\n // not a PersonJpa\n }\n }\n }\n }\n }\n\n return matchCount;\n }", "public int getSearchResultsCount() {\n return searchResultsList.size();\n }", "int getNumberOfResults();", "int getEntryCount();", "public long getCount() {\n return getCount(new BasicDBObject(), new DBCollectionCountOptions());\n }", "public int numberOfRows(){\n int numRows = (int) DatabaseUtils.queryNumEntries(db, TRACKINGS_TABLE_NAME);\n return numRows;\n }" ]
[ "0.72055745", "0.7112963", "0.7040392", "0.6930659", "0.6835712", "0.6823517", "0.6775256", "0.67737544", "0.6716066", "0.6703935", "0.66931164", "0.66503805", "0.66427094", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6639231", "0.6600916", "0.6595538", "0.65883136", "0.65668726", "0.65490055", "0.6548163", "0.65458274", "0.65458274", "0.6543795", "0.6542109", "0.65409493", "0.64883584", "0.6482766", "0.6469149", "0.6468853", "0.642194", "0.64217895", "0.64018846", "0.64018846", "0.64018846", "0.64006865", "0.64006865", "0.64006865", "0.64006865", "0.64006865", "0.63895786", "0.6381241", "0.6380681", "0.63747543", "0.63744247", "0.63663566", "0.63531417", "0.63497454", "0.6343935", "0.6340019", "0.6339959", "0.63278925", "0.63152474", "0.63152474", "0.6311246", "0.63079417", "0.6299475", "0.6294323", "0.62940884", "0.62934625", "0.6292069", "0.6289897", "0.6285537", "0.62807864", "0.6277845", "0.627098", "0.6258978", "0.6252132", "0.6252132", "0.62367713", "0.6224649", "0.62076414", "0.6200036", "0.6197492", "0.6197106", "0.6195209", "0.6191631", "0.6185228", "0.61812896", "0.6176652", "0.6166418", "0.61582184", "0.6155591", "0.6155591", "0.61554873", "0.615518", "0.61546546", "0.61495847", "0.61427605", "0.61326104", "0.61259687", "0.6124277", "0.61238605" ]
0.0
-1
Constructs a default LocalObject instance.
public LocalObject() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Local() {\n }", "@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }", "public Local createLocal(Position pos, LocalInstance li) {\n return (Local) xnf.Local(pos, xnf.Id(pos, li.name())).localInstance(li).type(li.type());\n }", "public LocalChannel() {\n\t\t}", "public THLocalGame createLocalGame() {\n\n return null;\n }", "OBJECT createOBJECT();", "private LocalParameters() {\n\n\t}", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }", "void createLocalClass()\n\t{\n\t\tfinal int localVar = 10;\n\t\t\n\t\t//this is to create local class\n\t\tclass LocalClass{\n\t\t\tpublic void print(){\n\t\t\t\tSystem.out.println(\"THis is local class with Id:\");\n\t\t\t\tSystem.out.println(\"THis is local class with num:\"+nums);\n\t\t\t\tSystem.out.println(\"THis is local class with num:\"+localVar); // localVar must be final. scope is different. the value might change inside local method.\n\t\t\t}\n\t\t}\n\t\t\n\t\tLocalClass l = new LocalClass();\n\t\tl.print();\n\t}", "public ObjectFactory() {\n\t}", "private static LocalCacheValue createLocalCacheValue(Object internalValue, long ldtCreation, ExpiryPolicy policy,\n JCacheSyntheticKind kind)\n {\n return new LocalCacheValue(internalValue, ldtCreation, policy, kind);\n }", "public ObjectFactory() {\r\n\t}", "private SingleObject()\r\n {\r\n }", "public DefaultObjectModel ()\n {\n this (new Schema ());\n }", "private SingleObject(){}", "public Local createLocal(Position pos, Local local) {\n return syn.createLocal(pos, local.localInstance());\n }", "static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "LocalReference createLocalReference();", "defaultConstructor(){}", "public LocalClient() {\n\t\tsuper(\"SERVER\", Arrays.asList(new String[] {\"*\"}), null, null);\n\t\tinputThread = new Thread(this);\n\t\tinputThread.start();\n\t}", "@JRubyMethod(name = \"new\")\n public static IRubyObject newObject(ThreadContext ctx, IRubyObject self) {\n return self.rbClone().callMethod(ctx, \"reset\");\n }", "public OreAPI() {\n\t\tthis(DEFAULT_URL, null);\n\t}", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.7339811", "0.61537445", "0.6083556", "0.6078274", "0.5988414", "0.59289634", "0.5893282", "0.58762175", "0.5829766", "0.5825046", "0.58094317", "0.5809245", "0.57507294", "0.5722788", "0.5710531", "0.56895566", "0.56523865", "0.5638541", "0.5638541", "0.5638541", "0.5618117", "0.5596567", "0.554498", "0.55254894", "0.55232507", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5512508", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747", "0.5495747" ]
0.8418152
0
Determines whether the two object references are equivalent, so far as the ORB can easily determine. Two object references are equivalent if they are identical. Two distinct object references which in fact refer to the same object are also equivalent. However, ORBs are not required to attempt determination of whether two distinct object references refer to the same object, since such determination could be impractically expensive. Default implementation of the org.omg.CORBA.Object method.
public boolean _is_equivalent(Object that) { return equals(that) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }", "boolean _is_equivalent(org.omg.CORBA.Object other);", "public static boolean isSameObject(Object a, Object b) {\n return Builtins.isSameObject(a, b);\n }", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }", "public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "public boolean equal(Object obj1, Object obj2) {\n\t\treturn obj1.equals(obj2);\r\n\t}", "private static boolean equiv(VObject src, VObject dst)\n {\n return ((src.getId() != null && src.getId().equals(dst.getId()))\n || (src.getSid() != null && src.getSid().equals(dst.getSid())) \n || (src.getName() != null && src.getName().equals(dst.getName())));\n }", "public static boolean equals(Object obj1, Object obj2)\n {\n return obj1 == obj2;\n }", "@NeededForTesting\n public static boolean areObjectsEqual(Object a, Object b) {\n return a == b || (a != null && a.equals(b));\n }", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public boolean equals(XObject obj2) {\n/* */ try {\n/* 262 */ if (4 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 268 */ return obj2.equals(this);\n/* */ }\n/* 270 */ if (1 == obj2.getType())\n/* */ {\n/* 272 */ return (bool() == obj2.bool());\n/* */ }\n/* 274 */ if (2 == obj2.getType())\n/* */ {\n/* 276 */ return (num() == obj2.num());\n/* */ }\n/* 278 */ if (4 == obj2.getType())\n/* */ {\n/* 280 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 282 */ if (3 == obj2.getType())\n/* */ {\n/* 284 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 286 */ if (5 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* 290 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* */ \n/* */ \n/* 294 */ return super.equals(obj2);\n/* */ \n/* */ }\n/* 297 */ catch (TransformerException te) {\n/* */ \n/* 299 */ throw new WrappedRuntimeException(te);\n/* */ } \n/* */ }", "public boolean equals(Object object);", "public boolean equals( Object obj );", "public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}", "public boolean equals(XObject obj2){\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.equals(this);\n if(null!=m_obj){\n return m_obj.equals(obj2.m_obj);\n }else{\n return obj2.m_obj==null;\n }\n }", "private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }", "public boolean equals(Object obj);", "public void testEqualsObject()\n {\n // Null check\n assertFalse(b1.equals(null));\n // Type mismatch\n assertFalse(b1.equals(\"a\"));\n\n // Reflexive\n assertTrue(b1.equals(b1));\n\n // In general, two empty boards\n assertTrue(b1.equals(b2));\n\n // Different contents\n b1.setCell(0, 0, Cell.RED1);\n assertFalse(b1.equals(b2));\n\n // Same Contents\n b2.setCell(0, 0, Cell.RED1);\n assertTrue(b1.equals(b2));\n\n // Some more complex cases\n b1.fromString(\"RRRBEEBBE\");\n assertFalse(b1.equals(b2));\n b2.fromString(\"RRRBEEBBE\");\n assertTrue(b1.equals(b2));\n\n }", "boolean equals(Object object);", "public boolean equals(Object obj) {\n // we must deproxy objects before comparison, because hibernate proxy could be received here\n AbstractEntity<ID> thisEntity = HibernateUtils.deproxy(this);\n Object otherEntity = HibernateUtils.deproxy(obj);\n\n ID id = thisEntity.getId();\n\n if (id != null && otherEntity != null && otherEntity.getClass().getName().equals(getClass().getName())) {\n return id.equals(((AbstractEntity) otherEntity).getId());\n }\n\n // fallback to reference equality, original object instance should be used there\n return super.equals(obj);\n }", "public static boolean equalObjects(Object o1, Object o2) {\n if (o1 == null) {\n return (o2 == null);\n } else if (o2 == null) {\n return false;\n } else {\n return o1.equals(o2);\n }\n }", "boolean canEqual(Object obj);", "boolean hasSameAs();", "public boolean equals(Object o);", "static public boolean testEquality(Object a, Object b) {\r\n\t\tif (a == null && b == null) // undefined == undefined\r\n\t\t\treturn true;\r\n\t\tif ((a == null || b == null) && (a instanceof JSNull || b instanceof JSNull)) // undefined or null\r\n\t\t\treturn true;\r\n\t\tif ((a == null && b instanceof JSNull) || (a == null && b instanceof JSNull)) // anything == undefined\r\n\t\t\treturn true;\r\n\t\tif (a == null || b == null) // anything equals null\r\n\t\t\treturn false;\r\n\t\treturn a.equals(b);\r\n\t}", "static public boolean areEqual(Object aThis, Object aThat) {\r\n // System.out.println(\"Object\");\r\n return aThis == null ? aThat == null : aThis.equals(aThat);\r\n }", "public static boolean equal(Object a, Object b) {\r\n\t\tif (a == b) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn a != null && b != null && a.equals(b);\r\n\t}", "boolean hasIsEquivalent();", "public boolean equals(Object paramObject) {\n/* 124 */ if (paramObject != null && paramObject instanceof BinaryRefAddr) {\n/* 125 */ BinaryRefAddr binaryRefAddr = (BinaryRefAddr)paramObject;\n/* 126 */ if (this.addrType.compareTo(binaryRefAddr.addrType) == 0) {\n/* 127 */ if (this.buf == null && binaryRefAddr.buf == null)\n/* 128 */ return true; \n/* 129 */ if (this.buf == null || binaryRefAddr.buf == null || this.buf.length != binaryRefAddr.buf.length)\n/* */ {\n/* 131 */ return false; } \n/* 132 */ for (byte b = 0; b < this.buf.length; b++) {\n/* 133 */ if (this.buf[b] != binaryRefAddr.buf[b])\n/* 134 */ return false; \n/* 135 */ } return true;\n/* */ } \n/* */ } \n/* 138 */ return false;\n/* */ }", "boolean equals(Object obj);", "boolean equals(Object obj);", "public static boolean sameVersion(Object o1, Object o2) {\r\n checkVersionable(o1);\r\n checkVersionable(o2);\r\n return ((Versionable) o1).getVersionId() ==\r\n ((Versionable) o2).getVersionId();\r\n }", "public static boolean defaultEquals(DataValue obj1, Object obj2) {\r\n if (obj1 == obj2) return true;\r\n if (obj2 == null) return false;\r\n if (!(obj2 instanceof DataValue)) return false;\r\n DataValue other = (DataValue) obj2;\r\n if (!obj1.getName().equals(other.getName())) return false;\r\n if (obj1.getObject() == null) {\r\n if (other.getObject() != null) return false;\r\n } else if (obj1.getObject().getClass().isArray()) {\r\n if (!other.getObject().getClass().isArray()) return false;\r\n return Arrays.equals((byte[]) obj1.getObject(), (byte[]) other.getObject());\r\n } else {\r\n if (!obj1.getObject().equals(other.getObject())) return false;\r\n }\r\n return true;\r\n }", "@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }", "public static boolean m9055a(Object obj, Object obj2) {\n return obj == null ? obj2 == null : obj.equals(obj2);\n }", "public boolean mojeEquals(Obj o1, Obj o2) {\r\n\t\t//System.out.println(o1.getName() + \" \" + o2.getName());\r\n\t\tboolean sameRight = true; // 21.06.2020. provera prava pristupa\r\n\t\tboolean sameName = true;\t// 22.06.2020. ako nisu metode ne moraju da imaju isto ime\r\n\t\tboolean sameArrayType = true; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t\t\r\n\t\tif (o1.getKind() == Obj.Meth && o2.getKind() == Obj.Meth) {\r\n\t\t\tsameRight = o1.getFpPos() == o2.getFpPos()+10; \r\n\t\t\tsameName = o1.getName().equals(o2.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (o1.getType().getKind() == Struct.Array && o2.getType().getKind() == Struct.Array) {\r\n\t\t\t\tif (!(o1.getType().getElemType() == o2.getType().getElemType())) { // ZA KLASE MOZDA TREBA equals\r\n\t\t\t\t\tsameArrayType = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 16.08.2020.\r\n//\t\tif (o1.getType().getKind() == Struct.Class || o1.getType().getKind() == Struct.Interface)\r\n//\t\t\treturn true;\r\n\t\t\r\n\t\t\r\n\t\treturn o1.getKind() == o2.getKind() \r\n\t\t\t\t&& sameName\r\n\t\t\t\t&& o1.getType().equals(o2.getType())\r\n\t\t\t\t&& /*adr == other.adr*/ o1.getLevel() == o2.getLevel()\r\n\t\t\t\t&& equalsCompleteHash(o1.getLocalSymbols(), o2.getLocalSymbols())\r\n\t\t\t\t&& sameRight // 21.06.2020. provera prava pristupa\r\n\t\t\t\t&& sameArrayType; //22.6.2020 ako je parametar niz mora isti tip niza da bude\r\n\t}", "public static boolean m66061a(Object obj, Object obj2) {\n return obj == obj2 || (obj != null && obj.equals(obj2));\n }", "public static boolean equals(Object object1, Object object2) {\n if (object1 == object2) {\n return true;\n }\n if ((object1 == null) || (object2 == null)) {\n return false;\n }\n return object1.equals(object2);\n }", "@Test\r\n\tpublic void testEquality(){\n\t\t assertEquals(object1, object2);\r\n\t}", "public abstract boolean equals(Object o);", "public static final boolean m1454equalsimpl0(Object obj, Object obj2) {\n return Intrinsics.areEqual(obj, obj2);\n }", "public boolean equals(Object t) {\n if (!(t instanceof ReferenceType)) return false;\n ReferenceType r = (ReferenceType) t;\n if (typeClass() != null) return typeClass().equals(r.typeClass());\n return name.equals(r.name);\n }", "public void testObjEqual()\n {\n assertEquals( true, Util.objEqual(null,null) );\n assertEquals( false,Util.objEqual(this,null) );\n assertEquals( false,Util.objEqual(null,this) );\n assertEquals( true, Util.objEqual(this,this) );\n assertEquals( true, Util.objEqual(\"12\",\"12\") );\n }", "public static boolean equal(Object o1, Object o2) {\n\t\tif (o1 == null) {\n\t\t\treturn o2 == null;\n\t\t} else {\n\t\t\treturn o1.equals(o2);\n\t\t}\n\t}", "public abstract boolean equals(Object other);", "public boolean equals (Object object)\n {\n return\n ( object instanceof RefDocTypePair &&\n ((RefDocTypePair)object).getFromDocType() == this.fromDocType &&\n ((RefDocTypePair)object).getToDocType() == this.toDocType );\n }", "public static boolean notEqual(Object object1, Object object2) {\n return ObjectUtils.equals(object1, object2) == false;\n }", "public boolean equals(Object otherObject)\n {\n boolean isEqual = super.equals(otherObject);\n\n if(isEqual)\n {\n if(getClass() == otherObject.getClass())\n {\n isEqual = true;\n }\n else\n {\n isEqual = false;\n }\n }\n\n return isEqual;\n }", "public void testEqualsObject() {\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.0\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.1\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.2\")); //$NON-NLS-1$\n\t\t\tif (tipo1 != tipo1)\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.3\")); //$NON-NLS-1$\n\t\t\tif (!tipo1.equals(tipo2))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.4\"));\t\t\t //$NON-NLS-1$\n\t\t\tif (tipo1.equals(tipo3))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.5\"));\t //$NON-NLS-1$\n\t\t}", "@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equals(object));\n assertTrue(\"attribute not equal to object\", object.equals(attribute));\n\n // current implementation checks only for identity\n// final Attribute clonedAttribute = (Attribute) attribute.clone();\n// assertTrue(\"attribute not equal to its clone\", attribute.equals(clonedAttribute));\n// assertTrue(\"clone not equal to attribute\", clonedAttribute.equals(attribute));\n\t}", "private static boolean m4280b(Object obj, Object obj2) {\n if (obj != obj2) {\n if (obj == null || obj.equals(obj2) == null) {\n return null;\n }\n }\n return true;\n }", "public boolean equalsImpl(Object obj)\n {\n boolean ivarsEqual = true;\n\n final EntityTypeVP rhs = (EntityTypeVP)obj;\n\n if( ! (recordType == rhs.recordType)) ivarsEqual = false;\n if( ! (changeIndicator == rhs.changeIndicator)) ivarsEqual = false;\n if( ! (entityType.equals( rhs.entityType) )) ivarsEqual = false;\n if( ! (padding == rhs.padding)) ivarsEqual = false;\n if( ! (padding1 == rhs.padding1)) ivarsEqual = false;\n return ivarsEqual;\n }", "@Override\n public boolean equals(Object object) {\n if ( !getClass().isInstance(object)) {\n return false;\n }\n\n DocumentBase other = (DocumentBase)object;\n if (this.getId() != other.getId() && (this.getId() == null || !this.getId().equals(other.getId()))) return false;\n return true;\n }", "public boolean isIdentical(Object o) {\n if (equals(o)) {\n Contact contact = (Contact) o;\n return firstName.equals(contact.firstName)\n && lastName.equals(contact.lastName)\n && phone.equals(contact.phone)\n && email.equals(contact.email)\n && dateOfBirth.equals(contact.dateOfBirth)\n && notes.equals(contact.notes);\n }\n\n return false;\n }", "public boolean realEquals(Object o){\n\t\treturn keywords.equals(o);\n\t}", "public static void main(String[] args) {\nAddress addobj = new Address();\r\nAddress addobj2=new Address();\r\n\r\nSystem.out.println(\"addobj: \"+addobj);\r\nSystem.out.println(\"addobj2: \"+addobj2);\r\nSystem.out.println(addobj==addobj2);\r\n//System.out.println(addobj.equals(addobj2));\r\n\r\naddobj.name=\"F\";\r\naddobj.zip=94536;\r\naddobj2.name=\"F\";\r\naddobj2.zip=94536;\r\n\r\nSystem.out.println(addobj.equals(addobj2));\r\n\r\n\r\n}", "public final void testSameObjectEquals() {\n final Transaction copy = testTransaction1;\n assertTrue(testTransaction1.equals(copy)); // pmd doesn't like either\n // way\n\n }", "public static void main(String[] args) {\n \n String s1 = new String(\"abc\"); // new address space created\n String s2 = new String(\"xyz\");\n String s3 = new String(\"xyz\");\n String s4 = \"xyz\";\n String s5 = \"xyz\";\n System.out.println(\"s1 == s2 \" + s1 == s2);\n System.out.println(\"s1.equals(s2) \" + s1.equals(s2));\n System.out.println(\"s2.equals(s3) \" + s2.equals(s3));\n System.out.println(\"s2 == s3 \" + s2 == s3);\n System.out.println(\"s4 == s5 \" + s4 == s5);\n System.out.println(\"s4.equals(s5) \" + s4.equals(s5));\n \n // == operator comparison with null is always false\n \n System.out.println(\"s1 == null \" + (s1 == null));\n \n // null == null comparison results in always true\n System.out.println( \"null == null \" + (null == null));\n \n // equality operators can be applied everywhere \n // boolean\n // primitives\n // objects conditions [ there should be some relation \n // between reference type else it will result in compile time error]\n \n \n //******************************************************************\n // EQUALS METHOD\n //******************************************************************\n //Equals method present in the object class is meant for reference comparison \n // if we want to content comparison then we need to over-ride the method in the child class.\n \n \n // When do we need to override equals method?\n // It is when a class has a\n // notion of logical equality that differs from mere object identity and a\n // superclass has not already overridden equals.\n \n // What is a value classes\n // Value classes are classes which represent some values such as Integer or String.\n // Over here when we want to check\n \n // A programmer who compares references to value\n // objects using the equals method expects to find out whether they are\n // logically equivalent, not whether they refer to the same object\n \n //******************************************************************\n // EQUALS METHOD RELATION WITH REFERENCE OPERATOR\n //******************************************************************\n \n // CASE 1: IF R1 == R2 is TRUE then R1.equals(R2) is always TRUE\n // CASE 2: IF R1 == R2 is FALSE then R1.equals(R2) maybe true(when equals method has been overridden) and \n // FALSE when equals method has not been overridden\n // CASE 3: IF R1.equals(R2) is TRUE then R1 == R2 maybe true (if equals method had not been overridden) and \n // false if not overridden\n // CASE 4: IF R1.equals(R2) false then R1 == R2 is always FALSE\n \n StringBuffer sb1 = new StringBuffer(\"1\");\n StringBuffer sb2 = new StringBuffer(\"1\");\n String str1 = new String (\"1\");\n System.out.println(\"str1.equals(sb1) \" + str1.equals(sb1)); \n \n //INTERESTING CONCLUSION WHEN COMPARED WITH NULL BOTH == operator and equals method will return null\n System.out.println(\"sb1 == null \" + (sb1 == null));\n System.out.println(\"sb1.equals(null) \" + sb1.equals(null));\n \n //When we want to use == operator then the reference type must have some sort of relation \n // either R1 or R2 must be of same type\n // either R1 must be parent of R2\n // either R1 must be child of R2 \n // else it will result in compilation error ie incomparable types.\n \n String s11 = new String(\"amitabh\");\n String s21 = new String(\"amitabh\");\n \n System.out.println( \"s11.equals(s21) \" + s11.equals(s21) );\n System.out.println( \"s11.hashCode() == s21.hashCode() \" + (s11.hashCode() == s21.hashCode() ));\n \n //Thus from the above we can conclude that the equals and hashcode methods have been overridden in the case\n //of string for content comparison\n \n StringBuffer sb11 = new StringBuffer(\"amitabh\");\n StringBuffer sb21 = new StringBuffer(\"amitabh\");\n \n System.out.println( \"sb11.equals(s21) \" + sb11.equals(sb21) );\n System.out.println( \"sb11.hashCode() == sb21.hashCode() \" + (sb11.hashCode() == sb21.hashCode() ));\n \n // Thus from the above we can conclude that the equals method is not overridden for content comparison \n // and hashcode methods has also not been overridden in the case\n // of string for content comparison\n }", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public native boolean __equals( long __swiftObject, java.lang.Object arg0 );", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "public static void main(String[] args) {\n\t\tObjectWithoutEquals noEquals = new ObjectWithoutEquals(1, 10.0);\n\n\t\t// This class includes an implementation of hashCode and equals\n\t\tObjectWithEquals withEquals = new ObjectWithEquals(1, 10.0);\n\n\t\t// Of course, these two instances are not going to be equal because they\n\t\t// are instances of two different classes.\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ withEquals.equals(noEquals));\n\t\tSystem.out.println(\"Two instances of difference classes, equal?: \"\n\t\t\t\t+ noEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Now, let's create two more instances of these classes using the same\n\t\t// input parameters.\n\t\tObjectWithoutEquals noEquals2 = new ObjectWithoutEquals(1, 10.0);\n\t\tObjectWithEquals withEquals2 = new ObjectWithEquals(1, 10.0);\n\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// If you do not implement the equals method, then equals only returns\n\t\t// true if the two variables are referring to the same instance.\n\n\t\tSystem.out.println(\"Same instance of ObjectWithoutEquals, equal?: \"\n\t\t\t\t+ noEquals.equals(noEquals));\n\t\tSystem.out.println(\"Same instance of ObjectWithEquals, equal?: \"\n\t\t\t\t+ withEquals.equals(withEquals));\n\t\tSystem.out.println();\n\n\t\t// Of course, the exact same instance should be equal to itself.\n\n\t\t// Also, the == operator checks if the instance on the left and right of\n\t\t// the operator are referencing the same instance.\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, ==: \"\n\t\t\t\t+ (noEquals == noEquals2));\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, ==: \"\n\t\t\t\t+ (withEquals == withEquals2));\n\t\tSystem.out.println();\n\t\t// Which in this case, they are not.\n\n\t\t//\n\t\t// How the equals method is used in Collections\n\t\t//\n\n\t\t// The behavior of the equals method can influence how other things work\n\t\t// in Java.\n\t\t// For example, if these instances where included in a Collection:\n\t\tList<ObjectWithoutEquals> noEqualsList = new ArrayList<ObjectWithoutEquals>();\n\t\tList<ObjectWithEquals> withEqualsList = new ArrayList<ObjectWithEquals>();\n\n\t\t// Add the first two instances that we created earlier:\n\t\tnoEqualsList.add(noEquals);\n\t\twithEqualsList.add(withEquals);\n\n\t\t// If we check if the list contains the other instance that we created\n\t\t// earlier:\n\t\tSystem.out.println(\"List of ObjectWithoutEquals, contains?: \"\n\t\t\t\t+ noEqualsList.contains(noEquals2));\n\t\tSystem.out.println(\"List of ObjectWithEquals, contains?: \"\n\t\t\t\t+ withEqualsList.contains(withEquals2));\n\t\tSystem.out.println();\n\n\t\t// The class with no equals method says that it does not contain the\n\t\t// instance even though there is an instance with the same parameters in\n\t\t// the List.\n\n\t\t// The class with an equals method does contain the instance as\n\t\t// expected.\n\n\t\t// So, if you try to use the values as keys in a Map:\n\t\tMap<ObjectWithoutEquals, Double> noEqualsMap = new HashMap<ObjectWithoutEquals, Double>();\n\t\tnoEqualsMap.put(noEquals, 10.0);\n\t\tnoEqualsMap.put(noEquals2, 20.0);\n\n\t\tMap<ObjectWithEquals, Double> withEqualsMap = new HashMap<ObjectWithEquals, Double>();\n\t\twithEqualsMap.put(withEquals, 10.0);\n\t\twithEqualsMap.put(withEquals2, 20.0);\n\n\t\t// Then the Map using the class with the default equals method\n\t\t// will contain two keys and two values, while the Map using the class\n\t\t// with an equals method will only have one key and one value\n\t\t// (because it knows that the two keys are equal).\n\t\tSystem.out.println(\"Map using ObjectWithoutEquals: \" + noEqualsMap);\n\t\tSystem.out.println(\"Map using ObjectWithEquals: \" + withEqualsMap);\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// The hashCode method\n\t\t//\n\n\t\t// Another method used by Collections is the hashCode method. If the\n\t\t// equals method says that two instances are equal, then the hashCode\n\t\t// method should generate the same int.\n\n\t\t// The hashCode value is used in Maps\n\t\tSystem.out.println(\"Two instances of ObjectWithoutEquals, hashCodes?: \"\n\t\t\t\t+ noEquals.hashCode() + \" and \" + noEquals2.hashCode());\n\t\tSystem.out.println(\"Two instances of ObjectWithEquals, hashCodes?: \"\n\t\t\t\t+ withEquals.hashCode() + \" and \" + withEquals2.hashCode());\n\t\tSystem.out.println();\n\n\t\t// Since the default hashCode method is overridden in the\n\t\t// ObjectWithEquals class, the two instances return the same int value.\n\n\t\t// The hashCode method is not required to give a unique value\n\t\t// for every unequal instance, but performance can be improved by having\n\t\t// the hashCode method generate distinct values.\n\n\t\t// For example:\n\t\tMap<ObjectWithEquals, Integer> mapUsingDistinctHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\t\tMap<ObjectWithEquals, Integer> mapUsingSameHashCodes = new HashMap<ObjectWithEquals, Integer>();\n\n\t\t// Now add 10,000 objects to each map\n\t\tfor (int i = 0; i < 10000; i++) {\n\t\t\t// Uses the hashCode in ObjectWithEquals\n\t\t\tObjectWithEquals distinctHashCode = new ObjectWithEquals(i, i);\n\t\t\tmapUsingDistinctHashCodes.put(distinctHashCode, i);\n\n\t\t\t// The following overrides the hashCode method using an anonymous\n\t\t\t// inner class.\n\t\t\t// We will get to anonymous inner classes later... the important\n\t\t\t// part is that it returns the same hashCode no matter what values\n\t\t\t// are given to the constructor, which is a really bad idea!\n\t\t\tObjectWithEquals sameHashCode = new ObjectWithEquals(i, i) {\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 31;\n\t\t\t\t}\n\t\t\t};\n\t\t\tmapUsingSameHashCodes.put(sameHashCode, i);\n\t\t}\n\n\t\t// Iterate over the two maps and time how long it takes\n\t\tlong startTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingDistinctHashCodes.keySet()) {\n\t\t\tint i = mapUsingDistinctHashCodes.get(key);\n\t\t}\n\n\t\tlong endTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using distinct hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\n\t\tstartTime = System.nanoTime();\n\n\t\tfor (ObjectWithEquals key : mapUsingSameHashCodes.keySet()) {\n\t\t\tint i = mapUsingSameHashCodes.get(key);\n\t\t}\n\n\t\tendTime = System.nanoTime();\n\n\t\tSystem.out.println(\"Time required when using same hashCodes: \"\n\t\t\t\t+ (endTime - startTime));\n\t\tSystem.out.println();\n\n\t\t//\n\t\t// Warning about hashCode method\n\t\t//\n\n\t\t// You can run into trouble if your hashCode is based on a value that\n\t\t// could change.\n\t\t// For example, we create an instance with a custom hashCode\n\t\t// implementation:\n\t\tObjectWithEquals withEquals3 = new ObjectWithEquals(1, 10.0);\n\n\t\t// Create the Map and add the instance as a key\n\t\tMap<ObjectWithEquals, Double> withEquals3Map = new HashMap<ObjectWithEquals, Double>();\n\t\twithEquals3Map.put(withEquals3, 100.0);\n\n\t\t// Print some info about Map before changing attribute\n\t\tSystem.out.println(\"Map before changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map before changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// Now we change one of the values that the hashCode is based on:\n\t\twithEquals3.setX(123);\n\n\t\t// See what the Map look like now\n\t\tSystem.out.println(\"Map after changing attribute of key: \"\n\t\t\t\t+ withEquals3Map);\n\t\tSystem.out\n\t\t\t\t.println(\"Map after changing attribute, does it contain key: \"\n\t\t\t\t\t\t+ withEquals3Map.containsKey(withEquals3));\n\t\tSystem.out.println();\n\n\t\t// What is the source of this problem?\n\t\t// So, even though we used the same instance to put a value in the Map,\n\t\t// the Map does not recognize that the key is in the Map if an attribute\n\t\t// that is being used by the hashCode method is changed.\n\t\t// This can create some really confusing behavior!\n\n\t\t//\n\t\t// Final notes about equals and hashCode\n\t\t//\n\n\t\t// Also, Eclipse has a nice feature for generating the equals and\n\t\t// hashCode methods (Source -> Generate hashCode and equals methods), so\n\t\t// I would recommend using this feature if you need to implement these\n\t\t// methods. The source generator allows you to choose which attributes\n\t\t// should be used in the equals and hashCode methods.\n\n\t\t// GOOD CODING PRACTICE:\n\t\t// When working with objects, it is good to know if you are working with\n\t\t// the same instances over and over again or if you are expected to do\n\t\t// comparisons between different instances that may actually be equal.\n\t\t//\n\t\t// Also, if you override the hashCode method, if possible have the\n\t\t// hashCode be based on immutable data (data that cannot change value).\n\t}", "@JRubyMethod(name = \"==\", required = 1)\n public static IRubyObject op_equal(ThreadContext ctx, IRubyObject self, IRubyObject oth) {\n RubyString str1, str2;\n RubyModule instance = (RubyModule)self.getRuntime().getModule(\"Digest\").getConstantAt(\"Instance\");\n if (oth.getMetaClass().getRealClass().hasModuleInHierarchy(instance)) {\n str1 = digest(ctx, self, null).convertToString();\n str2 = digest(ctx, oth, null).convertToString();\n } else {\n str1 = to_s(ctx, self).convertToString();\n str2 = oth.convertToString();\n }\n boolean ret = str1.length().eql(str2.length()) && (str1.eql(str2));\n return ret ? self.getRuntime().getTrue() : self.getRuntime().getFalse();\n }", "boolean equivalent(Concept x, Concept y);", "public final boolean equals(Object obj) {\r\n return this == obj;\r\n }", "public static boolean equalQuick(final Object a, final Object b) {\n \treturn a == b || ((a != null & b != null) && a.equals(b));\n }", "@Override public boolean equals(Object object);", "public void testEquals(PCEPObject object1, PCEPObject object2) {\n \tInteger test1=new Integer(2);\n\t\tobject1.equals(test1);\n \t//Test same object\n \tobject1.equals(object1);\n \t//Test change in parent\n \tobject2.setObjectClass(object1.getObjectClass()+1);\n \tobject1.equals(object2);\n \tobject2.setObjectClass(object1.getObjectClass());\n \t//Test changes in fields\n\t\tList<Field> fieldListNS = new ArrayList<Field>();\n\t\tList<Field> fieldList= Arrays.asList(object1.getClass().getDeclaredFields());\n\t\tfor (Field field : fieldList) {\n\t\t\tfieldListNS.add(field);\n\t\t\tType ty=field.getGenericType();\n\t\t\tif (!java.lang.reflect.Modifier.isStatic(field.getModifiers())) {\n\t\t\t\tif (ty instanceof Class){\n\t\t\t\t\tClass c =(Class)ty;\n\t\t\t\t\tSystem.out.println(\"XXXXXXXXXXXXXXXXXClass name: \"+c.getName()); \n\t\t\t\t\tMethod method;\n\t\t\t\t\tMethod methods;\n\t\t\t\t\tif (c.isPrimitive()){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (c.getName().equals(\"boolean\")) {\n\t\t\t\t\t\t\tmethod = object1.getClass().getMethod(\"is\"+field.getName().replaceFirst(field.getName().substring(0, 1), field.getName().substring(0, 1).toUpperCase()));\n\t\t\t\t\t\t\tmethods = object2.getClass().getMethod(\"set\"+field.getName().replaceFirst(field.getName().substring(0, 1), field.getName().substring(0, 1).toUpperCase()),boolean.class);\n\t\t\t\t\t\t\tif (((boolean)method.invoke(object1,null))==true) {\n\t\t\t\t\t\t\t\tmethods.invoke(object2,false);\n\t\t\t\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tmethods.invoke(object2,true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tobject1.equals(object2);\n\t\t\t\t\t\t\tmethods.invoke(object2,(boolean)method.invoke(object1,null));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tmethod = object1.getClass().getMethod(\"get\"+field.getName().replaceFirst(field.getName().substring(0, 1), field.getName().substring(0, 1).toUpperCase()));\n\t\t\t\t\t\t\tmethods = object2.getClass().getMethod(\"set\"+field.getName().replaceFirst(field.getName().substring(0, 1), field.getName().substring(0, 1).toUpperCase()),c);\n\t\t\t\t\t\t\tmethods.invoke(object2,77);\n\t\t\t\t\t\t\tobject1.equals(object2);\n\t\t\t\t\t\t\tmethods.invoke(object2,method.invoke(object1,null));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \t\n }", "private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.Bag b1, Automaton.Bag b2) {\n\t\tint b1_size = b1.size();\n\t\tint b2_size = b2.size();\n\n\t\tif (b1_size != b2_size) {\n\t\t\t// Observe that, unlike a set, the size of a bag will never be\n\t\t\t// changed by the identification of equivalent states. Therefore,\n\t\t\t// the size of both collection must be identical, otherwise they can\n\t\t\t// never be equivalent.\n\t\t\treturn false;\n\t\t}\n\n\t\tint[] b1_children = b1.children;\n\t\tint[] b2_children = b2.children;\n\t\t// maps vertices in b2 to those they are matched against in b1\n\t\tint[] matches = new int[b1_size];\n\t\tArrays.fill(matches, -1);\n\t\t// Used to ensure no vertex is explored more than once during\n\t\t// reconfiguration.\n\t\tboolean[] visited = new boolean[b1_size];\n\t\t\n\t\t// For every state in s1\n\t\tfor (int i = 0; i != b1_size; ++i) {\n\t\t\tint b1_child = b1_children[i];\n\t\t\tif(b1_child < 0) {\n\t\t\t\t// In this case, we have to do something different.\n\t\t\t\tif(!findNegativeMatch(i,b1_children,b2_children,equivs,matches)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tArrays.fill(visited,false);\n\t\t\t\tif(!findMatch(i,b1_children,b2_children,equivs,matches,visited)) {\n\t\t\t\t\t// If we can't find a match, then it's game over and we know for\n\t\t\t\t\t// sure these two states are not equivalent.\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean checker(Object primObj, Object equalObj, Object diffObj) {\n logger.log(Level.FINE, \"Primary object:: \" + primObj);\n logger.log(Level.FINE,\n \"Object that is equal to the primary one:: \" + equalObj);\n logger.log(Level.FINE,\n \"Object that is different from the primary one:: \" + diffObj);\n\n if (!primObj.equals(equalObj)) {\n logger.log(Level.FINE, primObj + \" isn't equal to \" + equalObj);\n return false;\n }\n\n if (primObj.equals(diffObj)) {\n logger.log(Level.FINE, primObj + \" is equal to \" + diffObj);\n return false;\n }\n\n /*\n * Check that toString() method invoked twice on the same object\n * produces equal String objects\n */\n logger.log(Level.FINE,\n \"Check that toString() method invoked twice on the same object\"\n + \" produces equal String objects ...\");\n String str1 = primObj.toString();\n String str2 = primObj.toString();\n\n if (!(str1.equals(str2))) {\n logger.log(Level.FINE,\n \"toString() method invoked twice on the same object\"\n + \" produces non-equal String objects:\\n\" + str1 + \"\\n\"\n + str2);\n return false;\n }\n logger.log(Level.FINE, \"\\tpassed\");\n\n /*\n * Check that 2 equal objects have equal string representations\n */\n logger.log(Level.FINE,\n \"Check that 2 equal objects have equal string\"\n + \" representations ...\");\n String primObj_str = primObj.toString();\n String equalObj_str = equalObj.toString();\n\n if (!(primObj_str.equals(equalObj_str))) {\n logger.log(Level.FINE,\n \"2 equal objects have non-equal string representations:\\n\"\n + primObj_str + \"\\n\" + equalObj_str);\n return false;\n }\n logger.log(Level.FINE, \"\\tpassed\");\n return true;\n }", "@Test\n public void equalsTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0, entity1);\n }", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\tproduit p = (produit) arg0;\n\t\treturn this.reference.equals(p.reference);\n\t}", "@Test\n\tpublic void objectEqualsTest() {\n\t\tAssert.assertEquals(service1, service2);\n\t\tAssert.assertSame(service1, service2);\n\t}", "protected boolean safeEquals(Object one, Object two) {\r\n\t\treturn one == null ? two == null : one.equals(two);\r\n\t}", "public boolean equals(Object otherObj)\n {\n Strand other = (Strand)otherObj;\n //TODO: determine if the two strands are equal.\n // Strands are equal if they have the same type,\n // have the same length, and have identical\n // sequences.\n \n return false;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn EqualsBuilder.reflectionEquals(this, obj);\n\t}", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n\n if (TkRefexAbstractMember.class.isAssignableFrom(obj.getClass())) {\n TkRefexAbstractMember<?> another = (TkRefexAbstractMember<?>) obj;\n\n // =========================================================\n // Compare properties of 'this' class to the 'another' class\n // =========================================================\n // Compare refsetUuid\n if (!this.refexUuid.equals(another.refexUuid)) {\n return false;\n }\n\n // Compare componentUuid\n if (!this.componentUuid.equals(another.componentUuid)) {\n return false;\n }\n\n // Compare their parents\n return super.equals(obj);\n }\n\n return false;\n }", "public boolean equivalent(Tradeoff trade)\r\n\t{\r\n\t\tboolean eq = false;\r\n\t\tif ((trade.getOnt1().toString().equals(ont1.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont2.toString())))\r\n\t\t\teq = true;\r\n\t\telse if ((trade.getOnt1().toString().equals(ont2.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont1.toString())))\r\n\t\t\teq = true;\r\n\t\treturn eq;\r\n\t}", "public final boolean equals(java.lang.Object r2) {\n /*\n r1 = this;\n if (r1 == r2) goto L_0x0015\n boolean r0 = r2 instanceof com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice\n if (r0 == 0) goto L_0x0013\n com.ss.android.ugc.aweme.notice.repo.list.bean.PostNotice r2 = (com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice) r2\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r1.aweme\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r2.aweme\n boolean r2 = kotlin.jvm.internal.C7573i.m23585a(r0, r2)\n if (r2 == 0) goto L_0x0013\n goto L_0x0015\n L_0x0013:\n r2 = 0\n return r2\n L_0x0015:\n r2 = 1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.notice.repo.list.bean.PostNotice.equals(java.lang.Object):boolean\");\n }", "public abstract boolean doEquivalent(T t, T t2);", "@Override public boolean equals(Object o) { // since 1.3.1\n // should these ever match actually?\n return (o == this);\n }", "public boolean equivalent(Operation o) {\n return o.token == this.token && o.op == this.op;\n }", "public static Expression referenceEqual(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.Equal, expression0, expression1);\n }", "public boolean equals(Object object)\n {\n return hashCode() == object.hashCode();\n }", "public boolean equals( final Object object ) {\n if ( object == this )\n return true; // Slight optimization\n return super.equals( object ) && equivalents( (CoordinateSystem) object );\n }", "@Override\n\tpublic boolean equalsEntity(ACLDriver object) {\n\t\treturn false;\n\t}", "boolean equalTo(ObjectPassDemo o) {\n return (o.a == a && o.b == b);\n }", "public boolean areEquals(PolyAdapter one, Object obj) {\n if (one == obj) {\n return true;\n }\n if (one == null || obj == null || !(obj instanceof PolyAdapter)) {\n return false;\n }\n PolyAdapter other = (PolyAdapter) obj;\n return one.adaptedCode().equals(other.adaptedCode());\n }", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Override\r\n \tpublic boolean equals(final Object obj) {\r\n \t\t// Insert code to compare the receiver and obj here.\r\n \t\t// This implementation forwards the message to super. You may replace or supplement this.\r\n \t\t// NOTE: obj might be an instance of any class\r\n \t\treturn super.equals(obj);\r\n \t}", "public static boolean equals(Object o1, Object o2) {\n return o1 == null ? o2 == null : o1.equals(o2);\n }", "public static void main(String[] args){\n\t\tString s1=\"mohan\";\r\n\t\tString s2=\"mohan\";\r\n\t\t\r\n\t\tif(s1.equals(s2)) System.out.println(\"Two string objects has same hash value\");\r\n\t\telse System.out.println(\"Two Strings objects has different hash value\");\r\n\t\t\r\n\t\tif(s1==s2) System.out.println(\"s1 and s2 point to same Objects\");\r\n\t\telse System.out.println(\"s1 and s2 point to different Objects\");\r\n\t\t\r\n\t\tString a1 = new String(\"krish\");\r\n\t\tString a2 = new String(\"krish\");\r\n\t\t\r\n\t\tif(a1==a2 && a1.equals(a2)) \r\n\t\t\tSystem.out.println(\"a1 and a2 point to same strings object and has same value\");\r\n\t\telse if(a1!=a2 && a1.equals(a2))\r\n\t\t\tSystem.out.println(\"a1 and a2 point to different strings objects but have same value\");\r\n\t\telse if(a1!=a2 && !a1.equals(a2))\r\n\t\t\tSystem.out.println(\"a1 and a2 point to different strings objects and have different values\");\r\n\r\n\t\tint i1=10;\r\n\t\tint i2=10;\r\n\t\t\r\n\t\tif(i1==i2) System.out.println(\"Two variable have same value w.r.t ==\");\r\n\t\telse System.out.println(\"values different\");\r\n\r\n\t\tif(new Integer(i1).equals(new Integer(i1))) {\r\n\t\t\tSystem.out.println(\"Two Integer vars pointing to same object\");\r\n\t\t}\r\n\t\tInteger I1 = new Integer(i1);\r\n\t\tInteger I2 = new Integer(i2);\r\n\t\t//For integer Objects \"values\" are compared instead of references. Integer class overrides equals() method from Object class\r\n\t\tif(I1.equals(I2)) {\r\n\t\t\tSystem.out.println(\"Two Integer Objects are same\");\r\n\t\t} else System.out.println(\"Not Same Objects\");\r\n\t\t\r\n\t\tif(I1==I2) System.out.println(\"Two Objects same(referencing same w.r.t == operator\");\r\n\t\telse System.out.println(\"Two Objects Different w.r.t == operator\");\r\n\t}" ]
[ "0.800182", "0.7667263", "0.7276438", "0.6953216", "0.68932307", "0.6809989", "0.67544115", "0.6717217", "0.6668339", "0.6639067", "0.6611637", "0.65947413", "0.6485368", "0.6477629", "0.6454611", "0.6413129", "0.6403093", "0.6397599", "0.6390462", "0.6368044", "0.63428956", "0.6330616", "0.6323974", "0.6306405", "0.6303972", "0.62900025", "0.62800646", "0.6268412", "0.6256118", "0.6247035", "0.62151223", "0.62151223", "0.6214682", "0.6193666", "0.61904866", "0.61837614", "0.61837614", "0.61837614", "0.61837614", "0.61837614", "0.6179047", "0.61571574", "0.6142138", "0.6128466", "0.61025286", "0.60775715", "0.6052057", "0.60491216", "0.6028727", "0.6017019", "0.6016488", "0.59984773", "0.59409297", "0.58997464", "0.589147", "0.5889594", "0.5877046", "0.58697885", "0.58620465", "0.58593017", "0.58581203", "0.58308214", "0.5829617", "0.5823365", "0.5821231", "0.5802331", "0.57942134", "0.5787854", "0.5778594", "0.5777527", "0.5774275", "0.5771522", "0.5764668", "0.57571113", "0.5747908", "0.5747829", "0.5738556", "0.5728507", "0.5724098", "0.57121044", "0.5710184", "0.5707293", "0.5700645", "0.5691607", "0.5679038", "0.5661914", "0.56558937", "0.5650408", "0.56478715", "0.56418526", "0.56340814", "0.5631949", "0.5612731", "0.5594899", "0.5589875", "0.55785006", "0.5577274", "0.5572238", "0.5566984", "0.5562311" ]
0.6103022
44
Always returns false. This method is the default implementation of the org.omg.CORBA.Object method.
public boolean _non_existent() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isObject() {\n return false;\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "@Override\n public boolean isObject() {\n return false;\n }", "protected synchronized boolean isObjectPresent() { return objPresent; }", "public boolean isObject() {\n\t\t// Object is the class that has itself as superclass\n\t\treturn getSuperClass() == this;\n\t}", "public boolean hasObject(){\n return _object != null;\n }", "boolean _is_equivalent(org.omg.CORBA.Object other);", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "boolean hasObject();", "@Override\n\tpublic boolean validObject() {\n\t\treturn valid;\n\t}", "protected boolean isObject() {\n long mark = 0;\n try {\n mark = this.createMark();\n boolean bl = this.getObject() != null;\n return bl;\n }\n catch (MathLinkException e) {\n this.clearError();\n boolean bl = false;\n return bl;\n }\n finally {\n if (mark != 0) {\n this.seekMark(mark);\n this.destroyMark(mark);\n }\n }\n }", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public boolean isSetObject() {\n return this.object != null;\n }", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "public boolean hasObject() {\n return objectBuilder_ != null || object_ != null;\n }", "@Override\n public boolean IsNewObject()\n {\n return _isNewObject;\n }", "boolean mo10605a(Object obj);", "public boolean handlesObject(Object object);", "@Override\r\n\tpublic boolean hasObjectOption1(GlobalObject obj) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean hasObjectOption1(GlobalObject obj) {\n\t\treturn false;\r\n\t}", "public boolean isStoredInObject() {\r\n return lockValueStored == IN_OBJECT;\r\n }", "@Override\r\n\t\tpublic boolean implementEquals(Object obj) {\n\t\t\treturn false;\r\n\t\t}", "public boolean canBeNullObject() { // for future, nobody calls when first\n return _canBeNullObject;\n }", "@Override\n\tpublic boolean isClassObject() {\n\t\treturn heldObj.isClassObject();\n\t}", "protected boolean isObjectHeld() { return objHeld; }", "public abstract org.omg.CORBA.Object read_Object();", "public boolean isReturnObjects() {\n return returnObjects;\n }", "@Override\n\t\tpublic boolean matches(EObject eObject) {\n\t\t\treturn false;\n\t\t}", "public boolean isMaybeObjectOrSymbol() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null;\n }", "private static boolean empty(Object object) {\n\t\treturn false;\n\t}", "public boolean hasObjUser() {\n return instance.hasObjUser();\n }", "@SuppressWarnings(\"unchecked\")\n public boolean stillExists(Object obj) {\n \treturn true;\n }", "public boolean hasObjUser() {\n return objUser_ != null;\n }", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onObject(Player player, int objectID) {\n\t\treturn false;\n\t}", "public boolean evaluateWithObject(java.lang.Object object){\n return false; //TODO codavaj!!\n }", "@Override\n\tpublic boolean equalsEntity(ACLDriver object) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean update(Dynamic object) {\n\t\treturn false;\n\t}", "public abstract boolean canHandle(ObjectInformation objectInformation);", "public boolean isMaybeObject() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null && object_labels.stream().anyMatch(x -> x.getKind() != Kind.SYMBOL);\n }", "public /* bridge */ /* synthetic */ boolean mo23140a(C7059Ec ec, Object obj) {\n return super.mo23140a(ec, obj);\n }", "public boolean isObjectCreated() {\n return OBJECTCREATED.equals(message);\n }", "@ReflectiveMethod(name = \"b\", types = {})\n public boolean b(){\n return (boolean) NMSWrapper.getInstance().exec(nmsObject);\n }", "protected boolean filterOutObject(PhysicalObject object) {\n return false;\n }", "public abstract boolean isObject(T type);", "public boolean isAlive() {\n\t\tif (combox == null){\n\t\t\treturn false;\n\t\t}\n\t\tPOPBuffer popBuffer = combox.getBufferFactory().createBuffer();\n\t\tMessageHeader messageHeader = new MessageHeader(0,\n\t\t\t\tMessageHeader.OBJECT_ALIVE_CALL, Semantic.SYNCHRONOUS);\n\t\tmessageHeader.setRequestID(requestID.incrementAndGet());\n\t\tpopBuffer.setHeader(messageHeader);\n\n\t\tpopDispatch(popBuffer);\n\t\tboolean result = false;\n\t\ttry {\n\t\t\tPOPBuffer responseBuffer = combox.getBufferFactory().createBuffer();\n\t\t\tpopResponse(responseBuffer, messageHeader.getRequestID());\n\t\t\tresult = responseBuffer.getBoolean();\n\t\t} catch (POPException e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn result;\n\t}", "public /* bridge */ /* synthetic */ boolean mo9978a(C1082d dVar, Object obj) {\n return super.mo9978a(dVar, obj);\n }", "public boolean isObjectAdded() {\n return OBJECTADDED.equals(message);\n }", "@Override\n\tpublic boolean movable(Entity obj) {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean javaMethodBaseWithBooleanRet() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean create(Etape obj) {\n\t\treturn false;\n\t}", "public final boolean tryOwn() {\n return own(this) == this;\n }", "public boolean isPersistenceCapable(Object object)\n{\n\treturn true;\n}", "public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }", "@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}", "@Override\n\t\tpublic boolean contains(Object o) {\n\t\t\treturn false;\n\t\t}", "protected boolean findObject(Object obj){\n \n }", "@Override\n public boolean isExist(Object o) {\n return true;\n }", "public RubyBoolean getTrue() {\n return trueObject;\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "public boolean collision(Objet o) {\r\n\t\treturn false;\r\n\t}", "public Boolean getObjectType() {\r\n\t\treturn objectType;\r\n\t}", "public boolean grab()\n {\n \n boolean retVal = grab_0(nativeObj);\n \n return retVal;\n }", "public boolean doesNotMatch(NakedObject nakedObject);", "public java.lang.Boolean getByhand() throws java.rmi.RemoteException;", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean update(Etape obj) {\n\t\treturn false;\n\t}", "public final boolean m2276k() {\n return this.f2952a == ValueType.object;\n }", "@Override\n\tpublic boolean contains(Object entity) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean equals(TestObject obj) {\n\t\treturn false;\n\t}", "protected boolean isPrimitiveObject(Object object) {\r\n return PropertyType.PRIMITIVE.equals(determinePropertyType(object));\r\n }", "default boolean checkDbObj(Object object) {\n return false;\n }", "@Override\n\tpublic boolean containsValue(Object arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean delete(Dynamic object) {\n\t\treturn false;\n\t}", "public boolean init()\n {\n \n boolean retVal = init_0(nativeObj);\n \n return retVal;\n }", "@ReflectiveMethod(name = \"c\", types = {})\n public boolean c(){\n return (boolean) NMSWrapper.getInstance().exec(nmsObject);\n }", "public final boolean isReference() {\n \treturn !isPrimitive();\n }", "boolean hasObjUser();", "@ReflectiveMethod(name = \"a\", types = {})\n public boolean a(){\n return (boolean) NMSWrapper.getInstance().exec(nmsObject);\n }", "public boolean isNotASummarizedObject() {\n checkNotPolymorphicOrUnknown();\n if (object_labels == null) {\n return true;\n }\n for (ObjectLabel object_label : object_labels) {\n if (!object_label.isSingleton()) {\n return false;\n }\n }\n return true;\n }", "@Override\r\n\tpublic boolean validate(Object object) {\n\t\treturn this.validate(object);\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn false;\n\t}", "public static boolean isControlled(Object object)\n {\n if (!(object instanceof EObject)) return false;\n EObject eObject = (EObject)object;\n EObject container = eObject.eContainer();\n Resource resource = eObject.eResource();\n return resource != null && container != null && resource != container.eResource();\n }", "private boolean isBinaryMessage(Object anObject) {\n\t\tif(anObject.getClass() == this.getClass()) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\t\t\tpublic boolean containsValue(Object value) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "boolean isCustom(Object custom);", "@ReflectiveMethod(name = \"I\", types = {})\n public boolean I(){\n return (boolean) NMSWrapper.getInstance().exec(nmsObject);\n }" ]
[ "0.7268896", "0.7262596", "0.70481944", "0.6971274", "0.6906573", "0.68793195", "0.6822862", "0.67729205", "0.67729205", "0.67729205", "0.67729205", "0.67729205", "0.67729205", "0.67729205", "0.6752109", "0.6728142", "0.6724207", "0.66841125", "0.66730005", "0.6581101", "0.6575946", "0.6448532", "0.6400751", "0.6372166", "0.6372166", "0.63487554", "0.6347451", "0.63397586", "0.6321272", "0.63206875", "0.6309228", "0.6285762", "0.6266123", "0.6244405", "0.6197061", "0.6196813", "0.61431557", "0.613647", "0.6098672", "0.6088589", "0.60861754", "0.60827535", "0.6081658", "0.60651815", "0.6034798", "0.60310304", "0.60270643", "0.6009335", "0.60067034", "0.59961903", "0.59868634", "0.59769136", "0.5956738", "0.58885837", "0.5865871", "0.5846847", "0.58323973", "0.58272815", "0.5821294", "0.58176863", "0.58143526", "0.58143526", "0.58143526", "0.58045965", "0.57990915", "0.5796133", "0.5792977", "0.5785357", "0.5782172", "0.5778568", "0.57755893", "0.57709455", "0.57611996", "0.5748948", "0.5748948", "0.5748948", "0.5748948", "0.5748419", "0.57351834", "0.5725485", "0.57189393", "0.5713403", "0.5706215", "0.5679946", "0.56536", "0.5641245", "0.5638161", "0.5619779", "0.5615036", "0.56085896", "0.55978274", "0.5592042", "0.55896604", "0.5573702", "0.5568622", "0.55656487", "0.5563467", "0.5560377", "0.55566776", "0.555546", "0.5552668" ]
0.0
-1
Returns a hash value that is consistent for the lifetime of the object, using the given number as the maximum. This method is the default implementation of the org.omg.CORBA.Object method.
public int _hash(int maximum) { return hashCode() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int _hash(int maximum);", "@Override\r\n public int hashCode() {\r\n return this.number;\r\n }", "public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getProjectName());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getDataProvider());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getPrimaryInvestigator());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getCreatedBy());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getCreatedTime());\n return (int)(hash % Integer.MAX_VALUE);\n }", "public int hashCode() {\n/* 370 */ if (this.hashCode == 0) {\n/* 371 */ this.hashCode = 17;\n/* 372 */ this.hashCode = 37 * this.hashCode + getClass().hashCode();\n/* 373 */ this.hashCode = 37 * this.hashCode + (int)(this.min ^ this.min >> 32L);\n/* 374 */ this.hashCode = 37 * this.hashCode + (int)(this.max ^ this.max >> 32L);\n/* */ } \n/* 376 */ return this.hashCode;\n/* */ }", "@JRubyMethod(name = \"hash\")\n @Override\n public RubyFixnum hash() {\n return getRuntime().newFixnum((int)(((dt.getMillis() / 1000) ^ microseconds()) << 1) >> 1);\n }", "public int hashCode()\n\t{\n\t\treturn System.identityHashCode(userObject);\n\t}", "@Override\n\t\tpublic int hashCode() {\n\t\t\tSystem.out.println(\"hashCode for \" + roll_no);\n\t\t\treturn roll_no % 10;\n\t\t}", "protected Object getStickyKey(Object value) {\n int hashCode = 37;\n if (value != null) {\n hashCode = value.hashCode();\n }\n if (numberOfHashGroups > 0) {\n hashCode = hashCode % numberOfHashGroups;\n }\n return hashCode;\n }", "public final int hashCode() {\r\n return _value;\r\n }", "public int hashCode() {\n if (getInternalValue() == null) {\n return -3;\n }\n else {\n return super.hashCode();\n }\n }", "public int hashCode() {\n int result;\n result = (this.time != null ? this.time.hashCode() : 0);\n result = 29 * result + (this.value != null ? this.value.hashCode() : 0);\n return result;\n }", "public long getMaxObjectID() {\n\t\treturn maxObjectID;\n\t}", "public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }", "public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }", "public native int __hashCode( long __swiftObject );", "public int getHash(int key, int i, int max);", "@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return System.identityHashCode(o);\n }", "public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getProject());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getUser());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getStatus());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getLastActivityDate());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasPiSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasDpSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasAdminSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasRequestorSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getEmailStatus());\n return (int)(hash % Integer.MAX_VALUE);\n }", "static int getHash(Object obj) {\n return getHash(new HashSet<Class>(), obj, 0);\n }", "private static int nextHashCode() {\n return nextHashCode.getAndAdd(HASH_INCREMENT);\n }", "public int\thashCode() { return value; }", "public long getMaxObjectID() {\n\t\t\treturn maxObjectID;\n\t\t}", "@Override\r\n public int hashCode() {\n return id % 10;\r\n }", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "final int hash(E object)\n {\n // Spread bits to regularize both segment and index locations,\n // using variant of single-word Wang/Jenkins hash.\n int h = object.hashCode();\n h += (h << 15) ^ 0xffffcd7d;\n h ^= (h >>> 10);\n h += (h << 3);\n h ^= (h >>> 6);\n h += (h << 2) + (h << 14);\n h = h ^ (h >>> 16);\n return h;\n }", "public long getObjectId(Object o)\n{\n\treturn o.hashCode();\n}", "public static final int nextHashCodeEntropy() {\n\t\tint hash = 17;\n\t\tfor (int i = 0; i < 11; i++) {\n\t\t\thash = 37 * hash + new Object().hashCode();\n\t\t}\n\t\treturn hash = 37 * hash + new Object().hashCode();\n\t}", "protected abstract int hashOfObject(Object key);", "static int getUniqueID(Object obj) {\n return obj.hashCode();\n }", "public int hashCode() {\n return registrationNumber.hashCode(); // In this case there is the simplest and best solving.\n }", "public int hashCode() {\n return 37 * 17;\n }", "@Override\n public int hashCode() {\n // Declare hash and assign value\n int hash = 7;\n // Generate hash integer\n hash = 31 * hash + (int) this.getCrossingTime();\n hash = 31 * hash + (this.getName() == null ? 0 : this.getName().hashCode());\n return hash;\n }", "public int hashCode() {\n return m_value;\n }", "int getHash();", "public int hashCode() {\n return _ordinal;\n }", "public int hashCode() {\r\n\t\treturn this.value().hashCode();\r\n\t}", "public int hashCode() {\n\t\treturn this.eid + 25;\n\t}", "public int hashCode()\n {\n if (this.hashValue == 0)\n {\n int result = 17;\n int wsidValue = this.getWsid() == null ? 0 : this.getWsid().hashCode();\n result = result * 37 + wsidValue;\n this.hashValue = result;\n }\n return this.hashValue;\n }", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn absorber.getObjectId();\n\t\t}", "@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }", "public int hashCode()\r\n\t{\n\t\treturn (i % 9); //this will make the values to store in the table based on size of hashtable is 9 and calculation will be (i %9)\r\n\t}", "public int getHash() {\n return hash_;\n }", "public int getHash() {\n return hash_;\n }", "@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }", "private int hash(T x)\n {\n // calcolo della chiave ridotta - eventualmente negativa\n int h = x.hashCode() % v.length;\n\n // calcolo del valore assoluto\n if (h < 0)\n h = -h;\n \n return h; \n }", "public int hashCode(){\n \n long code;\n\n // Values in linear combination with two\n // prime numbers.\n\n code = ((21599*(long)value)+(20507*(long)n.value));\n code = code%(long)prime;\n return (int)code;\n }", "@Override\n public int hashCode() {\n int i;\n int result = 17;\n i = getIdacquirente();\n result = 37*result + i;\n return result;\n }", "public static int defaultHashCode(DataValue obj) {\r\n final int prime = 31;\r\n int result = 1;\r\n result = prime * result + obj.getName().hashCode();\r\n if (obj.getObject() == null) {\r\n result = prime * result;\r\n } else if (obj.getObject().getClass().isArray()) {\r\n result = prime * result + Arrays.hashCode((byte[]) obj.getObject());\r\n } else {\r\n result = prime * result + obj.getObject().hashCode();\r\n }\r\n return result;\r\n }", "public int hashCode() {\n\t\treturn 14356 + historyIndex * 373 + dimension; \n\t\t// return some arbitrary number related to historyIndex and dimension\n\t}", "public static int m1456hashCodeimpl(Object obj) {\n if (obj != null) {\n return obj.hashCode();\n }\n return 0;\n }", "public int hashCode()\n {\n return ((calendar.get(Calendar.DAY_OF_MONTH) & 0x0000001F) << 0)\n | ((calendar.get(Calendar.MONTH ) & 0x0000000F) << 5)\n | ((calendar.get(Calendar.YEAR ) & 0x007FFFFF) << 9);\n }", "@Override\n public int hashCode()\n {\n return Objects.hash(value);\n }", "@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return o.hashCode();\n }", "public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }", "public static int hashCode(Object obj)\n {\n return System.identityHashCode(obj);\n }", "private int hash(T t) {\n int code = t.hashCode();\n return code % Table.size();\n }", "private int hashValue(K key) {\r\n\t\treturn (Math.abs(key.hashCode()) % currentCapacity);\r\n\t}", "public int hashCode() {\n final int HASH_MULTIPLIER = 29;\n int h = HASH_MULTIPLIER * FName.hashCode() + LName.hashCode();\n h = HASH_MULTIPLIER * h + ((Integer)ID).hashCode();\n return h;\n }", "public int hashCode() {\n\t\treturn hash(objects); //return the hash code of the objects\n\t}", "public int getHashCode(){\n return hashCode();\n }", "public static int hash(double value)\r\n/* 15: */ {\r\n/* 16: 57 */ return new Double(value).hashCode();\r\n/* 17: */ }", "public String getHashCode();", "public final int hashCode()\n {\n return ordinal;\n }", "@Override\n public int hashCode() {\n return value;\n }", "protected int safeHashCode(Object object) {\r\n\t\treturn object == null ? 0 : object.hashCode();\r\n\t}", "@Override public int hashCode() {\n return _ordinal;\n }", "int getObjectNumber();", "public int hashCode()\r\n/* */ {\r\n/* 89 */ int hash = 3;\r\n/* 90 */ hash = 19 * hash + Objects.hashCode(this.id);\r\n/* 91 */ return hash;\r\n/* */ }", "public abstract int getHash();", "private int getHash(Object key) {\n return key.hashCode();\n }", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "private Integer getUniqueId(Object object) {\n/* 89 */ Integer id = this.idCache.get(object);\n/* 90 */ if (id == null) {\n/* 91 */ id = Integer.valueOf(this.uidGenerator.incrementAndGet());\n/* 92 */ Integer existing = this.idCache.putIfAbsent(object, id);\n/* 93 */ if (existing != null) {\n/* 94 */ return existing;\n/* */ }\n/* */ } \n/* 97 */ return id;\n/* */ }", "public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (role != null ? role.hashCode() : 0);\n return hash;\n }", "protected int hashOfObject(Object key) {\n\t\t\treturn set.hashOfObject(key);\n\t\t}", "@Override\r\n public int hashCode() {\r\n return jsObject.hashCode();\r\n }", "public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (projectId != null ? projectId.hashCode() : 0);\n return hash;\n }", "public int hashCode() {\n if (hashCode != 0){\n return hashCode;\n }\n return hashCode = computeHash();\n }", "public int hashCode()\n {\n return 37 * 17 + this.EAS_event_ID;\n }", "public int hashCode() {\n if (myhash == -1) {\n myhash = timestamp.hashCode() + signerCertPath.hashCode();\n }\n return myhash;\n }", "int\thashCode();", "@Override\n public int hashCode() {\n return mVal;\n }", "@Override\r\n\t public int hashCode()\r\n\t {\n\t final int PRIME = 31;\r\n\t int result = 1;\r\n\t result = (int) (PRIME * result + (getId()==null?\r\n\t \t\tgetName().hashCode()\r\n\t \t\t:getName().hashCode()+getId()));\r\n\t return result;\r\n\t }", "int hashCode();", "int hashCode();", "public String identityHash() {\n return Integer.toHexString(System.identityHashCode(this));\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\treturn Objects.hashCode(value);\r\n\t}", "protected int myhash(T x)\r\n\t{\r\n\t\tint hashVal = x.hashCode( );\r\n\t\thashVal %= tableSize;\r\n\t\tif( hashVal < 0 )\r\n\t\t\thashVal += tableSize;\r\n\t\treturn hashVal;\r\n\t}", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "public int hashCode() {\n/* 360 */ return Objects.hashCode(new Object[] { Long.valueOf(this.count), Double.valueOf(this.mean), Double.valueOf(this.sumOfSquaresOfDeltas), Double.valueOf(this.min), Double.valueOf(this.max) });\n/* */ }", "public int hashCode()\r\n {\r\n int hashCode = 0;\r\n hashCode = 29 * hashCode + (identificador == null ? 0 : identificador.hashCode());\r\n\r\n return hashCode;\r\n }", "public int hashCode() {\n\t// Insert code to generate a hash code for the receiver here.\n\t// This implementation forwards the message to super. You may replace or supplement this.\n\t// NOTE: if two objects are equal (equals(Object) returns true) they must have the same hash code\n\t//return super.hashCode();\n\tint res = 0;\n\ttry {\n\t\tif (getOwner() != null)\n\t\t\tres = getOwner().getOrganization() * 10;\n\t\tif (getStorage() != null)\n\t\t\tres = res + getStorage().getStorageplace();\n\t} catch (Exception e) {\n\t\t// Something fatal occured\n\t\te.printStackTrace(System.out);\n\t}\n\treturn res;\n}", "@Override\n public int hashCode()\n {\n return this.value.hashCode();\n }", "public int hashCode() {\n int result = 1;\n Object $pageSize = this.getPageSize();\n result = result * 59 + ($pageSize == null ? 43 : $pageSize.hashCode());\n Object $pageNo = this.getPageNo();\n result = result * 59 + ($pageNo == null ? 43 : $pageNo.hashCode());\n Object $sort = this.getSort();\n result = result * 59 + ($sort == null ? 43 : $sort.hashCode());\n Object $orderByField = this.getOrderByField();\n result = result * 59 + ($orderByField == null ? 43 : $orderByField.hashCode());\n return result;\n }", "@Override\n //zwraca niepowtarzalny numer identyfikujacy nasz obiekt\n public int hashCode() {\n return Objects.hash(name, engine, maxSpeed);\n }", "public int hashcode();", "public int hashCode()\n {\n return (int)(swigCPtr^(swigCPtr>>>32));\n }", "public int hashCode()\n\t{\n\t\treturn mX * gMaximumCoordinateValue + mY;\n\t}" ]
[ "0.6635545", "0.6175104", "0.6019411", "0.5921658", "0.589955", "0.58738565", "0.58656836", "0.5844865", "0.5812596", "0.5802868", "0.5791384", "0.5757375", "0.5747017", "0.574273", "0.57366776", "0.5736373", "0.57049847", "0.5697179", "0.56823516", "0.56797665", "0.5678869", "0.56482244", "0.5624579", "0.5624136", "0.561126", "0.5606182", "0.55204785", "0.55161715", "0.55091107", "0.5507766", "0.5505826", "0.5486856", "0.54839844", "0.54779774", "0.5477573", "0.5470317", "0.54578906", "0.5446938", "0.5410916", "0.53909796", "0.5390023", "0.5386456", "0.5384912", "0.53786457", "0.537307", "0.5366252", "0.53626764", "0.5360265", "0.53555393", "0.5352008", "0.5341145", "0.53278875", "0.5321632", "0.530633", "0.52996385", "0.5296785", "0.52944356", "0.52915674", "0.5277011", "0.5275405", "0.5266999", "0.5263896", "0.52638525", "0.5263182", "0.5263078", "0.5262207", "0.52608955", "0.5260254", "0.5257454", "0.5255124", "0.5241083", "0.5241083", "0.5241083", "0.5241083", "0.52409", "0.52328134", "0.52305245", "0.5230297", "0.52280545", "0.5216372", "0.52162653", "0.5211609", "0.5210893", "0.52075166", "0.52039814", "0.5192894", "0.5192894", "0.5187092", "0.51814044", "0.51780236", "0.51780134", "0.51759136", "0.5170924", "0.51535064", "0.5151187", "0.51497585", "0.514813", "0.5135329", "0.5135211", "0.5128193" ]
0.66714215
0
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.
public boolean _is_a(String repository_id) { throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public abstract org.omg.CORBA.Object read_Object();", "public LocalObject() {}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "void mo3207a(Object obj);", "public interface BaseObject {\n}", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "BoundObject(){}", "void m21807c(Object obj);", "public abstract Object getUnderlyingObject();", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public interface StandaloneObject {\n // marker\n}", "void m21809e(Object obj);", "public Object getObject();", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "OBJECT createOBJECT();", "public Object getObject() ;", "void m21808d(Object obj);", "void m21805a(Object obj);", "ObjectRealization createObjectRealization();", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "void m21806b(Object obj);", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "@Override\n public Object getObject()\n {\n return null;\n }", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "IObjectWrapper mo29837Ca() throws RemoteException;", "public static void objectDemo() {\n\t}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "void marshal(Object obj);", "protected synchronized boolean isObjectPresent() { return objPresent; }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "EJBLocalObject getEJBLocalObject() throws IllegalStateException;", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "Object getBase();", "void mo67921a(Object obj);", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface DerivedType extends EObject {\r\n}", "public ObjectReference getObject();", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "void getObject(String globalName) throws RemoteException, NotBoundException, MalformedURLException {\n remoteObject = (GraphInterface) Naming.lookup(globalName);\n }", "public abstract void mo1184a(Object obj);", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "org.omg.CORBA.Object _duplicate();", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "void mo6504by(Object obj);", "public NetObject getObject();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "public interface PersonLocal extends javax.ejb.EJBLocalObject {\r\n\t/**\r\n\t * Get accessor for persistent attribute: password\r\n\t */\r\n\tpublic java.lang.String getPassword();\r\n\t/**\r\n\t * Set accessor for persistent attribute: password\r\n\t */\r\n\tpublic void setPassword(java.lang.String newPassword);\r\n\t/**\r\n\t * Get accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic java.lang.String getFirstName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic void setFirstName(java.lang.String newFirstName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic java.lang.String getLastName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic void setLastName(java.lang.String newLastName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic java.lang.String getEmailAddress();\r\n\t/**\r\n\t * Set accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic void setEmailAddress(java.lang.String newEmailAddress);\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic java.util.Collection getTodo();\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic void setTodo(java.util.Collection aTodo);\r\n\t/**\r\n\t * This is our method to get all todos for one person\r\n\t */\r\n\tpublic java.util.Collection getTodos();\r\n\tpublic boolean isPasswordCorrect(String password);\r\n}", "Object loadObject() throws Exception;", "slco.Object getObject2();", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "private Object setupDefaultPrototype() {\n }", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "com.google.protobuf2.Any getObject();", "public void setObject(XSerial obj);", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public boolean isObject() {\n return false;\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "public interface Compromiso_peticionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: tiag_id\n\t */\n\tpublic java.lang.Long getTiag_id();\n\t/**\n\t * Set accessor for persistent attribute: tiag_id\n\t */\n\tpublic void setTiag_id(java.lang.Long newTiag_id);\n\t/**\n\t * Get accessor for persistent attribute: id_rango\n\t */\n\tpublic java.lang.Integer getId_rango();\n\t/**\n\t * Set accessor for persistent attribute: id_rango\n\t */\n\tpublic void setId_rango(java.lang.Integer newId_rango);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic java.lang.String getCodigo_pcom();\n\t/**\n\t * Set accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic void setCodigo_pcom(java.lang.String newCodigo_pcom);\n\t/**\n\t * Get accessor for persistent attribute: dia_especifico\n\t */\n\tpublic java.sql.Timestamp getDia_especifico();\n\t/**\n\t * Set accessor for persistent attribute: dia_especifico\n\t */\n\tpublic void setDia_especifico(java.sql.Timestamp newDia_especifico);\n\t/**\n\t * Get accessor for persistent attribute: id_tecnico\n\t */\n\tpublic java.lang.Long getId_tecnico();\n\t/**\n\t * Set accessor for persistent attribute: id_tecnico\n\t */\n\tpublic void setId_tecnico(java.lang.Long newId_tecnico);\n\t/**\n\t * Get accessor for persistent attribute: user_mac\n\t */\n\tpublic java.lang.String getUser_mac();\n\t/**\n\t * Set accessor for persistent attribute: user_mac\n\t */\n\tpublic void setUser_mac(java.lang.String newUser_mac);\n\t/**\n\t * Get accessor for persistent attribute: hora_desde\n\t */\n\tpublic java.lang.String getHora_desde();\n\t/**\n\t * Set accessor for persistent attribute: hora_desde\n\t */\n\tpublic void setHora_desde(java.lang.String newHora_desde);\n\t/**\n\t * Get accessor for persistent attribute: hora_hasta\n\t */\n\tpublic java.lang.String getHora_hasta();\n\t/**\n\t * Set accessor for persistent attribute: hora_hasta\n\t */\n\tpublic void setHora_hasta(java.lang.String newHora_hasta);\n\t/**\n\t * Get accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic java.lang.String getCodigo_agencia();\n\t/**\n\t * Set accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic void setCodigo_agencia(java.lang.String newCodigo_agencia);\n\t/**\n\t * Get accessor for persistent attribute: estado\n\t */\n\tpublic java.lang.Short getEstado();\n\t/**\n\t * Set accessor for persistent attribute: estado\n\t */\n\tpublic void setEstado(java.lang.Short newEstado);\n\t/**\n\t * Get accessor for persistent attribute: grse_id\n\t */\n\tpublic java.lang.Integer getGrse_id();\n\t/**\n\t * Set accessor for persistent attribute: grse_id\n\t */\n\tpublic void setGrse_id(java.lang.Integer newGrse_id);\n\t/**\n\t * Get accessor for persistent attribute: fecha\n\t */\n\tpublic java.sql.Timestamp getFecha();\n\t/**\n\t * Set accessor for persistent attribute: fecha\n\t */\n\tpublic void setFecha(java.sql.Timestamp newFecha);\n\t/**\n\t * Get accessor for persistent attribute: care_id\n\t */\n\tpublic java.lang.Integer getCare_id();\n\t/**\n\t * Set accessor for persistent attribute: care_id\n\t */\n\tpublic void setCare_id(java.lang.Integer newCare_id);\n\t/**\n\t * Get accessor for persistent attribute: usua_id\n\t */\n\tpublic java.lang.Long getUsua_id();\n\t/**\n\t * Set accessor for persistent attribute: usua_id\n\t */\n\tpublic void setUsua_id(java.lang.Long newUsua_id);\n\t/**\n\t * Get accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic java.lang.Long getId_cita_previa();\n\t/**\n\t * Set accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic void setId_cita_previa(java.lang.Long newId_cita_previa);\n}", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "slco.Object getObject1();", "public abstract Object mo1185b();", "@Override\r\n\tpublic boolean hasObjectOption1(GlobalObject obj) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean hasObjectOption1(GlobalObject obj) {\n\t\treturn false;\r\n\t}", "protected PObject createIndependentObject() {\n return createIndependentObjects(1).get(0);\n }", "public IDfPersistentObject getObject() {\n\t\treturn object;\n\t}", "public void mo1774a(Object obj) {\n }", "Objet getObjetAlloue();", "boolean mo10605a(Object obj);", "public interface FilterFactory extends FilterFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "public abstract Object getObservedObject();", "public void add(RealObject o) throws NullPointerException;", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public java.lang.String getObjectName(){\n return localObjectName;\n }" ]
[ "0.63962483", "0.63840675", "0.6158492", "0.615174", "0.60899615", "0.60842717", "0.6051479", "0.5900007", "0.58709913", "0.5840676", "0.58274674", "0.5824589", "0.578535", "0.57483524", "0.57407755", "0.5732347", "0.5676089", "0.5660036", "0.5657385", "0.5656312", "0.5648001", "0.5644225", "0.56363034", "0.56306845", "0.5623504", "0.5600709", "0.5595972", "0.5593325", "0.5588008", "0.5585105", "0.5565515", "0.55252254", "0.54942894", "0.54942894", "0.54942894", "0.54942894", "0.54757637", "0.5475084", "0.54711866", "0.54639965", "0.5431619", "0.5429559", "0.5414667", "0.5405692", "0.5404783", "0.53919905", "0.53711396", "0.5343665", "0.5341837", "0.5312353", "0.5307994", "0.53058654", "0.53051347", "0.5298094", "0.5282064", "0.5281169", "0.5279523", "0.52746737", "0.52631205", "0.5261359", "0.52499306", "0.5241132", "0.5222658", "0.52189535", "0.52075016", "0.5206201", "0.52019155", "0.51986563", "0.5195441", "0.5192112", "0.51877093", "0.5185879", "0.5174131", "0.51591", "0.5152164", "0.51494324", "0.51486456", "0.5147208", "0.51463836", "0.51319164", "0.5124648", "0.5120345", "0.5119247", "0.5116794", "0.5109849", "0.5097792", "0.5086334", "0.50787073", "0.50787073", "0.5062585", "0.50589883", "0.50579447", "0.5052559", "0.50456554", "0.504324", "0.50423855", "0.5037298", "0.5030489", "0.5027834", "0.5025072", "0.502309" ]
0.0
-1
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
public Object _duplicate() { throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract org.omg.CORBA.Object read_Object();", "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface BaseObject {\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "void mo3207a(Object obj);", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "BoundObject(){}", "public LocalObject() {}", "OBJECT createOBJECT();", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "public interface StandaloneObject {\n // marker\n}", "void m21807c(Object obj);", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public abstract Object getUnderlyingObject();", "void m21809e(Object obj);", "public Object getObject();", "void m21805a(Object obj);", "public Object getObject() ;", "ObjectRealization createObjectRealization();", "IObjectWrapper mo29837Ca() throws RemoteException;", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "void m21806b(Object obj);", "@Override\n public Object getObject()\n {\n return null;\n }", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "void m21808d(Object obj);", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "public static void objectDemo() {\n\t}", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface DerivedType extends EObject {\r\n}", "void marshal(Object obj);", "Object loadObject() throws Exception;", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "Object getBase();", "protected synchronized boolean isObjectPresent() { return objPresent; }", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "void mo67921a(Object obj);", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "com.google.protobuf2.Any getObject();", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public abstract void mo1184a(Object obj);", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "org.omg.CORBA.Object _duplicate();", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public ObjectReference getObject();", "public org.omg.CORBA.Object read_Object(Class\n clz) {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "private Object setupDefaultPrototype() {\n }", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public NetObject getObject();", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "public T caseClientInterface(ClientInterface object)\n {\n return null;\n }", "public T caseDefNonInertia(DefNonInertia object)\n {\n return null;\n }", "void mo6504by(Object obj);", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "public boolean isObject() {\n return false;\n }", "public abstract Object mo1185b();", "Objet getObjetAlloue();", "public abstract B zzt(Object obj);", "public Object mo27142b(Object obj) throws C3885b {\n if (obj == null || this.f17268a.isInstance(obj)) {\n return obj;\n }\n throw new C3885b(\"Caller [\" + obj + \"] is not a instance of type [\" + this.f17268a + \"]!\");\n }", "public T caseObjectDefinition(ObjectDefinition object) {\n\t\treturn null;\n\t}", "slco.Object getObject2();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "boolean mo10605a(Object obj);", "public Value restrictToNotTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= ~NULL;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() == Kind.FUNCTION || objlabel.getKind() == Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getObjectOrBuilder() {\n return getObject();\n }", "public T caseServerInterface(ServerInterface object)\n {\n return null;\n }", "public void mo1774a(Object obj) {\n }", "public void setObject(XSerial obj);", "public ExtensibleObject getNativeObject(SoffidObjectType type, String object1, String object2)\n\t\t\tthrows RemoteException, InternalErrorException {\n\t\treturn null;\n\t}", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }" ]
[ "0.6512437", "0.6478393", "0.6258392", "0.6256161", "0.6205298", "0.615545", "0.6037277", "0.60164344", "0.60033655", "0.592476", "0.59009516", "0.58834183", "0.5774403", "0.576282", "0.57368785", "0.5734551", "0.5731212", "0.57273376", "0.57109666", "0.5699425", "0.56763464", "0.5660393", "0.5657711", "0.56520796", "0.5645662", "0.5636351", "0.5613694", "0.5613389", "0.5610663", "0.5592719", "0.55823636", "0.55772597", "0.55497885", "0.5533799", "0.5532259", "0.55301964", "0.5528035", "0.55213237", "0.55213237", "0.55213237", "0.55213237", "0.5514724", "0.54860866", "0.5473442", "0.54531914", "0.54445195", "0.5440005", "0.5436047", "0.5424157", "0.5422005", "0.54148704", "0.5412472", "0.53841144", "0.53741693", "0.535929", "0.53362066", "0.53308827", "0.53236", "0.5302714", "0.5300525", "0.52889854", "0.52868485", "0.528591", "0.5283675", "0.5278573", "0.52643543", "0.52633697", "0.52424514", "0.5239026", "0.52346355", "0.5226439", "0.5206625", "0.51961166", "0.5195425", "0.51842827", "0.5178458", "0.51697505", "0.51624256", "0.51621854", "0.5159792", "0.5157788", "0.5156837", "0.5144885", "0.5136314", "0.5128429", "0.5122583", "0.5118509", "0.51178586", "0.51146305", "0.5105841", "0.50862014", "0.5084231", "0.5083689", "0.50778204", "0.50659335", "0.50654376", "0.5062635", "0.50564104", "0.5044501", "0.5042566" ]
0.5052123
98
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
public void _release() { throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract org.omg.CORBA.Object read_Object();", "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface BaseObject {\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "void mo3207a(Object obj);", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "BoundObject(){}", "public LocalObject() {}", "OBJECT createOBJECT();", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "public interface StandaloneObject {\n // marker\n}", "void m21807c(Object obj);", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public abstract Object getUnderlyingObject();", "void m21809e(Object obj);", "public Object getObject();", "void m21805a(Object obj);", "public Object getObject() ;", "ObjectRealization createObjectRealization();", "IObjectWrapper mo29837Ca() throws RemoteException;", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "void m21806b(Object obj);", "@Override\n public Object getObject()\n {\n return null;\n }", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "void m21808d(Object obj);", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "public static void objectDemo() {\n\t}", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface DerivedType extends EObject {\r\n}", "void marshal(Object obj);", "Object loadObject() throws Exception;", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "Object getBase();", "protected synchronized boolean isObjectPresent() { return objPresent; }", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "void mo67921a(Object obj);", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "com.google.protobuf2.Any getObject();", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public abstract void mo1184a(Object obj);", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "org.omg.CORBA.Object _duplicate();", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public ObjectReference getObject();", "public org.omg.CORBA.Object read_Object(Class\n clz) {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "private Object setupDefaultPrototype() {\n }", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public NetObject getObject();", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "public T caseClientInterface(ClientInterface object)\n {\n return null;\n }", "public T caseDefNonInertia(DefNonInertia object)\n {\n return null;\n }", "void mo6504by(Object obj);", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "public boolean isObject() {\n return false;\n }", "public abstract Object mo1185b();", "Objet getObjetAlloue();", "public abstract B zzt(Object obj);", "public Object mo27142b(Object obj) throws C3885b {\n if (obj == null || this.f17268a.isInstance(obj)) {\n return obj;\n }\n throw new C3885b(\"Caller [\" + obj + \"] is not a instance of type [\" + this.f17268a + \"]!\");\n }", "public T caseObjectDefinition(ObjectDefinition object) {\n\t\treturn null;\n\t}", "slco.Object getObject2();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "boolean mo10605a(Object obj);", "public Value restrictToNotTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= ~NULL;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() == Kind.FUNCTION || objlabel.getKind() == Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getObjectOrBuilder() {\n return getObject();\n }", "public T caseServerInterface(ServerInterface object)\n {\n return null;\n }", "public void mo1774a(Object obj) {\n }", "public void setObject(XSerial obj);", "public Object _duplicate() {\n throw new NO_IMPLEMENT(reason);\n }", "public ExtensibleObject getNativeObject(SoffidObjectType type, String object1, String object2)\n\t\t\tthrows RemoteException, InternalErrorException {\n\t\treturn null;\n\t}", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }" ]
[ "0.6512437", "0.6478393", "0.6258392", "0.6256161", "0.6205298", "0.615545", "0.6037277", "0.60164344", "0.60033655", "0.592476", "0.59009516", "0.58834183", "0.5774403", "0.576282", "0.57368785", "0.5734551", "0.5731212", "0.57273376", "0.57109666", "0.5699425", "0.56763464", "0.5660393", "0.5657711", "0.56520796", "0.5645662", "0.5636351", "0.5613694", "0.5613389", "0.5610663", "0.5592719", "0.55823636", "0.55772597", "0.55497885", "0.5533799", "0.5532259", "0.55301964", "0.5528035", "0.55213237", "0.55213237", "0.55213237", "0.55213237", "0.5514724", "0.54860866", "0.5473442", "0.54531914", "0.54445195", "0.5440005", "0.5436047", "0.5424157", "0.5422005", "0.54148704", "0.5412472", "0.53841144", "0.53741693", "0.535929", "0.53362066", "0.53308827", "0.53236", "0.5302714", "0.5300525", "0.52889854", "0.52868485", "0.528591", "0.5283675", "0.5278573", "0.52643543", "0.52633697", "0.52424514", "0.5239026", "0.52346355", "0.5226439", "0.5206625", "0.51961166", "0.5195425", "0.51842827", "0.5178458", "0.51697505", "0.51624256", "0.51621854", "0.5159792", "0.5157788", "0.5156837", "0.5144885", "0.5136314", "0.5128429", "0.5122583", "0.5118509", "0.51178586", "0.51146305", "0.5105841", "0.50862014", "0.5084231", "0.5083689", "0.50778204", "0.50659335", "0.50654376", "0.5062635", "0.50564104", "0.5052123", "0.5044501", "0.5042566" ]
0.0
-1
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
public Request _request(String operation) { throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract org.omg.CORBA.Object read_Object();", "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface BaseObject {\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "void mo3207a(Object obj);", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "BoundObject(){}", "public LocalObject() {}", "OBJECT createOBJECT();", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "public interface StandaloneObject {\n // marker\n}", "void m21807c(Object obj);", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public abstract Object getUnderlyingObject();", "void m21809e(Object obj);", "public Object getObject();", "void m21805a(Object obj);", "public Object getObject() ;", "ObjectRealization createObjectRealization();", "IObjectWrapper mo29837Ca() throws RemoteException;", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "void m21806b(Object obj);", "@Override\n public Object getObject()\n {\n return null;\n }", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "void m21808d(Object obj);", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "public static void objectDemo() {\n\t}", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface DerivedType extends EObject {\r\n}", "void marshal(Object obj);", "Object loadObject() throws Exception;", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "Object getBase();", "protected synchronized boolean isObjectPresent() { return objPresent; }", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "void mo67921a(Object obj);", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "com.google.protobuf2.Any getObject();", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public abstract void mo1184a(Object obj);", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "org.omg.CORBA.Object _duplicate();", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public ObjectReference getObject();", "public org.omg.CORBA.Object read_Object(Class\n clz) {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "private Object setupDefaultPrototype() {\n }", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public NetObject getObject();", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "public T caseClientInterface(ClientInterface object)\n {\n return null;\n }", "public T caseDefNonInertia(DefNonInertia object)\n {\n return null;\n }", "void mo6504by(Object obj);", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "public boolean isObject() {\n return false;\n }", "public abstract Object mo1185b();", "Objet getObjetAlloue();", "public abstract B zzt(Object obj);", "public Object mo27142b(Object obj) throws C3885b {\n if (obj == null || this.f17268a.isInstance(obj)) {\n return obj;\n }\n throw new C3885b(\"Caller [\" + obj + \"] is not a instance of type [\" + this.f17268a + \"]!\");\n }", "public T caseObjectDefinition(ObjectDefinition object) {\n\t\treturn null;\n\t}", "slco.Object getObject2();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "boolean mo10605a(Object obj);", "public Value restrictToNotTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= ~NULL;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() == Kind.FUNCTION || objlabel.getKind() == Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getObjectOrBuilder() {\n return getObject();\n }", "public T caseServerInterface(ServerInterface object)\n {\n return null;\n }", "public void mo1774a(Object obj) {\n }", "public void setObject(XSerial obj);", "public Object _duplicate() {\n throw new NO_IMPLEMENT(reason);\n }", "public ExtensibleObject getNativeObject(SoffidObjectType type, String object1, String object2)\n\t\t\tthrows RemoteException, InternalErrorException {\n\t\treturn null;\n\t}", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }" ]
[ "0.6512437", "0.6478393", "0.6258392", "0.6256161", "0.6205298", "0.615545", "0.6037277", "0.60164344", "0.60033655", "0.592476", "0.59009516", "0.58834183", "0.5774403", "0.576282", "0.57368785", "0.5734551", "0.5731212", "0.57273376", "0.57109666", "0.5699425", "0.56763464", "0.5660393", "0.5657711", "0.56520796", "0.5645662", "0.5636351", "0.5613694", "0.5613389", "0.5610663", "0.5592719", "0.55823636", "0.55772597", "0.55497885", "0.5533799", "0.5532259", "0.55301964", "0.5528035", "0.55213237", "0.55213237", "0.55213237", "0.55213237", "0.5514724", "0.54860866", "0.5473442", "0.54531914", "0.54445195", "0.5440005", "0.5436047", "0.5424157", "0.5422005", "0.54148704", "0.5412472", "0.53841144", "0.53741693", "0.535929", "0.53362066", "0.53308827", "0.53236", "0.5302714", "0.5300525", "0.52889854", "0.52868485", "0.528591", "0.5283675", "0.5278573", "0.52643543", "0.52633697", "0.52424514", "0.5239026", "0.52346355", "0.5226439", "0.5206625", "0.51961166", "0.5195425", "0.51842827", "0.5178458", "0.51697505", "0.51624256", "0.51621854", "0.5159792", "0.5157788", "0.5156837", "0.5144885", "0.5136314", "0.5128429", "0.5122583", "0.5118509", "0.51178586", "0.51146305", "0.5105841", "0.50862014", "0.5084231", "0.5083689", "0.50778204", "0.50659335", "0.50654376", "0.5062635", "0.50564104", "0.5052123", "0.5044501", "0.5042566" ]
0.0
-1
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
public Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result) { throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract org.omg.CORBA.Object read_Object();", "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface BaseObject {\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "void mo3207a(Object obj);", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "BoundObject(){}", "public LocalObject() {}", "OBJECT createOBJECT();", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "public interface StandaloneObject {\n // marker\n}", "void m21807c(Object obj);", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public abstract Object getUnderlyingObject();", "void m21809e(Object obj);", "public Object getObject();", "void m21805a(Object obj);", "public Object getObject() ;", "ObjectRealization createObjectRealization();", "IObjectWrapper mo29837Ca() throws RemoteException;", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "void m21806b(Object obj);", "@Override\n public Object getObject()\n {\n return null;\n }", "void m21808d(Object obj);", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "public static void objectDemo() {\n\t}", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface DerivedType extends EObject {\r\n}", "void marshal(Object obj);", "Object loadObject() throws Exception;", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "Object getBase();", "protected synchronized boolean isObjectPresent() { return objPresent; }", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "void mo67921a(Object obj);", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "com.google.protobuf2.Any getObject();", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public abstract void mo1184a(Object obj);", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "org.omg.CORBA.Object _duplicate();", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public ObjectReference getObject();", "public org.omg.CORBA.Object read_Object(Class\n clz) {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "private Object setupDefaultPrototype() {\n }", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public NetObject getObject();", "public T caseClientInterface(ClientInterface object)\n {\n return null;\n }", "public T caseDefNonInertia(DefNonInertia object)\n {\n return null;\n }", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "void mo6504by(Object obj);", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "public boolean isObject() {\n return false;\n }", "public abstract Object mo1185b();", "Objet getObjetAlloue();", "public abstract B zzt(Object obj);", "public Object mo27142b(Object obj) throws C3885b {\n if (obj == null || this.f17268a.isInstance(obj)) {\n return obj;\n }\n throw new C3885b(\"Caller [\" + obj + \"] is not a instance of type [\" + this.f17268a + \"]!\");\n }", "public T caseObjectDefinition(ObjectDefinition object) {\n\t\treturn null;\n\t}", "slco.Object getObject2();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "boolean mo10605a(Object obj);", "public Value restrictToNotTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= ~NULL;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() == Kind.FUNCTION || objlabel.getKind() == Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getObjectOrBuilder() {\n return getObject();\n }", "public T caseServerInterface(ServerInterface object)\n {\n return null;\n }", "public void mo1774a(Object obj) {\n }", "public void setObject(XSerial obj);", "public Object _duplicate() {\n throw new NO_IMPLEMENT(reason);\n }", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }", "public ExtensibleObject getNativeObject(SoffidObjectType type, String object1, String object2)\n\t\t\tthrows RemoteException, InternalErrorException {\n\t\treturn null;\n\t}" ]
[ "0.6510526", "0.6477", "0.6257711", "0.6256765", "0.62042433", "0.61538386", "0.6038405", "0.60151535", "0.600293", "0.5923568", "0.59007293", "0.58838385", "0.577411", "0.57611656", "0.573652", "0.5732086", "0.57307076", "0.5725131", "0.5711146", "0.5697668", "0.56770754", "0.56593037", "0.5655752", "0.5650006", "0.56468624", "0.5633623", "0.5614143", "0.56105953", "0.56095994", "0.5591058", "0.55816877", "0.55781645", "0.5547799", "0.5532952", "0.5531447", "0.55293274", "0.552572", "0.55185187", "0.55185187", "0.55185187", "0.55185187", "0.551297", "0.54835707", "0.547159", "0.54536855", "0.54427725", "0.5439213", "0.54361916", "0.54244965", "0.5420363", "0.54136914", "0.5412846", "0.5384574", "0.5372325", "0.53585875", "0.5335441", "0.53302205", "0.53243095", "0.5300929", "0.52991337", "0.5290402", "0.5286686", "0.5286437", "0.5281945", "0.5276046", "0.52638704", "0.5263008", "0.5240975", "0.524061", "0.5232686", "0.5224254", "0.52033037", "0.51940745", "0.5193735", "0.5184068", "0.5178232", "0.5166275", "0.5161285", "0.51606995", "0.51604253", "0.51584285", "0.51560384", "0.51441103", "0.51348215", "0.51274306", "0.51215357", "0.51186645", "0.5118055", "0.5116466", "0.5103812", "0.50843054", "0.508402", "0.5083535", "0.50780845", "0.5064803", "0.5064657", "0.5063879", "0.50563306", "0.5050476", "0.5043482", "0.5042396" ]
0.0
-1
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
public Request _create_request(Context ctx, String operation, NVList arg_list, NamedValue result, ExceptionList exceptions, ContextList contexts) { throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract org.omg.CORBA.Object read_Object();", "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface BaseObject {\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "void mo3207a(Object obj);", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "BoundObject(){}", "public LocalObject() {}", "OBJECT createOBJECT();", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "public interface StandaloneObject {\n // marker\n}", "void m21807c(Object obj);", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public abstract Object getUnderlyingObject();", "void m21809e(Object obj);", "public Object getObject();", "void m21805a(Object obj);", "public Object getObject() ;", "ObjectRealization createObjectRealization();", "IObjectWrapper mo29837Ca() throws RemoteException;", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "void m21806b(Object obj);", "@Override\n public Object getObject()\n {\n return null;\n }", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "void m21808d(Object obj);", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "public static void objectDemo() {\n\t}", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface DerivedType extends EObject {\r\n}", "void marshal(Object obj);", "Object loadObject() throws Exception;", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "Object getBase();", "protected synchronized boolean isObjectPresent() { return objPresent; }", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "void mo67921a(Object obj);", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "com.google.protobuf2.Any getObject();", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public abstract void mo1184a(Object obj);", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "org.omg.CORBA.Object _duplicate();", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public ObjectReference getObject();", "public org.omg.CORBA.Object read_Object(Class\n clz) {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "private Object setupDefaultPrototype() {\n }", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public NetObject getObject();", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "public T caseClientInterface(ClientInterface object)\n {\n return null;\n }", "public T caseDefNonInertia(DefNonInertia object)\n {\n return null;\n }", "void mo6504by(Object obj);", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "public boolean isObject() {\n return false;\n }", "public abstract Object mo1185b();", "Objet getObjetAlloue();", "public abstract B zzt(Object obj);", "public Object mo27142b(Object obj) throws C3885b {\n if (obj == null || this.f17268a.isInstance(obj)) {\n return obj;\n }\n throw new C3885b(\"Caller [\" + obj + \"] is not a instance of type [\" + this.f17268a + \"]!\");\n }", "public T caseObjectDefinition(ObjectDefinition object) {\n\t\treturn null;\n\t}", "slco.Object getObject2();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "boolean mo10605a(Object obj);", "public Value restrictToNotTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= ~NULL;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() == Kind.FUNCTION || objlabel.getKind() == Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getObjectOrBuilder() {\n return getObject();\n }", "public T caseServerInterface(ServerInterface object)\n {\n return null;\n }", "public void mo1774a(Object obj) {\n }", "public void setObject(XSerial obj);", "public Object _duplicate() {\n throw new NO_IMPLEMENT(reason);\n }", "public ExtensibleObject getNativeObject(SoffidObjectType type, String object1, String object2)\n\t\t\tthrows RemoteException, InternalErrorException {\n\t\treturn null;\n\t}", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }" ]
[ "0.6512437", "0.6478393", "0.6258392", "0.6256161", "0.6205298", "0.615545", "0.6037277", "0.60164344", "0.60033655", "0.592476", "0.59009516", "0.58834183", "0.5774403", "0.576282", "0.57368785", "0.5734551", "0.5731212", "0.57273376", "0.57109666", "0.5699425", "0.56763464", "0.5660393", "0.5657711", "0.56520796", "0.5645662", "0.5636351", "0.5613694", "0.5613389", "0.5610663", "0.5592719", "0.55823636", "0.55772597", "0.55497885", "0.5533799", "0.5532259", "0.55301964", "0.5528035", "0.55213237", "0.55213237", "0.55213237", "0.55213237", "0.5514724", "0.54860866", "0.5473442", "0.54531914", "0.54445195", "0.5440005", "0.5436047", "0.5424157", "0.5422005", "0.54148704", "0.5412472", "0.53841144", "0.53741693", "0.535929", "0.53362066", "0.53308827", "0.53236", "0.5302714", "0.5300525", "0.52889854", "0.52868485", "0.528591", "0.5283675", "0.5278573", "0.52643543", "0.52633697", "0.52424514", "0.5239026", "0.52346355", "0.5226439", "0.5206625", "0.51961166", "0.5195425", "0.51842827", "0.5178458", "0.51697505", "0.51624256", "0.51621854", "0.5159792", "0.5157788", "0.5156837", "0.5144885", "0.5136314", "0.5128429", "0.5122583", "0.5118509", "0.51178586", "0.51146305", "0.5105841", "0.50862014", "0.5084231", "0.5083689", "0.50778204", "0.50659335", "0.50654376", "0.5062635", "0.50564104", "0.5052123", "0.5044501", "0.5042566" ]
0.0
-1
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method.
public Object _get_interface() { throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public abstract org.omg.CORBA.Object read_Object();", "public LocalObject() {}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "void mo3207a(Object obj);", "public interface BaseObject {\n}", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "BoundObject(){}", "void m21807c(Object obj);", "public abstract Object getUnderlyingObject();", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public interface StandaloneObject {\n // marker\n}", "void m21809e(Object obj);", "public Object getObject();", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "OBJECT createOBJECT();", "public Object getObject() ;", "void m21808d(Object obj);", "void m21805a(Object obj);", "ObjectRealization createObjectRealization();", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "void m21806b(Object obj);", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@Override\n public Object getObject()\n {\n return null;\n }", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "IObjectWrapper mo29837Ca() throws RemoteException;", "public static void objectDemo() {\n\t}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "void marshal(Object obj);", "protected synchronized boolean isObjectPresent() { return objPresent; }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "EJBLocalObject getEJBLocalObject() throws IllegalStateException;", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "Object getBase();", "void mo67921a(Object obj);", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface DerivedType extends EObject {\r\n}", "public ObjectReference getObject();", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "void getObject(String globalName) throws RemoteException, NotBoundException, MalformedURLException {\n remoteObject = (GraphInterface) Naming.lookup(globalName);\n }", "public abstract void mo1184a(Object obj);", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "org.omg.CORBA.Object _duplicate();", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "void mo6504by(Object obj);", "public NetObject getObject();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "public interface PersonLocal extends javax.ejb.EJBLocalObject {\r\n\t/**\r\n\t * Get accessor for persistent attribute: password\r\n\t */\r\n\tpublic java.lang.String getPassword();\r\n\t/**\r\n\t * Set accessor for persistent attribute: password\r\n\t */\r\n\tpublic void setPassword(java.lang.String newPassword);\r\n\t/**\r\n\t * Get accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic java.lang.String getFirstName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic void setFirstName(java.lang.String newFirstName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic java.lang.String getLastName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic void setLastName(java.lang.String newLastName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic java.lang.String getEmailAddress();\r\n\t/**\r\n\t * Set accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic void setEmailAddress(java.lang.String newEmailAddress);\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic java.util.Collection getTodo();\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic void setTodo(java.util.Collection aTodo);\r\n\t/**\r\n\t * This is our method to get all todos for one person\r\n\t */\r\n\tpublic java.util.Collection getTodos();\r\n\tpublic boolean isPasswordCorrect(String password);\r\n}", "Object loadObject() throws Exception;", "slco.Object getObject2();", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "private Object setupDefaultPrototype() {\n }", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "com.google.protobuf2.Any getObject();", "public void setObject(XSerial obj);", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public boolean isObject() {\n return false;\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public interface Compromiso_peticionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: tiag_id\n\t */\n\tpublic java.lang.Long getTiag_id();\n\t/**\n\t * Set accessor for persistent attribute: tiag_id\n\t */\n\tpublic void setTiag_id(java.lang.Long newTiag_id);\n\t/**\n\t * Get accessor for persistent attribute: id_rango\n\t */\n\tpublic java.lang.Integer getId_rango();\n\t/**\n\t * Set accessor for persistent attribute: id_rango\n\t */\n\tpublic void setId_rango(java.lang.Integer newId_rango);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic java.lang.String getCodigo_pcom();\n\t/**\n\t * Set accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic void setCodigo_pcom(java.lang.String newCodigo_pcom);\n\t/**\n\t * Get accessor for persistent attribute: dia_especifico\n\t */\n\tpublic java.sql.Timestamp getDia_especifico();\n\t/**\n\t * Set accessor for persistent attribute: dia_especifico\n\t */\n\tpublic void setDia_especifico(java.sql.Timestamp newDia_especifico);\n\t/**\n\t * Get accessor for persistent attribute: id_tecnico\n\t */\n\tpublic java.lang.Long getId_tecnico();\n\t/**\n\t * Set accessor for persistent attribute: id_tecnico\n\t */\n\tpublic void setId_tecnico(java.lang.Long newId_tecnico);\n\t/**\n\t * Get accessor for persistent attribute: user_mac\n\t */\n\tpublic java.lang.String getUser_mac();\n\t/**\n\t * Set accessor for persistent attribute: user_mac\n\t */\n\tpublic void setUser_mac(java.lang.String newUser_mac);\n\t/**\n\t * Get accessor for persistent attribute: hora_desde\n\t */\n\tpublic java.lang.String getHora_desde();\n\t/**\n\t * Set accessor for persistent attribute: hora_desde\n\t */\n\tpublic void setHora_desde(java.lang.String newHora_desde);\n\t/**\n\t * Get accessor for persistent attribute: hora_hasta\n\t */\n\tpublic java.lang.String getHora_hasta();\n\t/**\n\t * Set accessor for persistent attribute: hora_hasta\n\t */\n\tpublic void setHora_hasta(java.lang.String newHora_hasta);\n\t/**\n\t * Get accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic java.lang.String getCodigo_agencia();\n\t/**\n\t * Set accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic void setCodigo_agencia(java.lang.String newCodigo_agencia);\n\t/**\n\t * Get accessor for persistent attribute: estado\n\t */\n\tpublic java.lang.Short getEstado();\n\t/**\n\t * Set accessor for persistent attribute: estado\n\t */\n\tpublic void setEstado(java.lang.Short newEstado);\n\t/**\n\t * Get accessor for persistent attribute: grse_id\n\t */\n\tpublic java.lang.Integer getGrse_id();\n\t/**\n\t * Set accessor for persistent attribute: grse_id\n\t */\n\tpublic void setGrse_id(java.lang.Integer newGrse_id);\n\t/**\n\t * Get accessor for persistent attribute: fecha\n\t */\n\tpublic java.sql.Timestamp getFecha();\n\t/**\n\t * Set accessor for persistent attribute: fecha\n\t */\n\tpublic void setFecha(java.sql.Timestamp newFecha);\n\t/**\n\t * Get accessor for persistent attribute: care_id\n\t */\n\tpublic java.lang.Integer getCare_id();\n\t/**\n\t * Set accessor for persistent attribute: care_id\n\t */\n\tpublic void setCare_id(java.lang.Integer newCare_id);\n\t/**\n\t * Get accessor for persistent attribute: usua_id\n\t */\n\tpublic java.lang.Long getUsua_id();\n\t/**\n\t * Set accessor for persistent attribute: usua_id\n\t */\n\tpublic void setUsua_id(java.lang.Long newUsua_id);\n\t/**\n\t * Get accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic java.lang.Long getId_cita_previa();\n\t/**\n\t * Set accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic void setId_cita_previa(java.lang.Long newId_cita_previa);\n}", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "slco.Object getObject1();", "public abstract Object mo1185b();", "@Override\r\n\tpublic boolean hasObjectOption1(GlobalObject obj) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean hasObjectOption1(GlobalObject obj) {\n\t\treturn false;\r\n\t}", "protected PObject createIndependentObject() {\n return createIndependentObjects(1).get(0);\n }", "public IDfPersistentObject getObject() {\n\t\treturn object;\n\t}", "public void mo1774a(Object obj) {\n }", "Objet getObjetAlloue();", "boolean mo10605a(Object obj);", "public interface FilterFactory extends FilterFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "public abstract Object getObservedObject();", "public void add(RealObject o) throws NullPointerException;", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public java.lang.String getObjectName(){\n return localObjectName;\n }" ]
[ "0.6396029", "0.63822776", "0.61573255", "0.6151376", "0.6089821", "0.6084226", "0.60506654", "0.5898948", "0.5870759", "0.583996", "0.58242613", "0.57854563", "0.57478654", "0.5740336", "0.5731119", "0.56747174", "0.5660005", "0.56570226", "0.5656142", "0.56469774", "0.56428313", "0.5635596", "0.56299734", "0.56219554", "0.55996084", "0.5594829", "0.559249", "0.5587958", "0.55843806", "0.5564244", "0.55240417", "0.5492875", "0.5492875", "0.5492875", "0.5492875", "0.5475471", "0.5474555", "0.5470686", "0.54638016", "0.54308605", "0.54280525", "0.54146063", "0.54059803", "0.5404886", "0.53911436", "0.5371534", "0.5341445", "0.53406924", "0.53116494", "0.5306789", "0.53055245", "0.5304109", "0.52972937", "0.5281999", "0.5279949", "0.5278018", "0.5274605", "0.52618515", "0.52601343", "0.52500224", "0.52393335", "0.5221913", "0.5218018", "0.52063227", "0.52050287", "0.5201766", "0.51975816", "0.51943916", "0.5190378", "0.5186771", "0.5185541", "0.51735234", "0.51576287", "0.5150997", "0.5148068", "0.5147254", "0.5146245", "0.51456016", "0.5131586", "0.5124168", "0.5119572", "0.5119395", "0.5116772", "0.510974", "0.50959355", "0.5085107", "0.50778097", "0.50778097", "0.5062081", "0.50574017", "0.50569874", "0.5050875", "0.50451016", "0.50427526", "0.5042256", "0.5035779", "0.5029145", "0.50267917", "0.50245684", "0.5021749" ]
0.5827664
10
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
public Object _get_interface_def() { // First try to call the delegate implementation class's // "Object get_interface_def(..)" method (will work for JDK1.2 // ORBs). // Else call the delegate implementation class's // "InterfaceDef get_interface(..)" method using reflection // (will work for pre-JDK1.2 ORBs). throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract org.omg.CORBA.Object read_Object();", "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface BaseObject {\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "void mo3207a(Object obj);", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "BoundObject(){}", "public LocalObject() {}", "OBJECT createOBJECT();", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "public interface StandaloneObject {\n // marker\n}", "void m21807c(Object obj);", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public abstract Object getUnderlyingObject();", "void m21809e(Object obj);", "public Object getObject();", "void m21805a(Object obj);", "public Object getObject() ;", "ObjectRealization createObjectRealization();", "IObjectWrapper mo29837Ca() throws RemoteException;", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "void m21806b(Object obj);", "@Override\n public Object getObject()\n {\n return null;\n }", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "void m21808d(Object obj);", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "public static void objectDemo() {\n\t}", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface DerivedType extends EObject {\r\n}", "void marshal(Object obj);", "Object loadObject() throws Exception;", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "Object getBase();", "protected synchronized boolean isObjectPresent() { return objPresent; }", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "void mo67921a(Object obj);", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "com.google.protobuf2.Any getObject();", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public abstract void mo1184a(Object obj);", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "org.omg.CORBA.Object _duplicate();", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public ObjectReference getObject();", "public org.omg.CORBA.Object read_Object(Class\n clz) {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "private Object setupDefaultPrototype() {\n }", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public NetObject getObject();", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "public T caseClientInterface(ClientInterface object)\n {\n return null;\n }", "public T caseDefNonInertia(DefNonInertia object)\n {\n return null;\n }", "void mo6504by(Object obj);", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "public boolean isObject() {\n return false;\n }", "public abstract Object mo1185b();", "Objet getObjetAlloue();", "public abstract B zzt(Object obj);", "public Object mo27142b(Object obj) throws C3885b {\n if (obj == null || this.f17268a.isInstance(obj)) {\n return obj;\n }\n throw new C3885b(\"Caller [\" + obj + \"] is not a instance of type [\" + this.f17268a + \"]!\");\n }", "public T caseObjectDefinition(ObjectDefinition object) {\n\t\treturn null;\n\t}", "slco.Object getObject2();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "boolean mo10605a(Object obj);", "public Value restrictToNotTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= ~NULL;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() == Kind.FUNCTION || objlabel.getKind() == Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getObjectOrBuilder() {\n return getObject();\n }", "public T caseServerInterface(ServerInterface object)\n {\n return null;\n }", "public void mo1774a(Object obj) {\n }", "public void setObject(XSerial obj);", "public Object _duplicate() {\n throw new NO_IMPLEMENT(reason);\n }", "public ExtensibleObject getNativeObject(SoffidObjectType type, String object1, String object2)\n\t\t\tthrows RemoteException, InternalErrorException {\n\t\treturn null;\n\t}", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }" ]
[ "0.6512437", "0.6478393", "0.6258392", "0.6256161", "0.6205298", "0.615545", "0.6037277", "0.60164344", "0.60033655", "0.592476", "0.59009516", "0.58834183", "0.5774403", "0.576282", "0.57368785", "0.5734551", "0.5731212", "0.57273376", "0.57109666", "0.5699425", "0.56763464", "0.5660393", "0.5657711", "0.56520796", "0.5645662", "0.5636351", "0.5613694", "0.5613389", "0.5610663", "0.5592719", "0.55823636", "0.55772597", "0.55497885", "0.5533799", "0.5532259", "0.55301964", "0.5528035", "0.55213237", "0.55213237", "0.55213237", "0.55213237", "0.5514724", "0.54860866", "0.5473442", "0.54531914", "0.54445195", "0.5440005", "0.5436047", "0.5424157", "0.5422005", "0.54148704", "0.5412472", "0.53841144", "0.53741693", "0.535929", "0.53362066", "0.53308827", "0.53236", "0.5302714", "0.5300525", "0.52889854", "0.52868485", "0.528591", "0.5283675", "0.5278573", "0.52643543", "0.52633697", "0.52424514", "0.5239026", "0.52346355", "0.5226439", "0.5206625", "0.51961166", "0.5195425", "0.51842827", "0.5178458", "0.51697505", "0.51624256", "0.51621854", "0.5159792", "0.5157788", "0.5156837", "0.5144885", "0.5136314", "0.5128429", "0.5122583", "0.5118509", "0.51178586", "0.51146305", "0.5105841", "0.50862014", "0.5084231", "0.5083689", "0.50778204", "0.50659335", "0.50654376", "0.5062635", "0.50564104", "0.5052123", "0.5044501", "0.5042566" ]
0.0
-1
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method.
public ORB _orb() { throw new NO_IMPLEMENT(reason); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract org.omg.CORBA.Object read_Object();", "public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface Calculadora extends CalculadoraOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public org.omg.CORBA.ORB orb() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface BaseObject {\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "void mo3207a(Object obj);", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "public interface RegionalRecordManipulator extends RegionalRecordManipulatorOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "BoundObject(){}", "public LocalObject() {}", "OBJECT createOBJECT();", "public interface StockFactory extends StockFactoryOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity\n{\n}", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "public interface StandaloneObject {\n // marker\n}", "void m21807c(Object obj);", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "public interface Ops extends OpsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public abstract Object getUnderlyingObject();", "void m21809e(Object obj);", "public Object getObject();", "void m21805a(Object obj);", "public Object getObject() ;", "ObjectRealization createObjectRealization();", "IObjectWrapper mo29837Ca() throws RemoteException;", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "void m21806b(Object obj);", "@Override\n public Object getObject()\n {\n return null;\n }", "void m21808d(Object obj);", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "JITypeLibImpl(IJIComObject comObject/*, JIRemUnknown unknown*/)\n\t{\n\t\tsuper(comObject);\n\t\t//this.comObject = comObject;\n\t}", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object createObject() {\n return klass.__call__().__tojava__(interfaceType);\n }", "public interface Task extends TaskOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface IPersistentObject extends IGUIDObject {\n\t\n /**\n * Gets a representation of the object.\n * \n * @return the object's state\n */\n IData reify();\n \n /**\n * Initialises the object.\n * \n * @param data the new state\n * @param pid the new PID\n * @param guid the new GUID\n */\n void initialise( IData data, IPID pid, IGUID guid );\n \n /**\n * Records the object's current state.\n * \n * @throws PersistenceException if the object's state could not be recorded\n */\n void persist() throws PersistenceException;\n \n /**\n * Gets the PID referring to the object's most recently recorded persistent state.\n * \n * @return the PID for the object's most recent persistent state\n */\n IPID getPID();\n}", "public static void objectDemo() {\n\t}", "public interface CtoB extends CtoBOperations, TEGApp.baseI, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface TimeOfDay extends TimeOfDayOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface DerivedType extends EObject {\r\n}", "void marshal(Object obj);", "Object loadObject() throws Exception;", "com.google.protobuf2.AnyOrBuilder getObjectOrBuilder();", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "public Cliente(String cpf, Object object, String nome, Object object0, int codCliente) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }", "Object getBase();", "protected synchronized boolean isObjectPresent() { return objPresent; }", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "public interface IDomainObject<T> extends IBasicDomainObject {\n\n Long getId();\n\n String getLabel();\n\n void initLazy();\n\n /**\n * Constant that indicates that the object has no id and is therefore to be ignored. \n */\n public static final Long UNASSIGNED_VALUE = Long.MIN_VALUE;\n public static final Long ROOT_USER_ID = new Long(0);\n}", "void mo67921a(Object obj);", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "com.google.protobuf2.Any getObject();", "@Override @AvailMethod\n\tA_Type o_Kind (\n\t\tfinal AvailObject object)\n\t{\n\t\treturn Types.ANY.o();\n\t}", "public abstract void mo1184a(Object obj);", "void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "org.omg.CORBA.Object _duplicate();", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "@Override\n public boolean isObject() {\n return false;\n }", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public ObjectReference getObject();", "public org.omg.CORBA.Object read_Object(Class\n clz) {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public Object getObject() throws javax.naming.NamingException {\n if (ThreadContext.isValid()) {\n ThreadContext cntx = ThreadContext.getThreadContext();\n byte operation = cntx.getCurrentOperation();\n checkOperation(operation);\n }\n return ref.getObject();\n }", "@java.lang.Override\n public com.google.protobuf2.Any getObject() {\n return object_ == null ? com.google.protobuf2.Any.getDefaultInstance() : object_;\n }", "public interface Activator extends ActivatorOperations, org.omg.CORBA.Object,\n org.omg.CORBA.portable.IDLEntity {}", "private Object setupDefaultPrototype() {\n }", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "public NetObject getObject();", "public T caseClientInterface(ClientInterface object)\n {\n return null;\n }", "public T caseDefNonInertia(DefNonInertia object)\n {\n return null;\n }", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "void mo6504by(Object obj);", "@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "public boolean isObject() {\n return false;\n }", "public abstract Object mo1185b();", "Objet getObjetAlloue();", "public abstract B zzt(Object obj);", "public Object mo27142b(Object obj) throws C3885b {\n if (obj == null || this.f17268a.isInstance(obj)) {\n return obj;\n }\n throw new C3885b(\"Caller [\" + obj + \"] is not a instance of type [\" + this.f17268a + \"]!\");\n }", "public T caseObjectDefinition(ObjectDefinition object) {\n\t\treturn null;\n\t}", "slco.Object getObject2();", "public interface ControlledObjectI extends java.io.Serializable {\n /**\n * Sets the Controller for the object\n */\n public void setController(Controller controller);\n /**\n * Gets the Controller for the object\n */\n public Controller getController();\n public Object getControllerWindow();\n}", "boolean mo10605a(Object obj);", "public Value restrictToNotTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= ~NULL;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() == Kind.FUNCTION || objlabel.getKind() == Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getObjectOrBuilder() {\n return getObject();\n }", "public T caseServerInterface(ServerInterface object)\n {\n return null;\n }", "public void mo1774a(Object obj) {\n }", "public void setObject(XSerial obj);", "public Object _duplicate() {\n throw new NO_IMPLEMENT(reason);\n }", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }", "public ExtensibleObject getNativeObject(SoffidObjectType type, String object1, String object2)\n\t\t\tthrows RemoteException, InternalErrorException {\n\t\treturn null;\n\t}" ]
[ "0.6510526", "0.6477", "0.6257711", "0.62042433", "0.61538386", "0.6038405", "0.60151535", "0.600293", "0.5923568", "0.59007293", "0.58838385", "0.577411", "0.57611656", "0.573652", "0.5732086", "0.57307076", "0.5725131", "0.5711146", "0.5697668", "0.56770754", "0.56593037", "0.5655752", "0.5650006", "0.56468624", "0.5633623", "0.5614143", "0.56105953", "0.56095994", "0.5591058", "0.55816877", "0.55781645", "0.5547799", "0.5532952", "0.5531447", "0.55293274", "0.552572", "0.55185187", "0.55185187", "0.55185187", "0.55185187", "0.551297", "0.54835707", "0.547159", "0.54536855", "0.54427725", "0.5439213", "0.54361916", "0.54244965", "0.5420363", "0.54136914", "0.5412846", "0.5384574", "0.5372325", "0.53585875", "0.5335441", "0.53302205", "0.53243095", "0.5300929", "0.52991337", "0.5290402", "0.5286686", "0.5286437", "0.5281945", "0.5276046", "0.52638704", "0.5263008", "0.5240975", "0.524061", "0.5232686", "0.5224254", "0.52033037", "0.51940745", "0.5193735", "0.5184068", "0.5178232", "0.5166275", "0.5161285", "0.51606995", "0.51604253", "0.51584285", "0.51560384", "0.51441103", "0.51348215", "0.51274306", "0.51215357", "0.51186645", "0.5118055", "0.5116466", "0.5103812", "0.50843054", "0.508402", "0.5083535", "0.50780845", "0.5064803", "0.5064657", "0.5063879", "0.50563306", "0.5050476", "0.5043482", "0.5042396" ]
0.6256765
3